]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Use run_on_main_thread in gdb.post_event
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
21987b9c
TT
12019-11-26 Tom Tromey <tom@tromey.com>
2
3 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
5 gdb_sigmask.
6 * configure, config.in: Rebuild.
7
5e030278
TT
82019-11-26 Tom Tromey <tom@tromey.com>
9
10 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
11 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
12 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
13 * acinclude.m4: Include ax_pthread.m4.
14 * config.in, configure: Rebuild.
15
6d91ce9a
CB
162019-11-26 Christian Biesinger <cbiesinger@google.com>
17
18 * debug.c (debug_set_output): Call safe_strerror instead of
19 strerror.
20 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
21 (linux_kill_one_lwp): Likewise.
22 (linux_detach_one_lwp): Likewise.
23 (linux_wait_for_event_filtered): Likewise.
24 (store_register): Likewise.
25 * lynx-low.c (lynx_attach): Likewise.
26 * mem-break.c (insert_memory_breakpoint): Likewise.
27 (remove_memory_breakpoint): Likewise.
28 (delete_fast_tracepoint_jump): Likewise.
29 (set_fast_tracepoint_jump): Likewise.
30 (uninsert_fast_tracepoint_jumps_at): Likewise.
31 (reinsert_fast_tracepoint_jumps_at): Likewise.
32 * nto-low.c (nto_xfer_memory): Likewise.
33 (nto_resume): Likewise.
34
6cdd651f
LM
352019-11-20 Luis Machado <luis.machado@linaro.org>
36
37 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
38 instead of register count.
39 * tdesc.c (tdesc_contains_feature): New function.
40 * tdesc.h (tdesc_contains_feature): New prototype.
41
cd850b40
CB
422019-11-15 Christian Biesinger <cbiesinger@google.com>
43
44 * Makefile.in: Add safe-strerror.c.
45 * configure: Regenerate.
46 * configure.ac: Don't source common.host.
47
5abebf3c
CB
482019-11-15 Christian Biesinger <cbiesinger@google.com>
49
50 * config.in: Regenerate.
51 * configure: Regenerate.
52
e06f3d6e
AB
532019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
54
55 * ax.c (ax_printf): Handle size_t_arg.
56
ca3a04f6
CB
572019-11-06 Christian Biesinger <cbiesinger@google.com>
58
59 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
60 * mi/mi-main.c (output_cores): Likewise.
61 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
62 (linux_xfer_osdata_modules): Likewise.
63 * remote.c (register_remote_support_xml): Likewise.
64 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
65 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
66
e48f6033
CB
672019-11-01 Christian Biesinger <cbiesinger@google.com>
68
69 * configure: Regenerate.
70 * configure.ac: Remove check for strerror_r.
71
e7e97a2e
CB
722019-10-31 Christian Biesinger <cbiesinger@google.com>
73
74 * config.in: Regenerate.
75 * configure: Regenerate.
76 * configure.ac: Also check for strerror_r.
77
75cafaa6
CB
782019-10-31 Christian Biesinger <cbiesinger@google.com>
79
80 * ax.h (debug_agent): Remove duplicate declaration.
81
30baf67b
TV
822019-10-26 Tom de Vries <tdevries@suse.de>
83
84 * linux-aarch64-low.c: Fix typos in comments.
85 * linux-arm-low.c: Same.
86 * linux-low.c: Same.
87 * linux-ppc-low.c: Same.
88 * proc-service.c: Same.
89 * regcache.h: Same.
90 * server.c: Same.
91 * tracepoint.c: Same.
92 * win32-low.c: Same.
93
52c64cf7
TT
942019-10-25 Tom Tromey <tromey@adacore.com>
95
96 * utils.c (xstrdup): Remove.
97
c12d372d
TT
982019-10-23 Tom Tromey <tom@tromey.com>
99
100 * configure, config.in: Rebuild.
101
4d0b984b
TT
1022019-10-23 Tom Tromey <tom@tromey.com>
103
104 * configure: Rebuild.
105 * acinclude.m4: Use m4_include, not sinclude.
106
c5adaa19
TT
1072019-10-17 Tom Tromey <tromey@adacore.com>
108
109 * configure: Rebuild.
110 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
111 in AC_CONFIG_FILES invocation.
112 * Makefile.in (stamp-h, Makefile): Use new-style config.status
113 invocation.
114
fec4e896
CB
1152019-10-16 Christian Biesinger <cbiesinger@google.com>
116
117 * server.c: Include xml-builtin.h.
118 (get_xml_features): Don't declare xml_builtins here.
119
00975ff6
AB
1202019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
121
122 * Makefile.in: Remove references to vec-ipa.o.
123
0dc32745
AB
1242019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
125
126 * Makefile.in: Remove references to vec.c.
127
3e6ec53a
CB
1282019-10-02 Christian Biesinger <cbiesinger@google.com>
129
130 * server.c (server_waiting): Change to bool.
131 (extended_protocol): Likewise.
132 (response_needed): Likewise.
133 (exit_requested): Likewise.
134 (run_once): Likewise.
135 (report_no_resumed): Likewise.
136 (non_stop): Likewise.
137 (disable_packet_vCont): Likewise.
138 (disable_packet_Tthread): Likewise.
139 (disable_packet_qC): Likewise.
140 (disable_packet_qfThreadInfo): Likewise.
141 (handle_general_set): Update.
142 (handle_detach): Update.
143 (handle_monitor_command): Update.
144 (handle_query): Update.
145 (captured_main): Update.
146 (process_serial_event): Update.
147 * server.h (server_waiting): Change to bool.
148 (disable_packet_vCont): Likewise.
149 (disable_packet_Tthread): Likewise.
150 (disable_packet_qC): Likewise.
151 (disable_packet_qfThreadInfo): Likewise.
152 (run_once): Likewise.
153 (non_stop): Likewise.
154 * target.c (target_stop_and_wait): Update.
155
80fd2826
TT
1562019-10-02 Tom Tromey <tromey@adacore.com>
157
158 * Makefile.in (SFILES): Add common-inferior.c.
159 (OBS): Add common-inferior.o.
160 * server.c (startup_with_shell): Don't define.
161
46f29a9a
AB
1622019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
163
164 * linux-low.c (linux_low_read_btrace): Update for change to
165 std::vector.
166
f9d949fb
CB
1672019-09-20 Christian Biesinger <cbiesinger@google.com>
168
169 * debug.c (debug_threads): Remove comment in favor of the header.
170 * debug.h (using_threads): Add declaration.
171 (debug_threads): Add comment.
172 * linux-aarch64-low.c: Include debug.h and remove declaration of
173 debug_threads.
174 * nto-low.c: Likewise.
175 * remote-utils.c: Likewise.
176 * thread-db.c: Likewise.
177
abf516c6
UW
1782019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
179
180 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
181 and powerpc-cell64l-ipa.o.
182 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
183 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
184 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
185 (spu*-*-*): Remove.
186
187 * spu-low.c: Remove file.
188
189 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
190 (parse_spufs_run): Remove.
191 (ppc_get_pc): Remove Cell/B.E. support.
192 (ppc_set_pc): Likewise.
193 (ppc_breakpoint_at): Likewise.
194 (ppc_arch_setup): Likewise.
195 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
196 tdesc_powerpc_cell32l.
197 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
198 or init_registers_powerpc_cell32l.
199 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
200 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
201 or init_registers_powerpc_cell32l.
202 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
203 (init_registers_powerpc_cell32l): Remove prototype.
204 (init_registers_powerpc_cell64l): Likewise.
205
206 * target.h (struct target_ops): Remove qxfer_spu member.
207 * server.c (handle_qxfer_spu): Remove.
208 (qxfer_packets): Remove entry for "spu".
209 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
210 * linux-low.c (SPUFS_MAGIC): Remove.
211 (spu_enumerate_spu_ids): Remove.
212 (linux_qxfer_spu): Remove.
213 (linux_target_ops): Remove qxfer_spu member.
214 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
215 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
216 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
217
2d41fa11
SDJ
2182019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
219
220 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
221 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
222 * config.in: Regenerate.
223 * configure: Regenerate.
224
d59b55f0
TT
2252019-08-15 Tom Tromey <tromey@adacore.com>
226
227 * target.c (target_write_memory): Use gdb::byte_vector.
228
4196ab2a
TT
2292019-08-15 Tom Tromey <tromey@adacore.com>
230
231 * tracepoint.c (write_inferior_data_pointer)
232 (write_inferior_integer, write_inferior_int8)
233 (write_inferior_uinteger, m_tracepoint_action_download)
234 (r_tracepoint_action_download, x_tracepoint_action_download)
235 (l_tracepoint_action_download, clear_inferior_trace_buffer)
236 (download_agent_expr, download_tracepoint_1)
237 (download_trace_state_variables, upload_fast_traceframes): Update.
238 * server.c (gdb_write_memory): Update.
239 * remote-utils.c (relocate_instruction): Update.
240 * proc-service.c (ps_pdwrite): Update.
241 * mem-break.c (remove_memory_breakpoint)
242 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
243 (uninsert_fast_tracepoint_jumps_at)
244 (reinsert_fast_tracepoint_jumps_at): Update.
245 * linux-x86-low.c (append_insns)
246 (i386_install_fast_tracepoint_jump_pad)
247 (amd64_write_goto_address, i386_write_goto_address): Update.
248 * linux-s390-low.c (append_insns, s390_write_goto_address):
249 Update.
250 * linux-ppc-low.c (ppc_relocate_instruction)
251 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
252 (ppc_write_goto_address): Update.
253 * linux-aarch64-low.c (append_insns): Update.
254 * target.h (struct target_ops): Update.
255 (write_inferior_memory): Don't declare.
256 * target.c (target_write_memory): Rename from
257 write_inferior_memory. Remove old target_write_memory.
258
c6778d00
TT
2592019-08-15 Tom Tromey <tromey@adacore.com>
260
261 * target.c (write_inferior_memory): Use std::vector.
262
404f2902
FCE
2632019-08-06 Frank Ch. Eigler <fche@redhat.com>
264
265 PR build/24886
266 * configure.ac: Drop enable-libmcheck support.
267 * configure, config.in: Rebuild.
268 * acinclude.m4: Don't include it.
269
4c5aa8e0
AH
2702019-07-19 Alan Hayward <alan.hayward@arm.com>
271
272 * configure.srv: Remove Arm xml files.
273
7cc17433
AH
2742019-07-19 Alan Hayward <alan.hayward@arm.com>
275
276 * configure.srv: Add new files. Remove xml generated files.
277 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
278 registers.
279 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
280 * linux-aarch32-tdesc.c: New file.
281 * linux-aarch32-tdesc.h: New file.
282 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
283 * linux-arm-low.c (init_registers_arm, tdesc_arm)
284 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
285 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
286 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
287 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
288 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
289 (arm_read_description): Call arm_linux_read_description.
290 (initialize_low_arch): Don't init registers.
291 * linux-arm-tdesc.c: New file.
292 * linux-arm-tdesc.h: New file.
293
166a82be
AH
2942019-07-10 Alan Hayward <alan.hayward@arm.com>
295
296 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
297 Move counter inside for.
298 (arm_read_description): Check ptrace earlier.
299 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
300
268a13a5
TT
3012019-07-09 Tom Tromey <tom@tromey.com>
302
303 * configure: Rebuild.
304 * configure.ac: Change common to gdbsupport.
305 * acinclude.m4: Change common to gdbsupport.
306 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
307 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
308 common to gdbsupport.
309 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
310 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
311 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
312 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
313 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
314 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
315 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
316 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
317 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
318 common to gdbsupport.
319
350fab54
AH
3202019-07-04 Alan Hayward <alan.hayward@arm.com>
321
322 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
323 defines.
324 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
325
2b40fda7
AH
3262019-07-04 Alan Hayward <alan.hayward@arm.com>
327
328 * configure.srv: Remove legacy xml.
329 * linux-aarch64-low.c (initialize_low_arch): Remove
330 initialize_low_tdesc call.
331 * linux-aarch64-tdesc-selftest.c: Remove file.
332 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
333 * linux-x86-low.c (initialize_low_arch): Remove
334 initialize_low_tdesc call.
335 * linux-x86-tdesc-selftest.c: Remove file.
336 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
337
7d10623d
TV
3382019-06-20 Tom de Vries <tdevries@suse.de>
339
340 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
341 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
342
8d6a48df
TV
3432019-06-19 Tom de Vries <tdevries@suse.de>
344
345 * debug.h (debug_write): Change return type to ssize_t.
346 * debug.c (debug_write): Same.
347
73cc7272
TT
3482019-06-14 Tom Tromey <tom@tromey.com>
349
350 * configure.ac: Use new path to gnulib.
351 * configure: Rebuild.
352 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
353 to gnulib.
354
08f10e02
TT
3552019-06-11 Tom Tromey <tom@tromey.com>
356
357 * Makefile.in (SFILES): Add alloc.c.
358 (OBS): Add alloc.o.
359 (IPA_OBJS): Add alloc-ipa.o.
360 (alloc-ipa.o): New target.
361 (%.o: ../%.c): New pattern rule.
362
422186a9
TT
3632019-06-10 Tom Tromey <tromey@adacore.com>
364
365 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
366 end warning with a newline.
367 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
368 newline.
369 * thread-db.c (attach_thread): Don't end warning with a newline.
370 (thread_db_notice_clone): Likewise.
371 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
372 newline.
373 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
374 end warning with a newline.
375
b02f78f9
PA
3762019-06-04 Pedro Alves <palves@redhat.com>
377
378 * server.c (captured_main): Use make_unique_xstrdup.
379
88ed7edb
TT
3802019-06-02 Tom Tromey <tom@tromey.com>
381
382 * gdbreplay.c (fromhex): Remove.
383 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
384
33a6bc35
TT
3852019-05-29 Tom Tromey <tromey@adacore.com>
386
387 * configure: Rebuild.
388
e90a813d
KB
3892019-05-06 Kevin Buettner <kevinb@redhat.com>
390
391 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
392 sign extension code on 32-bit builds.
393
353ea2d1
EZ
3942019-05-03 Eli Zaretskii <eliz@gnu.org>
395
396 * remote-utils.c:
397 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
398
b494cdff
TT
3992019-04-19 Tom Tromey <tom@tromey.com>
400
401 * server.c (struct vstop_notif): Derive from notif_event.
402 <base>: Remove.
403 (queue_stop_reply): Update.
404 (remove_all_on_match_ptid): Change type. Rewrite.
405 (discard_queued_stop_replies): Rewrite.
406 (in_queued_stop_replies_ptid): Change type.
407 (in_queued_stop_replies): Rewrite.
408 (notif_stop): Update.
409 (queue_stop_reply_callback): Update.
410 (captured_main): Don't call initialize_notif.
411 (push_stop_notification): Update.
412 * notif.c (notif_write_event, handle_notif_ack)
413 (notif_event_enque, notif_push): Update.
414 (notif_event_xfree, initialize_notif): Remove.
415 * notif.h (struct notif_event): Include <list>, not
416 "common/queue.h".
417 (struct notif_server) <queue>: Now a std::list.
418 (notif_event_p): Remove typedef.
419 (initialize_notif): Don't declare.
420 (struct notif_event): Add virtual destructor.
421
a7e559cc
AH
4222019-04-17 Alan Hayward <alan.hayward@arm.com>
423
424 * ax.c (ax_vdebug): Call debug_printf.
425 * debug.c (debug_write): New function.
426 * debug.h (debug_write): New declaration.
427 * linux-low.c (sigchld_handler): Call debug_write.
428
aeb2e706
AH
4292019-04-17 Alan Hayward <alan.hayward@arm.com>
430
431 * debug.c (debug_set_output): New function.
432 (debug_vprintf): Send output to debug_file.
433 (debug_flush): Likewise.
434 * debug.h (debug_set_output): New declaration.
435 * server.c (handle_monitor_command): Add debug-file option.
436 (captured_main): Likewise.
437
c1bc0935
AH
4382019-04-17 Alan Hayward <alan.hayward@arm.com>
439
440 * debug.c (remote_debug): Add definition.
441 * debug.h (remote_debug): Add declaration.
442 * hostio.c (remote_debug): Remove declaration.
443 * remote-utils.c (struct ui_file): Likewise.
444 (remote_debug): Likewise.
445 * remote-utils.h (remote_debug): Likewise,
446 * server.c (remote_debug): Remove definition.
447
3f52fdbc
KB
4482019-04-10 Kevin Buettner <kevinb@redhat.com>
449
450 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
451 when using a 64-bit gdbserver.
452
b0319eaa
TT
4532019-04-09 Tom Tromey <tromey@adacore.com>
454
455 * linux-low.c (select_event_lwp): Use find_thread_in_random.
456
eedc3f4f
TT
4572019-04-08 Tom Tromey <tom@tromey.com>
458
459 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
460 throw.
461 (linux_resume_one_lwp): Likewise.
462
230d2906
TT
4632019-04-08 Tom Tromey <tom@tromey.com>
464
465 * gdbreplay.c: Update.
466 * linux-low.c: Update.
467 * server.c: Update.
468
a70b8144
TT
4692019-04-08 Tom Tromey <tom@tromey.com>
470
471 * server.c: Use C++ exception handling.
472 * linux-low.c: Use C++ exception handling.
473 * gdbreplay.c: Use C++ exception handling.
474
3d6e9d23
TT
4752019-04-08 Tom Tromey <tom@tromey.com>
476
477 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
478 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
479 (captured_main, main): Update.
480 * gdbreplay.c (main): Update.
481
0570503d
PFC
4822019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
483
484 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
485 value in argument pointer, return 1 if the entry is found and 0
486 otherwise. Move comment.
487 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
488 * linux-low.h (linux_get_auxv): Declare.
489 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
490
227a9e65
TT
4912019-04-05 Tom Tromey <tromey@adacore.com>
492
493 * server.c (gdbserver_usage): Use upper-case for metasyntactic
494 variables.
495
69f4c9cc
AH
4962019-03-28 Alan Hayward <alan.hayward@arm.com>
497
498 * linux-low.c (AT_HWCAP2): Add define if not already included.
499
974c89e0
AH
5002019-03-26 Alan Hayward <alan.hayward@arm.com>
501
502 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
503 (aarch64_arch_setup): Call linux_get_hwcap.
504 * linux-arm-low.c (arm_get_hwcap): Remove function.
505 (arm_read_description): Call linux_get_hwcap.
506 * linux-low.c (linux_get_auxv): New function.
507 (linux_get_hwcap): Likewise.
508 (linux_get_hwcap2): Likewise.
509 * linux-low.h (linux_get_hwcap): New declaration.
510 (linux_get_hwcap2): Likewise.
511 * linux-ppc-low.c (ppc_get_auxv): Remove function.
512 (ppc_arch_setup): Call linux_get_hwcap.
513 * linux-s390-low.c (s390_get_hwcap): Remove function.
514 (s390_arch_setup): Call linux_get_hwcap.
515
1ef53e6b
AH
5162019-03-22 Alan Hayward <alan.hayward@arm.com>
517 Jiong Wang <jiong.wang@arm.com>
518
519 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
520 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
521 to fail.
522 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
523
ee4fbcfa
AH
5242019-03-22 Alan Hayward <alan.hayward@arm.com>
525 Jiong Wang <jiong.wang@arm.com>
526
527 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
528 (aarch64_get_hwcap): New function.
529 (aarch64_arch_setup): Read APIA hwcap.
530
6dc0ebde
AH
5312019-03-22 Alan Hayward <alan.hayward@arm.com>
532 Jiong Wang <jiong.wang@arm.com>
533
534 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
535 (initialize_low_tracepoint): Likewise.
536 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
537 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
538 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
539 (aarch64_linux_read_description): Likewise.
540 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
541
1163a4b7
JB
5422019-03-12 John Baldwin <jhb@FreeBSD.org>
543
544 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
545 i386_create_target_description for 'segments' parameter.
546 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
547 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
548 * win32-i386-low.c (i386_arch_setup): Likewise.
549
d3a70e03
TT
5502019-03-12 Tom Tromey <tromey@adacore.com>
551
552 * linux-low.c (iterate_over_lwps): Update.
553
37991b4f
TT
5542019-03-06 Tom Tromey <tom@tromey.com>
555
556 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
557 (captured_main): Use SCOPE_EXIT.
558
45950eb6
SDJ
5592019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
560
561 * configure.srv: Use '$enable_unittest' instead of '$development'
562 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
563 case.
564
43ac54fc
TT
5652019-02-27 Tom Tromey <tromey@adacore.com>
566
567 * gdbreplay.c (logchar): Handle \r\n.
568
df0da8a2
AH
5692019-02-07 Alan Hayward <alan.hayward@arm.com>
570
571 * linux-low.c (linux_attach): Add process before lwp.
572 * server.c (attach_inferior): Check if already attached.
573
1a5c2598
TT
5742019-02-07 Tom Tromey <tom@tromey.com>
575
576 * x86-tdesc.h: Rename include guard.
577 * x86-low.h: Add include guard.
578 * wincecompat.h: Rename include guard.
579 * win32-low.h: Add include guard.
580 * utils.h: Rename include guard.
581 * tracepoint.h: Rename include guard.
582 * tdesc.h: Rename include guard.
583 * target.h: Rename include guard.
584 * server.h: Rename include guard.
585 * remote-utils.h: Rename include guard.
586 * regcache.h: Rename include guard.
587 * nto-low.h: Rename include guard.
588 * notif.h: Add include guard.
589 * mem-break.h: Rename include guard.
590 * lynx-low.h: Add include guard.
591 * linux-x86-tdesc.h: Add include guard.
592 * linux-s390-tdesc.h: Add include guard.
593 * linux-ppc-tdesc-init.h: Add include guard.
594 * linux-low.h: Add include guard.
595 * linux-aarch64-tdesc.h: Add include guard.
596 * linux-aarch32-low.h: Add include guard.
597 * inferiors.h: Rename include guard.
598 * i387-fp.h: Rename include guard.
599 * hostio.h: Rename include guard.
600 * gdbthread.h: Rename include guard.
601 * gdb_proc_service.h: Rename include guard.
602 * event-loop.h: Rename include guard.
603 * dll.h: Rename include guard.
604 * debug.h: Rename include guard.
605 * ax.h: Rename include guard.
606
956cc47c
SN
6072018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
608
609 PR gdb/23985
610 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
611 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
612
a0707f3c
TT
6132019-01-25 Tom Tromey <tom@tromey.com>
614
615 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
616
0747795c
TT
6172019-01-25 Tom Tromey <tom@tromey.com>
618
619 * win32-low.c: Fix common/ includes.
620 * win32-i386-low.c: Fix common/ includes.
621 * tracepoint.c: Fix common/ includes.
622 * thread-db.c: Fix common/ includes.
623 * target.h: Fix common/ includes.
624 * symbol.c: Fix common/ includes.
625 * spu-low.c: Fix common/ includes.
626 * server.h: Fix common/ includes.
627 * server.c: Fix common/ includes.
628 * remote-utils.c: Fix common/ includes.
629 * regcache.h: Fix common/ includes.
630 * regcache.c: Fix common/ includes.
631 * nto-x86-low.c: Fix common/ includes.
632 * notif.h: Fix common/ includes.
633 * mem-break.h: Fix common/ includes.
634 * lynx-low.c: Fix common/ includes.
635 * lynx-i386-low.c: Fix common/ includes.
636 * linux-x86-tdesc-selftest.c: Fix common/ includes.
637 * linux-x86-low.c: Fix common/ includes.
638 * linux-low.c: Fix common/ includes.
639 * inferiors.h: Fix common/ includes.
640 * i387-fp.c: Fix common/ includes.
641 * hostio.c: Fix common/ includes.
642 * hostio-errno.c: Fix common/ includes.
643 * gdbthread.h: Fix common/ includes.
644 * gdbreplay.c: Fix common/ includes.
645 * fork-child.c: Fix common/ includes.
646 * event-loop.c: Fix common/ includes.
647 * ax.c:
648 (enum gdb_agent_op): Fix common/ includes.
649
be6d4f74
TT
6502019-01-21 Tom Tromey <tom@tromey.com>
651
652 * tracepoint.c: Fix includes.
653 * remote-utils.c: Fix includes.
654 * linux-x86-low.c: Fix includes.
655
66d91b39
JB
6562019-01-01 Joel Brobecker <brobecker@adacore.com>
657
658 * gdbreplay.c (gdbreplay_version): Update copyright year in
659 version message.
660 * server.c (gdbserver_version): Likewise.
661
754e3168
AH
6622018-12-05 Alan Hayward <alan.hayward@arm.com>
663
664 * linux-low.c (add_lwp): Switch ordering.
665
d105de22
TT
6662018-11-29 Tom Tromey <tom@tromey.com>
667
668 * win32-low.c (win32_join): Take pid, not process.
669 * target.h (struct target_ops) <join>: Change argument type.
670 (join_inferior): Change argument name.
671 * spu-low.c (spu_join): Take pid, not process.
672 * server.c (handle_detach): Preserve pid before destroying
673 process.
674 * lynx-low.c (lynx_join): Take pid, not process.
675 * linux-low.c (linux_join): Take pid, not process.
676
50138245
AH
6772018-11-23 Alan Hayward <alan.hayward@arm.com>
678
679 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
680 (aarch64_cannot_fetch_register): Likewise.
681 (struct linux_target_ops): Update references.
682
64f57f3d
PFC
6832018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
684
685 * linux-ppc-low.c: Include nat/linux-ptrace.h.
686
8d619c01
EBM
6872018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
688
689 * configure.srv (ipa_ppc_linux_regobj): Add
690 powerpc-isa207-htm-vsx32l-ipa.o and
691 powerpc-isa207-htm-vsx64l-ipa.o.
692 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
693 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
694 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
695 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
696 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
697 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
698 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
699 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
700 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
701 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
702 (init_registers_powerpc_isa207_htm_vsx32l)
703 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
704 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
705 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
706 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
707 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
708 (ppc_store_tm_ctarregset): New functions.
709 (ppc_regsets): Add entries for HTM regsets.
710 (ppc_arch_setup): Set htm in features struct when needed. Set
711 sizes for the HTM regsets.
712 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
713 (initialize_low_arch): Call
714 init_registers_powerpc_isa207_htm_vsx32l and
715 init_registers_powerpc_isa207_htm_vsx64l.
716 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
717 PPC_TDESC_ISA207_HTM_VSX.
718 (initialize_low_tracepoint): Call
719 init_registers_powerpc_isa207_htm_vsx32l and
720 init_registers_powerpc_isa207_htm_vsx64l.
721
232bfb86
EBM
7222018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
723
724 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
725 rs6000/power-linux-pmu.xml to srv_xmlfiles.
726 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
727 (ppc_store_pmuregset): New functions.
728 (ppc_regsets): Add entries for ebb and pmu regsets.
729 (ppc_arch_setup): Set isa207 in features struct if the ebb and
730 pmu regsets are available. Set sizes for these regsets.
731
f2cf6173
EBM
7322018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
733
734 * configure.srv (ipa_ppc_linux_regobj): Add
735 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
736 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
737 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
738 rs6000/powerpc-isa207-vsx32l.xml, and
739 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
740 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
741 <PPC_TDESC_ISA207_VSX>: New enum value.
742 (init_registers_powerpc_isa207_vsx32l): Declare.
743 (init_registers_powerpc_isa207_vsx64l): Declare.
744 * linux-ppc-low.c (ppc_fill_tarregset): New function.
745 (ppc_store_tarregset): New function.
746 (ppc_regsets): Add entry for the TAR regset.
747 (ppc_arch_setup): Set isa207 in features struct when needed. Set
748 size for the TAR regsets.
749 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
750 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
751 and init_registers_powerpc_isa207_vsx64l.
752 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
753 (initialize_low_tracepoint): Call
754 init_registers_powerpc_isa207_vsx32l and
755 init_registers_powerpc_isa207_vsx64l.
756
7ca18ed6
EBM
7572018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
758 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
759
760 * configure.srv (ipa_ppc_linux_regobj): Add
761 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
762 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
763 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
764 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
765 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
766 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
767 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
768 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
769 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
770 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
771 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
772 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
773 (ppc_hwcap): Add comment.
774 (ppc_hwcap2): New global.
775 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
776 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
777 (ppc_regsets): Add entries for the DSCR and PPR regsets.
778 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
779 when needed. Set sizes for the the DSCR and PPR regsets.
780 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
781 (initialize_low_arch): Call
782 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
783 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
784 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
785 PPC_TDESC_ISA205_PPR_DSCR_VSX.
786 (initialize_low_tracepoint): Call
787 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
788 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
789
5c849b22
PFC
7902018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
791
792 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
793
8ecfd7bd
SDJ
7942018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
795 Simon Marchi <simark@simark.ca>
796
797 * acinclude.m4: Include "../selftest.m4".
798 * configure: Regenerate.
799 * configure.ac: Use "GDB_AC_SELFTEST".
800 * configure.srv: Use "$enable_unittests" instead of
801 "$development" when checking whether unit tests have been
802 enabled.
803 * server.c (captured_main): Update message informing that
804 selftests have been disabled.
805
96643e35
TT
8062018-10-04 Tom Tromey <tom@tromey.com>
807
808 * configure: Rebuild.
809
da4ae14a
TT
8102018-10-04 Tom Tromey <tom@tromey.com>
811
812 * server.c (handle_status): Rename inner "thread".
813 (process_serial_event): Declare "res" in 'm' case.
814 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
815 (iterate_over_lwps): Rename inner "thread".
816 (linux_qxfer_libraries_svr4): Rename inner "len".
817 * gdbthread.h (find_thread_in_random): Rename inner "thread".
818
7c619dbd
GB
8192018-10-01 Gary Benson <gbenson@redhat.com>
820
821 * gdb_proc_service.h: Moved common code to
822 common/gdb_proc_service.h.
823
3795e814
GB
8242018-10-01 Gary Benson <gbenson@redhat.com>
825
826 * gdb_proc_service.h: Synchronize comments and whitespace with
827 GDB's version of this file.
828
49b036f1
TT
8292018-09-25 Tom Tromey <tom@tromey.com>
830
831 * configure: Rebuild.
832 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
833
8ff03f0b
SM
8342018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
835
836 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
837 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
838 ($(IPA_LIB)): Sort IPA_OBJS.
839
a1cd91dc
SM
8402018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
841
842 * Makefile.in: Remove references to $(ADD_DEPS).
843
752312ba
TT
8442018-09-16 Tom Tromey <tom@tromey.com>
845
846 * remote-utils.c (remote_open): Use GNU style for metasyntactic
847 variables.
848 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
849 variables.
850
f1628857
TT
8512018-09-05 Tom Tromey <tom@tromey.com>
852
853 * configure: Rebuild.
854
ad202fcc
SM
8552018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
856
857 PR build/23399
858 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
859
d3d8724a
TT
8602018-08-27 Tom Tromey <tom@tromey.com>
861
862 PR build/23087:
863 * configure: Rebuild.
864
b4f183d2
TT
8652018-08-27 Tom Tromey <tom@tromey.com>
866
867 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
868 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
869 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
870 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
871 (s390x_emit_stack_adjust): Add casts to unsigned char.
872
4e2aa472
SM
8732018-08-22 Simon Marchi <simon.marchi@ericsson.com>
874
875 PR gdb/23374
876 PR gdb/23375
877 * server.h (struct client_state) <disable_randomization>:
878 Initialize to 1.
879
cf4088a9
SM
8802018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
881
882 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
883 variable.
884 (mips_supply_ptrace_register): Likewise.
885
a0de763e
TT
8862018-07-22 Tom Tromey <tom@tromey.com>
887
888 * configure: Rebuild.
889
b0a7723d
TT
8902018-07-22 Tom Tromey <tom@tromey.com>
891
892 * win32-low.c (win32_create_inferior): Remove unused variables.
893 * gdbreplay.c (remote_open): Remove unused variable.
894 * remote-utils.c (remote_prepare): Remove unused variable.
895 * x86-tdesc.h (X86_TDESC_H): Define.
896 (amd64_expedite_regs): Define conditionally.
897 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
898 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
899 * remote-utils.c (readchar): Remove unused variable.
900
a780ef4f
PA
9012018-07-13 Pedro Alves <palves@redhat.com>
902
903 * linux-low.c (linux_kill): Change parameter to process_info
904 pointer instead of pid. Adjust.
905 * lynx-low.c (lynx_kill): Likewise.
906 * nto-low.c (nto_kill): Likewise.
907 * spu-low.c (spu_kill): Likewise.
908 * win32-low.c (win32_kill): Likewise.
909 * server.c (handle_v_kill, kill_inferior_callback)
910 (detach_or_kill_for_exit): Adjust.
911 * target.c (kill_inferior): Change parameter to process_info
912 pointer instead of pid. Adjust.
913 * target.h (struct target_ops) <kill>: Change parameter to
914 process_info pointer instead of pid. Adjust all implementations
915 and callers.
916 (kill_inferior): Likewise.
917
ef2ddb33
PA
9182018-07-13 Pedro Alves <palves@redhat.com>
919
920 * linux-low.c (linux_detach, linux_join): Change parameter to
921 process_info pointer instead of pid. Adjust.
922 * lynx-low.c (lynx_detach, lynx_join): Likewise.
923 * nto-low.c (nto_detach): Likewise.
924 * spu-low.c (spu_detach, spu_join): Likewise.
925 * win32-low.c (win32_detach, win32_join): Likewise.
926 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
927 * target.h (struct target_ops) <detach, join>: Change parameter to
928 process_info pointer instead of pid. Adjust all implementations
929 and callers.
930 (detach_inferior, join_inferior): Rename 'pid' parameter to
931 'proc'.
932
c7ab0aef
SDJ
9332018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
934 Jan Kratochvil <jan.kratochvil@redhat.com>
935 Paul Fertser <fercerpav@gmail.com>
936 Tsutomu Seki <sekiriki@gmail.com>
937
938 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
939 (OBS): Add 'common/netstuff.o'.
940 (GDBREPLAY_OBS): Likewise.
941 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
942 (remote_open): Implement support for IPv6
943 connections.
944 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
945 and 'wspiapi.h'.
946 (handle_accept_event): Accept connections from IPv6 sources.
947 (remote_prepare): Handle IPv6-style hostnames; implement
948 support for IPv6 connections.
949 (remote_open): Implement support for printing connections from
950 IPv6 sources.
951
31445d10
PA
9522018-07-11 Pedro Alves <palves@redhat.com>
953
954 PR gdb/23377
955 * mem-break.c (any_persistent_commands): Add process_info
956 parameter and use it instead of relying on the current process.
957 Change return type to bool.
958 * mem-break.h (any_persistent_commands): Add process_info
959 parameter and change return type to bool.
960 * server.c (handle_detach): Remove require_running_or_return call.
961 Look up the process_info for the process we're about to detach.
962 If not found, return back error to GDB. Adjust
963 any_persistent_commands call to pass down a process pointer.
964
cb197132
PA
9652018-07-11 Pedro Alves <palves@redhat.com>
966
967 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
968 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
969 instead of collect_register_by_name.
970 * regcache.c (regcache_raw_get_unsigned_by_name): New.
971 * regcache.h (regcache_raw_get_unsigned_by_name): New.
972
1b919490
VB
9732018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
974 Pedro Alves <palves@redhat.com>
975
976 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
977
d7e15655
TT
9782018-07-03 Tom Tromey <tom@tromey.com>
979
980 * linux-low.c: Update.
981 * lynx-low.c: Update.
982 * mem-break.c: Update.
983 * nto-low.c: Update.
984 * remote-utils.c: Update.
985 * server.c: Update.
986 * spu-low.c: Update.
987 * target.c: Update.
988 * win32-low.c: Update.
989
26a57c92
TT
9902018-07-03 Tom Tromey <tom@tromey.com>
991
992 * server.c: Update.
993
0e998d96
TT
9942018-07-03 Tom Tromey <tom@tromey.com>
995
996 * linux-low.c: Update.
997
cc6bcb54
TT
9982018-07-03 Tom Tromey <tom@tromey.com>
999
1000 * target.c: Update.
1001
e38504b3
TT
10022018-07-03 Tom Tromey <tom@tromey.com>
1003
1004 * linux-low.c: Update.
1005 * linux-mips-low.c: Update.
1006 * lynx-low.c: Update.
1007 * nto-low.c: Update.
1008 * remote-utils.c: Update.
1009 * server.c: Update.
1010 * spu-low.c: Update.
1011 * target.c: Update.
1012 * thread-db.c: Update.
1013
e99b03dc
TT
10142018-07-03 Tom Tromey <tom@tromey.com>
1015
1016 * linux-low.c: Update.
1017 * linux-mips-low.c: Update.
1018 * lynx-low.c: Update.
1019 * mem-break.c: Update.
1020 * nto-low.c: Update.
1021 * remote-utils.c: Update.
1022 * server.c: Update.
1023 * spu-low.c: Update.
1024 * target.c: Update.
1025 * tracepoint.c: Update.
1026
f2907e49
TT
10272018-07-03 Tom Tromey <tom@tromey.com>
1028
1029 * linux-low.c: Update.
1030 * linux-ppc-low.c: Update.
1031 * linux-x86-low.c: Update.
1032 * proc-service.c: Update.
1033 * server.c: Update.
1034 * spu-low.c: Update.
1035 * thread-db.c: Update.
1036 * win32-low.c: Update.
1037
fd79271b
TT
10382018-07-03 Tom Tromey <tom@tromey.com>
1039
1040 * linux-low.c: Update.
1041 * lynx-low.c: Update.
1042 * nto-low.c: Update.
1043 * remote-utils.c: Update.
1044 * spu-low.c: Update.
1045 * thread-db.c: Update.
1046 * win32-low.c: Update.
1047
c0867626
SDJ
10482018-06-29 Joel Brobecker <brobecker@adacore.com>
1049
1050 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1051 parameter in call to 'amd64_create_target_description'.
1052
2512d7ef
JK
10532018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1054
1055 * x86-tdesc.h: Remove executable permission flag.
1056
d0ac1c44
SM
10572018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1058
1059 * configure.ac: Remove AC_PREREQ, add missing quoting.
1060 * configure: Re-generate.
1061 * config.in: Re-generate.
1062 * aclocal.m4: Re-generate.
1063
c4eb05ff
SM
10642018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1065
1066 * tracepoint.h (current_traceframe): Remove declaration.
1067
02895270
AH
10682018-06-18 Alan Hayward <alan.hayward@arm.com>
1069
1070 * linux-aarch64-low.c (is_sve_tdesc): New function.
1071 (aarch64_sve_regs_copy_to_regcache): Likewise.
1072 (aarch64_sve_regs_copy_from_regcache): Likewise.
1073 (aarch64_regs_info): Add SVE checks.
1074 (initialize_low_arch): Initialize SVE.
1075
e9902bfc
AH
10762018-06-18 Alan Hayward <alan.hayward@arm.com>
1077
1078 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1079
fefa175e
AH
10802018-06-11 Alan Hayward <alan.hayward@arm.com>
1081
1082 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1083 (initialize_low_tracepoint): Likewise
1084 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1085 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1086 param.
1087 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1088 checks.
1089 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1090
b91ad3ff
AH
10912018-06-11 Alan Hayward <alan.hayward@arm.com>
1092
1093 * server.h (PBUFSIZ): Increase size
1094
f868386e
AH
10952018-06-11 Alan Hayward <alan.hayward@arm.com>
1096
1097 * regcache.c (regcache::raw_compare): New function.
1098 * regcache.h (regcache::raw_compare): New declaration.
1099
9c861883
AH
11002018-06-11 Alan Hayward <alan.hayward@arm.com>
1101
1102 * regcache.c (new_register_cache): Use new.
1103 (free_register_cache): Use delete.
1104 (register_data): Use const.
1105 (supply_register): Move body inside regcache.
1106 (regcache::raw_supply): New override function.
1107 (collect_register): Move body inside regcache.
1108 (regcache::raw_collect): New override function.
1109 (regcache::get_register_status): New override function.
1110 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1111
40591844
TT
11122018-06-09 Tom Tromey <tom@tromey.com>
1113
1114 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1115 declare queue.
1116 (event_queue): Use std::queue.
1117 (gdb_event_xfree): Remove.
1118 (initialize_event_loop, process_event, wait_for_event): Update.
1119
6341380d
SC
11202018-06-08 Stan Cox <scox@redhat.com>
1121
1122 * win32-low.c (win32_create_inferior): last_ptid and last_status
1123 moved to client_state.
1124
03349c93
PA
11252018-06-08 Pedro Alves <palves@redhat.com>
1126
1127 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1128 common/common-exceptions.o, common/common-utils.o,
1129 common/errors.o, common/print-utils.o and utils.o.
1130 * gdbreplay.c: Include "common-defs.h" instead of the two
1131 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1132 string.h or alloca.h.
1133 (perror_with_name): Delete.
1134 (remote_open): Use xstrdup instead of strdup.
1135 (main): Rename to ...
1136 (captured_main): ... this.
1137 (main): New.
1138
8dcc53b3
TT
11392018-06-08 Tom Tromey <tom@tromey.com>
1140
1141 * linux-low.c (linux_low_read_btrace): Update.
1142
c12a5089
SC
11432018-06-04 Stan Cox <scox@redhat.com>
1144
1145 * server.h (struct client_state): New.
1146 * server.c (cont_thread, general_thread, multi_process)
1147 (report_fork_events, report_vfork_events, report_exec_events)
1148 (report_thread_events, swbreak_feature, hwbreak_feature)
1149 (vCont_supported, disable_randomization, pass_signals)
1150 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1151 Moved to client_state.
1152 * remote-utils.c (remote_debug, noack_mode)
1153 (transport_is_reliable): Moved to client_state.
1154 * tracepoint.c (current_traceframe): Moved to client_state.
1155
1156 Update all callers.
1157 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1158 linux-low.c, remote-utils.h, target.c: Use client_state.
1159
122394f1
AH
11602018-05-31 Alan Hayward <alan.hayward@arm.com>
1161
1162 * configure.srv: Add new c/h file.
1163
95228a0d
AH
11642018-05-31 Alan Hayward <alan.hayward@arm.com>
1165
1166 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1167 null VQ.
1168
d8dab6c3
MR
11692018-05-25 Maciej W. Rozycki <macro@mips.com>
1170
1171 * gdb.arch/mips-fpregset-core.exp: New test.
1172 * gdb.arch/mips-fpregset-core.c: New test source.
1173
81e25b7c
EK
11742018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1175
1176 PR server/23198
1177 * hostio.c (require_int): Do not report overflow for integers
1178 between 0xfffffff and 0x7fffffff.
1179
7e947ad3
MR
11802018-05-22 Maciej W. Rozycki <macro@mips.com>
1181
1182 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1183 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1184 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1185 functions.
1186 (the_low_target): Wire them.
1187
1d75a658
PFC
11882018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1189
1190 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1191 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1192 mode. Call collect_register_by_name with vscr using
1193 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1194 (ppc_store_vrregset): Add and set vscr_offset variable as in
1195 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1196 vscr_offset.
1197
d078308a
PFC
11982018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1199
1200 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1201 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1202 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1203
7273b5fc
PFC
12042018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1205
1206 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1207 (ppc_store_vsxregset): Likewise.
1208 (ppc_fill_vrregset): Likewise.
1209 (ppc_store_vrregset): Likewise.
1210 (ppc_fill_evrregset): Likewise.
1211 (ppc_store_evrregset): Likewise.
1212 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1213 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1214 needed.
1215
2e077f5e
PFC
12162018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1217
1218 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1219 wordsize of the inferior. Call ppc_linux_target_wordsize.
1220
bd64614e
PFC
12212018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1222
1223 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1224 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1225 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1226 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1227 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1228 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1229 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1230 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1231 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1232 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1233 (tdesc_powerpc_e500l): Remove.
1234 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1235 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1236 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1237 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1238 linux-ppc-tdesc.h.
1239 (ppc_arch_setup): Remove target description matching code. Fill a
1240 ppc_linux_features struct and call ppc_linux_match_description
1241 with it.
1242
75d74cca
MR
12432018-05-22 Maciej W. Rozycki <macro@mips.com>
1244
1245 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1246 width of the requested register exceeds the width of the
1247 `ptrace' data type.
1248 (mips_cannot_store_register): Likewise.
1249
e4439e43
MR
12502018-05-21 Maciej W. Rozycki <macro@mips.com>
1251
1252 * linux-mips-low.c (mips_fetch_register): New function. Update
1253 preceding comment.
1254 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1255 (the_low_target): Wire `mips_fetch_register'.
1256
55271bf9
JB
12572018-05-10 Joel Brobecker <brobecker@adacore.com>
1258
1259 * lynx-i386-low.c (LYNXOS_178): New macro.
1260 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1261 the layout on LynxOS-178.
1262 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1263 handle floating point registers that are not supported by
1264 LynxOS-178.
1265
1a34f210
TT
12662018-05-10 Tom Tromey <tom@tromey.com>
1267
1268 * configure: Rebuild.
1269
190852c8
JB
12702018-05-10 Joel Brobecker <brobecker@adacore.com>
1271
1272 PR server/23158:
1273 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1274 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1275 Use it to set the expedite_regs field in the given tdesc.
1276 * x86-tdesc.h: New file.
1277 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1278 Adjust following the addition of the new expedite_regs parameter
1279 to init_target_desc.
1280 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1281 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1282 (i386_linux_read_description, amd64_linux_read_description):
1283 Adjust following the addition of the new expedite_regs parameter
1284 to init_target_desc.
1285 * lynx-i386-low.c: #include "x86-tdesc.h".
1286 (lynx_i386_arch_setup): Adjust following the addition of the new
1287 expedite_regs parameter to init_target_desc.
1288 * nto-x86-low.c: #include "x86-tdesc.h".
1289 (nto_x86_arch_setup): Adjust following the addition of the new
1290 expedite_regs parameter to init_target_desc.
1291 * win32-i386-low.c: #include "x86-tdesc.h".
1292 (i386_arch_setup): Adjust following the addition of the new
1293 expedite_regs parameter to init_target_desc.
1294
7dbac825
JB
12952018-05-10 Joel Brobecker <brobecker@adacore.com>
1296
1297 PR server/23158:
1298 * win32-low.c (win32_create_inferior): Add call to my_wait
1299 setting last_status global.
1300
906994d9
JB
13012018-05-10 Joel Brobecker <brobecker@adacore.com>
1302
1303 PR server/23158:
1304 * win32-low.c (create_process): Only call gdb_tilde_expand if
1305 inferior_cwd is not NULL.
1306
8ee22052
AB
13072018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1308
1309 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1310 registers to the cache if their values have changed.
1311 (i387_xsave_to_cache): Provide default values for x87 control
1312 registers when these features are available, but disabled.
1313 * regcache.c (supply_register_by_name_zeroed): New function.
1314 * regcache.h (supply_register_by_name_zeroed): Declare new
1315 function.
1316
aff689d3
TT
13172018-05-07 Tom Tromey <tom@tromey.com>
1318
1319 * configure: Rebuild.
1320
85e26832
TT
13212018-05-04 Tom Tromey <tom@tromey.com>
1322
1323 * configure: Rebuild.
1324
a3b60e45
JK
13252018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1326 Pedro Alves <palves@redhat.com>
1327
1328 * linux-aarch64-low.c (aarch64_stopped_data_address):
1329 Likewise.
1330
632e107b
TT
13312018-04-27 Tom Tromey <tom@tromey.com>
1332
1333 * configure: Rebuild.
1334
458412c3
TT
13352018-04-23 Tom Tromey <tom@tromey.com>
1336
1337 * configure: Rebuild.
1338
f31c089e
SM
13392018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1340
1341 * Makefile.in (depcomp): Add "..".
1342 (all_deps_files): New and use it.
1343
b319b098
AH
13442018-04-18 Alan Hayward <alan.hayward@arm.com>
1345
1346 * configure.srv (aarch64*-*-linux*): Don't include xml.
1347 (i[34567]86-*-cygwin*): Likewise.
1348 (i[34567]86-*-linux*): Likewise.
1349 (i[34567]86-*-lynxos*): Likewise.
1350 (i[34567]86-*-mingw32ce*): Likewise.
1351 (i[34567]86-*-mingw*): Likewise.
1352 (i[34567]86-*-nto*): Likewise.
1353 (tic6x-*-uclinux): Likewise.
1354 (x86_64-*-linux*): Likewise.
1355 (x86_64-*-mingw*): Likewise.
1356 (x86_64-*-cygwin*): Likewise.
1357
3b74854b
AH
13582018-04-18 Alan Hayward <alan.hayward@arm.com>
1359
1360 * tdesc.c: Remove xml parameter.
1361
e98577a9
AH
13622018-04-18 Alan Hayward <alan.hayward@arm.com>
1363
1364 * server.c (get_features_xml): Remove cast.
1365 * tdesc.c (void target_desc::accept): Fill in function.
1366 (tdesc_get_features_xml): Remove old xml creation.
1367 (print_xml_feature::visit_pre): Add xml vistor.
1368 * tdesc.h (struct target_desc): Make xmltarget mutable.
1369 (tdesc_get_features_xml): Remove declaration.
1370
d278f585
AH
13712018-04-18 Alan Hayward <alan.hayward@arm.com>
1372
1373 * tdesc.c (tdesc_architecture_name): Add new function.
1374 (tdesc_osabi_name): Likewise.
1375 (tdesc_get_features_xml): Use new functions.
1376
eee8a18d
AH
13772018-04-18 Alan Hayward <alan.hayward@arm.com>
1378
1379 * tdesc.c (tdesc_create_flags): Remove.
1380 (tdesc_add_flag): Likewise.
1381 (tdesc_named_type): Likewise.
1382 (tdesc_create_union): Likewise.
1383 (tdesc_create_struct): Likewise.
1384 (tdesc_create_vector): Likewise.
1385 (tdesc_add_bitfield): Likewise.
1386 (tdesc_add_field): Likewise.
1387 (tdesc_set_struct_size): Likewise.
1388
82ec9bc7
AH
13892018-04-18 Alan Hayward <alan.hayward@arm.com>
1390
1391 * tdesc.c (~target_desc): Remove implictly deleted items.
1392 (init_target_desc): Iterate all features.
1393 (tdesc_get_features_xml): Use vector.
1394 (tdesc_create_feature): Create feature.
1395 * tdesc.h (tdesc_feature) Remove
1396 (target_desc): Add features.
1397
ea3e7d71
AH
13982018-04-18 Alan Hayward <alan.hayward@arm.com>
1399
1400 * Makefile.in: Add common/tdesc.c
1401 * tdesc.c (init_target_desc): init all reg_defs from register
1402 vector.
1403 (tdesc_create_reg): Create tdesc_reg.
1404 * tdesc.h (tdesc_feature): Add register vector.
1405
17d08cd4
SM
14062018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1407
1408 * tdesc.h (struct target_desc) <features>: Change type to
1409 std::vector<std::string>.
1410 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1411 changes.
1412 (tdesc_get_features_xml): Likewise.
1413 (tdesc_create_feature): Likewise.
1414
5cd3e386
AH
14152018-03-26 Alan Hayward <alan.hayward@arm.com>
1416
1417 * regcache.c (find_register_by_number): Return a ref.
1418 (find_regno): Use references.
1419 (register_size): Likewise.
1420 (register_data): Likewise.
1421 * tdesc.c (target_desc::~target_desc): Remove free calls.
1422 (target_desc::operator==): Use std::vector compare.
1423 (init_target_desc): Use reference.
1424 (tdesc_create_reg): Use reg constructors.
1425 * tdesc.h (struct target_desc): Replace pointer with object.
1426
dff7492c
AH
14272018-03-23 Alan Hayward <alan.hayward@arm.com>
1428
1429 * regcache.c (find_register_by_number): Make static.
1430 (find_regno): Use find_register_by_number
1431 * regcache.h (struct reg): Remove declaration.
1432
d80e5242
AH
14332018-03-23 Alan Hayward <alan.hayward@arm.com>
1434
1435 * tdesc.c (target_desc::~target_desc): Move to here.
1436 (target_desc::operator==): Likewise.
1437 * tdesc.h (target_desc::~target_desc): Move from here.
1438 (target_desc::operator==): Likewise.
1439
f69c5afb
AA
14402018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1441
1442 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1443
ce29f843
AA
14442018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1445
1446 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1447 S390_TDESC_GS.
1448 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1449 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1450 and init_registers_s390_gs_linux64.
1451
c49bd90b
AA
14522018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1453
1454 * linux-s390-low.c (s390_fill_gs): Remove function.
1455 (s390_fill_gsbc): Remove function.
1456 (s390_regsets): Set fill functions for the guarded storage regsets
1457 to NULL.
1458
7edb9bd3
AA
14592018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1460
1461 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1462 the word size. Add comment.
1463 (s390_get_wordsize): New function.
1464 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1465 pswm with it. Instead, use s390_get_wordsize to determine the
1466 word size first and derive the correct tdesc from that directly.
1467
39be3c7e
SM
14682018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1469
1470 * Makefile.in: Include silent-rules.mk.
1471 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1472 (COMPILE): Add ECHO_CXX.
1473 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1474 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1475 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1476 (version-generated.c): Add ECHO_GEN.
1477 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1478 (IPAGENT_COMPILE): Add ECHO_CXX.
1479 (%-generated.c): Add ECHO_REGDAT.
1480
3ae9ce5d
TT
14812018-03-14 Tom Tromey <tom@tromey.com>
1482
1483 PR cli/14977:
1484 * ax.c (ax_printf): Special case for NULL.
1485
e6a58aa8
SM
14862018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1487
1488 * linux-low.c (linux_qxfer_libraries_svr4): Use
1489 xml_escape_text_append.
1490
f6e8a41e
SM
14912018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1492
1493 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1494
b9671caf
SM
14952018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1496
1497 * server.c (handle_general_set): Remove unnecessary xstrdup.
1498
e80aaf61
SM
14992018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1500
1501 * server.c (parse_debug_format_options): Adjust to
1502 delim_string_to_char_ptr_vec changes.
1503 * thread-db.c (thread_db_load_search): Adjust to
1504 dirnames_to_char_ptr_vec changes.
1505
b1223e78
MM
15062018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1507
1508 * target.h (target_enable_btrace, target_disable_btrace)
1509 (target_read_btrace, target_read_btrace_conf): Turn macro into
1510 inline function. Throw error if target method is not defined.
1511 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1512 check for btrace target method. Be prepared to handle exceptions
1513 from btrace target methods.
1514
81561546
SDJ
15152018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1516
1517 * server.c (captured_main): Change order of error message printed
1518 when the current working directory cannot be found.
1519
25e3c82c
SDJ
15202018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1521
1522 * server.c: Include "filenames.h" and "pathstuff.h".
1523 (program_name): Delete variable.
1524 (program_path): New anonymous class.
1525 (get_exec_wrapper): Use "program_path" instead of
1526 "program_name".
1527 (handle_v_run): Likewise.
1528 (captured_main): Likewise.
1529 (process_serial_event): Likewise.
1530
b4987c95
SDJ
15312018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1532
1533 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1534 (OBJS): Add "pathstuff.o".
1535 * server.c (current_directory): New global variable.
1536 (captured_main): Initialize "current_directory".
1537
f46cd62a
AH
15382018-02-26 Alan Hayward <alan.hayward@arm.com>
1539
1540 * tdesc.c: Use common/tdesc.h.
1541 * tdesc.h: Likewise.
1542
a543c5ca
AH
15432018-02-20 Alan Hayward <alan.hayward@arm.com>
1544 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * Makefile.in: Switch order of make rules.
1547
b5884fa7
AH
15482018-02-19 Alan Hayward <alan.hayward@arm.com>
1549
1550 * Makefile.in: Add common directory in build.
1551 * configure.ac: Add common reference.
1552 * configure: Regenerate.
1553
de6242d3
MM
15542018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1555
1556 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1557 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1558 * spu-low.c (spu_target_ops): Likewise.
1559 * win32-low.c (win32_target_ops): Likewise.
1560 * server.c (supported_btrace_packets): Report packets unconditionally.
1561 * target.h (target_ops) <supports_btrace>: Remove.
1562 (target_supports_btrace): Remove.
1563
9ee23a85
MM
15642018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1565
1566 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1567 (handle_btrace_disable): Change return type to void. Use exceptions
1568 to report errors.
1569 (handle_btrace_general_set): Catch exception and copy message to
1570 return message.
1571
8ce47547
TT
15722018-02-08 Tom Tromey <tom@tromey.com>
1573
1574 * linux-low.c (install_software_single_step_breakpoints): Use
1575 make_scoped_restore.
1576 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1577 (do_restore_current_thread_cleanup): Remove.
1578 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1579 declare.
1580
45dd3607
TT
15812018-02-08 Tom Tromey <tom@tromey.com>
1582
1583 * mem-break.c (set_raw_breakpoint_at): Use
1584 gdb::unique_xmalloc_ptr.
1585
e671cd59
PA
15862018-01-30 Pedro Alves <palves@redhat.com>
1587
1588 PR gdb/13211
1589 * target.c (target_terminal::terminal_state): Rename to ...
1590 (target_terminal::m_terminal_state): ... this.
1591
a0aad537
JC
15922018-01-19 James Clarke <jrtc27@jrtc27.com>
1593
1594 * linux-low.c (handle_extended_wait): Surround call to
1595 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1596
4d9b86e1
SM
15972018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1600 linux_ptrace_attach_fail_reason_string now returning an
1601 std::string.
1602 (linux_attach): Likewise.
1603 * thread-db.c (attach_thread): Likewise.
1604
f517c180
EA
16052018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1606
1607 PR gdb/21559
1608 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1609 checking for fs_base/gs_base fields in struct user_regs_struct.
1610 * configure: Regenerate.
1611
9a70f35c
YQ
16122018-01-16 Yao Qi <yao.qi@linaro.org>
1613
1614 PR gdb/18749
1615 * linux-low.c (fetch_register): Call supply_register instead of
1616 error.
1617
605fd3c6
YQ
16182018-01-08 Yao Qi <yao.qi@linaro.org>
1619 Simon Marchi <simon.marchi@ericsson.com>
1620
1621 * Makefile.in (OBS): Remove selftest.o.
1622 * configure.ac: Set srv_selftest_objs if $development is true.
1623 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1624 * configure: Re-generated.
1625 * server.c (captured_main): Wrap variable selftest_filter with
1626 GDB_SELF_TEST.
1627
2cc05030
SM
16282018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1629
1630 * server.c (parse_debug_format_options): Return std::string.
1631 (handle_monitor_command, captured_main): Adjust.
1632
e379cee6
PA
16332018-01-05 Pedro Alves <palves@redhat.com>
1634
1635 PR gdb/18653
1636 * server.c (captured_main): Pass quiet=false to
1637 save_original_signals_state.
1638
82e1e79a
JB
16392018-01-01 Joel Brobecker <brobecker@adacore.com>
1640
1641 * gdbreplay.c (gdbreplay_version): Update copyright year in
1642 version message.
1643 * server.c (gdbserver_version): Likewise.
1644
8e481c3b
TT
16452017-12-08 Tom Tromey <tom@tromey.com>
1646
1647 * ax.c (ax_printf): Update.
1648
a8806230
YQ
16492017-12-07 Yao Qi <yao.qi@linaro.org>
1650
1651 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1652 aarch64_linux_read_description.
1653 * linux-amd64-ipa.c (idx2mask): New array.
1654 (get_ipa_tdesc): Move idx2mask out.
1655 (initialize_low_tracepoint): Initialize target descriptions.
1656 * linux-i386-ipa.c (idx2mask): New array.
1657 (get_ipa_tdesc): Move idx2mask out.
1658 (initialize_low_tracepoint): Initialize target descriptions.
1659
d4a0e8b5
SM
16602017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1661
1662 * tdesc.c (struct tdesc_type): Change return type.
1663 (tdesc_add_flag): Change parameter type.
1664 (tdesc_add_bitfield): Likewise.
1665 (tdesc_add_field): Likewise.
1666 (tdesc_set_struct_size): Likewise.
1667
798a7429
SM
16682017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1669
1670 * regcache.c (registers_to_string): Remove unused variable.
1671
c0e15c9b
SM
16722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * inferiors.c (for_each_inferior_with_data): Remove.
1675 * inferiors.h (for_each_inferior_with_data): Remove.
1676 * server.c (handle_qxfer_threads_worker): Change parameter type.
1677 (handle_qxfer_threads_proper): Use for_each_thread.
1678
f0045347
SM
16792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1680
1681 * inferiors.c (for_each_inferior): Remove.
1682 (clear_inferiors): Use for_each_thread.
1683 * inferiors.h (for_each_inferior): Remove.
1684 * linux-low.c (linux_wait_for_event_filtered): Use
1685 for_each_thread.
1686 (linux_stabilize_threads): Likewise.
1687 * regcache.c (regcache_release): Likewise.
1688 * server.c (gdb_wants_all_threads_stopped): Likewise.
1689 (clear_pending_status_callback): Remove.
1690 (handle_status): Use for_each_thread.
1691 (captured_main): Likewise.
1692 * win32-low.c (child_init_thread_list): Likewise.
1693 (win32_clear_inferiors): Likewise.
1694 (fake_breakpoint_event): Likewise.
1695
9521758b
SM
16962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1697
1698 * inferiors.h (find_inferior): Remove.
1699 * inferiors.c (find_inferior): Remove.
1700
8f86d7aa
SM
17012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1702
1703 * linux-low.c (resume_status_pending_p): Update comment.
1704 (need_step_over_p): Update comment.
1705
e2b44075
SM
17062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1707
1708 * linux-low.c (proceed_one_lwp): Return void, change parameter
1709 type.
1710 (unsuspend_and_proceed_one_lwp): Likewise.
1711 (proceed_all_lwps): Use for_each_thread.
1712 (unstop_all_lwps): Likewise.
1713
c80825ff
SM
17142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1715
1716 * linux-low.c (linux_resume_one_thread): Return void, take
1717 parameter directly.
1718 (linux_resume): Use for_each_thread.
1719
df3e4dbe
SM
17202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1721
1722 * linux-low.c (send_sigstop_callback): Return void, change
1723 parameter type. Rename to...
1724 (send_sigstop): ... this.
1725 (suspend_and_send_sigstop_callback): Return void, change parameter
1726 type. Rename to...
1727 (suspend_and_send_sigstop): ... this.
1728 (stop_all_lwps): Use for_each_thread.
1729
5a6b0a41
SM
17302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1731
1732 * linux-low.c (lwp_running): Return bool, remove unused
1733 argument.
1734 (linux_stabilize_threads): Use find_thread.
1735
39a64da5
SM
17362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1737
1738 * linux-low.c (select_singlestep_lwp_callback): Remove.
1739 (count_events_callback): Remove.
1740 (select_event_lwp_callback): Remove.
1741 (select_event_lwp): Use find_thread/for_each_thread.
1742
a1385b7b
SM
17432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * linux-low.c (not_stopped_callback): Return bool, take filter
1746 argument directly.
1747 (linux_wait_for_event_filtered): Use find_thread.
1748 (linux_wait_1): Likewise.
1749
454296a2
SM
17502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1751
1752 * linux-low.c (same_lwp): Remove.
1753 (find_lwp_pid): Use find_thread.
1754
6b2a85da
SM
17552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1756
1757 * linux-low.c (delete_lwp_callback): Remove.
1758 (linux_mourn): Use for_each_thread.
1759
798a38e8
SM
17602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1761
1762 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1763 args parameter, don't check for pid.
1764 (linux_detach): Use for_each_thread.
1765
e4eb0dec
SM
17662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1767
1768 * linux-low.c (struct counter): Remove.
1769 (second_thread_of_pid_p): Remove.
1770 (last_thread_of_process_p): Use find_thread.
1771
83e1b6c1
SM
17722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1773
1774 * inferiors.c (find_inferior_in_random): Remove.
1775 * inferiors.h (find_inferior_in_random): Remove.
1776 * linux-low.c (status_pending_p_callback): Return bool, accept
1777 parameter ptid directly.
1778 (linux_wait_for_event_filtered): Use find_thread_in_random.
1779 (linux_wait_1): Likewise.
1780
8dc7b443
SM
17812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1782
1783 * inferiors.c (find_inferior_id): Remove.
1784 (find_thread_ptid): Move implemention from find_inferior_id to
1785 here.
1786 * inferiors.h (find_inferior_id): Remove.
1787 * server.c (handle_status): Use find_thread_ptid.
1788 (process_serial_event): Likewise.
1789 * thread-db.c (find_one_thread): Likewise.
1790 (thread_db_thread_handle): Likewise.
1791 * win32-low.c (thread_rec): Likewise.
1792 (child_delete_thread): Likewise.
1793 (win32_thread_alive): Likewise.
1794 (get_child_debug_event): Likewise.
1795
da25033c
SM
17962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1797
1798 * linux-mips-low.c (update_watch_registers_callback): Return
1799 void, remove pid_p parameter, don't check for pid.
1800 (mips_insert_point, mips_remove_point): Use for_each_thread.
1801
c91bb56b
SM
18022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1803
1804 * lynx.low (lynx_delete_thread_callback): Remove.
1805 (lynx_mourn): Use for_each_thread.
1806
634a3254
SM
18072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1808
1809 * regcache.c (regcache_invalidate_one): Remove.
1810 (regcache_invalidate_pid): use for_each_thread.
1811
41272101
TT
18122017-11-26 Tom Tromey <tom@tromey.com>
1813
1814 * linux-low.c (linux_create_inferior): Update.
1815
f5291a6f
UW
18162017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1817
1818 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1819
6654d750
AH
18202017-11-24 Alan Hayward <alan.hayward@arm.com>
1821
1822 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1823 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1824 * linux-aarch64-tdesc-selftest.c: New file.
1825 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1826
18272017-11-24 Alan Hayward <alan.hayward@arm.com>
1828
1829 * configure.srv: Add new file.
1830 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1831 * linux-aarch64-tdesc-selftest.c: New file.
1832 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1833
49bdb7ee
AH
18342017-11-24 Alan Hayward <alan.hayward@arm.com>
1835
1836 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1837 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1838 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1839
d6d7ce56
AH
18402017-11-24 Alan Hayward <alan.hayward@arm.com>
1841
1842 * configure.srv: Add new files.
1843 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1844 aarch64_linux_read_description.
1845 * linux-aarch64-low.c (aarch64_linux_read_description):
1846 Merge with aarch64_arch_setup.
1847 (aarch64_arch_setup): Call aarch64_linux_read_description.
1848 * linux-aarch64-tdesc.c: New file.
1849 * linux-aarch64-tdesc.h: New file.
1850
506fe5f4
YQ
18512017-11-24 Yao Qi <yao.qi@linaro.org>
1852
1853 * configure.srv: Set $srv_regobj for tic6x-linux.
1854 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1855 (tic6x_read_description): Move some code to tic6x_arch_setup.
1856 (tic6x_tdesc_test): New function.
1857 (initialize_low_arch): Call selftests::register_test.
1858
29f9a567
YQ
18592017-11-22 Yao Qi <yao.qi@linaro.org>
1860
1861 * remote-utils.c (prepare_resume_reply): Use memcpy.
1862
578290ec
SM
18632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1864
1865 * linux-low.c (kill_one_lwp_callback): Return void, take
1866 argument directly, don't filter on pid.
1867 (linux_kill): Use for_each_thread.
1868
eca55aec
SM
18692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1870
1871 * linux-low.c (need_step_over_p): Return bool, remove dummy
1872 argument.
1873 (linux_resume, proceed_all_lwps): Use find_thread.
1874
25c28b4d
SM
18752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1876
1877 * linux-low.c (resume_status_pending_p): Return bool, remove
1878 flag_p argument.
1879 (linux_resume): Use find_thread.
1880
5fdda392
SM
18812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1882
1883 * linux-low.c (struct thread_resume_array): Remove.
1884 (linux_set_resume_request): Return void, take arguments
1885 directly.
1886 (linux_resume): Use for_each_thread.
1887
fcb056a5
SM
18882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1889
1890 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1891 return bool, remove data argument.
1892 (linux_stabilize_threads): Use find_thread.
1893
139720c5
SM
18942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1895
1896 * linux-low.c (unsuspend_one_lwp): Remove.
1897 (unsuspend_all_lwps): Use for_each_thread, inline code from
1898 unsuspend_one_lwp.
1899
6d1e5673
SM
19002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1901
1902 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1903 * linux-low.c (struct iterate_over_lwps_args): Remove.
1904 (iterate_over_lwps_filter): Remove.
1905 (iterate_over_lwps): Use find_thread.
1906
bbf550d5
SM
19072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1908
1909 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1910 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1911 code from reset_lwp_ptrace_options_callback.
1912
00192f77
SM
19132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1914
1915 * linux-arm-low.c (struct update_registers_data): Remove.
1916 (update_registers_callback): Return void, take arguments
1917 directly, don't check thread's pid.
1918 (arm_insert_point, arm_remove_point): Use for_each_thread.
1919
2bee2b6c
SM
19202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1921
1922 * win32-low.c (continue_one_thread): Return void, take argument
1923 directly.
1924 (child_continue): Use for_each_thread.
1925
0b360f19
SM
19262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1927
1928 * win32-i386-low.c (update_debug_registers_callback): Rename
1929 to ...
1930 (update_debug_registers): ... this, return void, remove pid_p arg.
1931 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1932
f27866ba
SM
19332017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1934
1935 * inferiors.h (struct process_info): Add constructor, initialize
1936 fields..
1937 <syscalls_to_catch>: Change type to std::vector<int>.
1938 * inferiors.c (add_process): Allocate process_info with new.
1939 (remove_process): Free process_info with delete.
1940 * linux-low.c (handle_extended_wait): Adjust.
1941 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1942 * server.c (handle_general_set): Adjust.
1943
e849ea89
PA
19442017-11-16 Pedro Alves <palves@redhat.com>
1945
1946 * remote-utils.c (remote_close): Block SIGIO signals instead of
1947 uninstalling the SIGIO handler.
1948
1d0aa65c
AH
19492017-11-16 Alan Hayward <alan.hayward@arm.com>
1950
1951 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1952
3491a34c
YQ
19532017-11-16 Yao Qi <yao.qi@linaro.org>
1954
1955 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1956 (tic6x_store_gregset): Likewise.
1957 (tic6x_usrregs_info): Move it up.
1958
a602f924
AH
19592017-11-15 Alan Hayward <alan.hayward@arm.com>
1960
1961 * Makefile.in: Update arch rules.
1962 * configure.srv: Explicitly mark arch/ files.
1963
5616b6c3
AS
19642017-11-13 Andreas Schwab <schwab@suse.de>
1965
1966 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1967 function.
1968 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1969
d1928160
PA
19702017-11-06 Pedro Alves <palves@redhat.com>
1971
1972 * config.in, configure: Regenerate.
1973
bac608e7
SM
19742017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1975
1976 * target.c (struct thread_search): Remove.
1977 (thread_search_callback): Remove.
1978 (prepare_to_access_memory): Use for_each_thread instead of
1979 find_inferior. Inline code from thread_search_callback.
1980
eaddb425
SM
19812017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1982
1983 * server.c (struct visit_actioned_threads_data): Remove.
1984 (visit_actioned_threads): Change prototype to take arguments
1985 directly.
1986 (resume): Use find_thread instead of find_inferior.
1987
99078d34
SM
19882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1989
1990 * server.c (queue_stop_reply_callback): Change prototype, return
1991 void.
1992 (find_status_pending_thread_callback): Remove.
1993 (handle_status): Replace find_inferior with find_thread and
1994 for_each_thread.
1995
cc628f3d
AH
19962017-10-25 Alan Hayward <alan.hayward@arm.com>
1997
1998 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1999 with REGNO.
2000 (aarch64_store_gregset): Likewise.
2001 (aarch64_fill_fpregset): Likewise.
2002 (aarch64_store_fpregset): Likewise.
2003
4d3bb80e
SM
20042017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * gdbthread.h (find_thread, for_each_thread): New functions.
2007 * inferiors.c (thread_of_pid): Remove.
2008 (find_any_thread_of_pid): Use find_thread.
2009 * linux-low.c (num_lwps): Use for_each_thread.
2010
7a7cdfa0
YQ
20112017-10-17 Yao Qi <yao.qi@linaro.org>
2012
2013 * Makefile.in: Remove one rule.
2014 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2015
e675d170
YQ
20162017-10-17 Yao Qi <yao.qi@linaro.org>
2017
2018 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2019 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2020
7eb4e0f9
YQ
20212017-10-17 Yao Qi <yao.qi@linaro.org>
2022
2023 * configure.srv: Rename arm.o with arch/arm.o.
2024
60d6cfc9
YQ
20252017-10-17 Yao Qi <yao.qi@linaro.org>
2026
2027 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2028 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2029 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2030 (arch-i386.o, arch-amd64.o): Remove rules.
2031 (arch/%.o): New rule.
2032 Update POSTCOMPILE and COMPILE.pre.
2033 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2034 * configure: Re-generated.
2035 * configure.srv: Replace arch-i386.o with arch/i386.o.
2036 Replace arch-amd64.o with arch/amd64.o.
2037
5bfda255
YQ
20382017-10-16 Yao Qi <yao.qi@linaro.org>
2039
2040 * configure: Regenerated.
2041
9c80ecd6
SM
20422017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2043
2044 * inferiors.h: (struct inferior_list): Remove.
2045 (struct inferior_list_entry); Remove.
2046 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2047 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2048 get_first_inferior): Remove.
2049 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2050 find_inferior_id, find_inferior_in_random): Change signature.
2051 * inferiors.c (all_threads): Change type to
2052 std::list<thread_info *>.
2053 (get_thread): Remove macro.
2054 (find_inferior, find_inferior_id): Change signature, implement
2055 using find_thread.
2056 (find_inferior_in_random): Change signature, implement using
2057 find_thread_in_random.
2058 (for_each_inferior, for_each_inferior_with_data): Change
2059 signature, implement using for_each_thread.
2060 (add_inferior_to_list, remove_inferior): Remove.
2061 (add_thread, get_first_thread, thread_of_pid,
2062 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2063 (get_first_inferior, one_inferior_p, clear_inferior_list):
2064 Remove.
2065 (clear_inferiors, get_thread_process): Update.
2066 * gdbthread.h: Include <list>.
2067 (struct thread_info) <entry>: Remove field.
2068 <id>: New field.
2069 (all_threads): Change type to std::list<thread_info *>.
2070 (get_first_inferior): Add doc.
2071 (find_thread, for_each_thread, find_thread_in_random): New
2072 functions.
2073 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2074 * linux-arm-low.c (update_registers_callback): Update.
2075 * linux-low.c (second_thread_of_pid_p): Update.
2076 (kill_one_lwp_callback, linux_detach_lwp_callback,
2077 delete_lwp_callback, status_pending_p_callback, same_lwp,
2078 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2079 iterate_over_lwps, not_stopped_callback,
2080 resume_stopped_resumed_lwps, count_events_callback,
2081 select_singlestep_lwp_callback, select_event_lwp_callback,
2082 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2083 suspend_and_send_sigstop_callback, wait_for_sigstop,
2084 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2085 lwp_running, linux_set_resume_request, resume_status_pending_p,
2086 need_step_over_p, start_step_over, linux_resume_one_thread,
2087 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2088 reset_lwp_ptrace_options_callback): Update.
2089 * linux-mips-low.c (update_watch_registers_callback): Update.
2090 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2091 Update.
2092 (free_register_cache_thread_one): Remove.
2093 (regcache_release): Update.
2094 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2095 handle_qxfer_threads_worker): Update.
2096 (handle_query): Update, use list iterator.
2097 (visit_actioned_threads, handle_pending_status,
2098 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2099 clear_pending_status_callback, set_pending_status_callback,
2100 find_status_pending_thread_callback, handle_status,
2101 process_serial_event): Update.
2102 * target.c (thread_search_callback): Update.
2103 * thread-db.c (thread_db_get_tls_address): Update.
2104 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2105 Update.
2106 * win32-i386-low.c (update_debug_registers_callback): Update.
2107 * win32-low.c (delete_thread_info, child_delete_thread,
2108 continue_one_thread, suspend_one_thread,
2109 get_child_debug_event): Adjust.
2110
9179355e
SM
21112017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2112
2113 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2114 * inferiors.h: Include <list>.
2115 (struct process_info) <entry>: Remove field.
2116 <pid>: New field.
2117 (pid_of): Change macro to function.
2118 (ptid_of, lwpid_of): Remove macro.
2119 (all_processes): Change type to std::list<process_info *>.
2120 (ALL_PROCESSES): Remove macro.
2121 (for_each_process, find_process): New function.
2122 * inferiors.c (all_processes): Change type to
2123 std::list<process_info *>.
2124 (find_thread_process): Adjust.
2125 (add_process): Likewise.
2126 (remove_process): Likewise.
2127 (find_process_pid): Likewise.
2128 (get_first_process): Likewise.
2129 (started_inferior_callback): Remove.
2130 (have_started_inferiors_p): Adjust.
2131 (attached_inferior_callback): Remove.
2132 (have_attached_inferiors_p): Adjust.
2133 * linux-low.c (check_zombie_leaders): Likewise.
2134 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2135 (x86_linux_update_xmltarget): Adjust.
2136 * server.c (handle_query): Likewise.
2137 (gdb_reattached_process): Remove.
2138 (handle_status): Adjust.
2139 (kill_inferior_callback): Likewise.
2140 (detach_or_kill_inferior): Remove.
2141 (print_started_pid): Likewise.
2142 (print_attached_pid): Likewise.
2143 (detach_or_kill_for_exit): Update.
2144 (process_serial_event): Likewise.
2145 * linux-arm-low.c (arm_new_fork): Likewise.
2146
c9cb8905
SM
21472017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2148
2149 * dll.h: Include <list>.
2150 (struct dll_info): Add constructor.
2151 <entry>: Remove field.
2152 (all_dlls): Change type to std::list<dll_info>.
2153 * dll.c: Include <algorithm>.
2154 (get_dll): Remove macro.
2155 (all_dlls): Change type to std::list<dll_info *>.
2156 (free_one_dll): Remove.
2157 (match_dll): Likewise.
2158 (loaded_dll): Adjust.
2159 (unloaded_dll): Adjust to all_dlls type change, use
2160 std::find_if. Inline code from match_dll.
2161 (clear_dlls): Adjust to all_dlls type change.
2162 * server.c (emit_dll_description): Remove.
2163 (handle_qxfer_libraries): Adjust to all_dlls type change,
2164 integrate emit_dll_description's functionality.
2165
04ec7890
SM
21662017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2167
2168 * linux-low.h (struct linux_target_ops) <delete_process>: New
2169 field.
2170 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2171 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2172 (struct linux_target_ops): Add delete_process callback.
2173 * linux-arm-low.c (arm_delete_process): New.
2174 (struct linux_target_ops): Add delete_process callback.
2175 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2176 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2177 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2178 * linux-mips-low.c (mips_linux_delete_process): New.
2179 (struct linux_target_ops): Add delete_process callback.
2180 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2181 * linux-s390-low.c (struct linux_target_ops): Likewise.
2182 * linux-sh-low.c (struct linux_target_ops): Likewise.
2183 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2184 * linux-tile-low.c (struct linux_target_ops): Likewise.
2185 * linux-x86-low.c (x86_linux_delete_process): New.
2186 (struct linux_target_ops): Add delete_process callback.
2187 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2188
466eecee
SM
21892017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2190
2191 * linux-aarch64-low.c (the_low_target): Add thread delete
2192 callback.
2193 * linux-arm-low.c (arm_delete_thread): New function.
2194 (the_low_target): Add thread delete callback.
2195 * linux-bfin-low.c (the_low_target): Likewise.
2196 * linux-crisv32-low.c (the_low_target): Likewise.
2197 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2198 set.
2199 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2200 field.
2201 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2202 * linux-mips-low.c (mips_linux_delete_thread): New function.
2203 (the_low_target): Add thread delete callback.
2204 * linux-ppc-low.c (the_low_target): Likewise.
2205 * linux-s390-low.c (the_low_target): Likewise.
2206 * linux-sh-low.c (the_low_target): Likewise.
2207 * linux-tic6x-low.c (the_low_target): Likewise.
2208 * linux-tile-low.c (the_low_target): Likewise.
2209 * linux-x86-low.c (the_low_target): Likewise.
2210 * linux-xtensa-low.c (the_low_target): Likewise.
2211
b79f7801
YZ
22122017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2213
2214 * win32-low.c: Include "common-inferior.h".
2215
bc3b087d
SDJ
22162017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2217
2218 * inferiors.c (set_inferior_cwd): New function.
2219 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2220 (handle_query): Inform that QSetWorkingDir is supported.
2221 * win32-low.c (create_process): Pass the inferior's cwd to
2222 CreateProcess.
2223
d092c5a2
SDJ
22242017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2225
2226 * inferiors.c (current_inferior_cwd): New global variable.
2227 (get_inferior_cwd): New function.
2228 * inferiors.h (struct process_info) <cwd>: New field.
2229
7da0a886
SDJ
22302017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2231
2232 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2233 (OBS): Add gdb_tilde_expand.o.
2234
289a6840
SM
22352017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2236
2237 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2238 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2239
256642e8
PA
22402017-09-29 Pedro Alves <palves@redhat.com>
2241
2242 * ax.c (gdb_parse_agent_expr): Constify.
2243 * ax.h (gdb_parse_agent_expr): Constify.
2244 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2245 Constify.
2246 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2247 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2248 * remote-utils.h (read_ptid): Constify.
2249 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2250 (process_point_options, process_serial_event): Constify.
2251 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2252 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2253 (cmd_qtbuffer): Constify.
2254
5b9ca4d4
PA
22552017-09-29 Pedro Alves <palves@redhat.com>
2256
2257 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2258 fails.
2259
94c207e0
PA
22602017-09-29 Pedro Alves <palves@redhat.com>
2261
2262 * linux-low.c (handle_extended_wait): Pass parent thread instead
2263 of process to thread_db_notice_clone.
2264 * linux-low.h (thread_db_notice_clone): Replace parent process
2265 parameter with parent thread parameter.
2266 * thread-db.c (find_one_thread): Add comment.
2267 (thread_db_notice_clone): Replace parent process parameter with
2268 parent thread parameter. Temporarily switch to the parent thread.
2269
75352e28
SDJ
22702017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2271
2272 * gdbthread.h: Include "common-gdbthread.h".
2273 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2274 "if" when validating the ptid.
2275 * remote-utils.c: Include "gdbthread.h".
2276 (prepare_resume_reply): Use "switch_to_thread".
2277 * target.c (done_accessing_memory): Likewise.
2278
ad339634
AA
22792017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2280
2281 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2282 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2283 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2284 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2285 s390x-gs-linux64-ipa.o to ipa_obj.
2286 * linux-s390-low.c (HWCAP_S390_GS): New define.
2287 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2288 New functions.
2289 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2290 (s390_arch_setup): Check for guarded-storage support and choose
2291 appropriate tdesc.
2292 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2293 init_registers_s390x_gs_linux64.
2294 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2295 enum value.
2296 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2297 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2298
cc4d742f
SM
22992017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2300
2301 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2302
f6327dcb
KB
23032017-09-21 Kevin Buettner <kevinb@redhat.com>
2304
2305 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2306 (thread_db_thread_handle): Declare.
2307 * linux-low.c (linux_target_ops): Initialize thread_handle.
2308 * server.c (handle_qxfer_threads_worker): Add support for
2309 "handle" attribute.
2310 * target.h (struct target_ops): Add new function pointer,
2311 thread_handle.
2312 (target_thread_handle): Define.
2313 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2314 field in lwp.
2315 (thread_db_thread_handle): New function.
2316
86299109
KB
23172017-09-21 Kevin Buettner <kevinb@redhat.com>
2318
2319 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2320 * linux-low.h (thread_db_notice_clone): Declare.
2321 * thread-db.c (thread_db_notice_clone): New function.
2322
f557a88a
PA
23232017-09-21 Pedro Alves <palves@redhat.com>
2324
2325 * server.c (gdb_read_memory, handle_status, process_serial_event)
2326 (handle_serial_event, handle_target_event): Adjust to
2327 set_desired_thread prototype change.
2328 * target.c (set_desired_thread): Remove 'use_general' parameter
2329 and adjust.
2330 * target.h (set_desired_thread): Remove 'use_general' parameter.
2331
223ffa71
TT
23322017-09-20 Tom Tromey <tom@tromey.com>
2333
2334 * target.c (target_terminal::terminal_state): Define.
2335 (target_terminal::init): Rename from target_terminal_init.
2336 (target_terminal::inferior): Rename from
2337 target_terminal_inferior.
2338 (target_terminal::ours): Rename from target_terminal_ours.
2339 (target_terminal::ours_for_output, target_terminal::info): New.
2340
04fd3ba9
SM
23412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2342
2343 * server.c (accumulate_file_name_length): Remove.
2344 (emit_dll_description): Adjust to std::string change.
2345 (handle_qxfer_libraries): Use std::string to hold document.
2346
5e187554
SM
23472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2348
2349 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2350 return type of xml_escape_text.
2351 * server.c (emit_dll_description): Likewise.
2352
1526853e
SM
23532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2354
2355 * server.c (captured_main): Accept argument for --selftest.
2356 Update run_tests call.
2357 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2358 when registering selftests.
2359
c4dfafab
SDJ
23602017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2361
2362 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2363 instead of "VEC" for "target_desc.reg_defs".
2364 (regcache_cpy): Likewise.
2365 (registers_to_string): Likewise.
2366 (registers_from_string): Likewise.
2367 (find_regno): Likewise.
2368 (supply_regblock): Likewise.
2369 (regcache_raw_read_unsigned): Likewise.
2370 * tdesc.c (init_target_desc): Likewise.
2371 (tdesc_create_reg): Likewise.
2372 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2373 (struct target_desc) <reg_defs>: Convert to "std::vector".
2374 (target_desc): Do not initialize "reg_defs".
2375 (~target_desc): Update code to use "std::vector" instead of "VEC"
2376 for "target_desc.reg_defs".
2377 (operator==): Likewise.
2378
124aceb4
SM
23792017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2380
2381 * inferiors.h (thread_to_gdb_id): Remove.
2382 * inferiors.c (thread_to_gdb_id): Remove.
2383 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2384 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2385 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2386 Likewise.
2387 * nto-low.c (nto_fetch_registers, nto_store_registers,
2388 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2389
96cde54f
SM
23902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2391
2392 * inferiors.h (gdb_id_to_thread_id): Remove.
2393 * inferiors.c (gdb_id_to_thread_id): Remove.
2394 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2395 removal. Move pid declaration closer to where it's used.
2396
e8ca139e
SM
23972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2398
2399 * server.c (handle_detach): New function.
2400 (process_serial_event): Move code out, call handle_detach.
2401
f8a4e119
SM
24022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2403
2404 * server.c (require_running): Rename to ...
2405 (require_running_or_return): ... this ...
2406 (require_running_or_break): ... and this.
2407 (handle_query, process_serial_event): Adjust.
2408
0eb0a407
SM
24092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2410
2411 * linux-low.c (linux_set_resume_request): Remove unused
2412 variables.
2413
785922a5
SM
24142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2415
2416 * server.c (first_thread_of): Remove.
2417 (process_serial_event): Replace usage of first_thread_of with
2418 find_any_thread_of_pid.
2419 * tracepoint.c (same_process_p): Remove.
2420 (gdb_agent_about_to_close): Replace usage of same_process_p with
2421 find_any_thread_of_pid.
2422 * linux-x86-low.c (same_process_callback): Remove.
2423 (x86_arch_setup_process_callback): Replace usage of
2424 same_process_callback with find_any_thread_of_pid.
2425 * thread-db.c (any_thread_of): Remove.
2426 (switch_to_process): Replace usage of any_thread_of with
2427 find_any_thread_of_pid.
2428 * inferiors.c (thread_pid_matches_callback): Remove.
2429 (find_thread_process): Adjust to use find_any_thread_of_pid.
2430
a059f00c
SDJ
24312017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2432
2433 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2434 with "!VEC_empty".
a059f00c 2435
cc397f3a
SDJ
24362017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2437
2438 * linux-low.c (handle_extended_wait): Use
2439 "allocate_target_description" instead of "XNEW".
2440 * linux-x86-low.c (initialize_low_arch): Likewise.
2441
22916b07
YQ
24422017-09-05 Yao Qi <yao.qi@linaro.org>
2443
2444 * configure.srv (srv_i386_regobj): Remove.
2445 (srv_amd64_regobj): Remove.
2446 (srv_regobj): Set it to "" for x86 non-linux targets.
2447 * linux-x86-tdesc.c (i386_linux_read_description):
2448 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2449 (init_registers_i386): Remove the declaration.
2450 (tdesc_i386): Remove the declaration.
2451 (lynx_i386_arch_setup): Call i386_create_target_description.
2452 * nto-x86-low.c: Likewise.
2453 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2454 [!__x86_64__]: include arch/i386.h.
2455 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2456
38602d55
YQ
24572017-09-05 Yao Qi <yao.qi@linaro.org>
2458
2459 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2460 i386/amd64-XXX-linux from it.
2461
44b886ff
YQ
24622017-09-05 Yao Qi <yao.qi@linaro.org>
2463
2464 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2465 false.
2466 (ipa_amd64_linux_regobj): Remove.
2467 (ipa_x32_linux_regobj): Remove.
2468
b4570e4b
YQ
24692017-09-05 Yao Qi <yao.qi@linaro.org>
2470
2471 * Makefile.in (arch-amd64.o): New rule.
2472 * configure.srv: Append arch-amd64.o.
2473 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2474 (get_ipa_tdesc): Call amd64_linux_read_description.
2475 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2476 and init_registers_amd64_XXX.
2477 * linux-x86-low.c (x86_linux_read_description): Call
2478 amd64_linux_read_description.
2479 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2480 (initialize_low_arch): Don't call init_registers_x32_XXX and
2481 init_registers_amd64_XXX.
2482 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2483 and tdesc_amd64_XXX.
2484 [__x86_64__] (amd64_tdesc_test): New function.
2485 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2486 and init_registers_amd64_XXX.
2487 * linux-x86-tdesc.c: Include arch/amd64.h.
2488 (xcr0_to_tdesc_idx): New function.
2489 (i386_linux_read_description): New function.
2490 (amd64_get_ipa_tdesc_idx): New function.
2491 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2492 (amd64_get_ipa_tdesc): Declare.
2493
d1f28ea2
YQ
24942017-09-05 Yao Qi <yao.qi@linaro.org>
2495
2496 * configure.srv (srv_i386_linux_xmlfiles): Remove
2497 i386/i386-XXX-linux.xml from it.
2498
25a93583
YQ
24992017-09-05 Yao Qi <yao.qi@linaro.org>
2500
2501 * configure.srv: Set srv_i386_linux_regobj empty if $development
2502 is false.
2503 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2504 initialize_low_tdesc.
2505 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2506 with #if initialize_low_tdesc.
2507 * linux-x86-tdesc-selftest.c: New file.
2508 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2509
5f035c07
YQ
25102017-09-05 Yao Qi <yao.qi@linaro.org>
2511
2512 * Makefile.in (arch-i386.o): New rule.
2513 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2514 (x86_64-*-linux*): Likewise.
2515 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2516 include arch/i386.h.
2517 (i386_linux_read_description): Remove code and call
2518 i386_create_target_description.
2519 * tdesc.c (allocate_target_description): New function.
2520 * tdesc.h (set_tdesc_architecture): Remove declaration.
2521 (set_tdesc_osabi): Likewise.
2522
0abe8a89
YQ
25232017-09-05 Yao Qi <yao.qi@linaro.org>
2524
2525 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2526 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2527 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2528 .xmltarget.
2529 * server.c (get_features_xml): Call tdesc_get_features_xml.
2530 * tdesc.c (set_tdesc_architecture): New function.
2531 (set_tdesc_osabi): New function.
2532 (tdesc_get_features_xml): New function.
2533 (tdesc_create_feature): Add an argument.
2534 * tdesc.h (struct target_desc) <features>: New field.
2535 <arch, osabi>: New field.
2536 (~target_desc): xfree features, arch, and osabi.
2537 (target_desc::oerator==): Don't compare .xmltarget.
2538 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2539 (set_tdesc_osabi): Likewise.
2540 (tdesc_get_features_xml): Likewise.
2541
0a188386
YQ
25422017-09-05 Yao Qi <yao.qi@linaro.org>
2543
2544 * linux-x86-tdesc.c: Include selftest.h.
2545 (i386_tdesc_test): New function.
2546 (initialize_low_tdesc): Call selftests::register_test.
2547 * tdesc.h: Include regdef.h.
2548 (target_desc): Override operator == and !=.
2549
f49ff000
YQ
25502017-09-05 Yao Qi <yao.qi@linaro.org>
2551
2552 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2553 (ipa_obj): Likewise.
2554 * linux-i386-ipa.c: Include common/x86-xstate.h
2555 (get_ipa_tdesc): Call i386_linux_read_description.
2556 (initialize_low_tracepoint): Don't call init_registers_XXX
2557 functions, call initialize_low_tdesc instead.
2558 * linux-x86-low.c (x86_linux_read_description): Call
2559 i386_linux_read_description.
2560 (initialize_low_arch): Don't call init_registers_i386_XXX
2561 functions, call initialize_low_tdesc.
2562 * linux-x86-tdesc.c: New file.
2563 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2564 (i386_get_ipa_tdesc_idx): Declare.
2565 (i386_get_ipa_tdesc): Declare.
2566 (initialize_low_tdesc): Declare.
2567
2b68ef2f
YQ
25682017-09-05 Yao Qi <yao.qi@linaro.org>
2569
2570 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2571 instead of 0.
2572
f7000548
YQ
25732017-09-05 Yao Qi <yao.qi@linaro.org>
2574
2575 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2576 * regcache.c (get_thread_regcache): Use VEC_length.
2577 (init_register_cache): Likewise.
2578 (regcache_cpy): Likewise.
2579 (registers_to_string): Iterate reg_defs via VEC_iterate.
2580 (find_regno): Likewise.
2581 (find_register_by_number): Use VEC_index.
2582 (register_size): Call find_register_by_number.
2583 (register_data): Call find_register_by_number.
2584 (supply_regblock): Use VEC_length.
2585 (regcache_raw_read_unsigned): Likewise.
2586 * tdesc.c (init_target_desc): Iterate reg_defs via
2587 VEC_iterate.
2588 (default_description): Update initializer.
2589 (copy_target_description): Don't update field num_registers.
2590 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2591 <num_registers>: Remove.
2592
50a421ac
SM
25932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * Makefile.in (.SECONDARY): Define target.
2596
23fdd69e
SM
25972017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2598
2599 * linux-low.c (linux_wait_1): Adjust.
2600 * server.c (queue_stop_reply_callback): Adjust.
2601
0a2dde4a
SDJ
26022017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2603
2604 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2605 QEnvironmentUnset and QEnvironmentReset packets.
2606 (handle_query): Inform remote that QEnvironmentHexEncoded,
2607 QEnvironmentUnset and QEnvironmentReset are supported.
2608
6afd337d
SM
26092017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2610
2611 * inferiors.h (inferior_target_data): Rename to ...
2612 (thread_target_data): ... this.
2613 (inferior_regcache_data): Rename to ...
2614 (thread_regcache_data): ... this.
2615 (set_inferior_regcache_data): Rename to ...
2616 (set_thread_regcache_data): ... this.
2617 * inferiors.c (inferior_target_data): Rename to ...
2618 (thread_target_data): ... this.
2619 (inferior_regcache_data): Rename to ...
2620 (thread_regcache_data): ... this.
2621 (set_inferior_regcache_data): Rename to ...
2622 (set_thread_regcache_data): ... this.
2623 (free_one_thread): Update.
2624 * linux-low.h (get_thread_lwp): Update.
2625 * regcache.c (get_thread_regcache): Update.
2626 (regcache_invalidate_thread): Update.
2627 (free_register_cache_thread): Update.
2628 * win32-i386-low.c (update_debug_registers_callback): Update.
2629 (win32_get_current_dr): Update.
2630 * win32-low.c (thread_rec): Update.
2631 (delete_thread_info): Update.
2632 (continue_one_thread): Update.
2633 (suspend_one_thread): Update.
2634
a160cc46
SM
26352017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * inferiors.c (set_inferior_target_data): Remove.
2638 * inferiors.h (set_inferior_target_data): Remove.
2639
6d580b63
YQ
26402017-08-18 Yao Qi <yao.qi@linaro.org>
2641
2642 * Makefile.in (OBS): Add selftest.o.
2643 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2644 * configure, config.in: Re-generated.
2645 * server.c: Include common/sefltest.h.
2646 (captured_main): Handle option --selftest.
2647
f5a29eb0
YQ
26482017-08-09 Yao Qi <yao.qi@linaro.org>
2649
2650 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2651 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2652 i386-avx-mpx.o and i386-mmx.o.
2653 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2654 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2655 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2656 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2657 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2658 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2659 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2660 i386/amd64-avx-mpx.xml.
2661
57757c2f
YQ
26622017-08-09 Yao Qi <yao.qi@linaro.org>
2663
2664 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2665 and x32-avx-avx512.o.
2666 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2667 i386/x32-avx-avx512.xml.
2668
229d26fc
SM
26692017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2670
2671 * tracepoint.h (enum class fast_tpoint_collect_result): New
2672 enumeration.
2673 (fast_tracepoint_collecting): Change return type to
2674 fast_tpoint_collect_result.
2675 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2676 * linux-low.h: Include tracepoint.h.
2677 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2678 fast_tpoint_collect_result.
2679 * linux-low.c (handle_tracepoints): Adjust.
2680 (linux_fast_tracepoint_collecting): Change return type to
2681 fast_tpoint_collect_result.
2682 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2683 linux_wait_1, stuck_in_jump_pad_callback,
2684 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2685 proceed_one_lwp): Adjust to type change.
2686
2e1e43e1
YQ
26872017-07-10 Yao Qi <yao.qi@linaro.org>
2688
2689 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2690
adc764e7
YQ
26912017-06-29 Yao Qi <yao.qi@linaro.org>
2692
2693 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2694 Remove.
2695 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2696
a206891a
SM
26972017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2698
2699 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2700
9a6c7d9c
SDJ
27012017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2702
2703 * linux-low.c (linux_create_inferior): Adjust code to access the
2704 environment information via 'gdb_environ' class.
2705 * lynx-low.c (lynx_create_inferior): Likewise.
2706 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2707 (get_environ): Return a pointer to 'our_environ'.
2708 (captured_main): Initialize 'our_environ'.
2709 * server.h (get_environ): Adjust prototype.
2710 * spu-low.c (spu_create_inferior): Adjust code to access the
2711 environment information via 'gdb_environ' class.
2712
ae3e2ccf
SM
27132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2714
2715 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2716 usage of "register" keyword.
2717
3e019bdc
SM
27182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2719
2720 * configure: Re-generate.
2721
8465943a
SM
27222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2723
2724 * configure: Re-generate.
2725
cf0dd6f0
SM
27262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2727
2728 * Makefile.in (COMPILE.pre): Add "-x c++".
2729
9845682b
SDJ
27302017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2731
2732 * fork-child.c: Conditionally include <signal.h>.
2733
aefd8b33
SDJ
27342017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2735
2736 * server.c (handle_general_set): Handle new packet
2737 "QStartupWithShell".
2738 (handle_query): Add "QStartupWithShell" to the list of supported
2739 packets.
2740 (gdbserver_usage): Add help text explaining the
2741 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2742 options.
2743 (captured_main): Recognize and act upon the presence of the new
2744 CLI options.
2745
2090129c
SDJ
27462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2747 Pedro Alves <palves@redhat.com>
2748
2749 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2750 * configure: Regenerate.
2751 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2752 "fork-inferior.o".
2753 (i[34567]86-*-lynxos*): Likewise.
2754 (spu*-*-*): Likewise.
2755 * fork-child.c: New file.
2756 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2757 and "environ.h".
2758 (linux_ptrace_fun): New function.
2759 (linux_create_inferior): Adjust function prototype to reflect
2760 change on "target.h". Adjust function code to use
2761 "fork_inferior".
2762 (linux_request_interrupt): Delete "signal_pid".
2763 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2764 (lynx_ptrace_fun): New function.
2765 (lynx_create_inferior): Adjust function prototype to reflect
2766 change on "target.h". Adjust function code to use
2767 "fork_inferior".
2768 * nto-low.c (nto_create_inferior): Adjust function prototype and
2769 code to reflect change on "target.h". Update comments.
2770 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2771 "common-terminal.h" and "environ.h".
2772 (terminal_fd): Moved to fork-child.c.
2773 (old_foreground_pgrp): Likewise.
2774 (restore_old_foreground_pgrp): Likewise.
2775 (last_status): Make it global.
2776 (last_ptid): Likewise.
2777 (our_environ): New variable.
2778 (startup_with_shell): Likewise.
2779 (program_name): Likewise.
2780 (program_argv): Rename to...
2781 (program_args): ...this.
2782 (wrapper_argv): New variable.
2783 (start_inferior): Delete function.
2784 (get_exec_wrapper): New function.
2785 (get_exec_file): Likewise.
2786 (get_environ): Likewise.
2787 (prefork_hook): Likewise.
2788 (post_fork_inferior): Likewise.
2789 (postfork_hook): Likewise.
2790 (postfork_child_hook): Likewise.
2791 (handle_v_run): Update code to deal with arguments coming from the
2792 remote host. Update calls from "start_inferior" to
2793 "create_inferior".
2794 (captured_main): Likewise. Initialize environment variable. Call
2795 "have_job_control".
2796 * server.h (post_fork_inferior): New prototype.
2797 (get_environ): Likewise.
2798 (last_status): Declare.
2799 (last_ptid): Likewise.
2800 (signal_pid): Likewise.
2801 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2802 (spu_ptrace_fun): New function.
2803 (spu_create_inferior): Adjust function prototype to reflect change
2804 on "target.h". Adjust function code to use "fork_inferior".
2805 * target.c (target_terminal_init): New function.
2806 (target_terminal_inferior): Likewise.
2807 (target_terminal_ours): Likewise.
2808 * target.h: Include <vector>.
2809 (struct target_ops) <create_inferior>: Update prototype.
2810 (create_inferior): Update macro.
2811 * utils.c (gdb_flush_out_err): New function.
2812 * win32-low.c (win32_create_inferior): Adjust function prototype
2813 and code to reflect change on "target.h".
2814
043a4934
SDJ
28152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2816
2817 * inferiors.c (switch_to_thread): New function.
2818
15652511
SDJ
28192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2820
2821 * Makefile.in (SFILE): Add "common/job-control.c".
2822 (OBS): Add "job-control.o".
2823
21ea5acd
SDJ
28242017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2825
2826 * Makefile: Remove "@host_makefile_frag@".
2827
e13cb306
PA
28282017-05-05 Pedro Alves <palves@redhat.com>
2829
2830 * configure: Regenerate.
2831
c94fee56
SDJ
28322017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2833
2834 * configure: Regenerate.
2835
a0ff9e1a
SM
28362017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2837
2838 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2839 software_single_step change of return type to
2840 std::vector<CORE_ADDR>.
2841 * linux-low.c (install_software_single_step_breakpoints):
2842 Likewise.
2843 * linux-low.h (install_software_single_step_breakpoints):
2844 Likewise.
2845
be628ab8
SDJ
28462017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2847
2848 * remote-utils.c: Include "gdb_termios.h" instead of
2849 "terminal.h".
2850 * terminal.h: Delete file.
2851
7c5ded6a
SDJ
28522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2853
2854 * server.c: Include <vector>.
2855 <program_argv, wrapper_argv>: Convert to std::vector.
2856 (start_inferior): Rewrite function to use C++.
2857 (handle_v_run): Likewise. Update code that calculates the argv
2858 based on the vRun packet; use C++.
2859 (captured_main): Likewise.
2860
436252de
SM
28612017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2862
2863 * server.c (handle_v_cont): Initialize thread_resume::thread
2864 with null_ptid.
2865
9bf2a700
PA
28662017-04-05 Pedro Alves <palves@redhat.com>
2867
2868 * configure: Regenerate.
2869
a121b7c1
PA
28702017-04-05 Pedro Alves <palves@redhat.com>
2871
2872 * gdbreplay.c (sync_error): Constify.
2873 * linux-x86-low.c (push_opcode): Constify.
2874
21c8a587
PA
28752017-04-05 Pedro Alves <palves@redhat.com>
2876
2877 * win32-low.c (get_child_debug_event)
2878 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2879 Report TARGET_WAITKIND_SPURIOUS instead.
2880
fb32b4f7
PA
28812017-04-05 Pedro Alves <palves@redhat.com>
2882
e79be6e5
SM
2883 * remote-utils.c (remote_prepare, remote_open): Constify.
2884 * remote-utils.h (remote_prepare, remote_open): Constify.
2885 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2886
65dd1e59
SM
28872017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2888
2889 * Makefile.in (clean): Clear .deps.
2890
8fa5b777
SM
28912017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2892
2893 * .gitignore: Remove generated files, replace with wildcard.
2894 * (clean): Replace removal of generated files with wildcard.
2895 (version.c): Replace with...
2896 (version-generated.c): ...this.
2897 (xml-builtin.c): Replace with...
2898 (xml-builtin-generated.c): ...this.
2899 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2900 (%.c: *regformats*): Replace with...
2901 (%-generated.c: *regformats*): ...this.
2902
a12e714b
MF
29032017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2904
2905 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2906 (xtensa_fill_gregset): Call collect_register_by_name for
2907 threadptr register.
2908 (xtensa_store_gregset): Call supply_register_by_name for
2909 threadptr register.
2910
1a09b50a
MF
29112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2912
2913 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2914 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2915 (xtensa_store_gregset): Call supply_register for all registers in
2916 a0_regnum..a0_regnum + C0_NREGS range.
2917
1a01e7c6
SM
29182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2919
2920 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2921 (ax-ipa.o: ax.c): Remove.
2922 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2923 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2924 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2925 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2926 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2927
36bc18a8
SM
29282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2929
2930 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2931 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2932 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2933 (errors-ipa.o: ../common/errors.c): Remove.
2934 (format-ipa.o: ../common/format.c): Remove.
2935 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2936
a8ebe3d5
SM
29372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2938
2939 * Makefile.in (%-ipa.o: %.c): New rule.
2940 (tracepoint-ipa.o: tracepoint.c): Remove.
2941 (utils-ipa.o: utils.c): Remove.
2942 (remote-utils-ipa.o: remote-utils.c): Remove.
2943 (regcache-ipa.o: regcache.c): Remove.
2944 (i386-linux-ipa.o: i386-linux.c): Remove.
2945 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2946 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2947 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2948 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2949 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2950 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2951 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2952 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2953 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2954 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2955 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2956 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2957 (aarch64-ipa.o: aarch64.c): Remove.
2958 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2959 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2960 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2961 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2962 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2963 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2964 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2965 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2966 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2967 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2968 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2969 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2970 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2971 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2972 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2973 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2974 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2975 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2976 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2977 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2978 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2979 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2980 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2981 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2982 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2983 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2984 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2985 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2986 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2987 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2988 (tdesc-ipa.o: tdesc.c): Remove.
2989 (x32-linux-ipa.o: x32-linux.c): Remove.
2990 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2991 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2992
50cfacb7
SM
29932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2994
2995 * Makefile.in (%.o: ../arch/%.c): New rule.
2996 (arm.o: ../arch/arm.c): Remove.
2997 (arm-linux.o: ../arch/arm-linux.c): Remove.
2998 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2999 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3000
c5a22423
SM
30012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3002
3003 * Makefile.in (%.o: ../nat/%.c): New rule.
3004 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3005 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3006 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3007 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3008 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3009 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3010 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3011 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3012 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3013 (linux-personality.o: ../nat/linux-personality.c): Remove.
3014 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3015 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3016 (x86-linux.o: ../nat/x86-linux.c): Remove.
3017 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3018 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3019
6bda016b
SM
30202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3021
3022 * Makefile.in (%.o: ../common/%.c): New rule.
3023 (signals.o: ../common/signals.c): Remove.
3024 (print-utils.o: ../common/print-utils.c): Remove.
3025 (rsp-low.o: ../common/rsp-low.c): Remove.
3026 (common-utils.o: ../common/common-utils.c): Remove.
3027 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3028 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3029 (vec.o: ../common/vec.c): Remove.
3030 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3031 (xml-utils.o: ../common/xml-utils.c): Remove.
3032 (ptid.o: ../common/ptid.c): Remove.
3033 (buffer.o: ../common/buffer.c): Remove.
3034 (format.o: ../common/format.c): Remove.
3035 (filestuff.o: ../common/filestuff.c): Remove.
3036 (agent.o: ../common/agent.c): Remove.
3037 (errors.o: ../common/errors.c): Remove.
3038 (environ.o: ../common/environ.c): Remove.
3039 (common-debug.o: ../common/common-debug.c): Remove.
3040 (cleanups.o: ../common/cleanups.c): Remove.
3041 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3042 (fileio.o: ../common/fileio.c): Remove.
3043 (common-regcache.o: ../common/common-regcache.c): Remove.
3044 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3045 (new-op.o: ../common/new-op.c): Remove.
3046 (btrace-common.o: ../common/btrace-common.c): Remove.
3047
21122961
SM
30482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3049
3050 * Makefile.in (%.o: ../target/%.c): New rule.
3051 (waitstatus.o: ../target/waitstatus.c): Remove.
3052
c362e621
SM
30532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * Makefile.in
3056 (%.c: ../regformats/%.dat,
3057 (%.c: ../regformats/arm/%.dat,
3058 (%.c: ../regformats/i386/%.dat,
3059 (%.c: ../regformats/rs6000/%.dat): New rules.
3060 (aarch64.c): Remove.
3061 (reg-arm.c): Remove.
3062 (arm-with-iwmmxt.c): Remove.
3063 (arm-with-vfpv2.c): Remove.
3064 (arm-with-vfpv3.c): Remove.
3065 (arm-with-neon.c): Remove.
3066 (reg-bfin.c): Remove.
3067 (reg-cris.c): Remove.
3068 (reg-crisv32.c): Remove.
3069 (i386.c): Remove.
3070 (i386-linux.c): Remove.
3071 (i386-avx.c): Remove.
3072 (i386-avx-linux.c): Remove.
3073 (i386-avx-avx512.c): Remove.
3074 (i386-avx-avx512-linux.c): Remove.
3075 (i386-mpx.c): Remove.
3076 (i386-mpx-linux.c): Remove.
3077 (i386-avx-mpx-avx512-pku.c): Remove.
3078 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3079 (i386-avx-mpx.c): Remove.
3080 (i386-avx-mpx-linux.c): Remove.
3081 (i386-mmx.c): Remove.
3082 (i386-mmx-linux.c): Remove.
3083 (reg-ia64.c): Remove.
3084 (reg-m32r.c): Remove.
3085 (reg-m68k.c): Remove.
3086 (reg-cf.c): Remove.
3087 (mips-linux.c): Remove.
3088 (mips-dsp-linux.c): Remove.
3089 (mips64-linux.c): Remove.
3090 (mips64-dsp-linux.c): Remove.
3091 (nios2-linux.c): Remove.
3092 (powerpc-32.c): Remove.
3093 (powerpc-32l.c): Remove.
3094 (powerpc-altivec32l.c): Remove.
3095 (powerpc-cell32l.c): Remove.
3096 (powerpc-vsx32l.c): Remove.
3097 (powerpc-isa205-32l.c): Remove.
3098 (powerpc-isa205-altivec32l.c): Remove.
3099 (powerpc-isa205-vsx32l.c): Remove.
3100 (powerpc-e500l.c): Remove.
3101 (powerpc-64l.c): Remove.
3102 (powerpc-altivec64l.c): Remove.
3103 (powerpc-cell64l.c): Remove.
3104 (powerpc-vsx64l.c): Remove.
3105 (powerpc-isa205-64l.c): Remove.
3106 (powerpc-isa205-altivec64l.c): Remove.
3107 (powerpc-isa205-vsx64l.c): Remove.
3108 (s390-linux32.c): Remove.
3109 (s390-linux32v1.c): Remove.
3110 (s390-linux32v2.c): Remove.
3111 (s390-linux64.c): Remove.
3112 (s390-linux64v1.c): Remove.
3113 (s390-linux64v2.c): Remove.
3114 (s390-te-linux64.c): Remove.
3115 (s390-vx-linux64.c): Remove.
3116 (s390-tevx-linux64.c): Remove.
3117 (s390x-linux64.c): Remove.
3118 (s390x-linux64v1.c): Remove.
3119 (s390x-linux64v2.c): Remove.
3120 (s390x-te-linux64.c): Remove.
3121 (s390x-vx-linux64.c): Remove.
3122 (s390x-tevx-linux64.c): Remove.
3123 (tic6x-c64xp-linux.c): Remove.
3124 (tic6x-c64x-linux.c): Remove.
3125 (tic6x-c62x-linux.c): Remove.
3126 (reg-sh.c): Remove.
3127 (reg-sparc64.c): Remove.
3128 (reg-spu.c): Remove.
3129 (amd64.c): Remove.
3130 (amd64-linux.c): Remove.
3131 (amd64-avx.c): Remove.
3132 (amd64-avx-linux.c): Remove.
3133 (amd64-avx-avx512.c): Remove.
3134 (amd64-avx-avx512-linux.c): Remove.
3135 (amd64-mpx.c): Remove.
3136 (amd64-mpx-linux.c): Remove.
3137 (amd64-avx-mpx-avx512-pku.c): Remove.
3138 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3139 (amd64-avx-mpx.c): Remove.
3140 (amd64-avx-mpx-linux.c): Remove.
3141 (x32.c): Remove.
3142 (x32-linux.c): Remove.
3143 (x32-avx.c): Remove.
3144 (x32-avx-linux.c): Remove.
3145 (x32-avx-avx512.c): Remove.
3146 (x32-avx-avx512-linux.c): Remove.
3147 (reg-xtensa.c): Remove.
3148 (reg-tilegx.c): Remove.
3149 (reg-tilegx32.c): Remove.
3150
1672e0d9
SDJ
31512017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3152
3153 * Makefile.in (SFILES): Add "common/environ.c".
3154 (OBJS): Add "common/environ.h".
3155
239b6d10
WT
31562017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3157
3158 * configure.ac: Check if the fs_base and gs_base members of
3159 `struct user_regs_struct' exist.
3160 * config.in: Regenerated.
3161 * configure: Likewise.
3162
694b382c
AT
31632017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3164
3165 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3166 target_read_memory.
3167 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3168 (get_next_pcs_syscall_next_pc): Likewise.
3169
7dc53023
LM
31702016-12-23 Luis Machado <lgustavo@codesourcery.com>
3171
3172 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3173 * nto-x86-low.c: Likewise.
3174
ad02e4fe
SM
31752016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3176
3177 * Makefile.in: Include disable-implicit-rules.mk.
3178
dcb07cfa
PA
31792016-11-23 Pedro Alves <palves@redhat.com>
3180
3181 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3182 (debug_vprintf): Use std::chrono::steady_clock instead of
3183 gettimeofday. Use '.' instead of ':'.
3184 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3185 (get_timestamp): Use std::chrono::steady_clock instead of
3186 gettimeofday.
3187
8629c02c
SM
31882016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3189
3190 * Makefile.in: Fix whitespace formatting.
3191
b593ecca
SM
31922016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3193
3194 * Makefile.in (SFILES, OBS): Flatten list and order
3195 alphabetically.
3196
9986ba08
PA
31972016-11-23 Pedro Alves <palves@redhat.com>
3198
3199 * event-loop.c (handle_file_event): Use warning.
3200 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3201 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3202 Use warning.
3203
4eefa7bc
PA
32042016-11-23 Pedro Alves <palves@redhat.com>
3205
3206 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3207 output.
3208 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3209 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3210 debug_printf and debug_flush for debug output.
3211 * server.c (handle_general_set): Likewise.
3212 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3213 output.
3214
5443506e
SM
32152016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3216
3217 * Makefile.in (.c.o): Replace rule with ...
3218 (%.o: %.c): ... this one.
3219
3b165252
SM
32202016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3221
3222 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3223 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3224 make.
3225 * configure.ac: Remove checks for the make program.
3226 * configure: Re-generate.
3227
0bcda685
PA
32282016-10-28 Pedro Alves <palves@redhat.com>
3229
3230 * Makefile.in (CXX_DIALECT): Get from configure.
3231 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3232 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3233 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3234 * config.in: Regenerate.
3235 * configure: Regenerate.
3236
c3805894
YQ
32372016-10-27 Yao Qi <yao.qi@linaro.org>
3238
3239 * linux-low.c (linux_supports_range_stepping): Return true if
3240 can_software_single_step return true.
3241
89342618
YQ
32422016-10-27 Yao Qi <yao.qi@linaro.org>
3243
3244 * inferiors.c (find_inferior_in_random): New function.
3245 * inferiors.h (find_inferior_in_random): Declare.
3246 * linux-low.c (linux_wait_for_event_filtered): Call
3247 find_inferior_in_random instead of find_inferior.
3248
e3652c84
YQ
32492016-10-27 Yao Qi <yao.qi@linaro.org>
3250
3251 * linux-low.c (linux_wait_1): If single-step breakpoints are
3252 inserted, remove them.
3253
5a04c4cf
PA
32542016-10-26 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (handle_extended_wait): Link parent/child fork
3257 threads.
3258 (linux_wait_1): Unlink them.
3259 (linux_set_resume_request): Ignore resume requests for
3260 already-resumed and unhandled fork child threads.
3261 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3262 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3263 New functions.
3264 (handle_v_requests) <vCont>: Don't call require_running.
3265 * server.h (in_queued_stop_replies): New declaration.
3266
cb93dc7f
YQ
32672016-10-24 Yao Qi <yao.qi@linaro.org>
3268
3269 PR server/20733
3270 * linux-aarch64-low.c (append_insns): Cast the return value to
3271 'uint32_t *'.
3272
a1078bea
YQ
32732016-10-10 Yao Qi <yao.qi@linaro.org>
3274
3275 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3276
1fb77080
SDJ
32772016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3278
3279 * target.c (target_supports_multi_process): New function, moved
3280 from...
3281 * target.h (target_supports_multi_process): ... here. Remove
3282 macro.
3283
39b5a3b9
TT
32842016-10-05 Tom Tromey <tom@tromey.com>
3285
3286 PR remote/20655:
3287 * tracepoint.c (handle_tracepoint_bkpts): Check
3288 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3289
c1d0b70a
YQ
32902016-10-05 Yao Qi <yao.qi@linaro.org>
3291
3292 * configure.srv: Update the path of arm-*.xml files.
3293
0a69eedb
YQ
32942016-10-05 Terry Guo <terry.guo@arm.com>
3295 Yao Qi <yao.qi@linaro.org>
3296
3297 * Makefile.in: Adjust the path of rules.
3298 * configure.srv: Update the path of xml files.
3299 * regformats/arm-with-iwmmxt.dat: Regenerated.
3300 * regformats/arm-with-neon.dat: Likewise.
3301 * regformats/arm-with-vfpv2.dat: Likewise.
3302 * regformats/arm-with-vfpv3.dat Likewise.
3303
17e16485
YQ
33042016-09-30 Yao Qi <yao.qi@linaro.org>
3305
3306 PR gdbserver/20627
3307 * target.c (target_stop_and_wait): Don't call
3308 target_continue_no_signal, use resume_stop instead.
3309
edeeb602
YQ
33102016-09-26 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-low.c (linux_wait_1): Call debug_exit.
3313
503b1c39
PA
33142016-09-23 Pedro Alves <palves@redhat.com>
3315
3316 * Makefile.in (SFILES): Add common/new-op.c.
3317 (OBS): Add common/new-op.o.
3318 (new-op.o): New rule.
3319
74172ecf
SM
33202016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3321
3322 * .gitinore: Ignore more files.
3323
fc6cda2e
YQ
33242016-09-21 Yao Qi <yao.qi@linaro.org>
3325
3326 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3327 23.
3328
bc1e6c81
SDJ
33292016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3330
3331 * server.c (start_inferior): Call target_mourn_inferior instead of
3332 mourn_inferior; pass ptid_t argument to it.
3333 (resume): Likewise.
3334 (handle_target_event): Likewise.
3335 * target.c (target_mourn_inferior): New function.
3336 * target.h (mourn_inferior): Delete macro.
3337
0e00e962
AA
33382016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3339
3340 * linux-low.c (lwp_is_stepping): New function.
3341
1d8cb77d
CL
33422016-09-06 Carl Love <cel@us.ibm.com>
3343
3344 * server.c (start_inferior): Fixed comment, requested comment change
3345 didn't get updated correctly. Removed reference to ptrace () call as
3346 it is only true on Linux systems.
3347
7313bced
CL
33482016-09-06 Carl Love <cel@us.ibm.com>
3349
3350 * server.c (start_inferior): Do not call
3351 function target_post_create_inferior () if the
3352 inferior process has already exited.
3353
cf6de44d
PA
33542016-09-05 Pedro Alves <palves@redhat.com>
3355
3356 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3357 (COMPILE.pre, CC_LD): Use CXX directly.
3358 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3359 * acinclude.m4: Don't include build-with-cxx.m4.
3360 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3361 * configure: Regenerate.
3362
c1da6748
AT
33632016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3364
3365 PR gdb/19495
3366 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3367 call writing data to own_buf.
3368
f2b9e3df
SDJ
33692016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3370
3371 * target.c (mywait): Call target_wait instead of
3372 the_target->wait.
3373 (target_wait): New function.
3374
049a8570
SDJ
33752016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3376
3377 * server.c (start_inferior): New variable 'ptid'. Replace calls
3378 to the_target->resume by target_continue{,_no_signal}, depending
3379 on the case.
3380 * target.c (target_stop_and_wait): Call target_continue_no_signal
3381 instead of the_target->resume.
3382 (target_continue): New function.
3383
3aa5cfa0
AT
33842016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3385
3386 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3387
754653a7
AZ
33882016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3389
3390 PR server/20491
3391 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3392 ps_prochandle.
3393 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3394 * linux-arm-low.c (ps_get_thread_area): Likewise.
3395 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3396 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3397 * linux-mips-low.c (ps_get_thread_area): Likewise.
3398 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3399 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3400 * linux-x86-low.c (ps_get_thread_area): Likewise.
3401 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3402
ed036b40
PA
34032016-08-19 Pedro Alves <palves@redhat.com>
3404
3405 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3406
c8ef42ee
PA
34072016-08-19 Pedro Alves <palves@redhat.com>
3408
3409 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3410 comment. Use memcpy instead of casting through unsigned long.
3411
9c235a72
PA
34122016-08-19 Pedro Alves <palves@redhat.com>
3413
3414 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3415 allocating around 0x80000000.
3416
201506da
PA
34172016-08-19 Pedro Alves <palves@redhat.com>
3418
3419 PR gdb/20415
3420 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3421 (x32-avx512-linux-ipa.o): New rules.
3422 * configure.ac (x86_64-*-linux*): New x32 check.
3423 * configure.srv (ipa_x32_linux_regobj): New.
3424 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3425 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3426 descriptions.
3427 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3428 descriptions.
3429 * configure: Regenerate.
3430
f348d89a
PA
34312016-08-09 Pedro Alves <palves@redhat.com>
3432
3433 PR gdb/18653
3434 * Makefile.in (OBS): Add signals-state-save-restore.o.
3435 (signals-state-save-restore.o): New rule.
3436 * config.in: Regenerate.
3437 * configure: Regenerate.
3438 * linux-low.c: Include "signals-state-save-restore.h".
3439 (linux_create_inferior): Call
3440 restore_original_signals_state.
3441 * server.c: Include "dispositions-save-restore.h".
3442 (captured_main): Call save_original_signals_state.
3443
1baf5149
PA
34442016-08-05 Pedro Alves <palves@redhat.com>
3445
3446 * configure: Regenerate.
3447
fcd4a73d
YQ
34482016-08-04 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-low.c (regsets_fetch_inferior_registers): Check
3451 errno is ESRCH or not.
3452
979659d0
YQ
34532016-08-02 Yao Qi <yao.qi@linaro.org>
3454
3455 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3456 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3457 (thread_db_load_search): Update.
3458 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3459 td_ta_set_event and td_ta_event_getmsg.
3460
6598661d
PA
34612016-07-26 Pedro Alves <palves@redhat.com>
3462
3463 PR server/20414
3464 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3465 of unsigned long for 64-bit registers and use uint32_t instead of
3466 unsigned int for 32-bit registers.
3467
9cf12d57
PA
34682016-07-26 Pedro Alves <palves@redhat.com>
3469
3470 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3471 to 'ptrace'.
3472
305450ed
TT
34732016-07-21 Tom Tromey <tom@tromey.com>
3474
3475 * configure: Rebuild.
3476
2583da7c
YQ
34772016-07-21 Yao Qi <yao.qi@linaro.org>
3478
3479 * mem-break.c (find_gdb_breakpoint): Cast bp to
3480 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3481
21536b36
YQ
34822016-07-21 Yao Qi <yao.qi@linaro.org>
3483
3484 * server.c (handle_v_requests): Support s and S actions
3485 if target_supports_software_single_step return true.
3486
8901d193
YQ
34872016-07-21 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3490 is resume_step, call maybe_hw_step.
3491 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3492 and unstop them.
3493 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3494 breakpoints or not.
3495 (proceed_one_lwp): If resume request is resume_step, install
3496 reinsert breakpoints and call maybe_hw_step.
3497
0e9a339e
YQ
34982016-07-21 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-low.c (proceed_one_lwp): Declare.
3501 (linux_resume_one_thread): Remove local variable 'step'.
3502 Lift code enqueue signal. Call proceed_one_lwp instead of
3503 linux_resume_one_lwp.
3504
4281b351
YQ
35052016-07-21 Yao Qi <yao.qi@linaro.org>
3506
3507 * linux-low.c (linux_resume_one_thread): Call
3508 enqueue_pending_signal.
3509
984a2c04
YQ
35102016-07-21 Yao Qi <yao.qi@linaro.org>
3511
3512 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3513 * inferiors.c (do_restore_current_thread_cleanup): New function.
3514 (make_cleanup_restore_current_thread): Likewise.
3515 * linux-low.c (install_software_single_step_breakpoints): Call
3516 make_cleanup_restore_current_thread. Switch current_thread to
3517 thread.
3518
bec903c9
YQ
35192016-07-21 Yao Qi <yao.qi@linaro.org>
3520
3521 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3522 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3523 (clone_one_breakpoint): Likewise.
3524 (delete_reinsert_breakpoints): Change parameter to thread.
3525 Callers updated.
3526 (has_reinsert_breakpoints): Likewise.
3527 (uninsert_reinsert_breakpoints): Likewise.
3528 (reinsert_reinsert_breakpoints): Likewise.
3529 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3530 (delete_reinsert_breakpoints): Likewise.
3531 (reinsert_reinsert_breakpoints): Likewise.
3532 (uninsert_reinsert_breakpoints): Likewise.
3533 (has_reinsert_breakpoints): Likewise.
3534
63c40ec7
YQ
35352016-07-21 Yao Qi <yao.qi@linaro.org>
3536
3537 * inferiors.c (get_thread_process): Make parameter const.
3538 * inferiors.h (get_thread_process): Update declaration.
3539 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3540 Add new parameters child_thread and parent_thread. Callers
3541 updated.
3542 * mem-break.h (clone_all_breakpoints): Update declaration.
3543
9aa76cd0
YQ
35442016-07-21 Yao Qi <yao.qi@linaro.org>
3545
3546 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3547 <command_list, handler>: Remove.
3548 (struct gdb_breakpoint): New.
3549 (struct other_breakpoint): New.
3550 (struct reinsert_breakpoint): New.
3551 (is_gdb_breakpoint): New function.
3552 (any_persistent_commands): Update command_list if
3553 is_gdb_breakpoint returns true.
3554 (set_breakpoint): Create breakpoints according to their types.
3555 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3556 (set_gdb_breakpoint_1): Likewise.
3557 (set_gdb_breakpoint): Likewise.
3558 (clear_breakpoint_conditions): Change parameter type to
3559 'struct gdb_breakpoint *'.
3560 (clear_breakpoint_commands): Likewise.
3561 (clear_breakpoint_conditions_and_commands): Likewise.
3562 (add_condition_to_breakpoint): Likewise.
3563 (add_breakpoint_condition): Likewise.
3564 (add_commands_to_breakpoint): Likewise.
3565 (check_breakpoints): Check other_breakpoint.
3566 (clone_one_breakpoint): Clone breakpopint according to its type.
3567 * mem-break.h (struct gdb_breakpoint): Declare.
3568 (set_gdb_breakpoint): Update declaration.
3569 (clear_breakpoint_conditions_and_commands): Likewise.
3570 (add_breakpoint_condition): Likewise.
3571 (add_breakpoint_commands): Likewise.
3572 * server.c (process_point_options): Change parameter type to
3573 'struct gdb_breakpoint *'.
3574
811f8301
YQ
35752016-07-21 Yao Qi <yao.qi@linaro.org>
3576
3577 * mem-break.c (set_breakpoint_at): Rename it to ...
3578 (set_breakpoint_type_at): ... it.
3579 (set_breakpoint_at): Call set_breakpoint_type_at.
3580 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3581 * mem-break.h (set_breakpoint_at): Update comments.
3582
b1c51e36
CLT
35832016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3584
3585 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3586 to buf parameter.
3587 (nios2_store_gregset): Likewise.
3588
ced2dffb
PA
35892016-07-01 Pedro Alves <palves@redhat.com>
3590 Antoine Tremblay <antoine.tremblay@ericsson.com>
3591
3592 * linux-low.c: Change interface to take the target lwp_info
3593 pointer directly and return void. Handle detaching from a zombie
3594 thread.
3595 (linux_detach_lwp_callback): New function.
3596 (linux_detach): Detach from the leader thread after detaching from
3597 the clone threads.
3598
2ac09a5b
YQ
35992016-06-28 Yao Qi <yao.qi@linaro.org>
3600
3601 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3602 for variable new_offset.
3603 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3604 (aarch64_ftrace_insn_reloc_cb): Likewise.
3605 (aarch64_ftrace_insn_reloc_tb): Likewise.
3606 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3607 PRIx64 instead of PRIx32.
3608
79e7fd4f
YQ
36092016-06-28 Yao Qi <yao.qi@linaro.org>
3610
3611 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3612 (the_low_target): Install arm_get_syscall_trapinfo.
3613
061fc021
YQ
36142016-06-28 Yao Qi <yao.qi@linaro.org>
3615
3616 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3617 function.
3618 (the_low_target): Install aarch64_get_syscall_trapinfo.
3619
4cc32bec
YQ
36202016-06-28 Yao Qi <yao.qi@linaro.org>
3621
3622 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3623 Callers updated.
3624 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3625 Remove parameter sysno.
3626 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3627 sysret.
3628
782c1122
AA
36292016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3630
3631 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3632 (s390_emit_ne_goto): Likewise.
3633 (s390_emit_lt_goto): Likewise.
3634 (s390_emit_le_goto): Likewise.
3635 (s390_emit_gt_goto): Likewise.
3636 (s390_emit_ge_goto): Likewise.
3637 (s390x_emit_eq_goto): Likewise.
3638 (s390x_emit_ne_goto): Likewise.
3639 (s390x_emit_lt_goto): Likewise.
3640 (s390x_emit_le_goto): Likewise.
3641 (s390x_emit_gt_goto): Likewise.
3642 (s390x_emit_ge_goto): Likewise.
3643 (s390_emit_ops_impl): Mark variable static.
3644 (s390x_emit_ops): Likewise.
3645
2e7b624b
YQ
36462016-06-17 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-low.c (handle_extended_wait): Call
3649 uninsert_reinsert_breakpoints for the parent process. Remove
3650 reinsert breakpoints from the child process. Reinsert them to
3651 the parent process when vfork is done.
3652 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3653 (reinsert_reinsert_breakpoints): New function.
3654 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3655 (reinsert_reinsert_breakpoints): Declare.
3656
8a81c5d7
YQ
36572016-06-17 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-low.c (handle_extended_wait): If the parent is doing
3660 step-over, remove the reinsert breakpoints from the forked child.
3661
f50bf8e5
YQ
36622016-06-17 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-low.c (unsuspend_all_lwps): Declare.
3665 (linux_low_filter_event): If thread exited, call finish_step_over.
3666 If step-over is finished, unsuspend other threads.
3667
8376a3cb
YQ
36682016-06-17 Yao Qi <yao.qi@linaro.org>
3669
3670 * linux-low.c (linux_resume_one_lwp_throw): Assert
3671 has_reinsert_breakpoints returns false.
3672 * mem-break.c (delete_disabled_breakpoints): Assert
3673 bp type isn't reinsert_breakpoint.
3674
f79b145d
YQ
36752016-06-17 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-low.c (maybe_hw_step): New function.
3678 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3679 (finish_step_over): Switch current_thread to lwp temporarily,
3680 and assert has_reinsert_breakpoints returns true.
3681 (proceed_one_lwp): Call maybe_hw_step.
3682 * mem-break.c (has_reinsert_breakpoints): New function.
3683 * mem-break.h (has_reinsert_breakpoints): Declare.
3684
0ae534d2
JT
36852016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3686
3687 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3688
fcdad592
YQ
36892016-05-17 Yao Qi <yao.qi@linaro.org>
3690
3691 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3692 instead of find_inferior.
3693
9e784964
YQ
36942016-05-05 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3697 Initialize res to zero.
3698
cf2ebb6e
YQ
36992016-05-05 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3702 to uint32_t.
3703
c1aebf87
UW
37042016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3705
3706 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3707 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3708 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3709
35fd2deb 37102016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3711 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3712
3713 * tracepoint.c (write_inferior_int8): New function.
3714 (cmd_qtenable_disable): Write enable flag using
3715 write_inferior_int8.
3716
484b3c32
YQ
37172016-04-25 Yao Qi <yao.qi@linaro.org>
3718
3719 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3720 (need_step_over_p): Return zero if the LWP has pending signals
3721 can be delivered on software single step target.
3722
85ba7d86
YQ
37232016-04-25 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3726 return instead of error.
3727
3539aa13
YQ
37282016-04-22 Yao Qi <yao.qi@linaro.org>
3729
3730 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3731 to 23.
3732
5b061e98
YQ
37332016-04-22 Yao Qi <yao.qi@linaro.org>
3734
3735 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3736 signal when stepping over breakpoint with software single
3737 step.
3738
3451269c
PA
37392016-04-21 Pedro Alves <palves@redhat.com>
3740
3741 * linux-s390-low.c (s390_collect_ptrace_register)
3742 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3743 add casts.
3744 (s390_check_regset): Use void * instead of gdb_byte *.
3745
a2358508
PA
37462016-04-20 Pedro Alves <palves@redhat.com>
3747
3748 * configure: Renegerate.
3749
6885166d
YQ
37502016-04-20 Yao Qi <yao.qi@linaro.org>
3751
3752 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3753 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3754 number 16.
3755 (arm_store_gregset): Likewise.
3756
2b863f51
WT
37572016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3758
3759 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3760 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3761 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3762 (amd64-avx-mpx-linux.c): New rules.
3763 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3764 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3765 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3766 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3767 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3768 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3769 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3770 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3771 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3772 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3773 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3774 * linux-x86-low.c (x86_linux_read_description): Add case for
3775 X86_XSTATE_AVX_MPX_MASK.
3776 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3777 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3778 init_registers_i386_avx_mpx_linux.
3779 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3780 (initialize_low_tracepoint): Call
3781 init_registers_i386_avx_mpx_linux.
3782 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3783 (initialize_low_tracepoint): Call
3784 init_registers_amd64_avx_mpx_linux.
3785 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3786 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3787 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3788 declarations.
3789
9b30624b
PA
37902016-04-18 Pedro Alves <palves@redhat.com>
3791
3792 * configure: Regenerate.
3793
45e3745e
AT
37942016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3795
3796 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3797 (aarch64_emit_sub): Likewise.
3798
2afc13ff
PA
37992016-04-12 Pedro Alves <palves@redhat.com>
3800
3801 * utils.c (prepare_to_throw_exception): Delete.
3802
6e774b13
SM
38032016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3804
3805 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3806
4dca19f8
MK
38072016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3808
3809 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3810
d0a9981f
MK
38112016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3812
3813 * linux-aarch64-ipa.c: Add <elf.h> include.
3814 * linux-ppc-ipa.c: Add <elf.h> include.
3815 * linux-s390-ipa.c: Add <elf.h> include.
3816
252db07e
MK
38172016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3818
3819 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3820 (get_raw_reg_ptr): Likewise.
3821 (get_trace_state_variable_value_ptr): Likewise.
3822 (set_trace_state_variable_value_ptr): Likewise.
3823 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3824 char *.
3825
14e2b6d9
MK
38262016-03-31 Wei-cheng Wang <cole945@gmail.com>
3827 Marcin Kościelnicki <koriakin@0x04.net>
3828
3829 PR/17221
3830 * linux-ppc-low.c (emit_insns): New function.
3831 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3832 (ppc_emit_prologue): New function.
3833 (ppc_emit_epilogue): New function.
3834 (ppc_emit_add): New function.
3835 (ppc_emit_sub): New function.
3836 (ppc_emit_mul): New function.
3837 (ppc_emit_lsh): New function.
3838 (ppc_emit_rsh_signed): New function.
3839 (ppc_emit_rsh_unsigned): New function.
3840 (ppc_emit_ext): New function.
3841 (ppc_emit_zero_ext): New function.
3842 (ppc_emit_log_not): New function.
3843 (ppc_emit_bit_and): New function.
3844 (ppc_emit_bit_or): New function.
3845 (ppc_emit_bit_xor): New function.
3846 (ppc_emit_bit_not): New function.
3847 (ppc_emit_equal): New function.
3848 (ppc_emit_less_signed): New function.
3849 (ppc_emit_less_unsigned): New function.
3850 (ppc_emit_ref): New function.
3851 (ppc_emit_const): New function.
3852 (ppc_emit_reg): New function.
3853 (ppc_emit_pop): New function.
3854 (ppc_emit_stack_flush): New function.
3855 (ppc_emit_swap): New function.
3856 (ppc_emit_stack_adjust): New function.
3857 (ppc_emit_call): New function.
3858 (ppc_emit_int_call_1): New function.
3859 (ppc_emit_void_call_2): New function.
3860 (ppc_emit_if_goto): New function.
3861 (ppc_emit_goto): New function.
3862 (ppc_emit_eq_goto): New function.
3863 (ppc_emit_ne_goto): New function.
3864 (ppc_emit_lt_goto): New function.
3865 (ppc_emit_le_goto): New function.
3866 (ppc_emit_gt_goto): New function.
3867 (ppc_emit_ge_goto): New function.
3868 (ppc_write_goto_address): New function.
3869 (ppc_emit_ops_impl): New static variable.
3870 (ppc64v1_emit_prologue): New function.
3871 (ppc64v2_emit_prologue): New function.
3872 (ppc64_emit_epilogue): New function.
3873 (ppc64_emit_add): New function.
3874 (ppc64_emit_sub): New function.
3875 (ppc64_emit_mul): New function.
3876 (ppc64_emit_lsh): New function.
3877 (ppc64_emit_rsh_signed): New function.
3878 (ppc64_emit_rsh_unsigned): New function.
3879 (ppc64_emit_ext): New function.
3880 (ppc64_emit_zero_ext): New function.
3881 (ppc64_emit_log_not): New function.
3882 (ppc64_emit_bit_and): New function.
3883 (ppc64_emit_bit_or): New function.
3884 (ppc64_emit_bit_xor): New function.
3885 (ppc64_emit_bit_not): New function.
3886 (ppc64_emit_equal): New function.
3887 (ppc64_emit_less_signed): New function.
3888 (ppc64_emit_less_unsigned): New function.
3889 (ppc64_emit_ref): New function.
3890 (ppc64_emit_const): New function.
3891 (ppc64v1_emit_reg): New function.
3892 (ppc64v2_emit_reg): New function.
3893 (ppc64_emit_pop): New function.
3894 (ppc64_emit_stack_flush): New function.
3895 (ppc64_emit_swap): New function.
3896 (ppc64v1_emit_call): New function.
3897 (ppc64v2_emit_call): New function.
3898 (ppc64v1_emit_int_call_1): New function.
3899 (ppc64v2_emit_int_call_1): New function.
3900 (ppc64v1_emit_void_call_2): New function.
3901 (ppc64v2_emit_void_call_2): New function.
3902 (ppc64_emit_if_goto): New function.
3903 (ppc64_emit_eq_goto): New function.
3904 (ppc64_emit_ne_goto): New function.
3905 (ppc64_emit_lt_goto): New function.
3906 (ppc64_emit_le_goto): New function.
3907 (ppc64_emit_gt_goto): New function.
3908 (ppc64_emit_ge_goto): New function.
3909 (ppc64v1_emit_ops_impl): New static variable.
3910 (ppc64v2_emit_ops_impl): New static variable.
3911 (ppc_emit_ops): New function.
3912 (linux_low_target): Wire in ppc_emit_ops.
3913
a2174ba4
MK
39142016-03-31 Wei-cheng Wang <cole945@gmail.com>
3915 Marcin Kościelnicki <koriakin@0x04.net>
3916
3917 PR/17221
3918 * Makefile.in: Add powerpc-*-ipa.o
3919 * configure.srv: Add ipa_obj for powerpc*-linux.
3920 * linux-ppc-ipa.c: New file.
3921 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3922 includes.
3923 (PPC_FIELD): New macro.
3924 (PPC_SEXT): New macro.
3925 (PPC_OP6): New macro.
3926 (PPC_BO): New macro.
3927 (PPC_LI): New macro.
3928 (PPC_BD): New macro.
3929 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3930 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3931 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3932 (ppc_get_thread_area): New function.
3933 (is_elfv2_inferior): New function.
3934 (gen_ds_form): New function.
3935 (GEN_STD): New macro.
3936 (GEN_STDU): New macro.
3937 (GEN_LD): New macro.
3938 (GEN_LDU): New macro.
3939 (gen_d_form): New function.
3940 (GEN_ADDI): New macro.
3941 (GEN_ADDIS): New macro.
3942 (GEN_LI): New macro.
3943 (GEN_LIS): New macro.
3944 (GEN_ORI): New macro.
3945 (GEN_ORIS): New macro.
3946 (GEN_LWZ): New macro.
3947 (GEN_STW): New macro.
3948 (GEN_STWU): New macro.
3949 (gen_xfx_form): New function.
3950 (GEN_MFSPR): New macro.
3951 (GEN_MTSPR): New macro.
3952 (GEN_MFCR): New macro.
3953 (GEN_MTCR): New macro.
3954 (GEN_SYNC): New macro.
3955 (GEN_LWSYNC): New macro.
3956 (gen_x_form): New function.
3957 (GEN_OR): New macro.
3958 (GEN_MR): New macro.
3959 (GEN_LWARX): New macro.
3960 (GEN_STWCX): New macro.
3961 (GEN_CMPW): New macro.
3962 (gen_md_form): New function.
3963 (GEN_RLDICL): New macro.
3964 (GEN_RLDICR): New macro.
3965 (gen_i_form): New function.
3966 (GEN_B): New macro.
3967 (GEN_BL): New macro.
3968 (gen_b_form): New function.
3969 (GEN_BNE): New macro.
3970 (GEN_LOAD): New macro.
3971 (GEN_STORE): New macro.
3972 (gen_limm): New function.
3973 (gen_atomic_xchg): New function.
3974 (gen_call): New function.
3975 (ppc_relocate_instruction): New function.
3976 (ppc_install_fast_tracepoint_jump_pad): New function.
3977 (ppc_get_min_fast_tracepoint_insn_len): New function.
3978 (ppc_get_ipa_tdesc_idx): New function.
3979 (the_low_target): Wire in the new functions.
3980 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3981 tdescs.
3982 * linux-ppc-tdesc.h: New file.
3983
a13c4696
MK
39842016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3985
3986 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3987 (alloc_jump_pad_buffer): New function.
3988 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3989 (alloc_jump_pad_buffer): New function.
3990 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3991 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3992 (alloc_jump_pad_buffer): New function.
3993 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3994 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3995 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3996 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3997
1cda1512
MK
39982016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3999
4000 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4001 * linux-amd64-ipa.c: Likewise.
4002 * linux-i386-ipa.c: Likewise.
4003 * linux-s390-ipa.c: Likewise.
4004 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4005 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4006 set_trace_state_variable_value_ptr.
4007 (struct ipa_sym_addresses): Likewise.
4008 (symbol_list): Likewise.
4009 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4010 accessing gdb_collect directly.
4011 (gdb_collect_ptr_type): New typedef.
4012 (get_raw_reg_ptr_type): New typedef.
4013 (get_trace_state_variable_value_ptr_type): New typedef.
4014 (set_trace_state_variable_value_ptr_type): New typedef.
4015 (gdb_collect_ptr): New global.
4016 (get_raw_reg_ptr): New global.
4017 (get_trace_state_variable_value_ptr): New global.
4018 (set_trace_state_variable_value_ptr): New global.
4019 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4020 accessing get_raw_reg directly.
4021 (get_get_tsv_func_addr): Likewise for
4022 get_trace_state_variable_value_ptr.
4023 (get_set_tsv_func_addr): Likewise for
4024 set_trace_state_variable_value_ptr.
4025 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4026
72fb5488
SM
40272016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4028
4029 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4030
28170b88
MK
40312016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4032
4033 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4034 packets.
4035 (relocate_instruction): Remove own_buf.
4036 * server.c (own_buf): Make global.
4037 (handle_v_requests): Make global.
4038 * server.h (own_buf): New declaration.
4039 (handle_v_requests): New prototype.
4040
f39e8743
MK
40412016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4042
4043 PR 18377
4044 * linux-s390-low.c (add_insns): New function.
4045 (s390_emit_prologue): New function.
4046 (s390_emit_epilogue): New function.
4047 (s390_emit_add): New function.
4048 (s390_emit_sub): New function.
4049 (s390_emit_mul): New function.
4050 (s390_emit_lsh): New function.
4051 (s390_emit_rsh_signed): New function.
4052 (s390_emit_rsh_unsigned): New function.
4053 (s390_emit_ext): New function.
4054 (s390_emit_log_not): New function.
4055 (s390_emit_bit_and): New function.
4056 (s390_emit_bit_or): New function.
4057 (s390_emit_bit_xor): New function.
4058 (s390_emit_bit_not): New function.
4059 (s390_emit_equal): New function.
4060 (s390_emit_less_signed): New function.
4061 (s390_emit_less_unsigned): New function.
4062 (s390_emit_ref): New function.
4063 (s390_emit_if_goto): New function.
4064 (s390_emit_goto): New function.
4065 (s390_write_goto_address): New function.
4066 (s390_emit_litpool): New function.
4067 (s390_emit_const): New function.
4068 (s390_emit_call): New function.
4069 (s390_emit_reg): New function.
4070 (s390_emit_pop): New function.
4071 (s390_emit_stack_flush): New function.
4072 (s390_emit_zero_ext): New function.
4073 (s390_emit_swap): New function.
4074 (s390_emit_stack_adjust): New function.
4075 (s390_emit_set_r2): New function.
4076 (s390_emit_int_call_1): New function.
4077 (s390_emit_void_call_2): New function.
4078 (s390_emit_eq_goto): New function.
4079 (s390_emit_ne_goto): New function.
4080 (s390_emit_lt_goto): New function.
4081 (s390_emit_le_goto): New function.
4082 (s390_emit_gt_goto): New function.
4083 (s390_emit_ge_goto): New function.
4084 (s390x_emit_prologue): New function.
4085 (s390x_emit_epilogue): New function.
4086 (s390x_emit_add): New function.
4087 (s390x_emit_sub): New function.
4088 (s390x_emit_mul): New function.
4089 (s390x_emit_lsh): New function.
4090 (s390x_emit_rsh_signed): New function.
4091 (s390x_emit_rsh_unsigned): New function.
4092 (s390x_emit_ext): New function.
4093 (s390x_emit_log_not): New function.
4094 (s390x_emit_bit_and): New function.
4095 (s390x_emit_bit_or): New function.
4096 (s390x_emit_bit_xor): New function.
4097 (s390x_emit_bit_not): New function.
4098 (s390x_emit_equal): New function.
4099 (s390x_emit_less_signed): New function.
4100 (s390x_emit_less_unsigned): New function.
4101 (s390x_emit_ref): New function.
4102 (s390x_emit_if_goto): New function.
4103 (s390x_emit_const): New function.
4104 (s390x_emit_call): New function.
4105 (s390x_emit_reg): New function.
4106 (s390x_emit_pop): New function.
4107 (s390x_emit_stack_flush): New function.
4108 (s390x_emit_zero_ext): New function.
4109 (s390x_emit_swap): New function.
4110 (s390x_emit_stack_adjust): New function.
4111 (s390x_emit_int_call_1): New function.
4112 (s390x_emit_void_call_2): New function.
4113 (s390x_emit_eq_goto): New function.
4114 (s390x_emit_ne_goto): New function.
4115 (s390x_emit_lt_goto): New function.
4116 (s390x_emit_le_goto): New function.
4117 (s390x_emit_gt_goto): New function.
4118 (s390x_emit_ge_goto): New function.
4119 (s390_emit_ops): New function.
4120 (struct linux_target_ops): Fill in emit_ops hook.
4121
abd9baf9
MK
41222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4123
4124 PR 18377
4125 * Makefile.in: Add s390 IPA files.
4126 * configure.srv: Build IPA for s390.
4127 * linux-s390-ipa.c: New file.
4128 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4129 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4130 (tdesc_s390_linux32): Likewise.
4131 (init_registers_s390_linux32v1): Likewise.
4132 (tdesc_s390_linux32v1): Likewise.
4133 (init_registers_s390_linux32v2): Likewise.
4134 (tdesc_s390_linux32v2): Likewise.
4135 (init_registers_s390_linux64): Likewise.
4136 (tdesc_s390_linux64): Likewise.
4137 (init_registers_s390_linux64v1): Likewise.
4138 (tdesc_s390_linux64v1): Likewise.
4139 (init_registers_s390_linux64v2): Likewise.
4140 (tdesc_s390_linux64v2): Likewise.
4141 (init_registers_s390_te_linux64): Likewise.
4142 (tdesc_s390_te_linux64): Likewise.
4143 (init_registers_s390_vx_linux64): Likewise.
4144 (tdesc_s390_vx_linux64): Likewise.
4145 (init_registers_s390_tevx_linux64): Likewise.
4146 (tdesc_s390_tevx_linux64): Likewise.
4147 (init_registers_s390x_linux64): Likewise.
4148 (tdesc_s390x_linux64): Likewise.
4149 (init_registers_s390x_linux64v1): Likewise.
4150 (tdesc_s390x_linux64v1): Likewise.
4151 (init_registers_s390x_linux64v2): Likewise.
4152 (tdesc_s390x_linux64v2): Likewise.
4153 (init_registers_s390x_te_linux64): Likewise.
4154 (tdesc_s390x_te_linux64): Likewise.
4155 (init_registers_s390x_vx_linux64): Likewise.
4156 (tdesc_s390x_vx_linux64): Likewise.
4157 (init_registers_s390x_tevx_linux64): Likewise.
4158 (tdesc_s390x_tevx_linux64): Likewise.
4159 (have_hwcap_s390_vx): New static variable.
4160 (s390_arch_setup): Fill have_hwcap_s390_vx.
4161 (s390_get_thread_area): New function.
4162 (s390_ft_entry_gpr_esa): New const.
4163 (s390_ft_entry_gpr_zarch): New const.
4164 (s390_ft_entry_misc): New const.
4165 (s390_ft_entry_fr): New const.
4166 (s390_ft_entry_vr): New const.
4167 (s390_ft_main_31): New const.
4168 (s390_ft_main_64): New const.
4169 (s390_ft_exit_fr): New const.
4170 (s390_ft_exit_vr): New const.
4171 (s390_ft_exit_misc): New const.
4172 (s390_ft_exit_gpr_esa): New const.
4173 (s390_ft_exit_gpr_zarch): New const.
4174 (append_insns): New function.
4175 (s390_relocate_instruction): New function.
4176 (s390_install_fast_tracepoint_jump_pad): New function.
4177 (s390_get_min_fast_tracepoint_insn_len): New function.
4178 (s390_get_ipa_tdesc_idx): New function.
4179 (struct linux_target_ops): Wire in the above functions.
4180 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4181 * linux-s390-tdesc.h: New file.
4182
a4105d04
MK
41832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4184
4185 * linux-s390-low.c (s390_supports_tracepoints): New function.
4186 (struct linux_target_ops): Fill supports_tracepoints hook.
4187
35ac8b3e
YQ
41882016-03-18 Yao Qi <yao.qi@linaro.org>
4189
4190 * linux-low.c (lwp_signal_can_be_delivered): New function.
4191 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4192
94610ec4
YQ
41932016-03-18 Yao Qi <yao.qi@linaro.org>
4194
4195 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4196 0 if signal is enqueued. Remove 'signal' from one debugging
4197 message. Move one debugging message to some lines below.
4198 Remove code setting 'signal' to 0.
4199
80aea927
YQ
42002016-03-18 Yao Qi <yao.qi@linaro.org>
4201
4202 * linux-low.c (linux_low_filter_event): Remove redundant
4203 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4204
b04fd3be
MK
42052016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4206
4207 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4208 (struct linux_target_ops): Wire in the above.
4209
c40c8d4b
YQ
42102016-03-03 Yao Qi <yao.qi@linaro.org>
4211
4212 * linux-low.c: Update comments to start_step_over.
4213
0f8288ae
YQ
42142016-03-03 Yao Qi <yao.qi@linaro.org>
4215
4216 PR server/19736
4217 * linux-low.c (handle_extended_wait): Set child suspended
4218 if event_lwp->bp_reinsert isn't zero.
4219
fdbd04a8
YQ
42202016-03-02 Yao Qi <yao.qi@linaro.org>
4221
4222 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4223 enqueue_pending_signal.
4224
6896a8fa
MK
42252016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4226
4227 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4228 is actually loaded.
4229
ab503087
MK
42302016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4231
4232 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4233 (s390_regmap_3264) [!__s390x__]: New global.
4234 (s390_collect_ptrace_register): Skip map entries containing -1.
4235 (s390_supply_ptrace_register): Ditto.
4236 (s390_fill_gprs_high): New function.
4237 (s390_store_gprs_high): New function.
4238 (s390_regsets): Add NT_S390_HIGH_GPRS.
4239 (s390_get_hwcap): Enable on 31-bit.
4240 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4241 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4242 Detect NT_S390_HIGH_GPRS.
4243 (s390_usrregs_info_3264): Enable on 31-bit.
4244 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4245 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4246
ae91f625
MK
42472016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4248
4249 PR gdb/13808
4250 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4251 * configure.srv: Ditto.
4252 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4253 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4254 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4255 (init_registers_amd64_linux): Remove prototype.
4256 (tdesc_amd64_linux): Remove declaration.
4257 (get_ipa_tdesc): New function.
4258 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4259 initialize remaining tdescs.
4260 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4261 (init_registers_i386_linux): Remove prototype.
4262 (tdesc_i386_linux): Remove declaration.
4263 (get_ipa_tdesc): New function.
4264 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4265 initialize remaining tdescs.
4266 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4267 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4268 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4269 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4270 (x86_get_ipa_tdesc_idx): New function.
4271 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4272 * linux-x86-tdesc.h: New file.
4273 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4274 (target_get_ipa_tdesc_idx): New macro.
4275 * tracepoint.c (ipa_tdesc_idx): New macro.
4276 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4277 (symbol_list): Add ipa_tdesc_idx.
4278 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4279 (ipa_tdesc): Remove.
4280 (ipa_tdesc_idx): New variable.
4281 (get_context_regcache): Use get_ipa_tdesc.
4282 (gdb_collect): Ditto.
4283 (gdb_probe): Ditto.
4284 * tracepoint.h (get_ipa_tdesc): New prototype.
4285 (ipa_tdesc): Remove.
4286
e7ad2f14
PA
42872016-02-24 Pedro Alves <palves@redhat.com>
4288
4289 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4290 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4291 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4292 Factor out common code between the USE_SIGTRAP_SIGINFO and
4293 !USE_SIGTRAP_SIGINFO blocks.
4294 (linux_low_filter_event): Call save_stop_reason instead of
4295 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4296 Update comments.
4297 (linux_wait_1): Update comments.
4298
657f9cde
WW
42992016-02-24 Wei-cheng Wang <cole945@gmail.com>
4300
4301 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4302 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4303 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4304 ppc_insert_point, ppc_remove_point.
4305
b00b61e1
MK
43062016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4307
4308 * linux-s390-low.c (s390_supports_z_point_type): New function.
4309 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4310
553cb527
YQ
43112016-02-16 Yao Qi <yao.qi@linaro.org>
4312
4313 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4314 PC. Get pc from regcache_read_pc.
4315
a5652c21
YQ
43162016-02-12 Yao Qi <yao.qi@linaro.org>
4317
4318 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4319 or linux_get_pc_32bit.
4320 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4321
ed443b61
YQ
43222016-02-12 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4325 arm_linux_get_next_pcs_fixup.
4326
020ecd38
MK
43272016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4328
4329 * tracepoint.c (x_tracepoint_action_download): Change
4330 write_inferior_data_ptr to write_inferior_data_pointer.
4331 (cmd_qtstart): Likewise.
4332 (write_inferior_data_ptr): Remove.
4333 (download_agent_expr): Change write_inferior_data_ptr to
4334 write_inferior_data_pointer.
4335 (download_tracepoint_1): Likewise.
4336 (download_tracepoint): Likewise.
4337 (download_trace_state_variables): Likewise.
4338
7cae9051
WW
43392016-02-11 Wei-cheng Wang <cole945@gmail.com>
4340 Marcin Kościelnicki <koriakin@0x04.net>
4341
4342 * tracepoint.c (struct tracepoint_action_ops): Remove.
4343 (struct tracepoint_action): Remove ops.
4344 (m_tracepoint_action_download, r_tracepoint_action_download)
4345 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4346 size and offset accordingly.
4347 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4348 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4349 (tracepoint_action_send, tracepoint_action_download): New functions.
4350 Helpers for trace action handlers.
4351 (add_tracepoint_action): Remove setup actions ops.
4352 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4353
9f6a71b4
YQ
43542016-02-10 Yao Qi <yao.qi@linaro.org>
4355
4356 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4357
1e94266c
SM
43582016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4359
4360 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4361 to AC_OUTPUT.
4362 * configure: Regenerate.
4363
8adce034
SM
43642016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4365
4366 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4367 void * to gdb_byte *.
4368 * linux-low.c (siginfo_fixup): Likewise.
4369 (linux_xfer_siginfo): Likewise.
4370 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4371 Likewise.
4372 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4373
93813b37
WT
43742016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4375
4376 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4377 to srv_tgtobj.
4378 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4379 to srv_tgtobj.
4380 * linux-x86-low.c [__x86_64__]: Include
4381 "nat/amd64-linux-siginfo.h".
4382 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4383 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4384 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4385 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4386 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4387 (cpt_si_fd, si_timerid, si_overrun): Move from
4388 nat/amd64-linux-siginfo.c.
4389 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4390
8424cc97
SM
43912016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4392
4393 * server.c (skip_to_semicolon): Remove.
4394 (process_point_options): Use strchrnul instead of
4395 skip_to_semicolon.
4396
4d18591b
YQ
43972016-01-26 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4400 * linux-low.c (install_software_single_step_breakpoints): Don't
4401 call regcache_read_pc.
4402 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4403 argument pc.
4404
d8020970
YQ
44052016-01-26 Yao Qi <yao.qi@linaro.org>
4406
4407 * linux-low.c (install_software_single_step_breakpoints): Call
4408 regcache_read_pc instead of get_pc.
4409
8b207339
YQ
44102016-01-26 Yao Qi <yao.qi@linaro.org>
4411
4412 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4413 (unblock_async_io): Rename to ...
4414 (block_unblock_async_io): ... it. New function.
4415 (enable_async_io): Don't install SIGIO handler. Unblock it
4416 instead.
4417 (disable_async_io): Don't ignore SIGIO. Block it instead.
4418 (initialize_async_io): Install SIGIO handler. Don't call
4419 unblock_async_io.
4420
18879fef
YQ
44212016-01-26 Yao Qi <yao.qi@linaro.org>
4422
4423 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4424 first character is '\003', call *the_target->request_interrupt.
4425
a0f8e08a
YQ
44262016-01-25 Yao Qi <yao.qi@linaro.org>
4427
4428 * remote-utils.c (new_thread_notify): Remove.
4429 (dead_thread_notify): Likewise.
4430 * remote-utils.h (new_thread_notify): Remove declaration.
4431 (dead_thread_notify): Likewise.
4432
cc5fd9ab
MK
44332016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4434
4435 * gdb.trace/pending.exp: Fix expected message on continue.
4436
99e8eb11
MK
44372016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4438
4439 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4440 it works properly on big-endian machines where sizeof (CORE_ADDR)
4441 != sizeof (void *).
4442
a994041d
PA
44432016-01-21 Pedro Alves <palves@redhat.com>
4444
4445 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4446 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4447 * configure: Regenerate.
4448
f7a6a40d
YQ
44492016-01-21 Yao Qi <yao.qi@linaro.org>
4450
4451 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4452 is_thumb and set it according to CPSR saved on the stack.
4453 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4454 arm_sigreturn_next_pc.
4455
6f69e520
YQ
44562016-01-18 Yao Qi <yao.qi@linaro.org>
4457
4458 * linux-low.c (linux_set_pc_64bit): New function.
4459 (linux_get_pc_64bit): New function.
4460 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4461 Declare.
4462 * linux-sparc-low.c (debug_threads): Remove declaration.
4463 (sparc_get_pc): Remove.
4464 (the_low_target): Use linux_get_pc_64bit instead of
4465 sparc_get_pc.
4466 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4467 (the_low_target): Use linux_get_pc_64bit and
4468 linux_set_pc_64bit.
4469
276d4552
YQ
44702016-01-18 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-arm-low.c (debug_threads): Remove declaration.
4473 (arm_get_pc, arm_set_pc): Remove.
4474 (the_low_target): Use linux_get_pc_32bit and
4475 linux_set_pc_32bit.
4476 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4477 (the_low_target): Use linux_get_pc_32bit and
4478 linux_set_pc_32bit.
4479 * linux-cris-low.c (debug_threads): Remove declaration.
4480 (cris_get_pc, cris_set_pc,): Remove.
4481 (the_low_target): Use linux_get_pc_32bit and
4482 linux_set_pc_32bit.
4483 * linux-crisv32-low.c (debug_threads): Remove declaration.
4484 (cris_get_pc, cris_set_pc): Remove.
4485 (the_low_target): Use linux_get_pc_32bit and
4486 linux_set_pc_32bit.
4487 * linux-low.c: Include inttypes.h.
4488 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4489 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4490 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4491 (the_low_target): Use linux_get_pc_32bit and
4492 linux_set_pc_32bit.
4493 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4494 (the_low_target): Use linux_get_pc_32bit and
4495 linux_set_pc_32bit.
4496 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4497 (the_low_target): Use linux_get_pc_32bit and
4498 linux_set_pc_32bit.
4499 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4500 (the_low_target): Use linux_get_pc_32bit and
4501 linux_set_pc_32bit.
4502 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4503 (the_low_target): Use linux_get_pc_32bit and
4504 linux_set_pc_32bit.
4505
eb0edac8
GB
45062016-01-18 Gary Benson <gbenson@redhat.com>
4507
4508 * configure.ac (AC_FUNC_FORK): New check.
4509 * config.in: Regenerate.
4510 * configure: Likewise.
4511
1b451dda
YQ
45122016-01-14 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4515 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4516 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4517 arm_get_next_pcs_ctor.
4518
82075af2
JS
45192016-01-12 Josh Stone <jistone@redhat.com>
4520 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4521
4522 * inferiors.h: Include "gdb_vecs.h".
4523 (struct process_info): Add syscalls_to_catch.
4524 * inferiors.c (remove_process): Free syscalls_to_catch.
4525 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4526 syscall_return stops.
4527 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4528 * server.c (handle_general_set): Handle QCatchSyscalls.
4529 (handle_query): Report support for QCatchSyscalls.
4530 * target.h (struct target_ops): Add supports_catch_syscall.
4531 (target_supports_catch_syscall): New macro.
4532 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4533 (struct lwp_info): Add syscall_state.
4534 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4535 Maintain syscall_state and syscalls_to_catch across exec.
4536 (get_syscall_trapinfo): New function, proxy to the_low_target.
4537 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4538 (linux_low_filter_event): Toggle syscall_state entry/return for
4539 syscall traps, and set it ignored for all others.
4540 (gdb_catching_syscalls_p): New function.
4541 (gdb_catch_this_syscall_p): New function.
4542 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4543 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4544 (linux_supports_catch_syscall): New function.
4545 (linux_target_ops): Install it.
4546 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4547 (the_low_target): Install it.
4548
8f13a3ce
MF
45492016-01-12 Mike Frysinger <vapier@gentoo.org>
4550
4551 * acinclude.m4: Include new ../warning.m4 file.
4552 * configure: Regenerated.
4553 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4554
5b3da067
MF
45552016-01-12 Mike Frysinger <vapier@gentoo.org>
4556
4557 * ax.c (is_goto_target): Mark static.
4558 * linux-low.c (register_addr): Likewise.
4559 (linux_fetch_registers, linux_store_registers): Likewise.
4560 * mem-break.c (any_persistent_commands): Fix old prototype.
4561 (add_commands_to_breakpoint): Mark static.
4562 * regcache.c (find_register_by_name): Delete unused func.
4563 * remote-utils.c (hex_or_minus_one): Mark static.
4564 * server.c (monitor_show_help): Mark static.
4565 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4566 handle_v_requests): Likewise.
4567
bc504a31
PA
45682016-01-12 Pedro Alves <palves@redhat.com>
4569
4570 Remove use of the registered trademark symbol throughout.
4571
5a0dd67a
YQ
45722016-01-08 Yao Qi <yao.qi@linaro.org>
4573
4574 * remote-utils.c (getpkt): If c is '\003', call target hook
4575 request_interrupt.
4576
b2ca446f
YQ
45772016-01-06 Yao Qi <yao.qi@linaro.org>
4578
4579 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4580 linux-aarch32-low.c.
4581 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4582 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4583 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4584 (thumb2_breakpoint): Declare.
4585 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4586 linux-aarch32-low.h.
4587 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4588 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4589 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4590
edd88788
JB
45912016-01-01 Joel Brobecker <brobecker@adacore.com>
4592
4593 * gdbreplay.c (gdbreplay_version): Change copyright year in
4594 version message.
4595 * server.c (gdbserver_version): Likewise.
4596
65da7f14
PP
45972015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4598
4599 * server.c (crc32_table): Delete.
4600 (crc32): Use libiberty's xcrc32 function.
4601
4abd5ed2
JB
46022015-12-22 Joel Brobecker <brobecker@adacore.com>
4603
4604 * lynx-low.c (lynx_delete_thread_callback): New function.
4605 (lynx_mourn): Properly delete our process and all of its
4606 threads. Remove call to clear_inferiors.
4607
0e50fe5c
JB
46082015-12-22 Joel Brobecker <brobecker@adacore.com>
4609
4610 * target.c (thread_search_callback): Add check that
4611 the thread_stopped target callback is not NULL before
4612 calling it.
4613
35adc03f
YQ
46142015-12-21 Yao Qi <yao.qi@linaro.org>
4615
4616 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4617 arm breakpoint.
4618
bd2b2909
AT
46192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4620
4621 * server.c (handle_query): Call target_supports_software_single_step.
4622
7fe5e27e
AT
46232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4624
4625 * linux-low.c (single_step): New function.
4626 (linux_resume_one_lwp_throw): Call single_step.
4627 (start_step_over): Likewise.
4628
d9311bfa
AT
46292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4630
4631 * Makefile.in (SFILES): Append arch/arm-linux.c,
4632 arch/arm-get-next-pcs.c.
4633 (arm-linux.o): New rule.
4634 (arm-get-next-pcs.o): New rule.
4635 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4636 arm-linux.o.
4637 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4638 to linux-aarch32-low.c.
4639 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4640 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4641 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4642 (thumb2_breakpoint_len): Likewise.
4643 (arm_is_thumb_mode): Make non-static.
4644 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4645 from linux-aarch32-low.c.
4646 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4647 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4648 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4649 (thumb2_breakpoint_len): Likewise.
4650 (arm_is_thumb_mode): New declaration.
4651 * linux-arm-low.c: Include arch/arm-linux.h
4652 aarch/arm-get-next-pcs.h, sys/syscall.h.
4653 (get_next_pcs_ops): New struct.
4654 (get_next_pcs_addr_bits_remove): New function.
4655 (get_next_pcs_is_thumb): New function.
4656 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4657 (arm_sigreturn_next_pc): Likewise.
4658 (get_next_pcs_syscall_next_pc): Likewise.
4659 (arm_gdbserver_get_next_pcs): Likewise.
4660 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4661 Initialize.
4662 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4663 * server.h: Include gdb_vecs.h.
4664
68ce2059
AT
46652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4666
4667 * Makefile.in (SFILES): Append common/common-regcache.c.
4668 (OBS): Append common-regcache.o.
4669 (common-regcache.o): New rule.
4670 * regcache.c (init_register_cache): Initialize cache to
4671 REG_UNAVAILABLE.
4672 (regcache_raw_read_unsigned): New function.
4673 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4674 register_status enum.
4675
fa5308bd
AT
46762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4677
4678 * linux-aarch64-low.c (the_low_targets): Rename
4679 breakpoint_reinsert_addr to get_next_pcs.
4680 * linux-arm-low.c (the_low_targets): Likewise.
4681 * linux-bfin-low.c (the_low_targets): Likewise.
4682 * linux-cris-low.c (the_low_targets): Likewise.
4683 * linux-crisv32-low.c (the_low_targets): Likewise.
4684 * linux-low.c (can_software_single_step): Likewise.
4685 (install_software_single_step_breakpoints): New function.
4686 (start_step_over): Use install_software_single_step_breakpoints.
4687 * linux-low.h: New CORE_ADDR vector.
4688 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4689 get_next_pcs.
4690 * linux-mips-low.c (the_low_targets): Likewise.
4691 * linux-nios2-low.c (the_low_targets): Likewise.
4692 * linux-sparc-low.c (the_low_targets): Likewise.
4693
4a6ed09b
PA
46942015-12-17 Pedro Alves <palves@redhat.com>
4695
4696 * linux-low.c (linux_kill_one_lwp): Remove references to
4697 LinuxThreads.
4698 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4699 to 'kill'.
4700 (linux_init_signals): Delete.
4701 (initialize_low): Adjust.
4702 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4703
7544db95
PA
47042015-12-16 Pedro Alves <palves@redhat.com>
4705
4706 * configure.ac (compiler warning flags): When testing a
4707 -Wno-foo option, check whether -Wfoo works instead.
4708 * configure: Regenerate.
4709
8020350c
DB
47102015-12-11 Don Breazeal <donb@codesourcery.com>
4711
4712 * server.c (process_serial_event): Don't exit from gdbserver
4713 in remote mode if there are still active inferiors.
4714
db91f502
YQ
47152015-12-11 Yao Qi <yao.qi@linaro.org>
4716
4717 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4718 arm_breakpoint_at if the process is 32-bit.
4719
b37a6290
YQ
47202015-12-11 Yao Qi <yao.qi@linaro.org>
4721
4722 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4723 arm breakpoint.
4724
17b1509a
YQ
47252015-12-07 Yao Qi <yao.qi@linaro.org>
4726
4727 * configure.srv: Append arm.o to srv_tgtobj for
4728 aarch64*-*-linux* target.
4729 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4730 from linux-arm-low.c.
4731 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4732 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4733 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4734 (thumb2_breakpoint_len): Likewise.
4735 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4736 (arm_breakpoint_kinds): Likewise.
4737 (arm_breakpoint_kind_from_pc): Likewise.
4738 (arm_sw_breakpoint_from_kind): Likewise.
4739 (arm_breakpoint_kind_from_current_state): Likewise.
4740 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4741 (arm_sw_breakpoint_from_kind): Declare.
4742 (arm_breakpoint_kind_from_current_state): Declare.
4743 (arm_breakpoint_at): Declare.
4744 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4745 arm_sw_breakpoint_from_kind if process is 32-bit.
4746 (aarch64_breakpoint_kind_from_pc): New function.
4747 (aarch64_breakpoint_kind_from_current_state): New function.
4748 (the_low_target): Initialize fields breakpoint_kind_from_pc
4749 and breakpoint_kind_from_current_state.
4750 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4751 linux-aarch32-low.c.
4752 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4753 (arm_breakpoint, arm_breakpoint_len): Likewise.
4754 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4755 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4756 (arm_is_thumb_mode): Likewise.
4757 (arm_breakpoint_at): Likewise.
4758 (arm_breakpoint_kind_from_pc): Likewise.
4759 (arm_sw_breakpoint_from_kind): Likewise.
4760 (arm_breakpoint_kind_from_current_state): Likewise.
4761
4762 Revert:
4763 2015-08-04 Yao Qi <yao.qi@linaro.org>
4764
4765 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4766 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4767 * server.c (extended_protocol): Remove "static".
4768 * server.h (extended_protocol): Declare it.
4769
ece66d65
JS
47702015-12-04 Josh Stone <jistone@redhat.com>
4771
4772 * target.h (struct target_ops) <arch_setup>: Rename to ...
4773 (struct target_ops) <post_create_inferior>: ... this.
4774 (target_arch_setup): Rename to ...
4775 (target_post_create_inferior): ... this, calling post_create_inferior.
4776 * server.c (start_inferior): Update target_arch_setup calls to
4777 target_post_create_inferior.
4778 * linux-low.c (linux_low_ptrace_options): Forward declare.
4779 (linux_arch_setup): Update its comment for general use.
4780 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4781 (struct linux_target_ops): Use linux_post_create_inferior.
4782 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4783 to post_create_inferior.
4784 * nto-low.c (struct nto_target_ops): Likewise.
4785 * spu-low.c (struct spu_target_ops): Likewise.
4786 * win32-low.c (struct win32_target_ops): Likewise.
4787
e58c48b4
AT
47882015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4789
4790 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4791
fbec8956
AT
47922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4793
4794 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4795 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4796 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4797 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4798 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4799 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4800 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4801 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4802 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4803 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4804 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4805 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4806
9b4c5f87
AT
48072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4808
4809 * linux-low.c (linux_look_up_symbols): Don't call
4810 linux_supports_traceclone.
4811 * linux-low.h (thread_db_init): Remove use_events argument.
4812 * thread-db.c (thread_db_use_event): Remove global variable.
4813 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4814 (struct thread_db) <td_create_bp>: Remove field.
4815 (thread_db_create_event): Remove function.
4816 (thread_db_enable_reporting): Likewise.
4817 (find_one_thread): Don't check for thread_db_use_events.
4818 (attach_thread): Likewise.
4819 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4820 (try_thread_db_load_1): Don't check for thread_db_use_events.
4821 (thread_db_init): Remove use_events argument and thread events
4822 handling.
4823 (remove_thread_event_breakpoints): Remove function.
4824 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4825
7d00775e
AT
48262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4827
4828 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4829 New function.
4830 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4831 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4832 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4833 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4834 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4835 Initialize.
4836 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4837 New function.
4838 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4839 * linux-low.c (can_hardware_single_step): Use
4840 supports_hardware_single_step.
4841 (can_software_single_step): New function.
4842 (start_step_over): Call can_software_single_step.
4843 (linux_supports_hardware_single_step): New function.
4844 (struct target_ops) <supports_software_single_step>: Initialize.
4845 * linux-low.h (struct linux_target_ops)
4846 <supports_hardware_single_step>: Initialize.
4847 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4848 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4849 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4850 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4851 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4852 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4853 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4854 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4855 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4856 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4857 Initialize.
4858 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4859 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4860 Initialize.
4861 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4862 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4863 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4864 New function.
4865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4866 * target.h (struct target_ops): <supports_software_single_step>:
4867 New field.
4868 (target_supports_software_single_step): New macro.
4869
2d97cd35
AT
48702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4871
4872 * linux-low.c (linux_wait_1): Fix pc advance condition.
4873 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4874 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4875
769ef81f
AT
48762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4877
4878 * linux-arm-low.c (arm_is_thumb_mode): New function.
4879 (arm_breakpoint_at): Use arm_is_thumb_mode.
4880 (arm_breakpoint_kind_from_current_state): New function.
4881 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4882 Initialize.
4883 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4884 (linux_breakpoint_kind_from_current_state): New function.
4885 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4886 * linux-low.h (struct linux_target_ops)
4887 <breakpoint_kind_from_current_state>: New field.
4888 * target.h (struct target_ops): Likewise.
4889 (target_breakpoint_kind_from_current_state): New macro.
4890
1bebeeca
PA
48912015-11-30 Pedro Alves <palves@redhat.com>
4892
4893 * linux-low.c (linux_resume): Wake up the event loop before
4894 returning.
4895
a67a9fae
PA
48962015-11-30 Pedro Alves <palves@redhat.com>
4897
4898 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4899 check.
4900 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4901 to -1.
4902 * target.c (struct thread_search): New structure.
4903 (thread_search_callback): New function.
4904 (prev_general_thread): New global.
4905 (prepare_to_access_memory, done_accessing_memory): New functions.
4906 * target.h (prepare_to_access_memory, done_accessing_memory):
4907 Replace macros with function declarations.
4908
f2faf941
PA
49092015-11-30 Pedro Alves <palves@redhat.com>
4910
4911 PR 14618
4912 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4913 report TARGET_WAITKIND_NO_RESUMED.
4914 * remote-utils.c (prepare_resume_reply): Handle
4915 TARGET_WAITKIND_NO_RESUMED.
4916 * server.c (report_no_resumed): New global.
4917 (handle_query) <qSupported>: Handle "no-resumed+". Report
4918 "no-resumed+" support.
4919 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4920 return error if the client doesn't support no-resumed events.
4921 (push_stop_notification): New function.
4922 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4923 events if the client supports them.
4924
a681f9c9
PA
49252015-11-30 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (thread_still_has_status_pending_p): Don't check
4928 vCont;t here.
4929 (lwp_resumed): New function.
4930 (status_pending_p_callback): Return early if the LWP is not
4931 supposed to be resumed.
4932
65706a29
PA
49332015-11-30 Pedro Alves <palves@redhat.com>
4934
4935 * linux-low.c (handle_extended_wait): Assert that the LWP's
4936 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4937 thread create events, leave the new child's status pending.
4938 (linux_low_filter_event): If GDB wants to hear about thread exit
4939 events, leave the LWP marked dead and don't delete it.
4940 (linux_wait_for_event_filtered): Don't check for thread exit.
4941 (filter_exit_event): New function.
4942 (linux_wait_1): Use it, when returning an exit event.
4943 (linux_resume_one_lwp_throw): Assert that the LWP's
4944 waitstatus is TARGET_WAITKIND_IGNORE.
4945 * remote-utils.c (prepare_resume_reply): Handle
4946 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4947 * server.c (report_thread_events): New global.
4948 (handle_general_set): Handle QThreadEvents.
4949 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4950 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4951 TARGET_WAITKIND_THREAD_EXITED.
4952 * server.h (report_thread_events): Declare.
4953
56cf4bed
PA
49542015-11-30 Pedro Alves <palves@redhat.com>
4955
4956 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4957 the thread's last_resume_kind was resume_stop.
4958
500c1d85
PA
49592015-11-30 Pedro Alves <palves@redhat.com>
4960
4961 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4962 before returning.
4963
de979965
PA
49642015-11-30 Pedro Alves <palves@redhat.com>
4965
4966 * server.c (handle_v_requests): Handle vCtrlC.
4967
34c65914
PA
49682015-11-30 Pedro Alves <palves@redhat.com>
4969
4970 * gdbthread.h (find_any_thread_of_pid): Declare.
4971 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4972 functions.
4973 * server.c (handle_query): If current_thread is NULL, look for
4974 another thread of the selected process.
4975
79efa585 49762015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4977 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4978
4979 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4980 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4981 name in reply.
4982 * target.h (struct target_ops) <thread_name>: New field.
4983 (target_thread_name): New macro.
4984
80d82c19
JB
49852015-11-23 Joel Brobecker <brobecker@adacore.com>
4986
4987 * regcache.h (regcache_invalidate_pid): Add declaration.
4988 * regcache.c (regcache_invalidate_pid): New function, extracted
4989 from regcache_invalidate.
4990 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4991 Add trivial documentation comment.
4992 * lynx-low.c: Use regcache_invalidate_pid instead of
4993 regcache_invalidate.
4994
64da5dd5
JB
49952015-11-23 Joel Brobecker <brobecker@adacore.com>
4996
4997 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4998 and Elf64_auxv_t if the target is Android.
4999
37ce4055
DE
50002015-11-22 Doug Evans <xdje42@gmail.com>
5001
5002 * target.h: #include <sys/types.h>.
5003
06e03fff
PA
50042015-11-19 Pedro Alves <palves@redhat.com>
5005
5006 * linux-low.c (linux_process_qsupported): Change prototype.
5007 Adjust.
5008 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5009 Change prototype.
5010 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5011 and adjust to loop over all features.
5012 * server.c (handle_query) <qSupported>: Adjust to call
5013 target_process_qsupported once, passing it a vector of unprocessed
5014 features.
5015 * target.h (struct target_ops) <process_qsupported>: Change
5016 prototype.
5017 (target_process_qsupported): Adjust.
5018
9a084706
PA
50192015-11-19 Pedro Alves <palves@redhat.com>
5020
5021 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5022 mode.
5023 * configure: Regenerate.
5024
dad44a1f
PA
50252015-11-19 Pedro Alves <palves@redhat.com>
5026
5027 * configure: Regenerate.
5028
231c0592
YQ
50292015-11-19 Yao Qi <yao.qi@linaro.org>
5030
5031 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5032 type to uint32_t.
5033
6c1c9a8b
YQ
50342015-11-19 Yao Qi <yao.qi@linaro.org>
5035
5036 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5037 (struct aarch64_operand): Move enum out.
5038
9caa3311
YQ
50392015-11-19 Yao Qi <yao.qi@linaro.org>
5040
5041 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5042 struct user_fpsimd_state *.
5043 (aarch64_store_fpregset): Likewise.
5044
6a69a054
YQ
50452015-11-19 Yao Qi <yao.qi@linaro.org>
5046
5047 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5048 struct user_pt_regs *.
5049 (aarch64_store_gregset): Likewise.
5050
1798301e
PA
50512015-11-18 Pedro Alves <palves@redhat.com>
5052
5053 * Makefile.in (all_object_files): Add $IPA_OBJS.
5054
ce7715e2
PA
50552015-11-17 Pedro Alves <palves@redhat.com>
5056
5057 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5058 GDB_SIGNAL_0 and gdb_signal_to_string.
5059
c0879059
PA
50602015-11-17 Pedro Alves <palves@redhat.com>
5061
5062 * win32-low.c (handle_output_debug_string): Remove parameter.
5063 (win32_kill): Remove our_status local and adjust call to
5064 handle_output_debug_string.
5065 (get_child_debug_event): Adjust call to
5066 handle_output_debug_string.
5067
1996e237
SM
50682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5069
5070 * linux-mips-low.c (mips_fill_gregset): Add cast.
5071 (mips_store_gregset): Likewise.
5072 (mips_fill_fpregset): Likewise.
5073 (mips_store_fpregset): Likewise.
5074
cbec665b
SM
50752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5076
5077 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5078 priv.
5079
eb3e3c67
SM
50802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5081
5082 * linux-mips-low.c (mips_linux_new_thread): Change type of
5083 watch_type to enum target_hw_bp_type.
5084
171de4b8
SM
50852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5086
5087 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5088 Change return type to arm_hwbp_type.
5089
04248ead
SM
50902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5091
5092 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5093 (arm_store_gregset): Likewise.
5094 * linux-arm-low.c (arm_get_hwcap): Likewise.
5095 (arm_read_description): Likewise.
5096
04b3479c
SM
50972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5098
5099 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5100
2bc84e8a
SM
51012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5102
5103 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5104 (ppc_fill_vsxregset): Likewise.
5105 (ppc_store_vsxregset): Likewise.
5106 (ppc_fill_vrregset): Likewise.
5107 (ppc_store_vrregset): Likewise.
5108 (ppc_fill_evrregset): Likewise.
5109 (ppc_store_evrregset): Likewise.
5110
e6c5bb05
SM
51112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5112
5113 * linux-ppc-low.c (ppc_usrregs_info): Remove
5114 forward-declaration.
5115 (ppc_arch_setup): Move lower in file.
5116
7ea45d72
SM
51172015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5118
5119 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5120 (ps_pdwrite): Likewise.
5121
69291610
HW
51222015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5123
5124 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5125 to after assert checks.
5126
b42945fd
SM
51272015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5128
5129 * proc-service.c (ps_pdread): Add/adjust casts.
5130 (ps_pdwrite): Add/adjust casts.
5131
d6f85c84
SM
51322015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5133
5134 * server.c (handle_search_memory_1): Cast return value of
5135 memmem.
5136
f98cd059
SM
51372015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5138
5139 * server.c (write_qxfer_response): Change type of data to
5140 gdb_byte *.
5141
d2412fa5
PA
51422015-10-29 Pedro Alves <palves@redhat.com>
5143
5144 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5145
c17414a2
PA
51462015-10-29 Pedro Alves <palves@redhat.com>
5147
5148 * tracepoint.c (clear_installed_tracepoints): Add casts.
5149
e053fbc4
PA
51502015-10-29 Pedro Alves <palves@redhat.com>
5151
5152 * server.c (handle_v_cont, process_serial_event): Add enum
5153 gdb_signal casts to signal parsing code.
5154
add67df8
PA
51552015-10-29 Pedro Alves <palves@redhat.com>
5156
5157 * linux-low.h (NULL_REGSET): Define.
5158 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5159 * linux-arm-low.c (arm_regsets): Likewise.
5160 * linux-crisv32-low.c (cris_regsets): Likewise.
5161 * linux-m68k-low.c (m68k_regsets): Likewise.
5162 * linux-mips-low.c (mips_regsets): Likewise.
5163 * linux-nios2-low.c (nios2_regsets): Likewise.
5164 * linux-ppc-low.c (ppc_regsets): Likewise.
5165 * linux-s390-low.c (s390_regsets): Likewise.
5166 * linux-sh-low.c (sh_regsets): Likewise.
5167 * linux-sparc-low.c (sparc_regsets): Likewise.
5168 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5169 * linux-tile-low.c (tile_regsets): Likewise.
5170 * linux-x86-low.c (x86_regsets): Likewise.
5171 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5172
50bc912a
PA
51732015-10-29 Pedro Alves <palves@redhat.com>
5174
5175 * linux-low.h (NULL_REGSET): Define.
5176 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5177 * linux-arm-low.c (arm_regsets): Likewise.
5178 * linux-crisv32-low.c (cris_regsets): Likewise.
5179 * linux-m68k-low.c (m68k_regsets): Likewise.
5180 * linux-mips-low.c (mips_regsets): Likewise.
5181 * linux-nios2-low.c (nios2_regsets): Likewise.
5182 * linux-ppc-low.c (ppc_regsets): Likewise.
5183 * linux-s390-low.c (s390_regsets): Likewise.
5184 * linux-sh-low.c (sh_regsets): Likewise.
5185 * linux-sparc-low.c (sparc_regsets): Likewise.
5186 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5187 * linux-tile-low.c (tile_regsets): Likewise.
5188 * linux-x86-low.c (x86_regsets): Likewise.
5189 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5190
682b2546
DE
51912015-10-26 Doug Evans <dje@google.com>
5192
5193 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5194
963843d4
DE
51952015-10-26 Doug Evans <dje@google.com>
5196
5197 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5198
d41401ac
DE
51992015-10-26 Doug Evans <dje@google.com>
5200
5201 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5202 for debug_printf.
5203 (attach_thread, find_new_threads_callback): Ditto.
5204
3db28855
AT
52052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5206
5207 * mem-break.h (set_breakpoint_data): Remove.
5208
fb78e89c
AT
52092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5210
5211 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5212 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5213 (initialize_low): Remove set_breakpoint_data call.
5214 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5215 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5216 (initialize_low): Remove set_breakpoint_data call.
5217 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5218 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5219 (initialize_low): Remove set_breakpoint_data call.
5220
2e6ee069
AT
52212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5222
5223 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5224 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5225 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5226 * target.h (target_breakpoint_kind_from_pc): New macro.
5227
1652a986
AT
52282015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5229
5230 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5231 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5232 the default breakpoint kind.
5233
abeead09
AT
52342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5235
5236 * linux-arm-low.c (arm_supports_z_point_type): Add software
5237 breakpoint support.
5238
b0b4b501
AT
52392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5240
5241 * linux-arm-low.c: Refactor breakpoint definitions.
5242 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5243 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5244
8689682c
AT
52452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5246
5247 * Makefile.in: Add arm.c/o.
5248 * configure.srv: Likewise.
5249 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5250 (arm_breakpoint_kind_from_pc): New function.
5251 (arm_sw_breakpoint_from_kind): Return proper kind.
5252 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5253
27165294
AT
52542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5255
5256 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5257 removal.
5258 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5259 (struct raw_breakpoint) <size>: Remove.
5260 (struct raw_breakpoint) <kind>: Add.
5261 (bp_size): New function.
5262 (bp_opcode): Likewise.
5263 (find_raw_breakpoint_at): Adjust for kind.
5264 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5265 (remove_memory_breakpoint): Adjust for kind call bp_size.
5266 (set_raw_breakpoint_at): Adjust for kind.
5267 (set_breakpoint): Likewise.
5268 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5269 (delete_raw_breakpoint): Adjust for kind.
5270 (delete_breakpoint): Likewise.
5271 (find_gdb_breakpoint): Likewise.
5272 (set_gdb_breakpoint_1): Likewise.
5273 (set_gdb_breakpoint): Likewise.
5274 (delete_gdb_breakpoint_1): Likewise.
5275 (delete_gdb_breakpoint): Likewise.
5276 (uninsert_raw_breakpoint): Likewise.
5277 (reinsert_raw_breakpoint): Likewise.
5278 (set_breakpoint_data): Remove.
5279 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5280 (check_mem_read): Adjust for kind call bp_size.
5281 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5282 (clone_one_breakpoint): Adjust for kind.
5283 * mem-break.h (set_gdb_breakpoint): Likewise.
5284 (delete_gdb_breakpoint): Likewise.
5285 * server.c (process_serial_event): Likewise.
5286
dd373349
AT
52872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5288
5289 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5295 (arm_sw_breakpoint_from_kind): New function.
5296 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5297 (struct linux_target_ops) <breakpoint>: Remove.
5298 (struct linux_target_ops) <breakpoint_len>: Remove.
5299 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5300 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5301 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5302 (struct linux_target_ops) <breakpoint>: Remove.
5303 (struct linux_target_ops) <breakpoint_len>: Remove.
5304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5306 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5307 (struct linux_target_ops) <breakpoint>: Remove.
5308 (struct linux_target_ops) <breakpoint_len>: Remove.
5309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5311 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5312 and sw_breakpoint_from_kind to increment the pc.
5313 (linux_breakpoint_kind_from_pc): New function.
5314 (linux_sw_breakpoint_from_kind): New function.
5315 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5316 (initialize_low): Call breakpoint_kind_from_pc and
5317 sw_breakpoint_from_kind to replace breakpoint_data/len.
5318 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5319 New field.
5320 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5321 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5322 (struct linux_target_ops) <breakpoint>: Remove.
5323 (struct linux_target_ops) <breakpoint_len>: Remove.
5324 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5326 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5327 (struct linux_target_ops) <breakpoint>: Remove.
5328 (struct linux_target_ops) <breakpoint_len>: Remove.
5329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5331 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5332 (struct linux_target_ops) <breakpoint>: Remove.
5333 (struct linux_target_ops) <breakpoint_len>: Remove.
5334 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5335 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5336 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5337 (struct linux_target_ops) <breakpoint>: Remove.
5338 (struct linux_target_ops) <breakpoint_len>: Remove.
5339 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5341 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5342 (struct linux_target_ops) <breakpoint>: Remove.
5343 (struct linux_target_ops) <breakpoint_len>: Remove.
5344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5346 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5347 (struct linux_target_ops) <breakpoint>: Remove.
5348 (struct linux_target_ops) <breakpoint_len>: Remove.
5349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5351 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5352 (struct linux_target_ops) <breakpoint>: Remove.
5353 (struct linux_target_ops) <breakpoint_len>: Remove.
5354 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5355 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5356 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5357 (struct linux_target_ops) <breakpoint>: Remove.
5358 (struct linux_target_ops) <breakpoint_len>: Remove.
5359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5360 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5361 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5362 (struct linux_target_ops) <breakpoint>: Remove.
5363 (struct linux_target_ops) <breakpoint_len>: Remove.
5364 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5365 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5366 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5367 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5368 (struct linux_target_ops) <breakpoint>: Remove.
5369 (struct linux_target_ops) <breakpoint_len>: Remove.
5370 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5371 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5372 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5373 (struct linux_target_ops) <breakpoint>: Remove.
5374 (struct linux_target_ops) <breakpoint_len>: Remove.
5375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5377
4cd98a19
AT
53782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5379
5380 * linux-cris-low.c (cris_get_pc): Remove void arg.
5381
774ee6d2
AR
53822015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5383
5384 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5385 variable name.
5386
833dcd29
AR
53872015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5388
5389 * inferiors.c (thread_pid_matches_callback): New function.
5390 (find_thread_process): New function.
5391 (remove_thread): Reset current_thread.
5392 (remove_process): Assert threads have been removed first.
5393
8d689ee5
YQ
53942015-10-15 Yao Qi <yao.qi@linaro.org>
5395
5396 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5397 if it is 3.
5398 (aarch64_remove_point): Likewise.
5399 * regcache.c (regcache_register_size): New function.
5400
1c2e1515
YQ
54012015-10-12 Yao Qi <yao.qi@linaro.org>
5402
5403 * linux-aarch64-low.c: Update all callers as emit_load_store
5404 is renamed to aarch64_emit_load_store.
5405
e1c587c3
YQ
54062015-10-12 Yao Qi <yao.qi@linaro.org>
5407
5408 * linux-aarch64-low.c: Update all callers of function renaming
5409 from emit_insn to aarch64_emit_insn.
5410
b6542f81
YQ
54112015-10-12 Yao Qi <yao.qi@linaro.org>
5412
5413 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5414 arch/aarch64-insn.h.
5415 (struct aarch64_memory_operand): Likewise.
5416 (ENCODE): Likewise.
5417 (emit_insn): Move to arch/aarch64-insn.c.
5418 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5419 (emit_load_store): Move to arch/aarch64-insn.c.
5420 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5421 (can_encode_int32): Remove.
5422
246994ce
YQ
54232015-10-12 Yao Qi <yao.qi@linaro.org>
5424
5425 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5426 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5427 (aarch64_relocate_instruction): Likewise.
5428 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5429 (struct aarch64_insn_visitor): Likewise.
5430
0badd99f
YQ
54312015-10-12 Yao Qi <yao.qi@linaro.org>
5432
5433 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5434 (struct aarch64_insn_visitor): New.
5435 (struct aarch64_insn_relocation_data): New.
5436 (aarch64_ftrace_insn_reloc_b): New function.
5437 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5438 (aarch64_ftrace_insn_reloc_cb): Likewise.
5439 (aarch64_ftrace_insn_reloc_tb): Likewise.
5440 (aarch64_ftrace_insn_reloc_adr): Likewise.
5441 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5442 (aarch64_ftrace_insn_reloc_others): Likewise.
5443 (visitor): New.
5444 (aarch64_relocate_instruction): Use visitor.
5445
dfaffe9d
YQ
54462015-10-12 Yao Qi <yao.qi@linaro.org>
5447
5448 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5449 int. Add argument buf.
5450 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5451 aarch64_relocate_instruction.
5452
70b439f0
YQ
54532015-10-12 Yao Qi <yao.qi@linaro.org>
5454
5455 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5456 argument insn. Remove local variable insn. Don't call
5457 target_read_uint32.
5458 (aarch64_install_fast_tracepoint_jump_pad): Call
5459 target_read_uint32.
5460
7781c06f
YQ
54612015-09-30 Yao Qi <yao.qi@linaro.org>
5462
5463 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5464 (emit_load_store_pair): Likewise.
5465
9a3c8263
SM
54662015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5467
5468 * dll.c (match_dll): Add cast(s).
5469 (unloaded_dll): Likewise.
5470 * linux-low.c (second_thread_of_pid_p): Likewise.
5471 (delete_lwp_callback): Likewise.
5472 (count_events_callback): Likewise.
5473 (select_event_lwp_callback): Likewise.
5474 (linux_set_resume_request): Likewise.
5475 * server.c (accumulate_file_name_length): Likewise.
5476 (emit_dll_description): Likewise.
5477 (handle_qxfer_threads_worker): Likewise.
5478 (visit_actioned_threads): Likewise.
5479 * thread-db.c (any_thread_of): Likewise.
5480 * tracepoint.c (same_process_p): Likewise.
5481 (match_blocktype): Likewise.
5482 (build_traceframe_info_xml): Likewise.
5483
224c3ddb
SM
54842015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5485
5486 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5487 assignment.
5488 (gdb_unparse_agent_expr): Likewise.
5489 * hostio.c (require_data): Likewise.
5490 (handle_pread): Likewise.
5491 * linux-low.c (disable_regset): Likewise.
5492 (fetch_register): Likewise.
5493 (store_register): Likewise.
5494 (get_dynamic): Likewise.
5495 (linux_qxfer_libraries_svr4): Likewise.
5496 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5497 (set_fast_tracepoint_jump): Likewise.
5498 (uninsert_fast_tracepoint_jumps_at): Likewise.
5499 (reinsert_fast_tracepoint_jumps_at): Likewise.
5500 (validate_inserted_breakpoint): Likewise.
5501 (clone_agent_expr): Likewise.
5502 * regcache.c (init_register_cache): Likewise.
5503 * remote-utils.c (putpkt_binary_1): Likewise.
5504 (decode_M_packet): Likewise.
5505 (decode_X_packet): Likewise.
5506 (look_up_one_symbol): Likewise.
5507 (relocate_instruction): Likewise.
5508 (monitor_output): Likewise.
5509 * server.c (handle_search_memory): Likewise.
5510 (handle_qxfer_exec_file): Likewise.
5511 (handle_qxfer_libraries): Likewise.
5512 (handle_qxfer): Likewise.
5513 (handle_query): Likewise.
5514 (handle_v_cont): Likewise.
5515 (handle_v_run): Likewise.
5516 (captured_main): Likewise.
5517 * target.c (write_inferior_memory): Likewise.
5518 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5519 * tracepoint.c (init_trace_buffer): Likewise.
5520 (add_tracepoint_action): Likewise.
5521 (add_traceframe): Likewise.
5522 (add_traceframe_block): Likewise.
5523 (cmd_qtdpsrc): Likewise.
5524 (cmd_qtdv): Likewise.
5525 (cmd_qtstatus): Likewise.
5526 (response_source): Likewise.
5527 (response_tsv): Likewise.
5528 (cmd_qtnotes): Likewise.
5529 (gdb_collect): Likewise.
5530 (initialize_tracepoint): Likewise.
5531
afbe19f8
PL
55322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5533
5534 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5535 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5536 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5537 <NOP>: New.
5538 (enum aarch64_condition_codes): New enum.
5539 (w0): New static global.
5540 (fp): Likewise.
5541 (lr): Likewise.
5542 (struct aarch64_memory_operand) <type>: New
5543 MEMORY_OPERAND_POSTINDEX type.
5544 (postindex_memory_operand): New helper function.
5545 (emit_ret): New function.
5546 (emit_load_store_pair): New function, factored out of emit_stp
5547 with support for MEMORY_OPERAND_POSTINDEX.
5548 (emit_stp): Rewrite using emit_load_store_pair.
5549 (emit_ldp): New function.
5550 (emit_load_store): Likewise.
5551 (emit_ldr): Mention post-index instruction in comment.
5552 (emit_ldrh): New function.
5553 (emit_ldrb): New function.
5554 (emit_ldrsw): Mention post-index instruction in comment.
5555 (emit_str): Likewise.
5556 (emit_subs): New function.
5557 (emit_cmp): Likewise.
5558 (emit_and): Likewise.
5559 (emit_orr): Likewise.
5560 (emit_orn): Likewise.
5561 (emit_eor): Likewise.
5562 (emit_mvn): Likewise.
5563 (emit_lslv): Likewise.
5564 (emit_lsrv): Likewise.
5565 (emit_asrv): Likewise.
5566 (emit_mul): Likewise.
5567 (emit_sbfm): Likewise.
5568 (emit_sbfx): Likewise.
5569 (emit_ubfm): Likewise.
5570 (emit_ubfx): Likewise.
5571 (emit_csinc): Likewise.
5572 (emit_cset): Likewise.
5573 (emit_nop): Likewise.
5574 (emit_ops_insns): New helper function.
5575 (emit_pop): Likewise.
5576 (emit_push): Likewise.
5577 (aarch64_emit_prologue): New function.
5578 (aarch64_emit_epilogue): Likewise.
5579 (aarch64_emit_add): Likewise.
5580 (aarch64_emit_sub): Likewise.
5581 (aarch64_emit_mul): Likewise.
5582 (aarch64_emit_lsh): Likewise.
5583 (aarch64_emit_rsh_signed): Likewise.
5584 (aarch64_emit_rsh_unsigned): Likewise.
5585 (aarch64_emit_ext): Likewise.
5586 (aarch64_emit_log_not): Likewise.
5587 (aarch64_emit_bit_and): Likewise.
5588 (aarch64_emit_bit_or): Likewise.
5589 (aarch64_emit_bit_xor): Likewise.
5590 (aarch64_emit_bit_not): Likewise.
5591 (aarch64_emit_equal): Likewise.
5592 (aarch64_emit_less_signed): Likewise.
5593 (aarch64_emit_less_unsigned): Likewise.
5594 (aarch64_emit_ref): Likewise.
5595 (aarch64_emit_if_goto): Likewise.
5596 (aarch64_emit_goto): Likewise.
5597 (aarch64_write_goto_address): Likewise.
5598 (aarch64_emit_const): Likewise.
5599 (aarch64_emit_call): Likewise.
5600 (aarch64_emit_reg): Likewise.
5601 (aarch64_emit_pop): Likewise.
5602 (aarch64_emit_stack_flush): Likewise.
5603 (aarch64_emit_zero_ext): Likewise.
5604 (aarch64_emit_swap): Likewise.
5605 (aarch64_emit_stack_adjust): Likewise.
5606 (aarch64_emit_int_call_1): Likewise.
5607 (aarch64_emit_void_call_2): Likewise.
5608 (aarch64_emit_eq_goto): Likewise.
5609 (aarch64_emit_ne_goto): Likewise.
5610 (aarch64_emit_lt_goto): Likewise.
5611 (aarch64_emit_le_goto): Likewise.
5612 (aarch64_emit_gt_goto): Likewise.
5613 (aarch64_emit_ge_got): Likewise.
5614 (aarch64_emit_ops_impl): New static global variable.
5615 (aarch64_emit_ops): New target function, return
5616 &aarch64_emit_ops_impl.
5617 (struct linux_target_ops): Install it.
5618
bb903df0
PL
56192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5620
5621 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5622 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5623 aarch64-ipa.o.
5624 * linux-aarch64-ipa.c: New file.
5625 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5626 and endian.h.
5627 (aarch64_get_thread_area): New target method.
5628 (extract_signed_bitfield): New helper function.
5629 (aarch64_decode_ldr_literal): New function.
5630 (enum aarch64_opcodes): New enum.
5631 (struct aarch64_register): New struct.
5632 (struct aarch64_operand): New struct.
5633 (x0): New static global.
5634 (x1): Likewise.
5635 (x2): Likewise.
5636 (x3): Likewise.
5637 (x4): Likewise.
5638 (w2): Likewise.
5639 (ip0): Likewise.
5640 (sp): Likewise.
5641 (xzr): Likewise.
5642 (aarch64_register): New helper function.
5643 (register_operand): Likewise.
5644 (immediate_operand): Likewise.
5645 (struct aarch64_memory_operand): New struct.
5646 (offset_memory_operand): New helper function.
5647 (preindex_memory_operand): Likewise.
5648 (enum aarch64_system_control_registers): New enum.
5649 (ENCODE): New macro.
5650 (emit_insn): New helper function.
5651 (emit_b): New function.
5652 (emit_bcond): Likewise.
5653 (emit_cb): Likewise.
5654 (emit_tb): Likewise.
5655 (emit_blr): Likewise.
5656 (emit_stp): Likewise.
5657 (emit_ldp_q_offset): Likewise.
5658 (emit_stp_q_offset): Likewise.
5659 (emit_load_store): Likewise.
5660 (emit_ldr): Likewise.
5661 (emit_ldrsw): Likewise.
5662 (emit_str): Likewise.
5663 (emit_ldaxr): Likewise.
5664 (emit_stxr): Likewise.
5665 (emit_stlr): Likewise.
5666 (emit_data_processing_reg): Likewise.
5667 (emit_data_processing): Likewise.
5668 (emit_add): Likewise.
5669 (emit_sub): Likewise.
5670 (emit_mov): Likewise.
5671 (emit_movk): Likewise.
5672 (emit_mov_addr): Likewise.
5673 (emit_mrs): Likewise.
5674 (emit_msr): Likewise.
5675 (emit_sevl): Likewise.
5676 (emit_wfe): Likewise.
5677 (append_insns): Likewise.
5678 (can_encode_int32_in): New helper function.
5679 (aarch64_relocate_instruction): New function.
5680 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5681 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5682 (struct linux_target_ops): Install aarch64_get_thread_area,
5683 aarch64_install_fast_tracepoint_jump_pad and
5684 aarch64_get_min_fast_tracepoint_insn_len.
5685
787749ea
PL
56862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5687
5688 * Makefile.in (aarch64-insn.o): New rule.
5689 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5690
9812b2e6
YQ
56912015-09-21 Yao Qi <yao.qi@linaro.org>
5692
5693 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5694
18fe412b
YQ
56952015-09-21 Yao Qi <yao.qi@linaro.org>
5696
5697 * tracepoint.c (max_jump_pad_size): Remove.
5698
a0cc84cd
YQ
56992015-09-18 Yao Qi <yao.qi@linaro.org>
5700
5701 * linux-aarch64-low.c: Don't include sys/uio.h.
5702 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5703
d78908cf
WW
57042015-09-16 Wei-cheng Wang <cole945@gmail.com>
5705
5706 * tracepoint.c (eval_result_type): Change prototype.
5707 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5708
d57e0d50
PA
57092015-09-15 Pedro Alves <palves@redhat.com>
5710
5711 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5712 Check whether to report exec events instead of checking whether
5713 multiprocess is enabled.
5714
5a676acc
PA
57152015-09-15 Pedro Alves <palves@redhat.com>
5716
5717 PR remote/18965
5718 * remote-utils.c (prepare_resume_reply): Merge
5719 TARGET_WAITKIND_VFORK_DONE switch case with the
5720 TARGET_WAITKIND_FORKED case.
5721
7c5d0fad
YQ
57222015-09-15 Yao Qi <yao.qi@linaro.org>
5723
5724 * server.c (handle_query): Check string comparison using
5725 "else if" instead of "if".
5726
750ce8d1
YQ
57272015-09-15 Yao Qi <yao.qi@linaro.org>
5728
5729 * server.c (vCont_supported): New global variable.
5730 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5731 matches. Append ";vContSupported+" to own_buf.
5732 (handle_v_requests): Append ";s;S" to own_buf if target supports
5733 hardware single step or vCont_supported is false.
5734 (capture_main): Set vCont_supported to zero.
5735
70b90b91
YQ
57362015-09-15 Yao Qi <yao.qi@linaro.org>
5737
5738 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5739 it to ...
5740 (linux_supports_hardware_single_step): ... New function.
5741 (linux_target_ops): Update.
5742 * lynx-low.c (lynx_target_ops): Set field
5743 supports_hardware_single_step to target_can_do_hardware_single_step.
5744 * nto-low.c (nto_target_ops): Likewise.
5745 * spu-low.c (spu_target_ops): Likewise.
5746 * win32-low.c (win32_target_ops): Likewise.
5747 * target.c (target_can_do_hardware_single_step): New function.
5748 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5749 Remove. <supports_hardware_single_step>: New field.
5750 (target_supports_conditional_breakpoints): Remove.
5751 (target_supports_hardware_single_step): New macro.
5752 (target_can_do_hardware_single_step): Declare.
5753 * server.c (handle_query): Use target_supports_hardware_single_step
5754 instead of target_supports_conditional_breakpoints.
5755
ade90bde
YQ
57562015-09-15 Yao Qi <yao.qi@linaro.org>
5757
5758 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5759 function.
5760 (struct linux_target_ops the_low_target): Install
5761 aarch64_linux_siginfo_fixup.
5762
94585166
DB
57632015-09-11 Don Breazeal <donb@codesourcery.com>
5764 Luis Machado <lgustavo@codesourcery.com>
5765
5766 * linux-low.c (linux_mourn): Static declaration.
5767 (linux_arch_setup): Move in front of
5768 handle_extended_wait.
5769 (linux_arch_setup_thread): New function.
5770 (handle_extended_wait): Handle exec events. Call
5771 linux_arch_setup_thread. Make event_lwp argument a
5772 pointer-to-a-pointer.
5773 (check_zombie_leaders): Do not check stopped threads.
5774 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5775 (linux_low_filter_event): Add lwp and thread for exec'ing
5776 non-leader thread if leader thread has been deleted.
5777 Refactor code into linux_arch_setup_thread and call it.
5778 Pass child lwp pointer by reference to handle_extended_wait.
5779 (linux_wait_for_event_filtered): Update comment.
5780 (linux_wait_1): Prevent clobbering exec event status.
5781 (linux_supports_exec_events): New function.
5782 (linux_target_ops) <supports_exec_events>: Initialize new member.
5783 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5784 new member.
5785 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5786 * server.c (report_exec_events): New global variable.
5787 (handle_query): Handle qSupported query for exec-events feature.
5788 (captured_main): Initialize report_exec_events.
5789 * server.h (report_exec_events): Declare new global variable.
5790 * target.h (struct target_ops) <supports_exec_events>: New
5791 member.
5792 (target_supports_exec_events): New macro.
5793 * win32-low.c (win32_target_ops) <supports_exec_events>:
5794 Initialize new member.
5795
0568462b
MM
57962015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5797
5798 * linux-low.c (linux_low_enable_btrace): Remove.
5799 (linux_target_ops): Replace linux_low_enable_btrace with
5800 linux_enable_btrace.
5801
39edd165
YQ
58022015-09-03 Yao Qi <yao.qi@linaro.org>
5803
5804 * linux-aarch64-low.c (aarch64_insert_point): Call
5805 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5806 returns true.
5807
1db33b5a
UW
58082015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5809
5810 * linux-low.c (check_stopped_by_breakpoint): Use
5811 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5812
ab290430
PA
58132015-08-27 Pedro Alves <palves@redhat.com>
5814
5815 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5816
8d749320
SM
58172015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5818
6711b7f8
SM
5819 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5820 the XNEW-family equivalent.
8d749320
SM
5821 (compile_bytecodes): Likewise.
5822 * dll.c (loaded_dll): Likewise.
5823 * event-loop.c (append_callback_event): Likewise.
5824 (create_file_handler): Likewise.
5825 (create_file_event): Likewise.
5826 * hostio.c (handle_open): Likewise.
5827 * inferiors.c (add_thread): Likewise.
5828 (add_process): Likewise.
5829 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5830 * linux-arm-low.c (arm_new_process): Likewise.
5831 (arm_new_thread): Likewise.
5832 * linux-low.c (add_to_pid_list): Likewise.
5833 (linux_add_process): Likewise.
5834 (handle_extended_wait): Likewise.
5835 (add_lwp): Likewise.
5836 (enqueue_one_deferred_signal): Likewise.
5837 (enqueue_pending_signal): Likewise.
5838 (linux_resume_one_lwp_throw): Likewise.
5839 (linux_resume_one_thread): Likewise.
5840 (linux_read_memory): Likewise.
5841 (linux_write_memory): Likewise.
5842 * linux-mips-low.c (mips_linux_new_process): Likewise.
5843 (mips_linux_new_thread): Likewise.
5844 (mips_add_watchpoint): Likewise.
5845 * linux-x86-low.c (initialize_low_arch): Likewise.
5846 * lynx-low.c (lynx_add_process): Likewise.
5847 * mem-break.c (set_raw_breakpoint_at): Likewise.
5848 (set_breakpoint): Likewise.
5849 (add_condition_to_breakpoint): Likewise.
5850 (add_commands_to_breakpoint): Likewise.
5851 (clone_agent_expr): Likewise.
5852 (clone_one_breakpoint): Likewise.
5853 * regcache.c (new_register_cache): Likewise.
5854 * remote-utils.c (look_up_one_symbol): Likewise.
5855 * server.c (queue_stop_reply): Likewise.
5856 (start_inferior): Likewise.
5857 (queue_stop_reply_callback): Likewise.
5858 (handle_target_event): Likewise.
5859 * spu-low.c (fetch_ppc_memory): Likewise.
5860 (store_ppc_memory): Likewise.
5861 * target.c (set_target_ops): Likewise.
5862 * thread-db.c (thread_db_load_search): Likewise.
5863 (try_thread_db_load_1): Likewise.
5864 * tracepoint.c (add_tracepoint): Likewise.
5865 (add_tracepoint_action): Likewise.
5866 (create_trace_state_variable): Likewise.
5867 (cmd_qtdpsrc): Likewise.
5868 (cmd_qtro): Likewise.
5869 (add_while_stepping_state): Likewise.
5870 * win32-low.c (child_add_thread): Likewise.
5871 (get_image_name): Likewise.
5872
ed8b7b42
YQ
58732015-08-25 Yao Qi <yao.qi@linaro.org>
5874
5875 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5876
db3cb7cb
YQ
58772015-08-25 Yao Qi <yao.qi@linaro.org>
5878
5879 * Makefile.in (aarch64-linux.o): New rule.
5880 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5881 srv_tgtobj.
5882 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5883 (aarch64_init_debug_reg_state): Make it extern.
5884 (aarch64_linux_prepare_to_resume): Remove.
5885
f6011a1c
YQ
58862015-08-25 Yao Qi <yao.qi@linaro.org>
5887
5888 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5889 lwp_arch_private_info and ptid_of_lwp.
5890
88e2cf7e
YQ
58912015-08-25 Yao Qi <yao.qi@linaro.org>
5892
5893 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5894 Find proc_info by find_process_pid. All callers updated.
5895
5e35436e
YQ
58962015-08-25 Yao Qi <yao.qi@linaro.org>
5897
5898 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5899 Remove.
5900 (debug_reg_change_callback): Remove.
5901 (aarch64_notify_debug_reg_change): Remove.
5902
4a8a7965
YQ
59032015-08-25 Yao Qi <yao.qi@linaro.org>
5904
5905 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5906 Call current_lwp_ptid.
5907
32a271ee
YQ
59082015-08-25 Yao Qi <yao.qi@linaro.org>
5909
5910 * linux-aarch64-low.c (debug_reg_change_callback): Use
5911 debug_printf.
5912
0d51c8d7
YQ
59132015-08-25 Yao Qi <yao.qi@linaro.org>
5914
5915 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5916
31a43dd5
YQ
59172015-08-25 Yao Qi <yao.qi@linaro.org>
5918
5919 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5920
8ee52567
YQ
59212015-08-25 Yao Qi <yao.qi@linaro.org>
5922
5923 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5924 the code.
5925
ff3f0f45
YQ
59262015-08-25 Yao Qi <yao.qi@linaro.org>
5927
5928 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5929 Remove.
5930 (debug_reg_change_callback): Remove argument entry and add argument
5931 lwp. Remove local variable thread. Don't print thread id in the
5932 debugging output. Don't check whether pid of thread equals to pid.
5933 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5934 iterate_over_lwps instead find_inferior.
5935
3d40fbb5
PA
59362015-08-24 Pedro Alves <palves@redhat.com>
5937
5938 * inferiors.c (get_first_process): New function.
5939 * inferiors.h (get_first_process): New declaration.
5940 * remote-utils.c (read_ptid): Default to the first process in the
5941 list, instead of to the current thread's process.
5942
438e1e42
PA
59432015-08-24 Pedro Alves <palves@redhat.com>
5944
5945 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5946 * event-loop.c: Likewise.
5947 * remote-utils.c: Likewise.
5948 * tracepoint.c: Likewise.
5949
a8c6d4fc
PA
59502015-08-24 Pedro Alves <palves@redhat.com>
5951
5952 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5953 ptid_get_lwp.
5954
99b0bb12
PA
59552015-08-21 Pedro Alves <palves@redhat.com>
5956
5957 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5958 instead of literal 1.
5959
f8904751
PA
59602015-08-21 Pedro Alves <palves@redhat.com>
5961
5962 * tdesc.c (default_description): Explicitly zero-initialize.
5963
465a859e
PA
59642015-08-21 Pedro Alves <palves@redhat.com>
5965
5966 PR gdb/18749
5967 * inferiors.c (remove_thread): Discard any pending stop reply for
5968 this thread.
5969 * server.c (remove_all_on_match_pid): Rename to ...
5970 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5971 instead of a pid.
5972 (discard_queued_stop_replies): Change parameter to a ptid. Now
5973 extern.
5974 (handle_v_kill, kill_inferior_callback, captured_main)
5975 (process_serial_event): Adjust.
5976 * server.h (discard_queued_stop_replies): Declare.
5977
f0db101d
PA
59782015-08-21 Pedro Alves <palves@redhat.com>
5979
5980 * linux-low.c (wait_for_sigstop): Always switch to no thread
5981 selected if the previously current thread dies.
5982 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5983 process instead of the current thread's.
5984 * remote-utils.c (input_interrupt): Don't check if there's no
5985 current thread.
5986 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5987 current thread to the general thread fails, error out.
5988 (handle_qxfer_auxv, handle_qxfer_libraries)
5989 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5990 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5991 (handle_query): Check if there's a thread selected instead of
5992 checking whether there's any thread in the thread list.
5993 (handle_qxfer_threads, handle_qxfer_btrace)
5994 (handle_qxfer_btrace_conf): Don't error out early if there's no
5995 thread in the thread list.
5996 (handle_v_cont, myresume): Don't set the current thread to the
5997 continue thread.
5998 (process_serial_event) <Hg handling>: Also set thread_id if the
5999 previous general thread is still alive.
6000 (process_serial_event) <g/G handling>: If setting the current
6001 thread to the general thread fails, error out.
6002 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6003 thread's lwp instead of the current thread's.
6004 * target.c (set_desired_thread): If the desired thread was not
6005 found, leave the current thread pointing to NULL. Return an int
6006 (boolean) indicating success.
6007 * target.h (set_desired_thread): Change return type to int.
6008
40045d91
MF
60092015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6010
6011 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6012 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6013 #includes.
6014 (ps_get_thread_area): New function.
6015
45face3b
GB
60162015-08-19 Gary Benson <gbenson@redhat.com>
6017
6018 * hostio.c (handle_pread): Do not attempt to read more data
6019 than hostio_reply_with_data can fit in a packet.
6020
16d5f642
JB
60212015-08-18 Joel Brobecker <brobecker@adacore.com>
6022
6023 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6024
a738da3a
MF
60252015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6026
6027 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6028
33ebda9d
PA
60292015-08-06 Pedro Alves <palves@redhat.com>
6030
6031 * tracepoint.c (expr_eval_result): Now an int.
6032
a44892be
PA
60332015-08-06 Pedro Alves <palves@redhat.com>
6034
6035 * gdbthread.h (struct regcache): Forward declare.
6036 (struct thread_info) <regcache_data>: Now a struct regcache
6037 pointer.
6038 * inferiors.c (inferior_regcache_data)
6039 (set_inferior_regcache_data): Now work with struct regcache
6040 pointers.
6041 * inferiors.h (struct regcache): Forward declare.
6042 (inferior_regcache_data, set_inferior_regcache_data): Now work
6043 with struct regcache pointers.
6044 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6045 (free_register_cache_thread): Remove struct regcache pointer
6046 casts.
6047
608a1e46
PA
60482015-08-06 Pedro Alves <palves@redhat.com>
6049
6050 * server.c (captured_main): On error, print the exception message
6051 to stderr, and if run_once is set, throw a quit.
6052
f0ce0d3a
PA
60532015-08-06 Pedro Alves <palves@redhat.com>
6054
6055 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6056 the current thread.
6057
bf47e248
PA
60582015-08-06 Pedro Alves <palves@redhat.com>
6059
6060 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6061 reading beyond the passed in buffer length.
6062
b6b9ffcc
PL
60632015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6064
6065 * tracepoint.c (symbol_list) <required>: Remove.
6066
863d01bd
PA
60672015-08-06 Pedro Alves <palves@redhat.com>
6068
6069 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6070 count if stopping and suspending threads.
6071 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6072 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6073 (linux_detach): Complete an ongoing step-over.
6074 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6075 throughout.
6076 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6077 (linux_wait_1): If passing a signal to the inferior after
6078 finishing a step-over, unsuspend and re-resume all lwps. If we
6079 see a single-step event but the thread should be continuing, don't
6080 pass the trap to gdb.
6081 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6082 internal_error instead of gdb_assert.
6083 (enqueue_pending_signal): New function.
6084 (check_ptrace_stopped_lwp_gone): Add debug output.
6085 (start_step_over): Use internal_error instead of gdb_assert.
6086 (complete_ongoing_step_over): New function.
6087 (linux_resume_one_thread): Don't resume a suspended thread.
6088 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6089 it stepping.
6090
00db26fa
PA
60912015-08-06 Pedro Alves <palves@redhat.com>
6092
6093 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6094 (linux_thread_alive): Use lwp_is_marked_dead.
6095 (extended_event_reported): Delete.
6096 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6097 instead of extended_event_reported.
6098 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6099 as well.
6100 (lwp_is_marked_dead): New function.
6101 (lwp_running): Use lwp_is_marked_dead.
6102 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6103 comment.
6104
ad071a30
PA
61052015-08-06 Pedro Alves <palves@redhat.com>
6106
6107 * linux-low.c (linux_wait_1): Move fork event output out of the
6108 !report_to_gdb check. Pass event_child->waitstatus to
6109 target_waitstatus_to_string instead of ourstatus.
6110
524b57e6
YQ
61112015-08-04 Yao Qi <yao.qi@linaro.org>
6112
6113 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6114 if current_thread is 32 bit.
6115
6085d6f6
YQ
61162015-08-04 Yao Qi <yao.qi@linaro.org>
6117
6118 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6119 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6120 * server.c (extended_protocol): Remove "static".
6121 * server.h (extended_protocol): Declare it.
6122
8a7e4587
YQ
61232015-08-04 Yao Qi <yao.qi@linaro.org>
6124
6125 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6126 both aarch64 and aarch32.
6127 (aarch64_set_pc): Likewise.
6128
3b53ae99
YQ
61292015-08-04 Yao Qi <yao.qi@linaro.org>
6130
6131 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6132 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6133 arm-with-neon.xml to srv_xmlfiles.
6134 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6135 (is_64bit_tdesc): New function.
6136 (aarch64_linux_read_description): New function.
6137 (aarch64_arch_setup): Call aarch64_linux_read_description.
6138 (regs_info): Rename to regs_info_aarch64.
6139 (aarch64_regs_info): Return right regs_info.
6140 (initialize_low_arch): Call initialize_low_arch_aarch32.
6141
bd9e6534
YQ
61422015-08-04 Yao Qi <yao.qi@linaro.org>
6143
6144 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6145 * linux-aarch32-low.c: New file.
6146 * linux-aarch32-low.h: New file.
6147 * linux-arm-low.c (arm_fill_gregset): Move it to
6148 linux-aarch32-low.c.
6149 (arm_store_gregset): Likewise.
6150 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6151 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6152 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6153 (regs_info): Rename to regs_info_arm.
6154 (arm_regs_info): Return regs_info_aarch32 if
6155 have_ptrace_getregset is 1 and target description is
6156 arm_with_neon or arm_with_vfpv3.
6157 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6158 Call initialize_low_arch_aarch32 instead.
6159
ded48a5e
YQ
61602015-08-04 Yao Qi <yao.qi@linaro.org>
6161
6162 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6163 * linux-low.c: ... here.
6164 * linux-low.h (have_ptrace_getregset): Declare it.
6165
96e9210f
PA
61662015-08-04 Pedro Alves <palves@redhat.com>
6167
6168 * thread-db.c (struct thread_db): Use new typedefs.
6169 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6170 CHK calls.
6171 (disable_thread_event_reporting): Cast result of dlsym to
6172 destination function pointer type.
6173 (thread_db_mourn): Use td_ta_delete_ftype.
6174
af60a1ef
SL
61752015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6176
6177 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6178 arch variant.
6179 (CDX_BREAKPOINT): Define for R2.
6180 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6181 (the_low_target): Add comments.
6182
e8b41681
YQ
61832015-07-30 Yao Qi <yao.qi@linaro.org>
6184
6185 * linux-arm-low.c (arm_hwcap): Remove it.
6186 (arm_read_description): New local variable arm_hwcap. Don't
6187 set arm_hwcap to zero.
6188
89abb039
YQ
61892015-07-30 Yao Qi <yao.qi@linaro.org>
6190
6191 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6192 Use regcache->tdesc instead.
6193 (arm_store_wmmxregset): Likewise.
6194 (arm_fill_vfpregset): Likewise.
6195 (arm_store_vfpregset): Likewise.
6196
deca266c
YQ
61972015-07-30 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-arm-low.c: Include arch/arm.h.
6200 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6201 (arm_store_gregset): Likewise.
6202
aa58a496
SM
62032015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6204
6205 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6206 ptrace's 4th parameter.
6207
50904b25
YQ
62082015-07-27 Yao Qi <yao.qi@linaro.org>
6209
6210 * configure.srv (case aarch64*-*-linux*): Don't set
6211 srv_linux_usrregs.
6212
5826e159
PA
62132015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6214
6215 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6216 sys/ptrace.h.
6217 * linux-arm-low.c: Likewise.
6218 * linux-cris-low.c: Likewise.
6219 * linux-crisv32-low.c: Likewise.
6220 * linux-low.c: Likewise.
6221 * linux-m68k-low.c: Likewise.
6222 * linux-mips-low.c: Likewise.
6223 * linux-nios2-low.c: Likewise.
6224 * linux-s390-low.c: Likewise.
6225 * linux-sparc-low.c: Likewise.
6226 * linux-tic6x-low.c: Likewise.
6227 * linux-tile-low.c: Likewise.
6228 * linux-x86-low.c: Likewise.
6229
54019719
PA
62302015-07-24 Pedro Alves <palves@redhat.com>
6231
6232 * config.in: Regenerate.
6233 * configure: Regenerate.
6234
eb7aa561
PA
62352015-07-24 Pedro Alves <palves@redhat.com>
6236
6237 * acinclude.m4: Include ../ptrace.m4.
6238 * configure.ac: Call GDB_AC_PTRACE.
6239 * config.in, configure: Regenerate.
6240
55d7b841
YQ
62412015-07-24 Yao Qi <yao.qi@linaro.org>
6242
6243 * linux-low.c (linux_create_inferior): Remove setting to
6244 proc->priv->new_inferior.
6245 (linux_attach): Likewise.
6246 (linux_low_filter_event): Likewise.
6247 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6248
c06cbd92
YQ
62492015-07-24 Yao Qi <yao.qi@linaro.org>
6250
6251 * linux-low.c (linux_arch_setup): New function.
6252 (linux_low_filter_event): If proc->tdesc is NULL and
6253 proc->attached is true, call the_low_target.arch_setup.
6254 Otherwise, keep status pending, and return.
6255 (linux_resume_one_lwp_throw): Don't call get_pc if
6256 thread->while_stepping isn't NULL. Don't call
6257 get_thread_regcache if proc->tdesc is NULL.
6258 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6259 (linux_target_ops): Install arch_setup.
6260 * server.c (start_inferior): Call the_target->arch_setup.
6261 * target.h (struct target_ops) <arch_setup>: New field.
6262 (target_arch_setup): New marco.
6263 * lynx-low.c (lynx_target_ops): Update.
6264 * nto-low.c (nto_target_ops): Update.
6265 * spu-low.c (spu_target_ops): Update.
6266 * win32-low.c (win32_target_ops): Update.
6267
5ae3ebba
YQ
62682015-07-24 Yao Qi <yao.qi@linaro.org>
6269
6270 * linux-low.c (linux_add_process): Don't set
6271 proc->priv->new_inferior.
6272 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6273 (linux_attach): Likewise.
6274
eb97750b
YQ
62752015-07-24 Yao Qi <yao.qi@linaro.org>
6276
6277 * server.c (start_inferior): Code refactor.
6278
51aee833
YQ
62792015-07-24 Yao Qi <yao.qi@linaro.org>
6280
6281 * server.c (process_serial_event): Set general_thread.
6282
af1b22f3
YQ
62832015-07-21 Yao Qi <yao.qi@linaro.org>
6284
6285 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6286 aarch64_linux_get_debug_reg_capacity.
6287
554717a3
YQ
62882015-07-17 Yao Qi <yao.qi@linaro.org>
6289
6290 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6291 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6292 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6293 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6294 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6295 (AARCH64_HWP_ALIGNMENT): Likewise.
6296 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6297 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6298 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6299 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6300 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6301 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6302 (struct aarch64_debug_reg_state): Likewise.
6303 (struct arch_lwp_info): Likewise.
6304 (aarch64_align_watchpoint): Likewise.
6305 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6306 (aarch64_watchpoint_length): Likewise.
6307 (aarch64_point_encode_ctrl_reg): Likewise
6308 (aarch64_point_is_aligned): Likewise.
6309 (aarch64_align_watchpoint): Likewise.
6310 (aarch64_linux_set_debug_regs):
6311 (aarch64_dr_state_insert_one_point): Likewise.
6312 (aarch64_dr_state_remove_one_point): Likewise.
6313 (aarch64_handle_breakpoint): Likewise.
6314 (aarch64_handle_aligned_watchpoint): Likewise.
6315 (aarch64_handle_unaligned_watchpoint): Likewise.
6316 (aarch64_handle_watchpoint): Likewise.
6317
c67ca4de
YQ
63182015-07-17 Yao Qi <yao.qi@linaro.org>
6319
6320 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6321 and don't aarch64_get_debug_reg_state. All callers update.
6322 (aarch64_handle_aligned_watchpoint): Likewise.
6323 (aarch64_handle_unaligned_watchpoint): Likewise.
6324 (aarch64_handle_watchpoint): Likewise.
6325 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6326 (aarch64_remove_point): Likewise.
6327
25abf979
YQ
63282015-07-17 Yao Qi <yao.qi@linaro.org>
6329
6330 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6331 debug_printf.
6332 (aarch64_handle_unaligned_watchpoint): Likewise.
6333
db1ff28b
JK
63342015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6335
6336 Revert the previous 3 commits:
6337 Move gdb_regex* to common/
6338 Move linux_find_memory_regions_full & co.
6339 gdbserver build-id attribute generator
6340
700ca40f
JK
63412015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6342 Jan Kratochvil <jan.kratochvil@redhat.com>
6343
6344 gdbserver build-id attribute generator.
6345 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6346 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6347 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6348 (find_phdr): New.
6349 (get_dynamic): Use find_pdhr to traverse program headers.
6350 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6351 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6352 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6353 (get_hex_build_id): New.
6354 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6355 to reply XML document.
6356
9904185c
JK
63572015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6358 Jan Kratochvil <jan.kratochvil@redhat.com>
6359
6360 * target.c: Include target/target-utils.h and fcntl.h.
6361 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6362 (target_fileio_read_stralloc): New functions.
6363
6e5b4429
JK
63642015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6365
6366 * Makefile.in (OBS): Add gdb_regex.o.
6367 (gdb_regex.o): New.
6368 * config.in: Rebuilt.
6369 * configure: Rebuilt.
6370
ddc98fbf
JK
63712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6372 Jan Kratochvil <jan.kratochvil@redhat.com>
6373
6374 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6375 * Makefile.in (OBS): Add target-utils.o.
6376 (linux-maps.o, target-utils.o): New.
6377 * configure.srv (srv_linux_obj): Add linux-maps.o.
6378
e57bb7a0
PL
63792015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6380
6381 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6382 function, return 1.
6383 (the_low_target): Install it.
6384
586b02a9
PA
63852015-07-14 Pedro Alves <palves@redhat.com>
6386
6387 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6388 Instead, ignore ECHILD, and throw an error for other errnos.
6389
58c1b36c
PA
63902015-07-10 Pedro Alves <palves@redhat.com>
6391
6392 * event-loop.c (struct callback_event) <data>: Change type to
6393 gdb_client_data instance instead of gdb_client_data pointer.
6394 (append_callback_event): Adjust.
6395
421530db
PL
63962015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6397
6398 * linux-aarch64-low.c: Add comments for each linux_target_ops
6399 method. Remove comments already covered in target_ops and
6400 linux_target_ops definitions.
6401 (the_low_target): Add comments for each unimplemented method.
6402
c2d65f38
YQ
64032015-07-09 Yao Qi <yao.qi@linaro.org>
6404
6405 * linux-aarch64-low.c (aarch64_regmap): Remove.
6406 (aarch64_usrregs_info): Remove.
6407 (regs_info): Set field usrregs to NULL.
6408
b20a6524
MM
64092015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6410
6411 * linux-low.c: Include "rsp-low.h"
6412 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6413 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6414 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6415 (handle_btrace_enable_pt): New.
6416 (handle_btrace_general_set): Support "pt".
6417 (handle_btrace_conf_general_set): Support "pt:size".
6418
96c97461
PL
64192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6420
6421 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6422 Z_PACKET_SW_BP.
6423
37d66942
PL
64242015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6425
6426 * linux-aarch64-low.c: Remove comment about endianness.
6427 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6428 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6429 memcmp.
6430
dc06243f
GB
64312015-06-24 Gary Benson <gbenson@redhat.com>
6432
6433 * linux-i386-ipa.c (stdint.h): Do not include.
6434 * lynx-i386-low.c (stdint.h): Likewise.
6435 * lynx-ppc-low.c (stdint.h): Likewise.
6436 * mem-break.c (stdint.h): Likewise.
6437 * thread-db.c (stdint.h): Likewise.
6438 * tracepoint.c (stdint.h): Likewise.
6439 * win32-low.c (stdint.h): Likewise.
6440
124e13d9
SM
64412015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6442
6443 * server.c (write_qxfer_response): Update call to
6444 remote_escape_output.
6445
909c2cda
JK
64462015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6447 Jan Kratochvil <jan.kratochvil@redhat.com>
6448
6449 Merge multiple hex conversions.
6450 * gdbreplay.c (tohex): Rename to 'fromhex'.
6451 (logchar): Use fromhex.
6452
24c05f46
JK
64532015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6454
6455 * server.c (handle_qxfer_libraries): Set `version' attribute for
6456 <library-list>.
6457
14d2069a
GB
64582015-06-10 Gary Benson <gbenson@redhat.com>
6459
6460 * target.h (struct target_ops) <multifs_open>: New field.
6461 <multifs_unlink>: Likewise.
6462 <multifs_readlink>: Likewise.
6463 * linux-low.c (nat/linux-namespaces.h): New include.
6464 (linux_target_ops): Initialize the_target->multifs_open,
6465 the_target->multifs_unlink and the_target->multifs_readlink.
6466 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6467 * hostio.c (hostio_fs_pid): New static variable.
6468 (hostio_handle_new_gdb_connection): New function.
6469 (handle_setfs): Likewise.
6470 (handle_open): Use the_target->multifs_open as appropriate.
6471 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6472 (handle_readlink): Use the_target->multifs_readlink as
6473 appropriate.
6474 (handle_vFile): Handle vFile:setfs packets.
6475 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6476 after target_handle_new_gdb_connection.
6477
4b8b5e72
GB
64782015-06-10 Gary Benson <gbenson@redhat.com>
6479
6480 * configure.ac (AC_CHECK_FUNCS): Add setns.
6481 * config.in: Regenerate.
6482 * configure: Likewise.
6483 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6484 (linux-namespaces.o): New rule.
6485 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6486
3ac2e371
GB
64872015-06-09 Gary Benson <gbenson@redhat.com>
6488
6489 * hostio.c (handle_open): Process mode argument with
6490 fileio_to_host_mode.
6491
ca9b78ce
YQ
64922015-06-01 Yao Qi <yao.qi@linaro.org>
6493
6494 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6495 * linux-x86-low.c: Likewise.
6496
bfacd19d
DB
64972015-05-28 Don Breazeal <donb@codesourcery.com>
6498
6499 * linux-low.c (handle_extended_wait): Initialize
6500 thread_info.last_resume_kind for new fork children.
6501
452003ef
PA
65022015-05-15 Pedro Alves <palves@redhat.com>
6503
6504 * target.h (target_handle_new_gdb_connection): Rewrite using if
6505 wrapped in do/while.
6506
1041a03c
JB
65072015-05-14 Joel Brobecker <brobecker@adacore.com>
6508
6509 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6510 * configure, config.in: Regenerate.
6511 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6512 Declare typedef.
6513
c269dbdb
DB
65142015-05-12 Don Breazeal <donb@codesourcery.com>
6515
6516 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6517 PTRACE_EVENT_VFORK_DONE.
6518 (linux_low_ptrace_options, extended_event_reported): Add vfork
6519 events.
6520 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6521 and "vforkdone" for RSP 'T' Stop Reply Packet.
6522 * server.h (report_vfork_events): Declare
6523 global variable.
6524
3a8a0396
DB
65252015-05-12 Don Breazeal <donb@codesourcery.com>
6526
6527 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6528 (the_low_target) <new_fork>: Initialize new member.
6529 * linux-arm-low.c (arm_new_fork): New function.
6530 (the_low_target) <new_fork>: Initialize new member.
6531 * linux-low.c (handle_extended_wait): Call new target function
6532 new_fork.
6533 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6534 * linux-mips-low.c (mips_add_watchpoint): New function
6535 extracted from mips_insert_point.
6536 (the_low_target) <new_fork>: Initialize new member.
6537 (mips_linux_new_fork): New function.
6538 (mips_insert_point): Call mips_add_watchpoint.
6539 * linux-x86-low.c (x86_linux_new_fork): New function.
6540 (the_low_target) <new_fork>: Initialize new member.
6541
de0d863e
DB
65422015-05-12 Don Breazeal <donb@codesourcery.com>
6543
6544 * linux-low.c (handle_extended_wait): Implement return value,
6545 rename argument 'event_child' to 'event_lwp', handle
6546 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6547 (linux_low_ptrace_options): New function.
6548 (linux_low_filter_event): Call linux_low_ptrace_options,
6549 use different argument fo linux_enable_event_reporting,
6550 use return value from handle_extended_wait.
6551 (extended_event_reported): New function.
6552 (linux_wait_1): Call extended_event_reported and set
6553 status to report fork events.
6554 (linux_write_memory): Add pid to debug message.
6555 (reset_lwp_ptrace_options_callback): New function.
6556 (linux_handle_new_gdb_connection): New function.
6557 (linux_target_ops): Initialize new structure member.
6558 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6559 * lynx-low.c: Initialize new structure member.
6560 * remote-utils.c (prepare_resume_reply): Implement stop reason
6561 "fork" for "T" stop message.
6562 * server.c (handle_query): Call handle_new_gdb_connection.
6563 * server.h (report_fork_events): Declare global flag.
6564 * target.h (struct target_ops) <handle_new_gdb_connection>:
6565 New member.
6566 (target_handle_new_gdb_connection): New macro.
6567 * win32-low.c: Initialize new structure member.
6568
ddcbc397
DB
65692015-05-12 Don Breazeal <donb@codesourcery.com>
6570
6571 * mem-break.c (APPEND_TO_LIST): Define macro.
6572 (clone_agent_expr): New function.
6573 (clone_one_breakpoint): New function.
6574 (clone_all_breakpoints): New function.
6575 * mem-break.h: Declare new functions.
6576
89245bc0
DB
65772015-05-12 Don Breazeal <donb@codesourcery.com>
6578
6579 * linux-low.c (linux_supports_fork_events): New function.
6580 (linux_supports_vfork_events): New function.
6581 (linux_target_ops): Initialize new structure members.
6582 (initialize_low): Call linux_check_ptrace_features.
6583 * lynx-low.c (lynx_target_ops): Initialize new structure
6584 members.
6585 * server.c (report_fork_events, report_vfork_events):
6586 New global flags.
6587 (handle_query): Add new features to qSupported packet and
6588 response.
6589 (captured_main): Initialize new global variables.
6590 * target.h (struct target_ops) <supports_fork_events>:
6591 New member.
6592 <supports_vfork_events>: New member.
6593 (target_supports_fork_events): New macro.
6594 (target_supports_vfork_events): New macro.
6595 * win32-low.c (win32_target_ops): Initialize new structure
6596 members.
6597
835205d0
GB
65982015-05-12 Gary Benson <gbenson@redhat.com>
6599
6600 * server.c (handle_qxfer_exec_file): Use current process
6601 if annex is empty.
6602
21e94bd9
SL
66032015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6604
6605 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6606 Remove HAVE_PTRACE_GETREGS conditionals.
6607 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6608 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6609
45614f15
YQ
66102015-05-08 Yao Qi <yao.qi@linaro.org>
6611
6612 * linux-low.c (linux_supports_conditional_breakpoints): New
6613 function.
6614 (linux_target_ops): Install new target method.
6615 * lynx-low.c (lynx_target_ops): Install NULL hook for
6616 supports_conditional_breakpoints.
6617 * nto-low.c (nto_target_ops): Likewise.
6618 * spu-low.c (spu_target_ops): Likewise.
6619 * win32-low.c (win32_target_ops): Likewise.
6620 * server.c (handle_query): Check
6621 target_supports_conditional_breakpoints.
6622 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6623 New field.
6624 (target_supports_conditional_breakpoints): New macro.
6625
80ad801e
PA
66262015-05-06 Pedro Alves <palves@redhat.com>
6627
6628 PR server/18081
6629 * server.c (start_inferior): If the process exits, mourn it.
6630
819843c7
GB
66312015-04-21 Gary Benson <gbenson@redhat.com>
6632
6633 * hostio.c (fileio_open_flags_to_host): Factored out to
6634 fileio_to_host_openflags in common/fileio.c. Single use
6635 updated.
6636
a2d5a9d7
MF
66372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6638
6639 * linux-xtensa-low.c (xtensa_fill_gregset)
6640 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6641 XCHAL_HAVE_LOOP.
6642
deb44829
MF
66432015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6644
6645 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6646 (regs_info): Replace usrregs pointer with NULL.
6647
e57f1de3
GB
66482015-04-17 Gary Benson <gbenson@redhat.com>
6649
6650 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6651 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6652 * server.c (handle_qxfer_exec_file): New function.
6653 (qxfer_packets): Add exec-file entry.
6654 (handle_query): Report qXfer:exec-file:read as supported packet.
6655
62828379
RN
66562015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6657
6658 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6659
b88bb450
GB
66602015-04-09 Gary Benson <gbenson@redhat.com>
6661
6662 * hostio-errno.c (errno_to_fileio_error): Remove function.
6663 Update caller to use remote_fileio_to_fio_error.
6664
c8f4bfdd
YQ
66652015-04-09 Yao Qi <yao.qi@linaro.org>
6666
6667 * linux-low.c (linux_insert_point): Call
6668 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6669 (linux_remove_point): Call remove_memory_breakpoint if type is
6670 raw_bkpt_type_sw.
6671 * linux-x86-low.c (x86_insert_point): Don't call
6672 insert_memory_breakpoint.
6673 (x86_remove_point): Don't call remove_memory_breakpoint.
6674
41f98f02
PA
66752015-04-01 Pedro Alves <palves@redhat.com>
6676 Cleber Rosa <crosa@redhat.com>
6677
6678 * server.c (gdbserver_usage): Reorganize and extend the usage
6679 message.
6680
2bf6fb9d
PA
66812015-03-24 Pedro Alves <palves@redhat.com>
6682
6683 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6684 output. Also dump TRAP_TRACE.
6685 (linux_low_filter_event): In debug output, distinguish a
6686 resume_stop SIGSTOP from a delayed SIGSTOP.
6687
369f6daa
GB
66882015-03-24 Gary Benson <gbenson@redhat.com>
6689
6690 * linux-x86-low.c (x86_linux_new_thread): Moved to
6691 nat/x86-linux.c.
6692 (x86_linux_prepare_to_resume): Likewise.
6693
8e5d4070
GB
66942015-03-24 Gary Benson <gbenson@redhat.com>
6695
6696 * Makefile.in (x86-linux-dregs.o): New rule.
6697 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6698 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6699 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6700 (x86_linux_dr_get): Likewise.
6701 (x86_linux_dr_set): Likewise.
6702 (update_debug_registers_callback): Likewise.
6703 (x86_linux_dr_set_addr): Likewise.
6704 (x86_linux_dr_get_addr): Likewise.
6705 (x86_linux_dr_set_control): Likewise.
6706 (x86_linux_dr_get_control): Likewise.
6707 (x86_linux_dr_get_status): Likewise.
6708 (x86_linux_update_debug_registers): Likewise.
6709
2b95d440
GB
67102015-03-24 Gary Benson <gbenson@redhat.com>
6711
6712 * linux-x86-low.c (x86_linux_update_debug_registers):
6713 New function, factored out from...
6714 (x86_linux_prepare_to_resume): ...this.
6715
14b0bc68
GB
67162015-03-24 Gary Benson <gbenson@redhat.com>
6717
6718 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6719 (x86_linux_dr_set): Likewise.
6720 (update_debug_registers_callback): Likewise.
6721 (x86_linux_dr_set_addr): Likewise.
6722 (x86_linux_dr_get_addr): Likewise.
6723 (x86_linux_dr_set_control): Likewise.
6724 (x86_linux_dr_get_control): Likewise.
6725 (x86_linux_dr_get_status): Likewise.
6726 (x86_linux_prepare_to_resume): Likewise.
6727
5dfe6ca8
GB
67282015-03-24 Gary Benson <gbenson@redhat.com>
6729
6730 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6731 Use perror_with_name. Pass string through gettext.
6732 (x86_linux_dr_set): Likewise.
6733
d33472ad
GB
67342015-03-24 Gary Benson <gbenson@redhat.com>
6735
6736 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6737 (x86_linux_dr_set_addr): ...this.
6738 (x86_dr_low_get_addr): Rename to...
6739 (x86_linux_dr_get_addr): ...this.
6740 (x86_dr_low_set_control): Rename to...
6741 (x86_linux_dr_set_control): ...this.
6742 (x86_dr_low_get_control): Rename to...
6743 (x86_linux_dr_get_control): ...this.
6744 (x86_dr_low_get_status): Rename to...
6745 (x86_linux_dr_get_status): ...this.
6746 (x86_dr_low): Update with new function names.
6747
4b134ca1
GB
67482015-03-24 Gary Benson <gbenson@redhat.com>
6749
6750 * Makefile.in (x86-linux.o): New rule.
6751 * configure.srv: Add x86-linux.o to relevant targets.
6752 * linux-low.c (lwp_set_arch_private_info): New function.
6753 (lwp_arch_private_info): Likewise.
6754 * linux-x86-low.c: Include nat/x86-linux.h.
6755 (arch_lwp_info): Removed structure.
6756 (update_debug_registers_callback):
6757 Use lwp_set_debug_registers_changed.
6758 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6759 and lwp_set_debug_registers_changed.
6760 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6761
34c703da
GB
67622015-03-24 Gary Benson <gbenson@redhat.com>
6763
6764 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6765 * linux-arm-low.c (arm_new_thread): Likewise.
6766 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6767 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6768 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6769 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6770
cff068da
GB
67712015-03-24 Gary Benson <gbenson@redhat.com>
6772
6773 * linux-low.c (ptid_of_lwp): New function.
6774 (lwp_is_stopped): Likewise.
6775 (lwp_stop_reason): Likewise.
6776 * linux-x86-low.c (update_debug_registers_callback):
6777 Use lwp_is_stopped.
6778 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6779 lwp_stop_reason.
6780
b2f7c7e8
GB
67812015-03-24 Gary Benson <gbenson@redhat.com>
6782
6783 * linux-low.h (linux_stop_lwp): Remove declaration.
6784
6d4ee8c6
GB
67852015-03-24 Gary Benson <gbenson@redhat.com>
6786
6787 * linux-low.h: Include nat/linux-nat.h.
6788 * linux-low.c (iterate_over_lwps_args): New structure.
6789 (iterate_over_lwps_filter): New function.
6790 (iterate_over_lwps): Likewise.
6791 * linux-x86-low.c (update_debug_registers_callback):
6792 Update signature to what iterate_over_lwps expects.
6793 Remove PID check that iterate_over_lwps now performs.
6794 (x86_dr_low_set_addr): Use iterate_over_lwps.
6795 (x86_dr_low_set_control): Likewise.
6796
70a0bb6b
GB
67972015-03-24 Gary Benson <gbenson@redhat.com>
6798
6799 * linux-x86-low.c (x86_debug_reg_state): New function.
6800 (x86_linux_prepare_to_resume): Use the above.
6801
7b669087
GB
68022015-03-24 Gary Benson <gbenson@redhat.com>
6803
6804 * linux-low.c (current_lwp_ptid): New function.
6805 * linux-x86-low.c: Include nat/linux-nat.h.
6806 (x86_dr_low_get_addr): Use current_lwp_ptid.
6807 (x86_dr_low_get_control): Likewise.
6808 (x86_dr_low_get_status): Likewise.
6809
eef49a3d
PA
68102015-03-20 Pedro Alves <palves@redhat.com>
6811
6812 * tracepoint.c (cmd_qtstatus): Make "str" const.
6813
b2333d22
PA
68142015-03-20 Pedro Alves <palves@redhat.com>
6815
6816 * server.c (handle_general_set): Make "req_str" const.
6817
23f238d3
PA
68182015-03-19 Pedro Alves <palves@redhat.com>
6819
6820 * linux-low.c (linux_resume_one_lwp): Rename to ...
6821 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6822 instead call perror_with_name.
6823 (check_ptrace_stopped_lwp_gone): New function.
6824 (linux_resume_one_lwp): Reimplement as wrapper around
6825 linux_resume_one_lwp_throw that swallows errors if the LWP is
6826 gone.
6827
91baf43f
PA
68282015-03-19 Pedro Alves <palves@redhat.com>
6829
6830 * linux-low.c (count_events_callback, select_event_lwp_callback):
6831 No longer check whether the thread has resume_stop as last resume
6832 kind.
6833
8bf3b159
PA
68342015-03-19 Pedro Alves <palves@redhat.com>
6835
6836 * linux-low.c (count_events_callback, select_event_lwp_callback):
6837 Use the lwp's status_pending_p field, not the thread's.
6838
b90fc188
PA
68392015-03-19 Pedro Alves <palves@redhat.com>
6840
6841 * linux-low.c (select_event_lwp_callback): Update comments to
6842 no longer mention SIGTRAP.
6843
464b0089
GB
68442015-03-18 Gary Benson <gbenson@redhat.com>
6845
6846 * server.c (handle_query): Do not report vFile:fstat as supported.
6847
aa9e327f
GB
68482015-03-11 Gary Benson <gbenson@redhat.com>
6849
6850 * hostio.c (sys/types.h): New include.
6851 (sys/stat.h): Likewise.
6852 (common-remote-fileio.h): Likewise.
6853 (handle_fstat): New function.
6854 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6855
791c0056
GB
68562015-03-11 Gary Benson <gbenson@redhat.com>
6857
6858 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6859 struct stat.st_blocks and struct stat.st_blksize.
6860 * configure: Regenerate.
6861 * config.in: Likewise.
6862 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6863 (OBS): Add common-remote-fileio.o.
6864 (common-remote-fileio.o): New rule.
6865
9a9df970
PA
68662015-03-09 Pedro Alves <palves@redhat.com>
6867
6868 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6869 'struct sockaddr' pointer in 'accept' call.
6870
9eb1356e
PA
68712015-03-09 Pedro Alves <palves@redhat.com>
6872
6873 Revert:
6874 2015-03-07 Pedro Alves <palves@redhat.com>
6875 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6876 or <winsock2.h> here. Instead include "gdb_socket.h".
6877 (remote_open): Use union gdb_sockaddr_u.
6878 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6879 or <winsock2.h> here. Instead include "gdb_socket.h".
6880 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6881 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6882 or <sys/un.h>.
6883 (init_named_socket, gdb_agent_helper_thread): Use union
6884 gdb_sockaddr_u.
6885
aac331e4
PA
68862015-03-07 Pedro Alves <palves@redhat.com>
6887
6888 * configure.ac (build_warnings): Move
6889 -Wdeclaration-after-statement to the C-specific set.
6890 * configure: Regenerate.
6891
366c75fc
PA
68922015-03-07 Pedro Alves <palves@redhat.com>
6893
6894 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6895 or <winsock2.h> here. Instead include "gdb_socket.h".
6896 (remote_open): Use union gdb_sockaddr_u.
6897 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6898 or <winsock2.h> here. Instead include "gdb_socket.h".
6899 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6900 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6901 or <sys/un.h>.
6902 (init_named_socket, gdb_agent_helper_thread): Use union
6903 gdb_sockaddr_u.
6904
492d29ea
PA
69052015-03-07 Pedro Alves <palves@redhat.com>
6906
6907 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6908 instead.
6909
60a191ed
YQ
69102015-03-06 Yao Qi <yao.qi@linaro.org>
6911
6912 * linux-aarch64-low.c (aarch64_insert_point): Use
6913 show_debug_regs as a boolean.
6914 (aarch64_remove_point): Likewise.
6915
f5771b1d
PA
69162015-03-05 Pedro Alves <palves@redhat.com>
6917
6918 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6919 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6920 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6921 * nto-low.c (nto_target_ops): Likewise.
6922 * spu-low.c (spu_target_ops): Likewise.
6923 * win32-low.c (win32_target_ops): Likewise.
6924
3e572f71
PA
69252015-03-04 Pedro Alves <palves@redhat.com>
6926
72f4393d 6927 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6928 Decide whether a breakpoint triggered based on the SIGTRAP's
6929 siginfo.si_code.
72f4393d
L
6930 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6931 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6932 (linux_low_filter_event): Check for breakpoints before checking
6933 watchpoints.
6934 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6935 siginfo.si_code.
72f4393d
L
6936 (linux_stopped_by_sw_breakpoint)
6937 (linux_supports_stopped_by_sw_breakpoint)
6938 (linux_stopped_by_hw_breakpoint)
6939 (linux_supports_stopped_by_hw_breakpoint): New functions.
6940 (linux_target_ops): Install new target methods.
3e572f71 6941
1ec68e26
PA
69422015-03-04 Pedro Alves <palves@redhat.com>
6943
6944 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6945 * server.c (swbreak_feature, hwbreak_feature): New globals.
6946 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6947 (captured_main): Clear swbreak_feature and hwbreak_feature.
6948 * server.h (swbreak_feature, hwbreak_feature): Declare.
6949 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6950 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6951 supports_stopped_by_hw_breakpoint>: New fields.
6952 (target_supports_stopped_by_sw_breakpoint)
6953 (target_stopped_by_sw_breakpoint)
6954 (target_supports_stopped_by_hw_breakpoint)
6955 (target_stopped_by_hw_breakpoint): Declare.
6956
15c66dd6
PA
69572015-03-04 Pedro Alves <palves@redhat.com>
6958
6959 enum lwp_stop_reason -> enum target_stop_reason
6960 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6961 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6962 (linux_wait_1, stuck_in_jump_pad_callback)
6963 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6964 (linux_stopped_by_watchpoint):
6965 * linux-low.h (enum lwp_stop_reason): Delete.
6966 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6967 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6968
98fc70d6
YQ
69692015-03-04 Yao Qi <yao.qi@linaro.org>
6970
6971 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6972
dd2ac174
GB
69732015-03-03 Gary Benson <gbenson@redhat.com>
6974
6975 * hostio.c (handle_vFile): Fix prefix lengths.
6976
d68e53f4
MM
69772015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6978
6979 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6980 ptr_bits.
6981
bf2d68ab
AA
69822015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6983
6984 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6985 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6986 (clean): Add "rm -f" for above C files.
6987 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6988 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6989 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6990 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6991 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6992 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6993 (init_registers_s390x_vx_linux64)
6994 (init_registers_s390x_tevx_linux64)
6995 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6996 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6997 declarations.
6998 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6999 (s390_store_vxrs_high): New functions.
7000 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7001 NT_S390_VXRS_HIGH.
7002 (s390_arch_setup): Add logic for selecting one of the new target
7003 descriptions. Activate the new vector regsets if applicable.
7004 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7005 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7006 and init_registers_s390x_tevx_linux64.
7007
c966a859
PA
70082015-03-01 Pedro Alves <palves@redhat.com>
7009
7010 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7011 parameter.
7012
4180215b
PA
70132015-02-27 Pedro Alves <palves@redhat.com>
7014
7015 * linux-x86-low.c (u_debugreg_offset): New function.
7016 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7017
749bab01
PA
70182015-02-27 Pedro Alves <palves@redhat.com>
7019
7020 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7021 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7022 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7023 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7024 (ps_lsetfpregs, ps_getpid)
7025 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7026 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7027 (ps_lsetxregs, ps_plog): Declare.
7028
3c14e5a3
PA
70292015-02-27 Pedro Alves <palves@redhat.com>
7030
7031 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7032 IP_AGENT_EXPORT_FUNC.
7033 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7034 IP_AGENT_EXPORT_FUNC.
7035 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7036 (IP_AGENT_EXPORT): Delete.
7037 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7038 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7039 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7040 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7041 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7042 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7043 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7044 (traceframe_read_count, traceframe_write_count)
7045 (traceframes_created, trace_state_variables, get_raw_reg)
7046 (get_trace_state_variable_value, set_trace_state_variable_value)
7047 (ust_loaded, helper_thread_id, cmd_buf): Use
7048 IPA_SYM_EXPORTED_NAME.
7049 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7050 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7051 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7052 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7053 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7054 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7055 EXTERN_C_PUSH/EXTERN_C_POP.
7056 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7057 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7058 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7059 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7060 (traceframe_write_count, traceframe_read_count)
7061 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7062 (about_to_request_buffer_space, get_trace_state_variable_value)
7063 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7064 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7065 EXTERN_C_PUSH/EXTERN_C_POP.
7066 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7067 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7068 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7069 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7070 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7071 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7072 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7073 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7074 Define.
7075 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7076 (IP_AGENT_EXPORT_VAR_DECL): Define.
7077 (tracing): Declare.
7078 (gdb_agent_get_raw_reg): Declare.
7079
fe978cb0
PA
70802015-02-27 Tom Tromey <tromey@redhat.com>
7081 Pedro Alves <palves@redhat.com>
7082
7083 Rename symbols whose names are reserved C++ keywords throughout.
7084
3bc3d82a
PA
70852015-02-27 Pedro Alves <palves@redhat.com>
7086
7087 * Makefile.in (COMPILER): New, get it from autoconf.
7088 (CXX): Get from autoconf instead.
7089 (COMPILE.pre): Use COMPILER.
7090 (CC-LD): Rename to ...
7091 (CC_LD): ... this. Use COMPILER.
7092 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7093 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7094 * acinclude.m4: Include build-with-cxx.m4.
7095 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7096 Disable -Werror by default if building in C++ mode.
7097 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7098 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7099 the C++ compiler. Save/restore CXXFLAGS too.
7100 * configure: Regenerate.
7101
07697489
PA
71022015-02-27 Pedro Alves <palves@redhat.com>
7103
7104 * acinclude.m4: Include libiberty.m4.
7105 * configure.ac: Call libiberty_INIT.
7106 * config.in, configure: Regenerate.
7107
9beb7c4e
PA
71082015-02-26 Pedro Alves <palves@redhat.com>
7109
7110 * linux-low.c (linux_wait_1): When incrementing the PC past a
7111 program breakpoint always use the_low_target.breakpoint_len as
7112 increment, rather than the maximum between that and
7113 the_low_target.decr_pc_after_break.
7114
8090aef2
PA
71152015-02-23 Pedro Alves <palves@redhat.com>
7116
7117 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7118 thread was doing a step-over; always adjust the PC if
7119 we stepped over a permanent breakpoint.
7120 (linux_wait_1): If we stepped over breakpoint that was on top of a
7121 permanent breakpoint, manually advance the PC past it.
7122
bc9540e8
PA
71232015-02-23 Pedro Alves <palves@redhat.com>
7124
7125 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7126 modes.
7127 (x86_fill_gregset, x86_store_gregset): Use it when handling
7128 $orig_eax.
7129
2db9a427
PA
71302015-02-20 Pedro Alves <palves@redhat.com>
7131
7132 * thread-db.c: Include "nat/linux-procfs.h".
7133 (thread_db_init): Skip listing new threads if the kernel supports
7134 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7135
afa8d396
PA
71362015-02-20 Pedro Alves <palves@redhat.com>
7137
7138 * linux-low.c (status_pending_p_callback): Use ptid_match.
7139
c9587f88
AT
71402015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7141
7142 PR breakpoints/16812
7143 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7144 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7145 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7146
b05ec7a5
AT
71472015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7148
7149 PR breakpoints/15956
7150 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7151
d33501a5
MM
71522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7153
7154 * linux-low.c (linux_low_btrace_conf): Print size.
7155 * server.c (handle_btrace_conf_general_set): New.
7156 (hanle_general_set): Call handle_btrace_conf_general_set.
7157 (handle_query): Report Qbtrace-conf:bts:size as supported.
7158
f4abbc16
MM
71592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7160
7161 * linux-low.c (linux_low_enable_btrace): Update parameters.
7162 (linux_low_btrace_conf): New.
7163 (linux_target_ops)<to_btrace_conf>: Initialize.
7164 * server.c (current_btrace_conf): New.
7165 (handle_btrace_enable): Rename to ...
7166 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7167 to target_enable_btrace. Update comment. Update users.
7168 (handle_qxfer_btrace_conf): New.
7169 (qxfer_packets): Add btrace-conf entry.
7170 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7171 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7172 (target_ops)<read_btrace_conf>: New.
7173 (target_enable_btrace): Update parameters.
7174 (target_read_btrace_conf): New.
7175
043c3577
MM
71762015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7177
7178 * server.c (handle_btrace_general_set): Remove call to
7179 target_supports_btrace.
7180 (supported_btrace_packets): New.
7181 (handle_query): Call supported_btrace_packets.
7182 * target.h: include btrace-common.h.
7183 (btrace_target_info): Removed.
7184 (supports_btrace, target_supports_btrace): Update parameters.
7185
734b0e4b
MM
71862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7187
7188 * Makefile.in (SFILES): Add common/btrace-common.c.
7189 (OBS): Add common/btrace-common.o.
7190 (btrace-common.o): Add build rules.
7191 * linux-low: Include btrace-common.h.
7192 (linux_low_read_btrace): Use struct btrace_data. Call
7193 btrace_data_init and btrace_data_fini.
7194
d6c146e9
PA
71952015-02-06 Pedro Alves <palves@redhat.com>
7196
7197 * thread-db.c (find_new_threads_callback): Add debug output.
7198
20ba1ce6
PA
71992015-02-04 Pedro Alves <palves@redhat.com>
7200
7201 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7202 (resume_stopped_resumed_lwps): New function.
7203 (linux_wait_for_event_filtered): Use it.
7204
8cc73a39
SDJ
72052015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7206
7207 * Makefile.in (SFILES): Add linux-personality.c.
7208 (linux-personality.o): New rule.
7209 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7210 list of objects to be built.
7211 * linux-low.c: Include nat/linux-personality.h.
7212 (linux_create_inferior): Remove code to disable address space
7213 randomization (moved to ../nat/linux-personality.c). Create
7214 cleanup to disable address space randomization.
7215
fb23d554
SDJ
72162015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7217
7218 * Makefile.in (posix-strerror.o): New rule.
7219 (mingw-strerror.o): Likewise.
7220 * configure: Regenerated.
7221 * configure.ac: Source file ../common/common.host. Initialize new
7222 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7223
cdf43629
YQ
72242015-01-14 Yao Qi <yao@codesourcery.com>
7225
7226 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7227 (ppc-linux.o): New rule.
7228 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7229 * configure.ac: AC_CHECK_FUNCS(getauxval).
7230 * config.in: Re-generated.
7231 * configure: Re-generated.
7232 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7233 ppc64_64bit_inferior_p
7234
514c5338
YQ
72352015-01-14 Yao Qi <yao@codesourcery.com>
7236
7237 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7238 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7239 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7240 (PT_ORIG_R3, PT_TRAP): Likewise.
7241 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7242 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7243 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7244
3368c1e5
JB
72452015-01-10 Joel Brobecker <brobecker@adacore.com>
7246
7247 * i387-fp.c (i387_cache_to_xsave): In look over
7248 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7249 zmmh_low_space field by use of zmmh_high_space.
7250
582511be
PA
72512015-01-09 Pedro Alves <palves@redhat.com>
7252
7253 * linux-low.c (step_over_bkpt): Move higher up in the file.
7254 (handle_extended_wait): Don't store the stop_pc here.
7255 (get_stop_pc): Adjust comments and rename to ...
7256 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7257 stopped for a software breakpoint or hardware breakpoint.
7258 (thread_still_has_status_pending_p): New function.
7259 (status_pending_p_callback): Use
7260 thread_still_has_status_pending_p. If the event is no longer
7261 interesting, resume the LWP.
7262 (handle_tracepoints): Add assert.
7263 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7264 (wstatus_maybe_breakpoint): New function.
7265 (cancel_breakpoint): Delete function.
7266 (check_stopped_by_watchpoint): New function, factored out from
7267 linux_low_filter_event.
7268 (lp_status_maybe_breakpoint): Delete function.
7269 (linux_low_filter_event): Remove filter_ptid argument.
7270 Leave thread group exits pending here. Store the LWP's stop PC.
7271 Always leave events pending.
7272 (linux_wait_for_event_filtered): Pull all events out of the
7273 kernel, and leave them all pending.
7274 (count_events_callback, select_event_lwp_callback): Consider all
7275 events.
7276 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7277 (select_event_lwp): Only give preference to the stepping LWP in
7278 all-stop mode. Adjust comments.
7279 (ignore_event): New function.
7280 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7281 references to cancel_breakpoints. Adjust to renames. Also give
7282 equal priority to all LWPs that have had events in non-stop mode.
7283 If reporting a software breakpoint event, unadjust the LWP's PC.
7284 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7285 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7286 Adjust.
7287 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7288 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7289 (linux_stopped_by_watchpoint): Adjust.
7290 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7291 * linux-low.h (enum lwp_stop_reason): New.
7292 (struct lwp_info) <stop_pc>: Adjust comment.
7293 <stopped_by_watchpoint>: Delete field.
7294 <stop_reason>: New field.
7295 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7296 * mem-break.c (software_breakpoint_inserted_here)
7297 (hardware_breakpoint_inserted_here): New function.
7298 * mem-break.h (software_breakpoint_inserted_here)
7299 (hardware_breakpoint_inserted_here): Declare.
7300 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7301 (cancel_breakpoints): Delete.
7302 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7303 (upload_fast_traceframes): Remove references to
7304 cancel_breakpoints.
7305
a33e3959
PA
73062015-01-09 Pedro Alves <palves@redhat.com>
7307
7308 * thread-db.c (find_new_threads_callback): Ignore thread if the
7309 kernel thread ID is -1.
7310
8784d563
PA
73112015-01-09 Pedro Alves <palves@redhat.com>
7312
7313 * linux-low.c (linux_attach_fail_reason_string): Move to
7314 nat/linux-ptrace.c, and rename.
7315 (linux_attach_lwp): Update comment.
7316 (attach_proc_task_lwp_callback): New function.
7317 (linux_attach): Adjust to rename and use
7318 linux_proc_attach_tgid_threads.
7319 (linux_attach_fail_reason_string): Delete declaration.
7320
76f2b779
JB
73212015-01-01 Joel Brobecker <brobecker@adacore.com>
7322
7323 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7324 * server.c (gdbserver_version): Likewise.
7325
fafcc06a
SDJ
73262014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7327
7328 * remote-utils.c: Include ctype.h.
7329 (input_interrupt): Explicitly handle the case when the char
7330 received is the NUL byte. Improve the printing of non-ASCII
7331 characters.
7332
beed38b8
JB
73332014-12-16 Joel Brobecker <brobecker@adacore.com>
7334
7335 * linux-low.c (linux_low_filter_event): Update call to
7336 linux_enable_event_reporting following the addition of
7337 a new parameter to that function.
7338
bf330350
CU
73392014-12-16 Catalin Udma <catalin.udma@freescale.com>
7340
7341 PR server/17457
7342 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7343 (AARCH64_FPCR_REGNO): Likewise.
7344 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7345 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7346 (aarch64_store_fpregset): Likewise.
7347
5227d625
JB
73482014-12-15 Joel Brobecker <brobecker@adacore.com>
7349
7350 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7351 Remove FIXME comment about assumption about N.
7352
f93b65a0
JB
73532014-12-13 Joel Brobecker <brobecker@adacore.com>
7354
7355 * configure.ac: If large-file support is disabled in GDBserver,
7356 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7357 * configure: Regenerate.
7358
e5a9158d
AA
73592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7360
7361 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7362 warning upon ENODATA from ptrace.
7363 * linux-s390-low.c (s390_store_tdb): New.
7364 (s390_regsets): Add regset for NT_S390_TDB.
7365
feea5f36
AA
73662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7367
7368 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7369 without a fill_function.
7370 * linux-s390-low.c (s390_fill_last_break): Remove.
7371 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7372 (s390_arch_setup): Use regset's size instead of fill_function for
7373 loop end condition.
7374
098dbe61
AA
73752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7376
7377 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7378 the regset's store function when ptrace returned an error.
7379 * regcache.c (get_thread_regcache): Invalidate register cache
7380 before fetching inferior's registers.
7381
28eef672
AA
73822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7383
7384 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7385 while-loop as for-loop.
7386 (regsets_store_inferior_registers): Likewise.
7387
bdca27a2
YQ
73882014-11-28 Yao Qi <yao@codesourcery.com>
7389
7390 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7391 * config.in, configure: Re-generate.
7392 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7393 is defined.
7394
9c232dda
YQ
73952014-11-21 Yao Qi <yao@codesourcery.com>
7396
7397 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7398 (AC_CHECK_HEADERS): Remove malloc.h.
7399 * configure: Re-generated.
7400 * config.in: Re-generated.
7401 * server.h: Don't include alloca.h and malloc.h.
7402 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7403 Don't include malloc.h.
7404
43968415
JB
74052014-11-17 Joel Brobecker <brobecker@adacore.com>
7406
7407 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7408 corresponding ERRNO check in same block.
7409
40e91bc7
PA
74102014-11-12 Pedro Alves <palves@redhat.com>
7411
7412 * server.c (cont_thread): Update comment.
7413 (start_inferior, attach_inferior): No longer clear cont_thread.
7414 (handle_v_cont): No longer set cont_thread.
7415 (captured_main): Clear cont_thread each time a GDB connects.
7416
c2c118cf
PA
74172014-11-12 Pedro Alves <palves@redhat.com>
7418
7419 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7420 thread, and don't resume all threads if the Hc thread has exited.
7421
78708b7c
PA
74222014-11-12 Pedro Alves <palves@redhat.com>
7423
7424 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7425 the process group instead of to a specific LWP.
7426
a2abc7de
PA
74272014-10-15 Pedro Alves <palves@redhat.com>
7428
7429 PR server/17487
7430 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7431 parameter.
7432 (arm_set_thread_context): Delete.
7433 (the_low_target): Adjust.
7434 * win32-i386-low.c (debug_registers_changed)
7435 (debug_registers_used): Delete.
7436 (update_debug_registers_callback): New function.
7437 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7438 needing to update their debug registers.
7439 (win32_get_current_dr): New function.
7440 (x86_dr_low_get_addr, x86_dr_low_get_control)
7441 (x86_dr_low_get_status): Fetch the debug register from the thread
7442 record's context.
7443 (i386_initial_stuff): Adjust.
7444 (i386_get_thread_context): Remove current_event parameter. Don't
7445 clear debug_registers_changed nor copy DR values to
7446 debug_reg_state.
7447 (i386_set_thread_context): Delete.
7448 (i386_prepare_to_resume): New function.
7449 (i386_thread_added): Mark the thread as needing to update irs
7450 debug registers.
7451 (the_low_target): Remove i386_set_thread_context and install
7452 i386_prepare_to_resume.
7453 * win32-low.c (win32_get_thread_context): Adjust.
7454 (win32_set_thread_context): Use SetThreadContext
7455 directly.
7456 (win32_prepare_to_resume): New function.
7457 (win32_require_context): New function, factored out from ...
7458 (thread_rec): ... this.
7459 (continue_one_thread): Call win32_prepare_to_resume on each thread
7460 we're about to continue.
7461 (win32_resume): Call win32_prepare_to_resume on the event thread.
7462 * win32-low.h (struct win32_thread_info)
7463 <debug_registers_changed>: New field.
7464 (struct win32_target_ops): Change prototype of set_thread_context,
7465 delete set_thread_context and add prepare_to_resume.
7466 (win32_require_context): New declaration.
7467
a442d071
GB
74682014-10-08 Gary Benson <gbenson@redhat.com>
7469
7470 * server.h: Do not include common-exceptions.h.
7471
6f1947e8
GB
74722014-10-08 Gary Benson <gbenson@redhat.com>
7473
7474 * server.h: Do not include cleanups.h.
7475
63b434a4
JH
74762014-09-30 James Hogan <james.hogan@imgtec.com>
7477
7478 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7479 mips64-dsp-linux.c.
7480
c4d9ceb6
YQ
74812014-09-23 Yao Qi <yao@codesourcery.com>
7482
7483 * linux-low.c (lp_status_maybe_breakpoint): New function.
7484 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7485 (count_events_callback): Likewise.
7486 (select_event_lwp_callback): Likewise.
7487 (cancel_breakpoints_callback): Likewise.
7488
89a5711c
DB
74892014-09-19 Don Breazeal <donb@codesourcery.com>
7490
7491 * linux-low.c (handle_extended_wait): Call
7492 linux_ptrace_get_extended_event.
7493 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7494 linux_is_extended_waitstatus.
7495
bffc0964
JB
74962014-09-16 Joel Brobecker <brobecker@adacore.com>
7497
7498 * Makefile.in (CPPFLAGS): Define.
7499 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7500 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7501
0bfdf32f
GB
75022014-09-16 Gary Benson <gbenson@redhat.com>
7503
7504 * inferiors.h (current_inferior): Renamed as...
7505 (current_thread): New variable. All uses updated.
7506 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7507 (maybe_move_out_of_jump_pad): Likewise.
7508 (cancel_breakpoint): Likewise.
7509 (linux_low_filter_event): Likewise.
7510 (wait_for_sigstop): Likewise.
7511 (linux_resume_one_lwp): Likewise.
7512 (need_step_over_p): Likewise.
7513 (start_step_over): Likewise.
7514 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7515 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7516 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7517 and save_inferior as saved_thread.
7518 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7519 saved_thread.
7520 (regcache_invalidate_thread): Likewise.
7521 * remote-utils.c (prepare_resume_reply): Likewise.
7522 * thread-db.c (thread_db_get_tls_address): Likewise.
7523 (disable_thread_event_reporting): Likewise.
7524 (remove_thread_event_breakpoints): Likewise.
7525 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7526 as saved_thread.
7527 * target.h (set_desired_inferior): Renamed as...
7528 (set_desired_thread): New declaration. All uses updated.
7529 * server.c (myresume): Updated comment to reference thread instead
7530 of inferior.
7531 (handle_serial_event): Likewise.
7532 (handle_target_event): Likewise.
7533
361c8ade
GB
75342014-09-12 Tom Tromey <tromey@redhat.com>
7535 Gary Benson <gbenson@redhat.com>
7536
7537 * regcache.h: Include common-regcache.h.
7538 (regcache_read_pc): Don't declare.
7539 * regcache.c (get_thread_regcache_for_ptid): New function.
7540
bd9269f7
GB
75412014-09-11 Tom Tromey <tromey@redhat.com>
7542 Gary Benson <gbenson@redhat.com>
7543
7544 * symbol.c: New file.
7545 * Makefile.in (SFILES): Add symbol.c.
7546 (OBS): Add symbol.o.
7547
f8c1d06b
GB
75482014-09-11 Gary Benson <gbenson@redhat.com>
7549
7550 * target.c (target_stop_ptid, target_continue_ptid): New
7551 functions.
7552
721ec300
GB
75532014-09-11 Tom Tromey <tromey@redhat.com>
7554 Gary Benson <gbenson@redhat.com>
7555
7556 * target.h: Include target/target.h.
7557 * target.c (target_read_memory, target_read_uint32)
7558 (target_write_memory): New functions.
7559
c5e92cca
GB
75602014-09-11 Gary Benson <gbenson@redhat.com>
7561
7562 * server.h (debug_hw_points): Don't declare.
7563 * server.c (debug_hw_points): Don't define. Replace all uses
7564 with show_debug_regs.
7565 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7566 all uses with show_debug_regs.
7567
2e4bb98a
EBM
75682014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7569
7570 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7571 endianness into account.
7572 (ppc_supply_ptrace_register): Likewise.
7573
ac740bc7
JH
75742014-09-03 James Hogan <james.hogan@imgtec.com>
7575
7576 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7577 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7578
97ea6506
GB
75792014-09-03 Gary Benson <gbenson@redhat.com>
7580
7581 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7582 ALL_DEBUG_ADDRESS_REGISTERS.
7583
df7e5265
GB
75842014-09-02 Gary Benson <gbenson@redhat.com>
7585
7586 * i386-low.h: Renamed as...
7587 * x86-low.h: New file. All type, function and variable name
7588 prefixes changed from "i386_" to "x86_". All references updated.
7589 * i386-low.c: Renamed as...
7590 * x86-low.c: New file. All type, function and variable name
7591 prefixes changed from "i386_" to "x86_". All references updated.
7592
ed859da7
GB
75932014-09-02 Gary Benson <gbenson@redhat.com>
7594
7595 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7596 (x86_linux_new_thread): Likewise.
7597
860789c7
GB
75982014-08-29 Gary Benson <gbenson@redhat.com>
7599
7600 * server.h (setjmp.h): Do not include.
7601 (toplevel): Do not declare.
7602 (common-exceptions.h): Include.
7603 (cleanups.h): Likewise.
7604 * server.c (toplevel): Do not define.
7605 (exit_code): New static global.
7606 (detach_or_kill_for_exit_cleanup): New function.
7607 (main): New function. Original main renamed to...
7608 (captured_main): New function.
7609 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7610
ff55e1b5
GB
76112014-08-29 Gary Benson <gbenson@redhat.com>
7612
7613 * Makefile.in (SFILES): Add common/common-exceptions.c.
7614 (OBS): Add common-exceptions.o.
7615 (common-exceptions.o): New rule.
7616 * utils.c (prepare_to_throw_exception): New function.
7617
e9bcb658
GB
76182014-08-29 Gary Benson <gbenson@redhat.com>
7619
7620 * config.in: Regenerate.
7621 * configure: Likewise.
7622
e3180625
GB
76232014-08-29 Gary Benson <gbenson@redhat.com>
7624
7625 * Makefile.in (SFILES): Add common/cleanups.c.
7626 (OBS): cleanups.o.
7627 (cleanups.o): New rule.
7628
e3d6ba5d
GB
76292014-08-29 Gary Benson <gbenson@redhat.com>
7630
7631 * utils.c (internal_vwarning): New function.
7632
7096e886
GB
76332014-08-28 Gary Benson <gbenson@redhat.com>
7634
7635 * utils.h (fatal): Remove declaration.
7636 * utils.c (fatal): Remove function.
7637
14ce3192
GB
76382014-08-28 Gary Benson <gbenson@redhat.com>
7639
7640 * tracepoint.c (gdb_agent_init): Replace fatal with
7641 perror_with_name.
7642 (initialize_tracepoint): Likewise.
7643
50278d59
GB
76442014-08-28 Gary Benson <gbenson@redhat.com>
7645
7646 * remote-utils.c (remote_prepare): Replace fatal with error.
7647
aa96c426
GB
76482014-08-28 Gary Benson <gbenson@redhat.com>
7649
7650 * linux-low.c (linux_async): Replace fatal with warning.
7651 Tidy up and return.
7652 (linux_start_non_stop): Return -1 if linux_async failed.
7653
f7160e97
GB
76542014-08-28 Gary Benson <gbenson@redhat.com>
7655
7656 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7657 gdb_assert.
7658 (i386_dr_low_get_addr): Remove vague comment.
7659 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7660 gdb_assert.
7661
38e08fca
GB
76622014-08-28 Gary Benson <gbenson@redhat.com>
7663
7664 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7665 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7666 internal_error.
7667 (linux_resume_one_lwp): Likewise.
7668 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7669 gdb_assert.
7670 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7671 with internal_error.
7672 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7673 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7674 (find_register_by_name): Replace fatal with internal_error.
7675 (find_regno): Likewise.
7676 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7677 * thread-db.c (thread_db_create_event): Likewise.
7678 (thread_db_load_search): Likewise.
7679 (try_thread_db_load_1): Likewise.
7680 * tracepoint.c (get_jump_space_head): Replace fatal with
7681 internal_error.
7682 (claim_trampoline_space): Likewise.
7683 (have_fast_tracepoint_trampoline_buffer): Likewise.
7684 (cmd_qtstart): Likewise.
7685 (stop_tracing): Likewise.
7686 (fast_tracepoint_collecting): Likewise.
7687 (target_malloc): Likewise.
7688 (download_tracepoint): Likewise.
7689 (download_trace_state_variables): Replace check with gdb_assert.
7690 (upload_fast_traceframes): Replace fatal with internal_error.
7691
34abf635
GB
76922014-08-19 Tom Tromey <tromey@redhat.com>
7693 Gary Benson <gbenson@redhat.com>
7694
7695 * Makefile.in (SFILES): Add common/common-debug.c.
7696 (OBS): Add common-debug.o.
7697 (common-debug.o): New rule.
7698 * debug.h (debug_printf): Don't declare.
7699 * debug.c (debug_printf): Renamed and rewritten as...
7700 (debug_vprintf): New function.
7701
f6e94d78
GB
77022014-08-19 Gary Benson <gbenson@redhat.com>
7703
7704 * utils.h: Do not include print-utils.h.
7705
9239eeab
GB
77062014-08-19 Tom Tromey <tromey@redhat.com>
7707 Gary Benson <gbenson@redhat.com>
7708
7709 * server.h: Add static assertion.
7710 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7711
ef87c8bb
GB
77122014-08-19 Tom Tromey <tromey@redhat.com>
7713 Gary Benson <gbenson@redhat.com>
7714
7715 * Makefile.in (SFILES): Add common/errors.c.
7716 (OBS): Add errors.o.
7717 (IPA_OBS): Add errors-ipa.o.
7718 (errors.o): New rule.
7719 (errors-ipa.o): Likewise.
7720 * utils.h (perror_with_name, error, warning): Don't declare.
7721 * utils.c (warning): Renamed and rewritten as...
7722 (vwarning): New function.
7723 (error): Renamed and rewritten as...
7724 (verror): New function.
7725 (internal_error): Renamed and rewritten as...
7726 (internal_verror): New function.
7727
bb974a24
GB
77282014-08-07 Gary Benson <gbenson@redhat.com>
7729
7730 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7731 * configure: Regenerate.
7732 * config.in: Likewise.
7733 * server.h: Do not include errno.h.
7734 * event-loop.c: Likewise.
7735 * hostio-errno.c: Likewise.
7736 * linux-low.c: Likewise.
7737 * remote-utils.c: Likewise.
7738 * spu-low.c: Likewise.
7739 * utils.c: Likewise.
7740 * gdbreplay.c: Unconditionally include errno.h.
7741
6d3d12eb
GB
77422014-08-07 Gary Benson <gbenson@redhat.com>
7743
7744 * server.h: Do not include string.h.
7745 * event-loop.c: Likewise.
7746 * linux-low.c: Likewise.
7747 * regcache.c: Likewise.
7748 * remote-utils.c: Likewise.
7749 * spu-low.c: Likewise.
7750 * utils.c: Likewise.
7751
dccbb609
GB
77522014-08-07 Gary Benson <gbenson@redhat.com>
7753
7754 * server.h: Do not include gdb_assert.h.
7755
e76df0d0
GB
77562014-08-07 Gary Benson <gbenson@redhat.com>
7757
7758 * server.h: Do not include common-utils.h.
7759
4cb9c816
GB
77602014-08-07 Gary Benson <gbenson@redhat.com>
7761
7762 * server.h: Do not include ptid.h.
7763 * notif.h: Likewise.
7764
3995eeee
GB
77652014-08-07 Gary Benson <gbenson@redhat.com>
7766
7767 * server.h: Do not include gdb_locale.h.
7768
cb9f1a9b
GB
77692014-08-07 Gary Benson <gbenson@redhat.com>
7770
7771 * server.h: Do not include gdb/signals.h.
7772 * win32-low.c: Likewise.
7773
a5fceff8
GB
77742014-08-07 Gary Benson <gbenson@redhat.com>
7775
7776 * server.h: Do not include pathmax.h.
7777
b9391142
GB
77782014-08-07 Gary Benson <gbenson@redhat.com>
7779
7780 * server.h: Do not include libiberty.h.
7781 * linux-bfin-low.c: Likewise.
7782
0e443c87
GB
77832014-08-07 Gary Benson <gbenson@redhat.com>
7784
7785 * server.h: Do not include ansidecl.h.
7786
8ebb3f56
GB
77872014-08-07 Gary Benson <gbenson@redhat.com>
7788
7789 * linux-x86-low.c: Do not include stddef.h.
7790 * lynx-ppc-low.c: Likewise.
7791 * tracepoint.c: Likewise.
7792
8980bdf6
GB
77932014-08-07 Gary Benson <gbenson@redhat.com>
7794
7795 * server.h: Do not include stdarg.h.
7796 * nto-low.c: Likewise.
7797
d7096f71
GB
77982014-08-07 Gary Benson <gbenson@redhat.com>
7799
7800 * server.h: Do not include stdlib.h.
7801 * inferiors.c: Likewise.
7802 * linux-low.c: Likewise.
7803 * regcache.c: Likewise.
7804 * spu-low.c: Likewise.
7805 * tracepoint.c: Likewise.
7806 * utils.c: Likewise.
7807
d02f550d
GB
78082014-08-07 Gary Benson <gbenson@redhat.com>
7809
7810 * server.h: Do not include stdio.h.
7811 * linux-low.c: Likewise.
7812 * remote-utils.c: Likewise.
7813 * spu-low.c: Likewise.
7814 * utils.c: Likewise.
7815 * wincecompat.c: Likewise.
7816
87f6c4e3
GB
78172014-08-06 Gary Benson <gbenson@redhat.com>
7818
7819 * regcache.c (init_register_cache): Move conditionals inside if.
7820
7089dca4
GB
78212014-08-06 Gary Benson <gbenson@redhat.com>
7822
7823 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7824
462f517e
GB
78252014-07-31 Gary Benson <gbenson@redhat.com>
7826
7827 * ax.h: Do not include server.h.
7828 * gdbthread.h: Likewise.
7829 * lynx-low.h: Likewise.
7830 * notif.h: Likewise.
7831
976411d6
GB
78322014-07-30 Gary Benson <gbenson@redhat.com>
7833
7834 * server.h: Include common-defs.h.
7835 Do not include config.h or build-gnulib-gdbserver/config.h.
7836
d41f6d8e
GB
78372014-07-30 Gary Benson <gbenson@redhat.com>
7838
7839 * hostio-errno.c: Move server.h to top of includes list.
7840 * inferiors.c: Likewise.
7841 * linux-x86-low.c: Likewise.
7842 * notif.c: Include server.h.
7843
314c6a35
TT
78442014-07-24 Tom Tromey <tromey@redhat.com>
7845 Gary Benson <gbenson@redhat.com>
7846
7847 * server.h (CORE_ADDR): Now unsigned.
7848
69ff6be5
PA
78492014-07-16 Pedro Alves <palves@redhat.com>
7850
7851 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7852
ce9e3fe7
PA
78532014-07-15 Pedro Alves <palves@redhat.com>
7854
7855 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7856 copy.
7857
e76126e8
PA
78582014-07-11 Pedro Alves <palves@redhat.com>
7859
7860 * linux-low.c (kill_wait_lwp): New function, based on
7861 kill_one_lwp_callback, but use my_waitpid directly.
7862 (kill_one_lwp_callback, linux_kill): Use it.
7863
8e9db26e
PA
78642014-06-23 Pedro Alves <palves@redhat.com>
7865
7866 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7867 before setting DR0..DR3.
7868
698b3e08
GB
78692014-06-20 Gary Benson <gbenson@redhat.com>
7870
7871 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7872 * configure: Regenerated.
7873 * config.in: Likewise.
7874
125f8a3d
GB
78752014-06-20 Gary Benson <gbenson@redhat.com>
7876
7877 * Makefile.in (SFILES): Update locations for files moved
7878 from common to nat.
7879 (object file files): Reordered.
7880
42995dbd
GB
78812014-06-20 Gary Benson <gbenson@redhat.com>
7882
7883 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7884 (i386_dr_low_set_addr): Likewise.
7885 (i386_dr_low_get_addr): Likewise.
7886 (i386_dr_low_can_set_control): Likewise.
7887 (i386_dr_low_set_control): Likewise.
7888 (i386_dr_low_get_control): Likewise.
7889 (i386_dr_low_get_status): Likewise.
7890 (i386_get_debug_register_length): Likewise.
7891 * linux-x86-low.c (i386_dr_low_set_addr):
7892 Changed signature. Made static.
7893 (i386_dr_low_get_addr): Likewise.
7894 (i386_dr_low_set_control): Likewise.
7895 (i386_dr_low_get_control): Likewise.
7896 (i386_dr_low_get_status): Likewise.
7897 (i386_dr_low): New global variable.
7898 * win32-i386-low.c (i386_dr_low_set_addr):
7899 Changed signature. Made static.
7900 (i386_dr_low_get_addr): Likewise.
7901 (i386_dr_low_set_control): Likewise.
7902 (i386_dr_low_get_control): Likewise.
7903 (i386_dr_low_get_status): Likewise.
7904 (i386_dr_low): New global variable.
7905
e1d2394b
MS
79062014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7907
7908 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7909 * Makefile.in (AR, AR_FLAGS): Define.
7910 * configure: Regenerate.
7911
3a8ee006
GB
79122014-06-19 Gary Benson <gbenson@redhat.com>
7913
7914 * Makefile.in (i386-dregs.o): New rule.
7915 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7916 * i386-low.c (target.h): Remove include.
7917 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7918 (DR_CONTROL_SHIFT): Likewise.
7919 (DR_CONTROL_SIZE): Likewise.
7920 (DR_RW_EXECUTE): Likewise.
7921 (DR_RW_WRITE): Likewise.
7922 (DR_RW_READ): Likewise.
7923 (DR_RW_IORW): Likewise.
7924 (DR_LEN_1): Likewise.
7925 (DR_LEN_2): Likewise.
7926 (DR_LEN_4): Likewise.
7927 (DR_LEN_8): Likewise.
7928 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7929 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7930 (DR_ENABLE_SIZE): Likewise.
7931 (DR_LOCAL_SLOWDOWN): Likewise.
7932 (DR_GLOBAL_SLOWDOWN): Likewise.
7933 (DR_CONTROL_RESERVED): Likewise.
7934 (I386_DR_CONTROL_MASK): Likewise.
7935 (I386_DR_VACANT): Likewise.
7936 (I386_DR_LOCAL_ENABLE): Likewise.
7937 (I386_DR_GLOBAL_ENABLE): Likewise.
7938 (I386_DR_DISABLE): Likewise.
7939 (I386_DR_SET_RW_LEN): Likewise.
7940 (I386_DR_GET_RW_LEN): Likewise.
7941 (I386_DR_WATCH_HIT): Likewise.
7942 (i386_wp_op_t): Likewise.
7943 (i386_show_dr): Likewise.
7944 (i386_length_and_rw_bits): Likewise.
7945 (i386_insert_aligned_watchpoint): Likewise.
7946 (i386_remove_aligned_watchpoint): Likewise.
7947 (i386_handle_nonaligned_watchpoint): Likewise.
7948 i386_update_inferior_debug_regs(): Likewise.
7949 (i386_dr_insert_watchpoint): Likewise.
7950 (i386_dr_remove_watchpoint): Likewise.
7951 (i386_dr_region_ok_for_watchpoint): Likewise.
7952 (i386_dr_stopped_data_address): Likewise.
7953 (i386_dr_stopped_by_watchpoint): Likewise.
7954
8f26655c
GB
79552014-06-19 Gary Benson <gbenson@redhat.com>
7956
7957 * i386-low.c (i386_dr_show): Renamed to
7958 i386_show_dr and made static. All uses updated.
7959 (i386_dr_length_and_rw_bits): Renamed to
7960 i386_length_and_rw_bits and made static.
7961 All uses updated.
7962 (i386_dr_insert_aligned_watchpoint): Renamed to
7963 i386_insert_aligned_watchpoint and made static.
7964 All uses updated.
7965 (i386_dr_remove_aligned_watchpoint): Renamed to
7966 i386_remove_aligned_watchpoint and made static.
7967 All uses updated.
7968 (i386_dr_update_inferior_debug_regs): Renamed to
7969 i386_update_inferior_debug_regs and made static.
7970 All uses updated.
7971
b9228891
GB
79722014-06-18 Gary Benson <gbenson@redhat.com>
7973
5171def3
GB
7974 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7975 (i386_dr_low_can_set_control): Likewise.
7976 (i386_get_debug_register_length): Likewise.
7977 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7978 (i386_dr_low_can_set_control): Likewise.
7979 (i386_get_debug_register_length): Likewise.
7980
79812014-06-17 Gary Benson <gbenson@redhat.com>
7982
b9228891
GB
7983 * i386-low.h (i386-dregs.h): New include.
7984 (DR_FIRSTADDR): Now in i386-dregs.h.
7985 (DR_LASTADDR): Likewise.
7986 (DR_NADDR): Likewise.
7987 (DR_STATUS): Likewise.
7988 (DR_CONTROL): Likewise.
7989 (i386_debug_reg_state): Likewise.
7990 (i386_dr_insert_watchpoint): Likewise.
7991 (i386_dr_remove_watchpoint): Likewise.
7992 (i386_dr_region_ok_for_watchpoint): Likewise.
7993 (i386_dr_stopped_data_address): Likewise.
7994 (i386_dr_stopped_by_watchpoint): Likewise.
7995 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7996
4be83cc2
GB
79972014-06-18 Gary Benson <gbenson@redhat.com>
7998
7999 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8000 i386_dr_insert_watchpoint.
8001 (i386_low_remove_watchpoint): Renamed to
8002 i386_dr_remove_watchpoint.
8003 (i386_low_region_ok_for_watchpoint): Renamed to
8004 i386_dr_region_ok_for_watchpoint.
8005 (i386_low_stopped_data_address): Renamed to
8006 i386_dr_stopped_data_address.
8007 (i386_low_stopped_by_watchpoint): Renamed to
8008 i386_dr_stopped_by_watchpoint.
8009 * i386-low.c (i386_show_dr): Renamed to
8010 i386_dr_show and made nonstatic. All uses updated.
8011 (i386_length_and_rw_bits): Renamed to
8012 i386_dr_length_and_rw_bits and made nonstatic.
8013 All uses updated.
8014 (i386_insert_aligned_watchpoint): Renamed to
8015 i386_dr_insert_aligned_watchpoint and made nonstatic.
8016 All uses updated.
8017 (i386_remove_aligned_watchpoint): Renamed to
8018 i386_dr_remove_aligned_watchpoint and made nonstatic.
8019 All uses updated.
8020 (i386_update_inferior_debug_regs): Renamed to
8021 i386_dr_update_inferior_debug_regs and made nonstatic.
8022 All uses updated.
8023 (i386_low_insert_watchpoint): Renamed to
8024 i386_dr_insert_watchpoint. All uses updated.
8025 (i386_low_remove_watchpoint): Renamed to
8026 i386_dr_remove_watchpoint. All uses updated.
8027 (i386_low_region_ok_for_watchpoint): Renamed to
8028 i386_dr_region_ok_for_watchpoint. All uses updated.
8029 (i386_low_stopped_data_address): Renamed to
8030 i386_dr_stopped_data_address. All uses updated.
8031 (i386_low_stopped_by_watchpoint): Renamed to
8032 i386_dr_stopped_by_watchpoint. All uses updated.
8033
131aa0d4
GB
80342014-06-18 Gary Benson <gbenson@redhat.com>
8035
8036 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8037 (i386_dr_low_can_set_control): Likewise.
8038 (i386_insert_aligned_watchpoint): New check.
8039
d9305f7f
GB
80402014-06-18 Gary Benson <gbenson@redhat.com>
8041
8042 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8043 Renamed to state.
8044
e927c9fc
GB
80452014-06-18 Gary Benson <gbenson@redhat.com>
8046
8047 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8048 instead of fatal and error.
8049 (i386_handle_nonaligned_watchpoint): Likewise.
8050
1b6d4134
GB
80512014-06-18 Gary Benson <gbenson@redhat.com>
8052
8053 * i386-low.c (i386_get_debug_register_length): New macro.
8054 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8055 (i386_show_dr): Use debug_printf instead of fprintf. Use
8056 phex to format values.
8057
6e62758f
GB
80582014-06-18 Gary Benson <gbenson@redhat.com>
8059
8060 * i386-low.h: Comment changes.
8061 * i386-low.c: Likewise.
8062
fc6e2f03
GB
80632014-06-18 Gary Benson <gbenson@redhat.com>
8064
8065 * i386-low.c: Whitespace changes.
8066
f9d1eeed
TT
80672014-06-12 Tom Tromey <tromey@redhat.com>
8068
8069 * utils.c (freeargv): Remove.
8070
0b04e523
TT
80712014-06-12 Tom Tromey <tromey@redhat.com>
8072
8073 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8074 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8075 (parse_debug_format_options): Likewise.
8076 (gdbserver_usage): Likewise.
8077 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8078 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8079 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8080 against libiberty.
8081 ($(LIBGNU)): Depend on libiberty.
8082 (all-lib): Recurse into all subdirs.
8083 (install-only): Invoke "install" target in subdirs.
8084 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8085 targets.
8086 * configure: Rebuild.
8087 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8088 for vasprintf, vsnprintf, or gettimeofday.
8089 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8090 srv_tgtobj.
8091
270c9937
JB
80922014-06-05 Joel Brobecker <brobecker@adacore.com>
8093
8094 * development.sh: Delete.
8095 * Makefile.in (config.status): Adjust dependency on development.sh.
8096 * configure.ac: Adjust development.sh source call.
8097 * configure: Regenerate.
8098
0a261ed8
PA
80992014-06-02 Pedro Alves <palves@redhat.com>
8100
8101 * ax.c (gdb_free_agent_expr): New function.
8102 * ax.h (gdb_free_agent_expr): New declaration.
8103 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8104 list.
8105 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8106 static.
8107 (clear_breakpoint_conditions_and_commands): New function.
8108 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8109 (clear_breakpoint_conditions_and_commands): New declaration.
8110
e9dae05e
RR
81112014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8112
8113 * linux-aarch64-low.c (asm/ptrace.h): Include.
8114
5876f503
JK
81152014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8116
8117 Fix TLS access for -static -pthread.
8118 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8119 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8120 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8121
802e8e6d
PA
81222014-05-20 Pedro Alves <palves@redhat.com>
8123
8124 * linux-aarch64-low.c (aarch64_insert_point)
8125 (aarch64_remove_point): No longer check whether the type is
8126 supported here. Adjust to new interface.
8127 (the_low_target): Install aarch64_supports_z_point_type as
8128 supports_z_point_type method.
8129 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8130 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8131 instead of a Z packet char. Adjust.
8132 (arm_supports_z_point_type): New function.
8133 (arm_insert_point, arm_remove_point): Adjust to new interface.
8134 (the_low_target): Install arm_supports_z_point_type.
8135 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8136 (cris_insert_point, cris_remove_point): Adjust to new interface.
8137 Don't check whether the type is supported here.
8138 (the_low_target): Install cris_supports_z_point_type.
8139 * linux-low.c (linux_supports_z_point_type): New function.
8140 (linux_insert_point, linux_remove_point): Adjust to new interface.
8141 * linux-low.h (struct linux_target_ops) <insert_point,
8142 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8143 raw_breakpoint pointer parameter.
8144 <supports_z_point_type>: New method.
8145 * linux-mips-low.c (mips_supports_z_point_type): New function.
8146 (mips_insert_point, mips_remove_point): Adjust to new interface.
8147 Use mips_supports_z_point_type.
8148 (the_low_target): Install mips_supports_z_point_type.
8149 * linux-ppc-low.c (the_low_target): Install NULL as
8150 supports_z_point_type method.
8151 * linux-s390-low.c (the_low_target): Install NULL as
8152 supports_z_point_type method.
8153 * linux-sparc-low.c (the_low_target): Install NULL as
8154 supports_z_point_type method.
8155 * linux-x86-low.c (x86_supports_z_point_type): New function.
8156 (x86_insert_point): Adjust to new insert_point interface. Use
8157 insert_memory_breakpoint. Adjust to new
8158 i386_low_insert_watchpoint interface.
8159 (x86_remove_point): Adjust to remove_point interface. Use
8160 remove_memory_breakpoint. Adjust to new
8161 i386_low_remove_watchpoint interface.
8162 (the_low_target): Install x86_supports_z_point_type.
8163 * lynx-low.c (lynx_target_ops): Install NULL as
8164 supports_z_point_type callback.
8165 * nto-low.c (nto_supports_z_point_type): New.
8166 (nto_insert_point, nto_remove_point): Adjust to new interface.
8167 (nto_target_ops): Install nto_supports_z_point_type.
8168 * mem-break.c: Adjust intro comment.
8169 (struct raw_breakpoint) <raw_type, size>: New fields.
8170 <inserted>: Update comment.
8171 <shlib_disabled>: Delete field.
8172 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8173 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8174 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8175 (raw_bkpt_type_to_target_hw_bp_type): New function.
8176 (find_enabled_raw_code_breakpoint_at): New function.
8177 (find_raw_breakpoint_at): New type and size parameters. Use them.
8178 (insert_memory_breakpoint): New function, based off
8179 set_raw_breakpoint_at.
8180 (remove_memory_breakpoint): New function.
8181 (set_raw_breakpoint_at): Reimplement.
8182 (set_breakpoint): New, based on set_breakpoint_at.
8183 (set_breakpoint_at): Reimplement.
8184 (delete_raw_breakpoint): Go through the_target->remove_point
8185 instead of assuming memory breakpoints.
8186 (find_gdb_breakpoint_at): Delete.
8187 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8188 (find_gdb_breakpoint): New function.
8189 (set_gdb_breakpoint_at): Delete.
8190 (z_type_supported): New function.
8191 (set_gdb_breakpoint_1): New function, loosely based off
8192 set_gdb_breakpoint_at.
8193 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8194 (delete_gdb_breakpoint_at): Delete.
8195 (delete_gdb_breakpoint_1): New function, loosely based off
8196 delete_gdb_breakpoint_at.
8197 (delete_gdb_breakpoint): New function.
8198 (clear_gdb_breakpoint_conditions): Rename to ...
8199 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8200 breakpoint.
8201 (add_condition_to_breakpoint): Make static.
8202 (add_breakpoint_condition): Take a struct breakpoint pointer
8203 instead of an address. Adjust.
8204 (gdb_condition_true_at_breakpoint): Rename to ...
8205 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8206 z_type parameter.
8207 (gdb_condition_true_at_breakpoint): Reimplement.
8208 (add_breakpoint_commands): Take a struct breakpoint pointer
8209 instead of an address. Adjust.
8210 (gdb_no_commands_at_breakpoint): Rename to ...
8211 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8212 parameter. Return true if no breakpoint was found. Change debug
8213 output.
8214 (gdb_no_commands_at_breakpoint): Reimplement.
8215 (run_breakpoint_commands): Rename to ...
8216 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8217 and change return type to boolean.
8218 (run_breakpoint_commands): New function.
8219 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8220 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8221 breakpoint. Go through the_target->remove_point instead of
8222 assuming memory breakpoint.
8223 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8224 software and hardware breakpoints.
8225 (reinsert_raw_breakpoint): Go through the_target->insert_point
8226 instead of assuming memory breakpoint.
8227 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8228 software and hardware breakpoints.
8229 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8230 Check both software and hardware breakpoints.
8231 (validate_inserted_breakpoint): Assert the breakpoint is a
8232 software breakpoint. Set the inserted flag to -1 instead of
8233 setting shlib_disabled.
8234 (delete_disabled_breakpoints): Adjust.
8235 (validate_breakpoints): Only validate software breakpoints.
8236 Adjust to inserted flag change.
8237 (check_mem_read, check_mem_write): Skip breakpoint types other
8238 than software breakpoints. Adjust to inserted flag change.
8239 * mem-break.h (enum raw_bkpt_type): New enum.
8240 (raw_breakpoint, struct process_info): Forward declare.
8241 (Z_packet_to_target_hw_bp_type): Delete declaration.
8242 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8243 (set_gdb_breakpoint, delete_gdb_breakpoint)
8244 (clear_breakpoint_conditions): New declarations.
8245 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8246 (breakpoint_inserted_here): Update comment.
8247 (add_breakpoint_condition, add_breakpoint_commands): Replace
8248 address parameter with a breakpoint pointer parameter.
8249 (gdb_breakpoint_here): Update comment.
8250 (delete_gdb_breakpoint_at): Delete.
8251 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8252 * server.c (process_point_options): Take a struct breakpoint
8253 pointer instead of an address. Adjust.
8254 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8255 delete_gdb_breakpoint.
8256 * spu-low.c (spu_target_ops): Install NULL as
8257 supports_z_point_type method.
8258 * target.h: Include mem-break.h.
8259 (struct target_ops) <prepare_to_access_memory>: Update comment.
8260 <supports_z_point_type>: New field.
8261 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8262 instead of a char. Also take a raw breakpoint pointer.
8263 * win32-arm-low.c (the_low_target): Install NULL as
8264 supports_z_point_type.
8265 * win32-i386-low.c (i386_supports_z_point_type): New function.
8266 (i386_insert_point, i386_remove_point): Adjust to new interface.
8267 (the_low_target): Install i386_supports_z_point_type.
8268 * win32-low.c (win32_supports_z_point_type): New function.
8269 (win32_insert_point, win32_remove_point): Adjust to new interface.
8270 (win32_target_ops): Install win32_supports_z_point_type.
8271 * win32-low.h (struct win32_target_ops):
8272 <supports_z_point_type>: New method.
8273 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8274 instead of a char. Also take a raw breakpoint pointer.
8275
932539e3
PA
82762014-05-20 Pedro Alves <palves@redhat.com>
8277
8278 * mem-break.h: Include break-common.h.
8279 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8280 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8281 (Z_packet_to_target_hw_bp_type): New declaration.
8282 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8283 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8284 (Z_PACKET_ACCESS_WP): Delete macros.
8285 (Z_packet_to_hw_type): Delete function.
8286 * i386-low.h: Don't include break-common.h here.
8287 (Z_packet_to_hw_type): Delete declaration.
8288 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8289 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8290 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8291 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8292 * linux-aarch64-low.c: Don't include break-common.h here.
8293 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8294 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8295 (Z_packet_to_target_hw_bp_type): Delete function.
8296 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8297 function.
8298 (mips_insert_point, mips_remove_point): Use
8299 Z_packet_to_target_hw_bp_type.
8300
4ff0d3d8
PA
83012014-05-20 Pedro Alves <palves@redhat.com>
8302
8303 * linux-aarch64-low.c: Include break-common.h.
8304 (enum target_point_type): Delete.
8305 (Z_packet_to_point_type): Rename to ...
8306 (Z_packet_to_target_hw_bp_type): ... this, and return a
8307 target_hw_bp_type instead.
8308 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8309 instead of an enum target_point_type.
8310 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8311 breakpoint type.
8312 (aarch64_dr_state_insert_one_point)
8313 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8314 (aarch64_handle_aligned_watchpoint)
8315 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8316 Take an enum target_hw_bp_type instead of an enum
8317 target_point_type.
8318 (aarch64_supports_z_point_type): New function.
8319 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8320 use Z_packet_to_target_hw_bp_type.
8321
786dc519
JB
83222014-05-20 Joel Brobecker <brobecker@adacore.com>
8323
8324 * configure.ac: Only use -Werror by default when DEVELOPMENT
8325 is true.
8326 * configure: Regenerate.
8327
9e0aa64f
JK
83282014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8329
8330 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8331 * linux-x86-low.c (X86_64_USER_REGS): New.
8332 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8333
2b577b92
YQ
83342014-04-28 Yao Qi <yao@codesourcery.com>
8335
8336 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8337 name.
8338
94611da2
PA
83392014-04-25 Pedro Alves <palves@redhat.com>
8340
8341 PR server/16255
8342 * linux-low.c (linux_attach_fail_reason_string): New function.
8343 (linux_attach_lwp): Delete.
8344 (linux_attach_lwp_1): Rename to ...
8345 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8346 argument. Remove "initial" parameter. Return int instead of
8347 void. Don't error or warn here.
8348 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8349 failure to attach to the tgid. Call warning when failing to
8350 attach to an lwp.
8351 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8352 argument. Remove "initial" parameter. Return int instead of
8353 void. Don't error or warn here.
8354 (linux_attach_fail_reason_string): New declaration.
8355 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8356 interface change. Use linux_attach_fail_reason_string.
8357
01f9f808
MS
83582014-04-24 Michael Sturm <michael.sturm@mintel.com>
8359 Walfred Tedeschi <walfred.tedeschi@intel.com>
8360
8361 * Makefile.in: Added rules to handle new files
8362 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8363 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8364 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8365 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8366 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8367 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8368 x32-avx512-linux.o.
8369 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8370 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8371 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8372 i386/x32-avx512.xml.
8373 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8374 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8375 i386/x32-avx512-linux.xml.
8376 * i387-fp.c (num_avx512_k_registers): New constant for number
8377 of K registers.
8378 (num_avx512_zmmh_low_registers): New constant for number of
8379 lower ZMM registers (0-15).
8380 (num_avx512_zmmh_high_registers): New constant for number of
8381 higher ZMM registers (16-31).
8382 (num_avx512_ymmh_registers): New contant for number of higher
8383 YMM registers (ymm16-31 added by avx521 on x86_64).
8384 (num_avx512_xmm_registers): New constant for number of higher
8385 XMM registers (xmm16-31 added by AVX512 on x86_64).
8386 (struct i387_xsave): Add space for AVX512 registers.
8387 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8388 Add code to handle AVX512 registers.
8389 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8390 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8391 prototypei from generated file.
8392 (tdesc_amd64_avx512_linux): Likewise.
8393 (init_registers_x32_avx512_linux): Likewise.
8394 (tdesc_x32_avx512_linux): Likewise.
8395 (init_registers_i386_avx512_linux): Likewise.
8396 (tdesc_i386_avx512_linux): Likewise.
8397 (x86_64_regmap): Add AVX512 registers.
8398 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8399 mask.
8400 (initialize_low_arch): Add code to initialize AVX512 registers.
8401
51aa91f9
PA
84022014-04-23 Pedro Alves <palves@redhat.com>
8403
8404 * mem-break.c (find_gdb_breakpoint_at): Make static.
8405 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8406
a4165e94
PA
84072014-04-23 Pedro Alves <palves@redhat.com>
8408
8409 * i386-low.c: Don't include break-common.h here.
8410 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8411 prototype to take target_hw_bp_type as argument instead of a Z
8412 packet char.
8413 * i386-low.h: Include break-common.h here.
8414 (Z_packet_to_hw_type): Declare.
8415 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8416 prototypes.
8417 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8418 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8419 (x86_remove_point): Convert the packet number to a
8420 target_hw_bp_type before calling i386_low_remove_watchpoint.
8421 * win32-i386-low.c (i386_insert_point): Convert the packet number
8422 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8423 (i386_remove_point): Convert the packet number to a
8424 target_hw_bp_type before calling i386_low_remove_watchpoint.
8425
b8acf843
PA
84262014-04-23 Pedro Alves <palves@redhat.com>
8427
8428 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8429
d708bcd1
PA
84302014-04-10 Pedro Alves <palves@redhat.com>
8431
8432 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8433 Check if the condition or command is NULL before checking if the
8434 breakpoint is known. On success, return true.
8435 * mem-break.h (add_breakpoint_condition): Document return.
8436 (add_breakpoint_commands): Add describing comment.
8437 * server.c (skip_to_semicolon): New function.
8438 (process_point_options): Use it.
8439
2eec7d5b
PA
84402014-04-09 Pedro Alves <palves@redhat.com>
8441
8442 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8443 to lwpid_of.
8444
fa96cb38
PA
84452014-02-27 Pedro Alves <palves@redhat.com>
8446
8447 PR 12702
8448 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8449 macros.
8450 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8451 output.
8452 (last_thread_of_process_p): Take a PID argument instead of a
8453 thread pointer.
8454 (linux_wait_for_lwp): Delete.
8455 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8456 functions.
8457 (linux_low_filter_event): New function, party factored out from
8458 linux_wait_for_event.
8459 (linux_wait_for_event): Rename to ...
8460 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8461 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8462 sigsuspend. Check for zombie leaders.
8463 (linux_wait_for_event): Reimplement as wrapper around
8464 linux_wait_for_event_filtered.
8465 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8466 a normal or signal exit is seen, it's the whole process exiting.
8467 (wait_for_sigstop): No longer a for_each_inferior callback.
8468 Rewrite on top of linux_wait_for_event_filtered.
8469 (stop_all_lwps): Call wait_for_sigstop directly.
8470 * server.c (resume, handle_target_event): Handle
8471 TARGET_WAITKIND_NO_RESUMED.
8472
d763de10
JB
84732014-02-26 Joel Brobecker <brobecker@adacore.com>
8474
8475 * win32-low.c (psapi_get_dll_name,
8476 * win32_CreateToolhelp32Snapshot): Delete.
8477 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8478 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8479 Delete.
8480 (handle_load_dll): Add function description.
8481 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8482
850a0f76
JB
84832014-02-26 Joel Brobecker <brobecker@adacore.com>
8484
8485 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8486 Add comment.
8487 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8488 base address when calling win32_add_one_solib.
8489 (handle_load_dll): Delete local variable load_addr.
8490 Remove 0x1000 offset applied to DLL base address when calling
8491 win32_add_one_solib.
8492 (handle_unload_dll): Add comment.
8493
f25b3fc3
JB
84942014-02-26 Joel Brobecker <brobecker@adacore.com>
8495
8496 * win32-low.c (win32_add_all_dlls): Renames
8497 win32_ensure_ntdll_loaded. Rewrite function documentation.
8498 Adjust implementation to always load all DLLs.
8499 Add 0x1000 offset to DLL base address when calling
8500 win32_add_one_solib.
8501 (child_initialization_done): New static global.
8502 (do_initial_child_stuff): Set child_initialization_done to
8503 zero during child initialization, and 1 after. Replace call
8504 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8505 Add comment.
8506 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8507 (handle_unload_dll): Add function documentation.
8508 (get_child_debug_event): Ignore load and unload DLL events
8509 during child initialization.
8510
d86d4aaf
DE
85112014-02-20 Doug Evans <dje@google.com>
8512
3bc32da3 8513 Remove global all_lwps.
d86d4aaf
DE
8514 * inferiors.h (ptid_of): Move here from linux-low.h.
8515 (pid_of, lwpid_of): Ditto.
8516 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8517 parameter is a struct thread_info * now.
8518 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8519 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8520 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8521 directly.
8522 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8523 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8524 * linux-arm-low.c (update_registers_callback): Update, "entry"
8525 parameter is a struct thread_info * now.
8526 Fetch lwpid from current_inferior directly.
8527 (arm_insert_point): Pass &all_threads to find_inferior instead of
8528 &all_lwps.
8529 (arm_remove_point): Ditto.
8530 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8531 (arm_prepare_to_resume): Fetch pid from thread.
8532 (arm_read_description): Fetch lwpid from current_inferior directly.
8533 * linux-low.c (all_lwps): Delete.
8534 (delete_lwp): Delete call to remove_inferior.
8535 (handle_extended_wait): Fetch lwpid from thread.
8536 (add_lwp): Don't set lwp->entry.id. Remove call to
8537 add_inferior_to_list.
8538 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8539 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8540 (kill_one_lwp_callback): Ditto.
8541 (linux_kill): Don't dereference NULL pointer.
8542 Fetch ptid,lwpid from thread.
8543 (get_detach_signal): Fetch ptid from thread.
8544 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8545 Simplify call to regcache_invalidate_thread.
8546 (delete_lwp_callback): Update, "entry" parameter is a
8547 struct thread_info * now. Fetch pid from thread.
8548 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8549 (status_pending_p_callback): Update, "entry" parameter is a
8550 struct thread_info * now. Fetch ptid from thread.
8551 (find_lwp_pid): Update, "entry" parameter is a
8552 struct thread_info * now.
8553 (linux_wait_for_lwp): Fetch pid from thread.
8554 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8555 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8556 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8557 (dequeue_one_deferred_signal): Ditto.
8558 (cancel_breakpoint): Fetch ptid from current_inferior.
8559 (linux_wait_for_event): Pass &all_threads to find_inferior,
8560 not &all_lwps. Fetch ptid, lwpid from thread.
8561 (count_events_callback): Update, "entry" parameter is a
8562 struct thread_info * now.
8563 (select_singlestep_lwp_callback): Ditto.
8564 (select_event_lwp_callback): Ditto.
8565 (cancel_breakpoints_callback): Ditto.
8566 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8567 not &all_lwps.
8568 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8569 (unsuspend_one_lwp): Update, "entry" parameter is a
8570 struct thread_info * now.
8571 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8572 not &all_lwps.
8573 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8574 Fetch lwpid from thread, not lwp.
8575 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8576 Pass &all_threads to find_inferior, not &all_lwps.
8577 (send_sigstop): Fetch lwpid from thread, not lwp.
8578 (send_sigstop_callback): Update, "entry" parameter is a
8579 struct thread_info * now.
8580 (suspend_and_send_sigstop_callback): Ditto.
8581 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8582 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8583 struct thread_info * now.
8584 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8585 from thread, lwp.
8586 (lwp_running): Update, "entry" parameter is a
8587 struct thread_info * now.
8588 (stop_all_lwps): Fetch ptid from thread.
8589 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8590 (linux_resume_one_lwp): Fetch lwpid from thread.
8591 (linux_set_resume_request): Update, "entry" parameter is a
8592 struct thread_info * now. Fetch pid, lwpid from thread.
8593 (resume_status_pending_p): Update, "entry" parameter is a
8594 struct thread_info * now.
8595 (need_step_over_p): Ditto. Fetch lwpid from thread.
8596 (start_step_over): Fetch lwpid from thread.
8597 (linux_resume_one_thread): Update, "entry" parameter is a
8598 struct thread_info * now. Fetch lwpid from thread.
8599 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8600 (proceed_one_lwp): Update, "entry" parameter is a
8601 struct thread_info * now. Fetch lwpid from thread.
8602 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8603 struct thread_info * now.
8604 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8605 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8606 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8607 directly.
8608 (regsets_store_inferior_registers): Ditto.
8609 (fetch_register, store_register): Ditto.
8610 (linux_read_memory, linux_write_memory): Ditto.
8611 (linux_request_interrupt): Ditto.
8612 (linux_read_auxv): Ditto.
8613 (linux_xfer_siginfo): Ditto.
8614 (linux_qxfer_spu): Ditto.
8615 (linux_qxfer_libraries_svr4): Ditto.
8616 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8617 moved to inferiors.h.
8618 (get_lwp): Delete.
8619 (get_thread_lwp): Update.
8620 (struct lwp_info): Delete member "entry". Simplify comment for
8621 member "thread".
8622 (all_lwps): Delete.
8623 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8624 current_inferior directly.
8625 (update_watch_registers_callback): Update, "entry" parameter is a
8626 struct thread_info * now. Fetch pid from thread.
8627 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8628 (mips_insert_point): Fetch lwpid from current_inferior.
8629 Pass &all_threads to find_inferior, not &all_lwps.
8630 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8631 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8632 directly.
8633 (mips_stopped_data_address): Ditto.
8634 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8635 directly.
8636 * linux-tile-low.c (tile_arch_setup): Ditto.
8637 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8638 (update_debug_registers_callback): Update, "entry" parameter is a
8639 struct thread_info * now. Fetch pid from thread.
8640 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8641 Pass &all_threads to find_inferior, not &all_lwps.
8642 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8643 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8644 Pass &all_threads to find_inferior, not &all_lwps.
8645 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8646 (i386_dr_low_get_status): Ditto.
8647 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8648 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8649 (x86_linux_read_description): Ditto.
8650 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8651
3b8361aa
DE
86522014-02-20 Doug Evans <dje@google.com>
8653
8654 * inferiors.c (get_first_inferior): Fix buglet.
8655
f7667f0d
DE
86562014-02-19 Doug Evans <dje@google.com>
8657
8658 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8659 * inferiors.c (add_thread): Change result type to struct thread_info *.
8660 All callers updated.
8661 (add_lwp): Call add_thread here instead of in callers.
8662 All callers updated.
8663 * linux-low.h (get_lwp_thread): Rewrite.
8664 (struct lwp_info): New member "thread".
8665
b3312d80
DE
86662014-02-19 Doug Evans <dje@google.com>
8667
8668 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8669 All callers updated.
8670
ecc6f45c
DE
86712014-02-19 Doug Evans <dje@google.com>
8672
8673 * inferiors.c (add_thread): Fix whitespace.
8674
649ebbca
DE
86752014-02-19 Doug Evans <dje@google.com>
8676
8677 * dll.c (clear_dlls): Replace accessing list implemention details
8678 with API function.
8679 * gdbthread.h (get_first_thread): Declare.
8680 * inferiors.c (for_each_inferior_with_data): New function.
8681 (get_first_thread): New function.
8682 (find_thread_ptid): Simplify.
8683 (get_first_inferior): New function.
8684 (clear_list): Delete.
8685 (one_inferior_p): New function.
8686 (clear_inferior_list): New function.
8687 (clear_inferiors): Update.
8688 * inferiors.h (for_each_inferior_with_data): Declare.
8689 (clear_inferior_list): Declare.
8690 (one_inferior_p): Declare.
8691 (get_first_inferior): Declare.
8692 * linux-low.c (linux_wait_for_event): Replace accessing list
8693 implemention details with API function.
8694 * server.c (target_running): Ditto.
8695 (accumulate_file_name_length): New function.
8696 (emit_dll_description): New function.
8697 (handle_qxfer_libraries): Replace accessing list implemention
8698 details with API function.
8699 (handle_qxfer_threads_worker): New function.
8700 (handle_qxfer_threads_proper): Replace accessing list implemention
8701 details with API function.
8702 (handle_query): Ditto.
8703 (visit_actioned_threads_callback_ftype): New typedef.
8704 (visit_actioned_threads_data): New struct.
8705 (visit_actioned_threads): Rewrite to be find_inferior callback.
8706 (resume): Call find_inferior.
8707 (handle_status): Replace accessing list implemention
8708 details with API function.
8709 (process_serial_event): Replace accessing list implemention details
8710 with API function.
8711 * target.c (set_desired_inferior): Replace accessing list implemention
8712 details with API function.
8713 * tracepoint.c (same_process_p): New function.
8714 (gdb_agent_about_to_close): Replace accessing list implemention
8715 details with API function.
8716 * win32-low.c (child_delete_thread): Replace accessing list
8717 implemention details with API function.
8718 (match_dll_by_basename): New function.
8719 (dll_is_loaded_by_basename): New function.
8720 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8721 details call to dll_is_loaded_by_basename.
8722
80894984
DE
87232014-02-19 Doug Evans <dje@google.com>
8724
8725 * dll.h (struct dll_info): Add comment.
8726 * gdbthread.h (struct thread_info): Add comment.
8727 (current_ptid): Simplify.
8728 * inferiors.c (add_process): Update.
8729 (remove_process): Update.
8730 * inferiors.h (struct process_info): Rename member "head" to "entry".
8731 * linux-low.c (delete_lwp): Update.
8732 (add_lwp): Update.
8733 (last_thread_of_process_p): Update.
8734 (kill_one_lwp_callback, linux_kill): Update.
8735 (status_pending_p_callback): Update.
8736 (wait_for_sigstop): Update. Simplify read of ptid.
8737 (start_step_over): Update.
8738 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8739 (get_lwp_thread): Update.
8740 (struct lwp_info): Rename member "head" to "entry".
8741 * regcache.h (inferior_list_entry): Delete.
8742 * server.c (kill_inferior_callback): Update.
8743 (detach_or_kill_inferior_callback): Update.
8744 (print_started_pid): Update.
8745 (print_attached_pid): Update.
8746 (process_serial_event): Simplify read of ptid.
8747 * thread-db.c (thread_db_create_event): Update.
8748 (thread_db_get_tls_address): Update.
8749 * win32-low.c (current_inferior_ptid): Simplify.
8750
46917d26
TT
87512014-02-19 Tom Tromey <tromey@redhat.com>
8752
8753 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8754 argument.
8755 (target_supports_btrace): Update.
8756
0759a81e
YQ
87572014-02-14 Yao Qi <yao@codesourcery.com>
8758
8759 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8760 (rsp-low-ipa.o): New target.
8761
a7191e8b
TT
87622014-02-12 Tom Tromey <tromey@redhat.com>
8763
8764 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8765 convert_ascii_to_int.
8766 * regcache.c (registers_to_string): Likewise.
8767 * remote-utils.c (decode_M_packet): Likewise.
8768 * server.c (process_serial_event): Likewise.
8769
ff0e980e
TT
87702014-02-12 Tom Tromey <tromey@redhat.com>
8771
8772 * server.c (handle_query, handle_v_run): Use hex2bin, not
8773 unhexify.
8774 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8775
e9371aff
TT
87762014-02-12 Tom Tromey <tromey@redhat.com>
8777
8778 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8779 convert_int_to_ascii.
8780 * regcache.c (registers_to_string, collect_register_as_string):
8781 Likewise.
8782 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8783 Likewise.
8784 * server.c (process_serial_event): Likewise.
8785 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8786 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8787
971dc0b8
TT
87882014-02-12 Tom Tromey <tromey@redhat.com>
8789
8790 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8791 bin2hex, not hexify.
8792 * tracepoint.c (cmd_qtstatus): Likewise.
8793
0a822afb
TT
87942014-02-12 Tom Tromey <tromey@redhat.com>
8795
8796 * remote-utils.c (monitor_output): Pass explicit length to
8797 hexify.
8798
9c3d6531
TT
87992014-02-12 Tom Tromey <tromey@redhat.com>
8800
8801 * tracepoint.c: Include rsp-low.h.
8802 * server.c: Include rsp-low.h.
8803 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8804 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8805 declare.
8806 * remote-utils.c: Include rsp-low.h.
8807 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8808 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8809 (convert_int_to_ascii, convert_ascii_to_int): Move to
8810 common/rsp-low.c.
8811 * regcache.c: Include rsp-low.h.
8812 * ax.c: Include rsp-low.h.
8813 * Makefile.in (SFILES): Add common/rsp-low.c.
8814 (OBS): Add rsp-low.o.
8815 (rsp-low.o): New target.
8816
01fd3ea5
TT
88172014-02-12 Tom Tromey <tromey@redhat.com>
8818
8819 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8820 Include print-utils.h.
8821 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8822 (plongest, thirty_two, phex_nz): Remove.
8823 * Makefile.in (SFILES): Add common/print-utils.c.
8824 (OBS): Add print-utils.o.
8825 (print-utils-ipa.o): New target.
8826 (print-utils.o): New target.
8827 (IPA_OBJS): Add print-utils-ipa.o.
8828
e99dc820
TT
88292014-02-06 Tom Tromey <tromey@redhat.com>
8830
8831 * Makefile.in (SFILES): Fix indentation.
8832
ee1e2d4f
DE
88332014-02-05 Doug Evans <dje@google.com>
8834
8835 * linux-low.c (linux_wait_for_event): Improve comment.
8836 (linux_wait_1): Keep current_inferior in sync with event_child.
8837
f5a02773
DE
88382014-01-22 Doug Evans <dje@google.com>
8839
8840 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8841
87ce2a04
DE
88422014-01-22 Doug Evans <dje@google.com>
8843
8844 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8845 * configure: Regenerate.
8846 * config.in: Regenerate.
8847 * Makefile.in (SFILES): Add debug.c.
8848 (OBS): Add debug.o.
8849 * debug.c: New file.
8850 * debug.h: New file.
8851 * linux-aarch64-low.c (*): Update all debugging printfs to use
8852 debug_printf instead of fprintf.
8853 * linux-arm-low.c (*): Ditto.
8854 * linux-cris-low.c (*): Ditto.
8855 * linux-crisv32-low.c (*): Ditto.
8856 * linux-m32r-low.c (*): Ditto.
8857 * linux-sparc-low.c (*): Ditto.
8858 * linux-x86.c (*): Ditto.
8859 * linux-low.c (*): Ditto.
8860 (linux_wait_1): Add calls to debug_enter, debug_exit.
8861 (linux_wait): Remove redundant debugging printf.
8862 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8863 (linux_resume, unstop_all_lwps): Ditto.
8864 * mem-break.c (*): Update all debugging printfs to use
8865 debug_printf instead of fprintf.
8866 * remote-utils.c (*): Ditto.
8867 * thread-db.c (*): Ditto.
8868 * server.c #include <ctype.h>, "gdb_vecs.h".
8869 (debug_threads): Moved to debug.c.
8870 (*): Update all debugging printfs to use debug_printf instead of
8871 fprintf.
8872 (start_inferior): Replace call to fflush with call to debug_flush.
8873 (monitor_show_help): Mention set debug-format.
8874 (parse_debug_format_options): New function.
8875 (handle_monitor_command): Handle "monitor set debug-format".
8876 (gdbserver_usage): Mention --debug-format.
8877 (main): Parse --debug-format.
8878 * server.h (debug_threads): Declaration moved to debug.h.
8879 #include "debug.h".
8880 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8881 trace_debug_1 that uses debug_printf.
8882 (tracepoint_look_up_symbols): Update all debugging printfs to use
8883 debug_printf instead of fprintf.
8884
e671835b
BS
88852014-01-20 Baruch Siach <baruch@tkos.co.il>
8886
8887 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8888 sys/ptrace.h.
8889
b5737fa9
PA
88902014-01-17 Pedro Alves <palves@redhat.com>
8891
ea38d2a9 8892 PR build/16445
c7faa97a
PA
8893 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8894 defined after including gdb_proc_service.h.
b5737fa9 8895
40ed484e
DE
88962014-01-16 Doug Evans <dje@google.com>
8897
8898 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8899 (match_dll): Use it.
8900
969c39fb
MM
89012014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8902
8903 * target.h (target_ops) <read_btrace>: Change parameters and
8904 return type to allow error reporting.
8905 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8906 trace reading errors on.
8907 * linux-low.c (linux_low_read_btrace): Pass trace reading
8908 errors on.
8909 (linux_low_disable_btrace): New.
8910
ab7f45ba
DE
89112014-01-15 Doug Evans <dje@google.com>
8912
8913 * inferiors.c (thread_id_to_gdb_id): Delete.
8914 * inferiors.h (thread_id_to_gdb_id): Delete.
8915
66af0f44
EZ
89162014-01-13 Eli Zaretskii <eliz@gnu.org>
8917
8918 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8919 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8920 versions.
8921
9939e131
PA
89222014-01-08 Pedro Alves <palves@redhat.com>
8923
8924 * server.c (handle_status): Don't discard previous queued stop
8925 replies or thread's pending status here.
8926 (main) <disconnection>: Do it here instead.
8927
b7ea362b
PA
89282014-01-08 Pedro Alves <palves@redhat.com>
8929
8930 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8931 * server.c (visit_actioned_threads, handle_pending_status): New
8932 function.
8933 (handle_v_cont): Factor out parts to ...
8934 (resume): ... this new function. If in all-stop, and a thread
8935 being resumed has a pending status, report it without actually
8936 resuming.
8937 (myresume): Adjust to use the new 'resume' function.
8938 (clear_pending_status_callback, set_pending_status_callback)
8939 (find_status_pending_thread_callback): New functions.
8940 (handle_status): Handle the case of multiple threads having
8941 interesting statuses to report. Report threads' real last signal
8942 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8943 with an interesting thread to report the status for, instead of
8944 always reporting the status of the first thread.
8945
28498c42
JB
89462014-01-01 Joel Brobecker <brobecker@adacore.com>
8947
8948 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8949 * gdbreplay.c (gdbreplay_version): Likewise.
8950
f45c82da
YZ
89512013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8952
8953 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8954 iov.iov_len with the real length in use.
8955
379a5e2d
JB
89562013-12-13 Joel Brobecker <brobecker@adacore.com>
8957
8958 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8959 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8960 for all targets that use win32-low.c.
8961 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8962 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8963
4210d83e
PA
89642013-12-13 Pedro Alves <palves@redhat.com>
8965
8966 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8967 if equal to TARGET_WAITKIND_LOADED.
8968 * win32-low.c (cached_status): New static global.
8969 (win32_wait): Add declaration.
8970 (do_initial_child_stuff): Flush all initial pending debug events
8971 up to the initial breakpoint.
8972 (win32_wait): If CACHED_STATUS was set, return that instead
8973 of doing a real wait. Remove the code resuming the execution
8974 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8975 during the initial phase. Also remove the code changing
8976 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8977 TARGET_WAITKIND_STOPPED.
8978
e7f0d979
YQ
89792013-12-11 Yao Qi <yao@codesourcery.com>
8980
8981 * notif.c (handle_notif_ack): Return 0 if no notification
8982 matches.
8983
ebcf782c
DE
89842013-11-20 Doug Evans <dje@google.com>
8985
8986 * linux-low.c (linux_set_resume_request): Fix comment.
8987
20ad9378
DE
89882013-11-20 Doug Evans <dje@google.com>
8989
8990 * linux-low.c (resume_status_pending_p): Tweak comment.
8991
a196ebeb
WT
89922013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8993
8994 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8995 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8996 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8997 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8998 (srv_amd64_regobj): Add amd64-mpx.o.
8999 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9000 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9001 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9002 * i387-fp.c (num_pl_bnd_register) Added constant.
9003 (num_pl_bnd_cfg_registers) Added constant.
9004 (struct i387_xsave) Added reserved area and MPX fields.
9005 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9006 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9007 function.
9008 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9009 (init_registers_amd64_mpx_linux): Declare new function.
9010 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9011 (x86_64_regmap): Add MPX registers.
9012 (x86_linux_read_description): Add MPX case.
9013 (initialize_low_arch): Initialize MPX targets.
9014
0080a2f6
TT
90152013-11-18 Tom Tromey <tromey@redhat.com>
9016
9017 * configure: Rebuild.
9018 * configure.ac: Don't check for stdlib.h.
9019 * gdbreplay.c: Unconditionally include stdlib.h.
9020
2978b111
TT
90212013-11-18 Tom Tromey <tromey@redhat.com>
9022
9023 * config.in: Rebuild.
9024 * configure: Rebuild.
9025 * configure.ac: Don't use AC_HEADER_DIRENT.
9026
a3d08894
TT
90272013-11-18 Tom Tromey <tromey@redhat.com>
9028
9029 * server.h: Don't check HAVE_STRING_H.
9030 * gdbreplay.c: Don't check HAVE_STRING_H.
9031 * configure: Rebuild.
9032
0a5dd17d
TT
90332013-11-18 Tom Tromey <tromey@redhat.com>
9034
9035 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9036 LIBGNU.
9037
1bd2f0ba
TT
90382013-11-08 Tom Tromey <tromey@redhat.com>
9039
9040 * configure, config.in: Rebuild.
9041 * configure.ac: Remove unused configury.
9042
3266f10b
TT
90432013-11-08 Tom Tromey <tromey@redhat.com>
9044
9045 * acinclude.m4: Include common.m4, codeset.m4.
9046 * configure, config.in: Rebuild.
9047 * configure.ac: Use GDB_AC_COMMON.
9048
6682d959
AA
90492013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9050
9051 * linux-s390-low.c (HWCAP_S390_TE): New define.
9052 (s390_arch_setup): Consider the TE field in the HWCAP for
9053 determining 'have_regset_tdb'.
9054
fd0a4d76
SDJ
90552013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9056
9057 PR gdb/16014
9058 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9059 call to sizeof.
9060
1a3d890b
PA
90612013-10-02 Pedro Alves <palves@redhat.com>
9062
9063 * server.c (process_serial_event): Don't output "GDBserver
9064 exiting" if GDB is connected through stdio.
9065 * target.c (mywait): Likewise, be silent if GDB is connected
9066 through stdio.
9067
97ad4581
JB
90682013-10-01 Joel Brobecker <brobecker@adacore.com>
9069
9070 * lynx-low.c (lynx_add_threads_after_attach): New function.
9071 (lynx_attach): Remove call to add_thread. Add call to
9072 lynx_add_threads_after_attach instead.
9073
5b4e221c
MF
90742013-09-28 Mike Frysinger <vapier@gentoo.org>
9075
9076 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9077 * config.in, configure: Regenerated.
9078
ee47b2f8
YQ
90792013-09-18 Yao Qi <yao@codesourcery.com>
9080
9081 PR server/15959
9082 * server.c (start_inferior): Clear 'resume_info'.
9083
d6707650 90842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9085
d6707650
JW
9086 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9087 for each register.
9088
9243dd0e 90892013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9090
9243dd0e
JW
9091 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9092 linux-tile-low.o to srv_tgtobj.
9093
c623a6ef
WN
90942013-09-16 Will Newton <will.newton@linaro.org>
9095
9096 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9097 out regs.
9098
fb71d39e
PA
90992013-09-06 Pedro Alves <palves@redhat.com>
9100
9101 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9102 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9103 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9104 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9105 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9106 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9107
8e7e9910
PA
91082013-09-06 Pedro Alves <palves@redhat.com>
9109
9110 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9111 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9112
7c3a12ca
PA
91132013-09-06 Pedro Alves <palves@redhat.com>
9114
9115 * linux-amd64-ipa.c: Include tracepoint.h.
9116 * linux-i386-ipa.c: Include tracepoint.h.
9117
8eb3d7b6
RW
91182013-09-06 Ricard Wanderlof <ricardw@axis.com>
9119
9120 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9121 (ps_get_thread_area): New function.
9122
eddddb9d
RW
91232013-09-06 Ricard Wanderlof <ricardw@axis.com>
9124
9125 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9126 (initialize_low_arch): Call init_registers_crisv32 rather than
9127 init_register_crisv32.
9128
533b0600
PA
91292013-09-05 Pedro Alves <palves@redhat.com>
9130
9131 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9132 to ...
9133 * hostio.h: ... this new file.
9134 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9135 win32-low.c: Include hostio.h.
9136
0ce3d3b5
PA
91372013-09-05 Pedro Alves <palves@redhat.com>
9138
9139 * server.h (gdb_client_data, handler_func, callback_handler_func)
9140 (delete_file_handler, add_file_handler, append_callback_event)
9141 (delete_callback_event, start_event_loop, initialize_event_loop):
9142 Move to event-loop.h and include it.
9143 * event-loop.h: New file.
9144
799cdc37
PA
91452013-09-05 Pedro Alves <palves@redhat.com>
9146
9147 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9148 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9149 (loaded_dll, unloaded_dll): Move to ...
9150 * dll.h: ... this new file.
9151 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9152
6a6bbd9d
PA
91532013-09-05 Pedro Alves <palves@redhat.com>
9154
9155 * server.h (current_process, get_thread_process, all_processes)
9156 (add_inferior_to_list, for_each_inferior, current_inferior)
9157 (remove_inferior, add_process, remove_process, find_process_pid)
9158 (have_started_inferiors_p, have_attached_inferiors_p)
9159 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9160 (clear_inferiors, find_inferior, find_inferior_id)
9161 (inferior_target_data, set_inferior_target_data)
9162 (inferior_regcache_data, set_inferior_regcache_data): Move to
9163 inferiors.h, and include it.
9164 * inferiors.h: New file.
9165
f699aaba
PA
91662013-09-05 Pedro Alves <palves@redhat.com>
9167
9168 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9169 Move ...
72f4393d 9170 * ax.h: ... here.
f699aaba 9171
c144c7a0
PA
91722013-09-05 Pedro Alves <palves@redhat.com>
9173
9174 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9175 tracepoint.h.
9176 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9177 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9178 (handle_tracepoint_general_set, handle_tracepoint_query)
9179 (tracepoint_finished_step, tracepoint_was_hit)
9180 (release_while_stepping_state_list, current_traceframe)
9181 (in_readonly_region, traceframe_read_mem)
9182 (fetch_traceframe_registers, traceframe_read_sdata)
9183 (traceframe_read_info, struct fast_tpoint_collect_status)
9184 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9185 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9186 (supply_fast_tracepoint_registers)
9187 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9188 (ipa_tdesc, claim_trampoline_space)
9189 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9190 (agent_mem_read, agent_get_trace_state_variable_value)
9191 (agent_set_trace_state_variable_value, agent_tsv_read)
9192 (agent_mem_read_string, get_raw_reg_func_addr)
9193 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9194 * tracepoint.h: ... this new file.
9195
ff42e6ab
PA
91962013-09-05 Pedro Alves <palves@redhat.com>
9197
9198 * server.h (perror_with_name, error, fatal, warning, paddress)
9199 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9200 include it.
9201 * utils.h: New file.
9202
541af0f4
PA
92032013-09-05 Pedro Alves <palves@redhat.com>
9204
9205 * server.h (remote_debug, noack_mode, transport_is_reliable)
9206 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9207 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9208 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9209 (write_enn, initialize_async_io, enable_async_io)
9210 (disable_async_io, check_remote_input_interrupt_request)
9211 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9212 (dead_thread_notify, prepare_resume_reply)
9213 (decode_address_to_semicolon, decode_address, decode_m_packet)
9214 (decode_M_packet, decode_X_packet, decode_xfer_write)
9215 (decode_search_memory_packet, unhexify, hexify)
9216 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9217 (look_up_one_symbol, relocate_instruction)
9218 (monitor_output): Move to remote-utils.h, and include it.
9219 * remote-utils.h: New file.
9220
eebdf26b
PA
92212013-09-05 Pedro Alves <palves@redhat.com>
9222
9223 * server.h (_): Delete.
9224
3aafd2ff
PA
92252013-09-02 Pedro Alves <palves@redhat.com>
9226
9227 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9228 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9229 allocated.
9230 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9231
cee83bcb
PM
92322013-09-02 Pierre Muller <muller@sourceware.org>
9233
9234 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9235 or WriteProcessMemory complete successfully and handle
9236 ERROR_PARTIAL_COPY error.
9237
9a13b2fa
PA
92382013-09-02 Pedro Alves <palves@redhat.com>
9239
9240 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9241 error instead of EIO.
9242
602e3198
JK
92432013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9244
9245 PR server/15604
9246 * linux-low.c: Include filestuff.h.
9247 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9248 * lynx-low.c: Include filestuff.h.
9249 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9250 * server.c: Include filestuff.h.
9251 (main): Call notice_open_fds.
9252 * spu-low.c: Include filestuff.h.
9253 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9254
96d7229d
LM
92552013-08-22 Luis Machado <lgustavo@codesourcery.com>
9256
9257 * Makefile.in: Explain why ../target and ../nat are not
9258 listed as include file search paths.
9259 (linux-waitpid.o): New object file rule.
9260 * configure.srv (srv_native_linux_obj): New variable.
9261 Replace all occurrences of linux native object files with
9262 $srv_native_linux_obj.
9263 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9264 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9265 (linux_enable_event_reporting): Remove declaration.
9266 (my_waitpid): Moved to common/linux-waitpid.c.
9267 (linux_wait_for_event): Pass ptid when calling
9268 linux_enable_event_reporting.
9269 (linux_supports_tracefork_flag): Remove.
9270 (linux_enable_event_reporting): Likewise.
9271 (linux_tracefork_grandchild): Remove.
9272 (STACK_SIZE): Moved to common/linux-ptrace.c.
9273 (linux_tracefork_child): Remove.
9274 (linux_test_for_tracefork): Remove.
9275 (linux_look_up_symbols): Call linux_supports_traceclone.
9276 (initialize_low): Remove call to linux_test_for_tracefork.
9277 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9278 common/linux-ptrace.h.
9279 (PTRACE_TYPE_ARG4): Likewise.
9280 Include linux-ptrace.h.
9281
32940073
PA
92822013-08-21 Pedro Alves <palves@redhat.com>
9283
9284 * config.in: Renegerate.
9285
33b60d58 92862013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9287
33b60d58
LM
9288 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9289 (SFILES): Remove $(srcdir)/common/target-common.c and
9290 add $(srcdir)/target/waitstatus.c.
9291 (OBS): Remove target-common.o and add waitstatus.o.
9292 (server_h): Remove $(srcdir)/../common/target-common.h and
9293 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9294 and $(srcdir)/../target/waitstatus.h.
9295 (target-common.o): Remove.
9296 (waitstatus.o): New target object file.
9297 * target.h: Do not include target-common.h and
9298 include target/resume.h, target/wait.h and
9299 target/waitstatus.h.
9300
b8e1b30e
LM
93012013-08-13 Luis Machado <lgustavo@codesourcery.com>
9302
9303 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9304 to PTRACE_TYPE_ARG3.
9305 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9306 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9307 PTRACE_TYPE_ARG4.
9308 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9309 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9310
7a60ad40
YQ
93112013-07-27 Jie Zhang <jie@codesourcery.com>
9312 Daniel Jacobowitz <dan@codesourcery.com>
9313 Yao Qi <yao@codesourcery.com>
9314
9315 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9316 (mips-linux-watch.o): New rule.
9317 (mips_linux_watch_h): New variable.
9318 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9319 srv_tgtobj.
9320 * linux-mips-low.c: Include mips-linux-watch.h.
9321 (struct arch_process_info, struct arch_lwp_info): New.
9322 (update_watch_registers_callback): New function.
9323 (mips_linux_new_process, mips_linux_new_thread) New functions.
9324 (mips_linux_prepare_to_resume, mips_insert_point): New
9325 functions.
9326 (mips_remove_point, mips_stopped_by_watchpoint): New
9327 functions.
9328 (rsp_bp_type_to_target_hw_bp_type): New function.
9329 (mips_stopped_data_address): New function.
9330 (the_low_target): Add watchpoint support functions.
9331
de6f69ad
YQ
93322013-07-27 Yao Qi <yao@codesourcery.com>
9333
9334 * i386-low.c: Include break-common.h.
9335 (enum target_hw_bp_type): Remove.
9336
3360c0bf
LM
93372013-07-24 Luis Machado <lgustavo@codesourcery.com>
9338
9339 * Makefile.in (SFILES): /common/target-common.c.
9340 (OBS): Add target-common.o.
9341 (server_h): Add $(srcdir)/../common/target-common.h.
9342 (target-common.o): New target.
9343 * server.c (queue_stop_reply_callback): Free
9344 status string after use.
9345 * target.c (target_waitstatus_to_string): Remove.
9346 * target.h: Include target-common.h.
9347 (resume_kind): Likewise.
9348 (target_waitkind): Likewise.
9349 (target_waitstatus): Likewise.
9350 (TARGET_WNOHANG): Likewise.
9351
bd885420
YQ
93522013-07-04 Yao Qi <yao@codesourcery.com>
9353
9354 * Makefile.in (host_alias): Use @host_noncanonical@.
9355 (target_alias): Use @target_noncanonical@.
9356 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9357 ACX_NONCANONICAL_HOST.
9358 * configure: Regenerated.
9359
9360 Revert:
9361 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9362
9363 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9364 * configure: Rebuild.
9365 * Makefile.in (version_host, version_target): Get from configure.
9366 (version.c): Use $(version_host) and $(version_target).
9367
17ef446e
PA
93682013-07-03 Pedro Alves <palves@redhat.com>
9369
9370 * Makefile.in (config.status): Depend on development.sh.
9371 * acinclude.m4: Include libmcheck.m4.
9372 * configure: Regenerate.
9373
7a9a7487
MG
93742013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9375
9376 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9377 attribute inside the parentheses.
9378 (winapi_DebugSetProcessKillOnExit): Ditto.
9379 (winapi_DebugBreakProcess): Ditto.
9380 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9381
49b64de6
MG
93822013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9383
9384 * notif.h (notif_event): Add a dummy member to avoid compiler
9385 errors.
9386
d5749ee7
PA
93872013-07-01 Pedro Alves <palves@redhat.com>
9388
9389 * hostio.c (HOSTIO_PATH_MAX): Define.
9390 (require_filename, handle_open, handle_unlink, handle_readlink):
9391 Use it.
9392
d8d2a3ee
PA
93932013-07-01 Pedro Alves <palves@redhat.com>
9394
9395 * server.h: Include "pathmax.h".
9396 * linux-low.c: Don't include sys/param.h.
9397 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9398 MAXPATHLEN.
9399 * win32-low.c: Don't include sys/param.h.
9400 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9401
bc7dea8d
PA
94022013-07-01 Pedro Alves <palves@redhat.com>
9403
9404 * event-loop.c: Don't check HAVE_UNISTD_H before including
9405 <unistd.h>.
9406 * gdbreplay.c: Likewise.
9407 * remote-utils.c: Likewise.
9408 * server.c: Likewise.
9409 * configure.ac: Don't check for unistd.h.
9410 * configure: Regenerate.
9411
d6c2da54
TT
94122013-06-28 Tom Tromey <tromey@redhat.com>
9413
9414 * Makefile.in (version.c): Use version.in, not
9415 common/version.in.
9416
257b6bec
MG
94172013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9418
9419 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9420 * configure: Rebuild.
9421 * Makefile.in (version_host, version_target): Get from configure.
9422 (version.c): Use $(version_host) and $(version_target).
9423
86ebe149
DK
94242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9425
9426 Fix trace-status to output user name without trailing colon.
9427 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9428
f30aa5af
DK
94292013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9430
9431 Fix trace-status to output proper start-time and stop-time.
9432 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9433 output start time and stop time in hex as gdb expects.
9434
28a93511
YQ
94352013-06-26 Pedro Alves <pedro@codesourcery.com>
9436
9437 * tracepoint.c (build_traceframe_info_xml): Output trace state
9438 variables present in the trace buffer.
9439
01208463
TT
94402013-06-24 Tom Tromey <tromey@redhat.com>
9441
9442 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9443 create-version.sh.
9444 (version.o): Remove.
9445 * gdbreplay.c: Include version.h.
9446 (version, host_name): Don't declare.
9447 * server.h: Include version.h.
9448 (version, host_name): Don't declare.
9449
760256f9
PA
94502013-06-12 Pedro Alves <palves@redhat.com>
9451
9452 * linux-x86-low.c (linux_is_elf64): Delete global.
9453 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9454 with local linux_pid_exe_is_elf_64_file use.
9455
030031ee
PA
94562013-06-11 Pedro Alves <palves@redhat.com>
9457
9458 * linux-low.c (regset_disabled, disable_regset): New functions.
9459 (regsets_fetch_inferior_registers)
9460 (regsets_store_inferior_registers): Use them.
9461 (initialize_regsets_info); Don't allocate the disabled_regsets
9462 array here.
9463 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9464 comment.
9465
5da6eb0a
PA
94662013-06-11 Pedro Alves <palves@redhat.com>
9467
9468 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9469 xmalloc.
9470
7e5aaa09
PA
94712013-06-11 Pedro Alves <palves@redhat.com>
9472
9473 * linux-x86-low.c (initialize_low_arch): Call
9474 init_registers_x32_avx_linux.
9475
d878444c
JK
94762013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9477
9478 Fix compatibility with Android Bionic.
9479 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9480 it is not empty.
9481
3aee8918
PA
94822013-06-07 Pedro Alves <palves@redhat.com>
9483
5f2b57b5 9484 PR server/14823
3aee8918
PA
9485 * Makefile.in (OBS): Add tdesc.o.
9486 (IPA_OBJS): Add tdesc-ipa.o.
9487 (tdesc-ipa.o): New rule.
9488 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9489 interface.
9490 * linux-low.c (new_inferior): Delete.
9491 (disabled_regsets, num_regsets): Delete.
9492 (linux_add_process): Adjust to set the new per-process
9493 new_inferior flag.
9494 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9495 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9496 was a stop. When calling arch_setup, switch the current inferior
9497 to the thread that got an event.
9498 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9499 (regsets_fetch_inferior_registers)
9500 (regsets_store_inferior_registers): New regsets_info parameter.
9501 Adjust to use it.
9502 (linux_register_in_regsets): New regs_info parameter. Adjust to
9503 use it.
9504 (register_addr, fetch_register, store_register): New usrregs_info
9505 parameter. Adjust to use it.
9506 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9507 parameter regs_info. Adjust to use it.
9508 (linux_fetch_registers): Get the current inferior's regs_info, and
9509 adjust to use it.
9510 (linux_store_registers): Ditto.
9511 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9512 (initialize_low): Don't initialize the target_regsets here. Call
9513 initialize_low_arch.
9514 * linux-low.h (target_regsets): Delete declaration.
9515 (struct regsets_info): New.
9516 (struct usrregs_info): New.
9517 (struct regs_info): New.
9518 (struct process_info_private) <new_inferior>: New field.
9519 (struct linux_target_ops): Delete the num_regs, regmap, and
9520 regset_bitmap fields. New field regs_info.
9521 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9522 * i387-fp.c (num_xmm_registers): Delete.
9523 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9524 calls to new interface.
9525 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9526 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9527 Infer the number of xmm registers from the regcache's target
9528 description.
9529 * i387-fp.h (num_xmm_registers): Delete.
9530 * inferiors.c (add_thread): Don't install the thread's regcache
9531 here.
9532 * proc-service.c (gregset_info): Fetch the current inferior's
9533 regs_info. Adjust to use it.
9534 * regcache.c: Include tdesc.h.
9535 (register_bytes, reg_defs, num_registers)
9536 (gdbserver_expedite_regs): Delete.
9537 (get_thread_regcache): If the thread doesn't have a regcache yet,
9538 create one, instead of aborting gdbserver.
9539 (regcache_invalidate_one): Rename to ...
9540 (regcache_invalidate_thread): ... this.
9541 (regcache_invalidate_one): New.
9542 (regcache_invalidate): Only invalidate registers of the current
9543 process.
9544 (init_register_cache): Add target_desc parameter, and use it.
9545 (new_register_cache): Ditto. Assert the target description has a
9546 non zero registers_size.
9547 (regcache_cpy): Add assertions. Adjust.
9548 (realloc_register_cache, set_register_cache): Delete.
9549 (registers_to_string, registers_from_string): Adjust.
9550 (find_register_by_name, find_regno, find_register_by_number)
9551 (register_cache_size): Add target_desc parameter, and use it.
9552 (free_register_cache_thread, free_register_cache_thread_one)
9553 (regcache_release, register_cache_size): New.
9554 (register_size): Add target_desc parameter, and use it.
9555 (register_data, supply_register, supply_register_zeroed)
9556 (supply_regblock, supply_register_by_name, collect_register)
9557 (collect_register_as_string, collect_register_by_name): Adjust.
9558 * regcache.h (struct target_desc): Forward declare.
9559 (struct regcache) <tdesc>: New field.
9560 (init_register_cache, new_register_cache): Add target_desc
9561 parameter.
9562 (regcache_invalidate_thread): Declare.
9563 (regcache_invalidate_one): Delete declaration.
9564 (regcache_release): Declare.
9565 (find_register_by_number, register_cache_size, register_size)
9566 (find_regno): Add target_desc parameter.
9567 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9568 declarations.
9569 * remote-utils.c: Include tdesc.h.
9570 (outreg, prepare_resume_reply): Adjust.
9571 * server.c: Include tdesc.h.
9572 (gdbserver_xmltarget): Delete declaration.
9573 (get_features_xml, process_serial_event): Adjust.
9574 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9575 declare.
9576 (struct process_info) <tdesc>: New field.
9577 (ipa_tdesc): Declare.
9578 * tdesc.c: New file.
9579 * tdesc.h: New file.
9580 * tracepoint.c: Include tdesc.h.
9581 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9582 (get_context_regcache): Adjust to pass ipa_tdesc down.
9583 (do_action_at_tracepoint): Adjust to get the register cache size
9584 from the context regcache's description.
9585 (traceframe_walk_blocks): Adjust to get the register cache size
9586 from the current trace frame's description.
9587 (traceframe_get_pc): Adjust to get current trace frame's
9588 description and pass it down.
9589 (gdb_collect): Adjust to get the register cache size from the
9590 IPA's description.
9591 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9592 (gdbserver_xmltarget): Delete.
9593 (initialize_low_tracepoint): Set the ipa's target description.
9594 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9595 (initialize_low_tracepoint): Set the ipa's target description.
9596 * linux-x86-low.c: Include tdesc.h.
9597 [__x86_64__] (is_64bit_tdesc): New.
9598 (ps_get_thread_area, x86_get_thread_area): Use it.
9599 (i386_cannot_store_register): Rename to ...
9600 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9601 (i386_cannot_fetch_register): Rename to ...
9602 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9603 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9604 to new interface.
9605 (target_regsets): Rename to ...
9606 (x86_regsets): ... this.
9607 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9608 interface.
9609 (x86_siginfo_fixup): Use is_64bit_tdesc.
9610 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9611 (tdesc_x32_avx_linux, tdesc_x32_linux)
9612 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9613 Declare.
9614 (x86_linux_update_xmltarget): Delete.
9615 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9616 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9617 (AMD64_LINUX_USER64_CS): New.
9618 (x86_linux_read_description): New, based on
9619 x86_linux_update_xmltarget.
9620 (same_process_callback): New.
9621 (x86_arch_setup_process_callback): New.
9622 (x86_linux_update_xmltarget): New.
9623 (x86_regsets_info): New.
9624 (amd64_linux_regs_info): New.
9625 (i386_linux_usrregs_info): New.
9626 (i386_linux_regs_info): New.
9627 (x86_linux_regs_info): New.
9628 (x86_arch_setup): Reimplement.
9629 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9630 (x86_emit_ops): Ditto.
9631 (the_low_target): Adjust. Install x86_linux_regs_info,
9632 x86_cannot_fetch_register, and x86_cannot_store_register.
9633 (initialize_low_arch): New.
9634 * linux-ia64-low.c (tdesc_ia64): Declare.
9635 (ia64_fetch_register): Adjust.
9636 (ia64_usrregs_info, regs_info): New globals.
9637 (ia64_regs_info): New function.
9638 (the_low_target): Adjust.
9639 (initialize_low_arch): New function.
9640 * linux-sparc-low.c (tdesc_sparc64): Declare.
9641 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9642 Adjust.
9643 (sparc_arch_setup): New function.
9644 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9645 (the_low_target): Adjust.
9646 (initialize_low_arch): New function.
9647 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9648 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9649 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9650 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9651 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9652 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9653 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9654 (tdesc_powerpc_isa205_vsx64l): Declare.
9655 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9656 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9657 (ppc_set_pc, ppc_get_hwcap): Adjust.
9658 (ppc_usrregs_info): Forward declare.
9659 (!__powerpc64__) ppc_regmap_adjusted: New global.
9660 (ppc_arch_setup): Adjust to the current process'es target
9661 description.
9662 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9663 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9664 (ppc_store_evrregset): Adjust.
9665 (target_regsets): Rename to ...
9666 (ppc_regsets): ... this, and make static.
9667 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9668 (ppc_regs_info): New function.
9669 (the_low_target): Adjust.
9670 (initialize_low_arch): New function.
9671 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9672 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9673 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9674 (tdesc_s390x_linux64v2): Declare.
9675 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9676 (s390_fill_gregset, s390_store_last_break): Adjust.
9677 (target_regsets): Rename to ...
9678 (s390_regsets): ... this, and make static.
9679 (s390_get_pc, s390_set_pc): Adjust.
9680 (s390_get_hwcap): New target_desc parameter, and use it.
9681 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9682 (s390_arch_setup): Adjust to set the current process'es target
9683 description. Don't adjust the regmap.
9684 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9685 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9686 (regs_info_3264): New globals.
9687 (s390_regs_info): New function.
9688 (the_low_target): Adjust.
9689 (initialize_low_arch): New function.
9690 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9691 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9692 [__mips64] (init_registers_mips_linux)
9693 (init_registers_mips_dsp_linux): Delete defines.
9694 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9695 (have_dsp): New global.
9696 (mips_read_description): New, based on mips_arch_setup.
9697 (mips_arch_setup): Reimplement.
9698 (get_usrregs_info): New function.
9699 (mips_cannot_fetch_register, mips_cannot_store_register)
9700 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9701 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9702 (target_regsets): Rename to ...
9703 (mips_regsets): ... this, and make static.
9704 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9705 (dsp_regs_info, regs_info): New globals.
9706 (mips_regs_info): New function.
9707 (the_low_target): Adjust.
9708 (initialize_low_arch): New function.
9709 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9710 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9711 Declare.
9712 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9713 (arm_read_description): New, with bits factored from
9714 arm_arch_setup.
9715 (arm_arch_setup): Reimplement.
9716 (target_regsets): Rename to ...
9717 (arm_regsets): ... this, and make static.
9718 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9719 (arm_regs_info): New function.
9720 (the_low_target): Adjust.
9721 (initialize_low_arch): New function.
9722 * linux-m68k-low.c (tdesc_m68k): Declare.
9723 (target_regsets): Rename to ...
9724 (m68k_regsets): ... this, and make static.
9725 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9726 (m68k_regs_info): New function.
9727 (m68k_arch_setup): New function.
9728 (the_low_target): Adjust.
9729 (initialize_low_arch): New function.
9730 * linux-sh-low.c (tdesc_sharch): Declare.
9731 (target_regsets): Rename to ...
9732 (sh_regsets): ... this, and make static.
9733 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9734 (sh_regs_info, sh_arch_setup): New functions.
9735 (the_low_target): Adjust.
9736 (initialize_low_arch): New function.
9737 * linux-bfin-low.c (tdesc_bfin): Declare.
9738 (bfin_arch_setup): New function.
9739 (bfin_usrregs_info, regs_info): New globals.
9740 (bfin_regs_info): New function.
9741 (the_low_target): Adjust.
9742 (initialize_low_arch): New function.
9743 * linux-cris-low.c (tdesc_cris): Declare.
9744 (cris_arch_setup): New function.
9745 (cris_usrregs_info, regs_info): New globals.
9746 (cris_regs_info): New function.
9747 (the_low_target): Adjust.
9748 (initialize_low_arch): New function.
9749 * linux-cris-low.c (tdesc_crisv32): Declare.
9750 (cris_arch_setup): New function.
9751 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9752 (cris_regs_info): New function.
9753 (the_low_target): Adjust.
9754 (initialize_low_arch): New function.
9755 * linux-m32r-low.c (tdesc_m32r): Declare.
9756 (m32r_arch_setup): New function.
9757 (m32r_usrregs_info, regs_info): New globals.
9758 (m32r_regs_info): Adjust.
9759 (initialize_low_arch): New function.
9760 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9761 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9762 (tic6x_usrregs_info): Forward declare.
9763 (tic6x_read_description): New function, based on ...
9764 (tic6x_arch_setup): ... this. Reimplement.
9765 (target_regsets): Rename to ...
9766 (tic6x_regsets): ... this, and make static.
9767 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9768 (tic6x_regs_info): New function.
9769 (the_low_target): Adjust.
9770 (initialize_low_arch): New function.
9771 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9772 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9773 (target_regsets): Rename to ...
9774 (xtensa_regsets): ... this, and make static.
9775 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9776 globals.
9777 (xtensa_arch_setup, xtensa_regs_info): New functions.
9778 (the_low_target): Adjust.
9779 (initialize_low_arch): New function.
9780 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9781 (nios2_arch_setup): Set the current process'es tdesc.
9782 (target_regsets): Rename to ...
9783 (nios2_regsets): ... this.
9784 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9785 (nios2_regs_info): New function.
9786 (the_low_target): Adjust.
9787 (initialize_low_arch): New function.
a261b8f5
PA
9788 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9789 (aarch64_arch_setup): Set the current process'es tdesc.
9790 (target_regsets): Rename to ...
9791 (aarch64_regsets): ... this.
9792 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9793 (aarch64_regs_info): New function.
9794 (the_low_target): Adjust.
9795 (initialize_low_arch): New function.
3aee8918
PA
9796 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9797 globals.
9798 (target_regsets): Rename to ...
9799 (tile_regsets): ... this.
9800 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9801 (tile_regs_info): New function.
9802 (tile_arch_setup): Set the current process'es tdesc.
9803 (the_low_target): Adjust.
9804 (initialize_low_arch): New function.
9805 * spu-low.c (tdesc_spu): Declare.
9806 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9807 * win32-arm-low.c (tdesc_arm): Declare.
9808 (arm_arch_setup): New function.
9809 (the_low_target): Install arm_arch_setup instead of
9810 init_registers_arm.
9811 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9812 (init_windows_x86): Rename to ...
9813 (i386_arch_setup): ... this. Set `win32_tdesc'.
9814 (the_low_target): Adjust.
9815 * win32-low.c (win32_tdesc): New global.
9816 (child_add_thread): Don't create the thread cache here.
9817 (do_initial_child_stuff): Set the new process'es tdesc.
9818 * win32-low.h (struct target_desc): Forward declare.
9819 (win32_tdesc): Declare.
9820 * lynx-i386-low.c (tdesc_i386): Declare global.
9821 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9822 * lynx-low.c (lynx_tdesc): New global.
9823 (lynx_add_process): Set the new process'es tdesc.
9824 * lynx-low.h (struct target_desc): Forward declare.
9825 (lynx_tdesc): Declare global.
9826 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9827 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9828 * nto-low.c (nto_tdesc): New global.
9829 (do_attach): Set the new process'es tdesc.
9830 * nto-low.h (struct target_desc): Forward declare.
9831 (nto_tdesc): Declare.
9832 * nto-x86-low.c (tdesc_i386): Declare.
9833 (nto_x86_arch_setup): Set `nto_tdesc'.
9834
b1fbec62
GB
98352013-06-04 Gary Benson <gbenson@redhat.com>
9836
9837 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9838 to qSupported response when appropriate.
9839 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9840 with nonzero-length annex.
9841 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9842 arguments supplied in annex.
9843
d1ec4ce7
DE
98442013-05-31 Doug Evans <dje@google.com>
9845
ac44adcb 9846 PR server/15594
d1ec4ce7
DE
9847 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9848 64 bits in 64-cross-32 environment.
9849
9b25f2d3
PA
98502013-05-28 Pedro Alves <palves@redhat.com>
9851
9852 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9853 (aarch64-without-fpu.c): Delete rule.
9854 * configure.srv (aarch64*-*-linux*): Remove references to
9855 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9856 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9857 declaration.
9858
6740dc9c
PA
98592013-05-24 Pedro Alves <palves@redhat.com>
9860
9861 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9862 instead of strchr/decode_address. Error if the range isn't split
9863 with a ','. Don't assume there's be a ':' in the action.
9864
c2d6af84
PA
98652013-05-23 Yao Qi <yao@codesourcery.com>
9866 Pedro Alves <palves@redhat.com>
9867
9868 * linux-low.c (lwp_in_step_range): New function.
9869 (linux_wait_1): If the thread was range stepping and stopped
9870 outside the stepping range, report the stop to GDB. Otherwise,
9871 continue stepping. Add range stepping debug output.
9872 (linux_set_resume_request): Copy the step range from the resume
9873 request to the lwp.
9874 (linux_supports_range_stepping): New.
9875 (linux_target_ops) <supports_range_stepping>: Set to
9876 linux_supports_range_stepping.
9877 * linux-low.h (struct linux_target_ops)
9878 <supports_range_stepping>: New field.
9879 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9880 * linux-x86-low.c (x86_supports_range_stepping): New.
9881 (the_low_target) <supports_range_stepping>: Set to
9882 x86_supports_range_stepping.
9883 * server.c (handle_v_cont): Handle 'r' action.
9884 (handle_v_requests): Append ";r" if the target supports range
9885 stepping.
9886 * target.h (struct thread_resume) <step_range_start,
9887 step_range_end>: New fields.
9888 (struct target_ops) <supports_range_stepping>:
9889 New field.
9890 (target_supports_range_stepping): New macro.
9891
58794e1a
JB
98922013-05-17 Joel Brobecker <brobecker@adacore.com>
9893
9894 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9895 confusion in comment.
9896
d631c5a7
JB
98972013-05-17 Joel Brobecker <brobecker@adacore.com>
9898
9899 * lynx-low.c (struct process_info_private): New type.
9900 (lynx_add_process): New function.
9901 (lynx_create_inferior, lynx_attach): Replace calls to
9902 add_process by calls to lynx_add_process.
9903 (lynx_resume): If PTID is null, then try using
9904 current_process()->private->last_wait_event_ptid.
9905 Add comments.
9906 (lynx_clear_inferiors): Delete. The contents of that function
9907 has been inlined in lynx_mourn;
9908 (lynx_wait_1): Save the ptid in the process's private data.
9909 (lynx_mourn): Free the process' private data. Replace call
9910 to lynx_clear_inferiors by call to clear_inferiors.
9911
96f7a20f
YQ
99122013-05-17 Yao Qi <yao@codesourcery.com>
9913
9914 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9915 the right place.
9916
db0dfaa0
LM
99172013-05-16 Luis Machado <lgustavo@codesourcery.com>
9918
9919 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9920 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9921 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9922 PT_TEXT_END_ADDR guards. Update comments.
9923 (linux_target_op) <read_offsets>: Conditionally define to
9924 linux_read_offsets if the target is UCLIBC and if it defines
9925 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9926
68f5f838
SL
99272013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9928 Andrew Jenner <andrew@codesourcery.com>
9929
9930 * Makefile.in (SFILES): Add linux-nios2-low.c.
9931 (clean): Add action to delete nios2-linux.c.
9932 (nios2-linux.c): New rule.
9933 * configure.srv: Add nios2*-*-linux*.
9934 * linux-nios2-low.c: New.
9935
1ebff1fd
HAQ
99362013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9937
9938 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9939
f6150862
HZ
99402013-04-25 Hui Zhu <hui@codesourcery.com>
9941
9942 PR gdb/15186
f6150862
HZ
9943 * ax.c (ax_printf): Add fflush.
9944
614c279d
TT
99452013-04-22 Tom Tromey <tromey@redhat.com>
9946
9947 * Makefile.in (SFILES): Add filestuff.c.
9948 (OBS): Add filestuff.o.
9949 (filestuff.o): New target.
9950 * config.in, configure: Rebuild.
9951 * configure.ac: Check for fdwalk, pipe2.
9952
7d4e5717
PA
99532013-04-17 Pedro Alves <palves@redhat.com>
9954
9955 * configure.ac (USE_THREAD_DB): Delete variable.
9956 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9957 Don't AC_SUBST USE_THREAD_DB.
9958 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9959 * config.in, configure: Regenerate.
9960
d5c93e41
PA
99612013-04-16 Pedro Alves <palves@redhat.com>
9962
9963 * linux-low.h (struct lwp_info) <thread_known>: Move under
9964 the USE_THREAD_DB #ifdef.
9965
04f5fe89
PA
99662013-04-16 Pedro Alves <palves@redhat.com>
9967
9968 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9969 (linux-low.o): Delete rule.
9970 * linux-low.h: Always include "gdb_thread_db.h" instead of
9971 conditionally including thread_db.h.
9972 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9973 HAVE_THREAD_DB_H.
9974
480b27bf
JK
99752013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9976
9977 * Makefile.in (install-only): Fix make install regression.
9978
43662968
JK
99792013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9980
9981 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9982 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9983 installation.
9984 * gdbserver.1: Remove.
9985
3e74e146
PA
99862013-03-22 Pedro Alves <palves@redhat.com>
9987
9988 * linux-low.c (handle_extended_wait): Don't call
9989 linux_enable_event_reporting.
9990
a8347a2a
TT
99912013-03-15 Tony Theodore <tonyt@logyst.com>
9992
9993 PR build/9098:
9994 * Makefile.in (SHELL): Use @SHELL@.
9995
eeb56fa7
SDJ
99962013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9997
9998 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9999 compiler warning.
10000
4fa7e2ff
JB
100012013-03-13 Joel Brobecker <brobecker@adacore.com>
10002
10003 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10004 Remove extraneous NULL element.
10005
8ddb1965
YQ
100062013-03-13 Yao Qi <yao@codesourcery.com>
10007
10008 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10009 'V' block in trace frame.
10010
9accd112
MM
100112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10012
10013 * target.h (struct target_ops): Add btrace ops.
10014 (target_supports_btrace): New macro.
10015 (target_enable_btrace): New macro.
10016 (target_disable_btrace): New macro.
10017 (target_read_btrace): New macro.
10018 * gdbthread.h (struct thread_info): Add btrace field.
10019 * server.c: Include btrace-common.h.
10020 (handle_btrace_general_set): New function.
10021 (handle_btrace_enable): New function.
10022 (handle_btrace_disable): New function.
10023 (handle_general_set): Call handle_btrace_general_set.
10024 (handle_qxfer_btrace): New function.
10025 (struct qxfer qxfer_packets[]): Add btrace entry.
10026 * inferiors.c (remove_thread): Disable btrace.
10027 * linux-low: Include linux-btrace.h.
10028 (linux_low_enable_btrace): New function.
10029 (linux_low_read_btrace): New function.
10030 (linux_target_ops): Add btrace ops.
10031 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10032 Add srv_linux_btrace=yes.
10033 (x86_64-*-linux*): Add linux-btrace.o.
10034 Add srv_linux_btrace=yes.
10035 * configure.ac: Define HAVE_LINUX_BTRACE.
10036 * config.in: Regenerated.
10037 * configure: Regenerated.
10038
5cc22e4c
MM
100392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10040
10041 * server.c (handle_qxfer): Preserve error message if -3 is
10042 returned.
10043 (qxfer): Document the -3 return value.
10044
7c97f91e
MM
100452013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10046
10047 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10048 (linux_btrace_h): New variable.
10049 (linux-btrace.o): New rule.
10050
be9a119c 100512013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10052 Hafiz Abid Qadeer <abidh@codesourcery.com>
10053
10054 * tracepoint.c (trace_buffer_size): New global.
10055 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10056 (init_trace_buffer): Change to one-argument function. Allocate
10057 trace buffer memory.
10058 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10059 handle QTBuffer:size packet.
10060 (cmd_bigqtbuffer_size): New function.
10061 (initialize_tracepoint): Call init_trace_buffer with
10062 DEFAULT_TRACE_BUFFER_SIZE.
10063 * server.c (handle_query): Add QTBuffer:size in the
10064 supported packets.
10065
e64f7499
YQ
100662013-03-07 Yao Qi <yao@codesourcery.com>
10067
10068 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10069 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10070 of -1.
10071 (cmd_qtsp): Adjust condition. Do post increment.
10072 Set cur_action and cur_step_action back to 0.
10073
f0ae6fc3
PA
100742013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10075
10076 PR server/15236
10077 * linux-low.c (linux_write_memory): Return early success if LEN is
10078 zero.
10079
b5b0b0af
CV
100802013-03-05 Corinna Vinschen <vinschen@redhat.de>
10081
334ad4a8 10082 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10083
589bc927
TT
100842013-02-28 Tom Tromey <tromey@redhat.com>
10085
10086 * configure.ac: Invoke AC_SYS_LARGEFILE.
10087 * configure, config.in: Rebuild.
10088
dfe07582
CV
100892013-02-28 Corinna Vinschen <vinschen@redhat.com>
10090
10091 * win32-low.c: Throughout, fix format strings and casts of
10092 printf-like functions to avoid type related warnings on all
10093 platforms.
10094 (get_child_debug_event): Print dwDebugEventCode as hex since
10095 that's how it's usually documented.
10096
736cd585
YQ
100972013-02-28 Yao Qi <yao@codesourcery.com>
10098
10099 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10100 pulongest.
10101
e1f58301
JW
101022013-02-27 Jiong Wang <jiwang@tilera.com>
10103
10104 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10105 (reg-tilegx32.c): New rule.
10106 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10107 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10108 different register info initializer according to elf class.
10109 (init_registers_tilgx32): New function. The tilegx32 register info
10110 initializer.
10111 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10112 (tile_store_gregset): Likewise.
10113
d171ca78
YQ
101142013-02-27 Yao Qi <yao@codesourcery.com>
10115
10116 * server.c (process_point_options): Print debug message when
10117 debug_threads is true.
10118
282bbdf3
YQ
101192013-02-26 Yao Qi <yao@codesourcery.com>
10120
10121 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10122
aca22551
PA
101232013-02-19 Pedro Alves <palves@redhat.com>
10124 Kai Tietz <ktietz@redhat.com>
10125
10126 PR gdb/15161
10127
10128 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10129 instead of strtoul to extract address from packet.
10130 (process_serial_event) <'z'>: Likewise.
10131
4f3cee1c
YQ
101322013-02-18 Yao Qi <yao@codesourcery.com>
10133
10134 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10135
8e1d55a3
PA
101362013-02-14 Pedro Alves <palves@redhat.com>
10137
10138 Plug memory leak.
10139
10140 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10141 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10142
458820da
PA
101432013-02-14 Pedro Alves <palves@redhat.com>
10144
10145 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10146
baea0dae
PA
101472013-02-14 Pedro Alves <palves@redhat.com>
10148
10149 * tracepoint.c (save_string): Delete.
10150 (add_tracepoint_action): Use savestring instead of save_string.
10151
0b1afbb3
PA
101522013-02-12 Pedro Alves <palves@redhat.com>
10153
10154 * linux-xtensa-low.c: Ditto.
10155 * xtensa-xtregs.c: Ditto.
10156
8a4ac37e
PA
101572013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10158
10159 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10160 thread_db.
10161
148de6bb
MS
101622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10163
10164 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10165 aarch64_num_wp_regs and aarch64_num_bp_regs to
10166 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10167
55fac6e0
MS
101682013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10169
10170 * linux-aarch64-low.c (ps_get_thread_area): Replace
10171 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10172
176eb98c
MS
101732013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10174 Marcus Shawcroft <marcus.shawcroft@arm.com>
10175 Nigel Stephens <nigel.stephens@arm.com>
10176 Yufeng Zhang <yufeng.zhang@arm.com>
10177
10178 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10179 (aarch64.c, aarch64-without-fpu.c): New targets.
10180 * configure.srv (aarch64*-*-linux*): New.
10181 * linux-aarch64-low.c: New file.
10182
56f7af9c
MS
101832013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10184
43aaf8b6 10185 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10186 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10187 (dequeue_one_deferred_signal, linux_resume_one_thread)
10188 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10189 (linux_tracefork_grandchild, linux_test_for_tracefork)
10190 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10191 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10192 where the argument is 0.
10193
60f662b0
YQ
101942013-01-25 Yao Qi <yao@codesourcery.com>
10195
10196 * event-loop.c: Include "queue.h".
10197 (gdb_event_p): New typedef.
10198 (struct gdb_event) <next_event>: Remove.
10199 (event_queue): Change to QUEUE(gdb_event_p).
10200 (async_queue_event): Remove.
10201 (gdb_event_xfree): New.
10202 (initialize_event_loop): New.
10203 (process_event): Use API from QUEUE.
10204 (wait_for_event): Likewise.
10205 * server.c (main): Call initialize_event_loop.
10206 * server.h (initialize_event_loop): Declare.
10207
5ae4861a
YQ
102082013-01-18 Yao Qi <yao@codesourcery.com>
10209
10210 * ax.h (struct eval_agent_expr_context): New.
10211 (gdb_eval_agent_expr): Update declaration.
10212 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10213 TFRAME. Add new argument CTX.
10214 * server.h (struct eval_agent_expr_context): Declare.
10215 (agent_mem_read, agent_tsv_read): Update declaration.
10216 (agent_mem_read_string): Likewise.
10217 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10218 (add_traceframe_block): Add new argument TPOINT.
10219 Increase TPOINT->traceframe_usage.
10220 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10221 eval_tracepoint_agent_expr.
10222 (condition_true_at_tracepoint): Likewise.
10223 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10224 (agent_mem_read_string, agent_tsv_read): Likewise.
10225
85e00e85
YQ
102262013-01-16 Yao Qi <yao@codesourcery.com>
10227
10228 * linux-low.c (linux_resume_one_lwp): Don't check
10229 'lwp->bp_reinsert != 0'.
10230
4039cf45
JB
102312013-01-07 Joel Brobecker <brobecker@adacore.com>
10232 Pedro Alves <palves@redhat.com>
10233
10234 * lynx-low.c (ptrace_request_to_str): Define a temporary
10235 macro and use it to simplify this function's implementation.
10236
9044dee2
JB
102372013-01-07 Joel Brobecker <brobecker@adacore.com>
10238
10239 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10240 sets errno.
10241
e6352c8f
JB
102422013-01-07 Joel Brobecker <brobecker@adacore.com>
10243
10244 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10245
50681a27
JB
102462013-01-07 Joel Brobecker <brobecker@adacore.com>
10247
10248 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10249
3f6e77ef
JB
102502013-01-07 Joel Brobecker <brobecker@adacore.com>
10251
10252 * lynx-low.c (lynx_resume): Use the resume_info parameter
10253 to determine the ptid for the lynx_ptrace call, unless
10254 it is equal to minus_one_ptid, in which case we use the
10255 ptid of the current_inferior.
10256 (lynx_wait_1): After having received a thread create/exit
10257 event, resume the inferior's execution using the signaling
10258 thread's ptid, rather than the old ptid.
10259
7fda33ae
JB
102602013-01-07 Joel Brobecker <brobecker@adacore.com>
10261
10262 * lynx-low.c (lynx_resume): Delete variable ret.
10263
b9786c74
JB
102642013-01-01 Joel Brobecker <brobecker@adacore.com>
10265
10266 * gdbreplay.c (gdbreplay_version): Update copyright year.
10267 * server.c (gdbserver_version): Likewise.
10268
8b93d60f
JB
102692012-12-17 Joel Brobecker <brobecker@adacore.com>
10270
10271 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10272 new thread.
10273
037335a7
JB
102742012-12-17 Joel Brobecker <brobecker@adacore.com>
10275
10276 * lynx-low.c (ptrace_request_to_str): Add handling for
10277 PTRACE_GETTRACESIG.
10278
52d4cbd8
JB
102792012-12-17 Joel Brobecker <brobecker@adacore.com>
10280
10281 * lynx-low.c (lynx_attach): Delete variable new_process.
10282
ab8f6ca9
JB
102832012-12-17 Joel Brobecker <brobecker@adacore.com>
10284
10285 * lynx-low.c (lynx_create_inferior): Delete variable
10286 new_process.
10287
78cbc024
JB
102882012-12-17 Joel Brobecker <brobecker@adacore.com>
10289
10290 * lynx-low.c (ptrace_request_to_str): Do not handle
10291 PTRACE_GETTHREADLIST if this macro does not exist.
10292
14a00470
YQ
102932012-12-15 Yao Qi <yao@codesourcery.com>
10294
10295 * Makefile.in (OBS): Add notif.o.
10296 * notif.c, notif.h: New.
10297 * server.c: Include "notif.h".
10298 (struct vstop_notif) <next>: Remove.
10299 <base>: New field.
10300 (queue_stop_reply): Update.
10301 (push_event, send_next_stop_reply): Remove.
10302 (discard_queued_stop_replies): Update.
10303 (notif_stop): New variable.
10304 (handle_v_stopped): Remove.
10305 (handle_v_requests): Don't call handle_v_stopped. Call
10306 handle_ack_notif instead.
10307 (queue_stop_reply_callback): Call notif_event_enque instead
10308 of queue_stop_reply.
10309 (handle_status): Don't call send_next_stop_reply, call
10310 notif_write_event instead.
10311 (kill_inferior_callback): Likewise.
10312 (detach_or_kill_inferior_callback): Likewise.
10313 (main): Call initialize_notif.
10314 (process_serial_event): Call QUEUE_is_empty.
10315 (handle_target_event): Call notif_push instead of push event.
10316 * server.h (push_event): Remove declaration.
10317
61c125b9
TT
103182012-12-10 Tom Tromey <tromey@redhat.com>
10319
10320 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10321 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10322 macros.
10323 (.c.o): Rewrite.
10324 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10325 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10326 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10327 (amd64-linux-ipa.o, ax.o): Rewrite.
10328 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10329 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10330 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10331 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10332 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10333 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10334 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10335 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10336 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10337 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10338 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10339 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10340 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10341 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10342 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10343 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10344 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10345 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10346 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10347 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10348 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10349 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10350 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10351 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10352 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10353 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10354 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10355 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10356 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10357 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10358 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10359 (reg-tilegx.o): Remove.
10360 (all_object_files): New macro.
10361 Include .deps files.
10362 * aclocal.m4, configure: Rebuild.
10363 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10364 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10365 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10366
e90e9ad9
TT
103672012-12-05 Tom Tromey <tromey@redhat.com>
10368
10369 PR gdb/14917:
10370 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10371
02d403bf 103722012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10373
10374 * configure.ac: Check for linux/perf_event.h.
10375 * config.in: Regenerated.
10376 * configure: Regenerated.
10377
0270a750
PA
103782012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10379
10380 * hostio.c (handle_readlink): Decrease buffer size
10381 parameter passed to readlink by one byte.
10382
8c29b58e
YQ
103832012-11-26 Yao Qi <yao@codesourcery.com>
10384
10385 * configure.ac (build_warnings): Append '-Wempty-body'.
10386 * configure: Regenerated.
10387 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10388 body.
10389
8bdce1ff
PM
103902012-11-15 Pierre Muller <muller@sourceware.org>
10391
10392 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10393 * config.in: Regenerate.
10394 * configure: Regenerate.
10395 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10396 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10397 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10398 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10399 header.
10400 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10401 instead of <sys/wait.h> header.
10402 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10403
02d403bf 104042012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10405
10406 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10407 (various make rules): Remove -DGDBSERVER
10408
fbd5db48
YQ
104092012-11-09 Yao Qi <yao@codesourcery.com>
10410
10411 * spu-low.c (current_ptid): Move it to ..
10412 * gdbthread.h: ... here. New.
10413 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10414 * server.c (myresume, process_serial_event): Likewise.
10415 * thread-db.c (thread_db_find_new_threads): Likewise.
10416 * tracepoint.c (run_inferior_command): Likewise.
10417
b3dc46ff
AB
104182012-10-01 Andrew Burgess <aburgess@broadcom.com>
10419
10420 * server.c (handle_search_memory_1): Include access length in
10421 warning message.
10422
07c04788
HPN
104232012-09-05 Michael Brandt <michael.brandt@axis.com>
10424
10425 * linux-crisv32-low.c: Fix compile errors.
10426
918d227b
YQ
104272012-09-04 Yao Qi <yao@codesourcery.com>
10428
10429 * tracepoint.c (cmd_qtsv): Adjust debug message.
10430 Don't check CUR_TPOINT.
10431
18c1b81a
YQ
104322012-08-28 Yao Qi <yao@codesourcery.com>
10433
10434 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10435 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10436 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10437 Remove declarations of xmalloc, xreallloc, xstrdup and
10438 freeargv.
10439 * Makefile.in (libiberty_h): New.
10440 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10441 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10442
dc82f37b
YQ
104432012-08-23 Yao Qi <yao@codesourcery.com>
10444
10445 * server.h: Remove declaration of 'xsnprintf'.
10446
406b1477
KS
104472012-08-22 Keith Seitz <keiths@redhat.com>
10448
10449 * server.h: Include build-gnulib-gbserver/config.h.
10450 * gdbreplay.c: Likewise.
10451
e6712ff1
DE
104522012-08-08 Doug Evans <dje@google.com>
10453
10454 * Makefile.in (SFILES): Add gdb_vecs.c.
10455 (OBS): Add gdb_vecs.o.
10456 (gdb_vecs_h, host_defs_h): New variables.
10457 (thread-db.o): Add $(gdb_vecs_h) dependency.
10458 (gdb_vecs.o): New rule.
10459 * thread-db.c: #include "gdb_vecs.h".
10460 (thread_db_load_search): Use a vector to iterate over path elements.
10461 Handle text appearing after "$pdir".
10462
10463 * configure.ac: Add check for strstr.
10464 * config.in: Regenerate.
10465 * configure: Regenerate.
10466
7c3270ae
UW
104672012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10468
10469 * hostio.c (handle_pread): If pread fails, fall back to attempting
10470 lseek/read.
10471 (handle_pwrite): Likewise for pwrite.
10472
b62e2b27
UW
104732012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10474
10475 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10476 between unsupported TYPE and unimplementable ADDR/LEN combination.
10477 (arm_insert_point): Act on new return value.
10478
78a99e91
PA
104792012-07-31 Pedro Alves <palves@redhat.com>
10480
10481 * server.c (process_point_options): Only skip tokens if we find
10482 one that is unrecognized. Don't treat 'X' specially while
10483 skipping unrecognized tokens.
10484
fcf303ab
UW
104852012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10486
10487 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10488 to 4-byte-align HW breakpoint addresses for Thumb.
10489
7255706c
YQ
104902012-07-27 Yao Qi <yao@codesourcery.com>
10491
10492 PR remote/14161.
10493
10494 * server.h: Declare gdb_agent_about_to_close.
10495 * target.c (kill_inferior): Include "agent.h".
10496 New. Send command 'kill'.
10497 * target.h (kill_inferior): Removed macro.
10498 * tracepoint.c (gdb_agent_about_to_close): New.
10499 (gdb_agent_helper_thread): Handle command 'close'.
10500 Wait endlessly until the inferior stops.
10501 Install gdb_agent_remove_socket to atexit hook.
10502 (agent_socket_name): New static variable.
10503 (gdb_agent_socket_init): Replace local variable 'name' with
10504 'agent_socket_name'.
10505 (gdb_agent_remove_socket): New.
10506
5a3f286f
YQ
105072012-07-27 Yao Qi <yao@codesourcery.com>
10508
10509 * server.c (process_point_options): Stop at 'X' when parsing.
10510
961bd387
ME
105112012-07-19 Michael Eager <eager@eagercon.com>
10512
a261b8f5 10513 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10514 to hw_execute.
10515 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10516 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10517 hardware breakpoint.
10518
aa7c7447
JK
105192012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10520
10521 * gdbserver/linux-low.c (initialize_low): Call
10522 linux_ptrace_init_warnings.
10523
7f216e7c
DE
105242012-07-02 Doug Evans <dje@google.com>
10525
10526 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10527 pointer to int.
10528
d3ce09f5
SS
105292012-07-02 Stan Shebs <stan@codesourcery.com>
10530
10531 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10532 (ax.o): Add it to build rule.
10533 (ax-ipa.o): Ditto.
10534 (OBS): Add format.o.
10535 (IPA_OBS): Add format.o.
10536 * server.c (handle_query): Claim support for breakpoint commands.
10537 (process_point_options): Add command case.
10538 (process_serial_event): Leave running if there are printfs in
10539 effect.
10540 * mem-break.h (any_persistent_commands): Declare.
10541 (add_breakpoint_commands): Declare.
10542 (gdb_no_commands_at_breakpoint): Declare.
10543 (run_breakpoint_commands): Declare.
10544 * mem-break.c (struct point_command_list): New struct.
10545 (struct breakpoint): New field command_list.
10546 (any_persistent_commands): New function.
10547 (add_commands_to_breakpoint): New function.
10548 (add_breakpoint_commands): New function.
10549 (gdb_no_commands_at_breakpoint): New function.
10550 (run_breakpoint_commands): New function.
10551 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10552 locally.
10553 * ax.c: Include format.h.
10554 (ax_printf): New function.
10555 (gdb_eval_agent_expr): Add printf opcode.
10556
2f8f6aed
YQ
105572012-06-13 Yao Qi <yao@codesourcery.com>
10558
10559 * server.c (start_inferior): Remove duplicated writes to fields
10560 'last_resume_kind' and 'last_status' of 'current_inferior'.
10561
0c9070b3
YQ
105622012-06-12 Yao Qi <yao@codesourcery.com>
10563 Pedro Alves <palves@redhat.com>
10564
10565 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10566 comment.
10567 * server.c (handle_v_cont): Extend comment.
10568
c52daf70
YQ
105692012-06-11 Yao Qi <yao@codesourcery.com>
10570
10571 * linux-low.c (linux_attach): Add 'static'.
10572
d38bbb0a
YQ
105732012-06-06 Yao Qi <yao@codesourcery.com>
10574
10575 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10576
89dc0afd
JK
105772012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10578
10579 Fix gcc -flto compilation warning.
10580 * server.c (main): Make variable multi_mode and attach volatile.
10581
75f62ce7
TJB
105822012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10583
10584 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10585 if the platform doesn't know about it.
10586
65f479b6
PA
105872012-05-30 Jeff Kenton <jkenton@tilera.com>
10588
10589 * Makefile.in (SFILES): Add linux-tile-low.c.
10590 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10591 * configure.srv: Handle tilegx-*-linux*.
10592 * linux-tile-low.c: New file.
10593
0c5bf5a9
JK
105942012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10595
10596 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10597
a493e3e2
PA
105982012-05-24 Pedro Alves <palves@redhat.com>
10599
10600 PR gdb/7205
10601
43aaf8b6 10602 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10603
2ea28649
PA
106042012-05-24 Pedro Alves <palves@redhat.com>
10605
10606 PR gdb/7205
10607
10608 Replace target_signal with gdb_signal throughout.
10609
8d409d16
MR
106102012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10611
10612 * linux-low.c (linux_store_registers): Avoid the copying sequence
10613 when no data has been retrieved by ptrace.
10614
23512c01
MGD
106152012-05-22 Will Deacon <will.deacon@arm.com>
10616
10617 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10618 Include asm/ptrace.h.
10619 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10620 already defined.
10621
4934b29e
MR
106222012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10623
10624 * linux-low.c (linux_store_registers): Don't re-retrieve data
10625 with ptrace that has already been obtained from /proc. Always
10626 copy any data retrieved with ptrace to the buffer supplied.
10627
bde24c0a
PA
106282012-05-11 Yao Qi <yao@codesourcery.com>
10629 Pedro Alves <palves@redhat.com>
10630
10631 * linux-low.c (enum stopping_threads_kind): New.
10632 (stopping_threads): Change type to `enum stopping_threads_kind'.
10633 (handle_extended_wait): If stopping and suspending threads, leave
10634 the new_lwp suspended too.
10635 (linux_wait_for_event): Adjust.
10636 (stop_all_lwps): Set `stopping_threads' to
10637 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10638 whether we're suspending threads or just stopping them. Assert no
10639 recursion happens.
10640
623b6bdf
YQ
106412012-04-29 Yao Qi <yao@codesourcery.com>
10642
10643 * server.h: Move some code to ...
10644 * gdbthread.h: ... here. New.
10645 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10646 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10647 (nto-low.o, win32-low.o): Likewise.
10648 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10649 * regcache.c, remote-utils.c, server.c: Likewise.
10650 * target.c, tracepoint.c, win32-low.c: Likewise.
10651
f15f9948
TJB
106522012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10653
10654 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10655 (PTRACE_ARG4_TYPE): Likewise.
10656 (PTRACE_XFER_TYPE): Likewise.
10657 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10658 ptrace to PTRACE_ARG3_TYPE.
10659 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10660 (PTRACE_ARG4_TYPE): Likewise.
10661 (PTRACE_XFER_TYPE): Likewise.
10662 (linux_detach_one_lwp): Cast fourth argument of
10663 ptrace to long then PTRACE_ARG4_TYPE.
10664 (regsets_fetch_inferior_registers): Cast third argument of
10665 ptrace to long then PTRACE_ARG3_TYPE.
10666 (regsets_store_inferior_registers): Likewise.
10667
38ea300a
PA
106682012-04-20 Pedro Alves <palves@redhat.com>
10669
10670 * configure: Regenerate.
10671
c971b7fa
PA
106722012-04-19 Pedro Alves <palves@redhat.com>
10673
43aaf8b6 10674 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10675 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10676 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10677 (all, install-only, uninstall, clean-info, all-lib, clean): No
10678 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10679 (maintainer-clean realclean distclean): Use subdir_do.
10680 (subdir_do): New.
10681 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10682 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10683 * acinclude.m4: Include acx_configure_dir.m4.
10684 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10685 calls. Call AC_PROG_RANLIB. Configure gnulib using
10686 ACX_CONFIGURE_DIR.
10687 (GNULIB): New.
10688 (GNULIB_STDINT_H): Adjust.
10689 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10690 * gdbreplay.c: Include build-gnulib/config.h.
10691 * server.h: Likewise.
10692 * aclocal.m4: Regenerate.
10693 * config.in: Regenerate.
10694 * configure: Regenerate.
c971b7fa 10695
809277f8
PA
106962012-04-19 Pedro Alves <palves@redhat.com>
10697
10698 * Makefile.in (LIBGNU, INCGNU): Adjust.
10699 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10700 (all, install-only, uninstall, clean-info, all-lib, clean)
10701 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10702 * configure.ac: Adjust AC_OUTPUT output.
10703 * aclocal.m4: Regenerate.
10704 * configure: Regenerate.
10705
fd9bb8b8
PA
107062012-04-19 Pedro Alves <palves@redhat.com>
10707
10708 * Makefile.in (generated_files): New.
10709 (server_h): Remove the explicit dependency on config.h, and depend
10710 on $generated_files.
10711
1c298c66
PA
107122012-04-19 Pedro Alves <palves@redhat.com>
10713
10714 * Makefile.in (INCGNU): Add -Ignulib.
10715
57c4b50b
PA
107162012-04-19 Pedro Alves <palves@redhat.com>
10717
10718 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10719 (INCGNU): ... this, and spell out -I here.
10720 (GNULIB_LIB): Rename to ...
10721 (LIBGNU): ... this.
10722 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10723
1030e047
PA
107242012-04-19 Pedro Alves <palves@redhat.com>
10725
10726 * config.in: Regenerate.
10727
447d4319
PA
107282012-04-19 Pedro Alves <palves@redhat.com>
10729
10730 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10731 * server.h (memmem): Remove declaration.
10732 * config.in: Regenerate.
10733 * configure: Regenerate.
10734
aad9eab9
YQ
107352012-04-19 Yao Qi <yao@codesourcery.com>
10736
10737 * Makefile.in (SFILES): Add common/vec.c.
10738 (OBS): Add vec.o.
10739 (vec.o): New rule.
10740
3e10640f
YQ
107412012-04-19 Yao Qi <yao@codesourcery.com>
10742
10743 * remote-utils.c (prepare_resume_reply): Replace with macro
10744 target_core_of_thread.
10745 * server.c (handle_qxfer_threads_proper): Likewise.
10746 * target.h (traget_core_of_thread): New macro.
10747
71622373
PA
107482012-04-18 Pedro Alves <palves@redhat.com>
10749
10750 * aclocal.m4: Regenerate.
10751 * configure: Regenerate.
10752
80d26939
YQ
107532012-04-16 Yao Qi <yao@codesourcery.com>
10754
10755 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10756 duplicated on address.
10757
42476b70
YQ
107582012-04-16 Yao Qi <yao@codesourcery.com>
10759
10760 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10761 (struct tracepoint_action_ops) <send>: New field.
10762 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10763 (agent_expr_send, x_tracepoint_action_send): New.
10764 (l_tracepoint_action_send): New.
10765 (cmd_qtdp): Download and install tracepoint
10766 according to `use_agent'.
10767 (run_inferior_command): Add one more parameter `len'.
10768 Update callers.
10769 (tracepoint_send_agent): New.
10770 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10771
7bc83639
YQ
107722012-04-16 Yao Qi <yao@codesourcery.com>
10773
10774 * tracepoint.c (download_tracepoints): Moved to ...
10775 (cmd_qtstart): ... here.
10776
5f18041e
YQ
107772012-04-14 Yao Qi <yao@codesourcery.com>
10778
10779 * tracepoint.c: Include inttypes.h.
10780 (struct collect_memory_action): Use sized types.
10781 (struct tracepoint): Likewise.
10782 (cmd_qtdp, stop_tracing): Update print specifiers.
10783 (cmd_qtp, response_tracepoint): Likewise.
10784 (collect_data_at_tracepoint): Likewise.
10785 (collect_data_at_step): Likewise.
10786
55a8c076
YQ
107872012-04-14 Yao Qi <yao@codesourcery.com>
10788
10789 Import gnulib module inttypes.
10790 * aclocal.m4, config.in, configure: Regenerated.
10791
dc750257
YQ
107922012-04-14 Yao Qi <yao@codesourcery.com>
10793
10794 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10795 Makefile and config.status at last.
10796
0ab5faf9
YQ
107972012-04-13 Yao Qi <yao@codesourcery.com>
10798
10799 * tracepoint.c: Include stdint.h unconditionally.
10800
18f5fd81
TJB
108012012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10802
10803 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10804 on BFD_HAVE_SYS_PROCFS_TYPE.
10805 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10806 * configure: Regenerate.
10807 * config.in: Likewise.
10808
4d47af5c
L
108092012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10810
10811 * Makefile.in (clean): Also remove x32.c x32-linux.c
10812 x32-avx.c x32-avx-linux.c.
10813 (x32.o): New target.
10814 (x32.c): Likewise.
10815 (x32-linux.o): Likewise.
10816 (x32-linux.c): Likewise.
10817 (x32-avx.o): Likewise.
10818 (x32-avx.c): Likewise.
10819 (x32-avx-linux.o): Likewise.
10820 (x32-avx-linux.c): Likewise.
10821
10822 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10823 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10824 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10825 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10826 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10827 i386/x32-avx-linux.xml.
10828
10829 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10830 (init_registers_x32_avx_linux): Likwise.
10831 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10832 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10833
ecedbe58
PA
108342012-04-13 Pedro Alves <palves@redhat.com>
10835
10836 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10837 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10838 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10839 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10840 the sub-make.
10841
c92b5177
L
108422012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10843
10844 * linux-x86-low.c (compat_x32_clock_t): New.
10845 (compat_x32_siginfo_t): Likewise.
10846 (compat_x32_siginfo_from_siginfo): Likewise.
10847 (siginfo_from_compat_x32_siginfo): Likewise.
10848 (linux_is_elf64): Likewise.
10849 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10850 and siginfo_from_compat_x32_siginfo for x32.
10851 (x86_arch_setup): Set linux_is_elf64.
10852
214d508e
L
108532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10854
10855 PR gdb/13969
10856 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10857 e_machine field.
10858 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10859 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10860 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10861 compatible with process.
10862
c9a1864a
YQ
108632012-04-12 Yao Qi <yao@codesourcery.com>
10864
10865 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10866 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10867 (install-only, install-info, clean): Handle sub dir gnulib.
10868 (all-lib, am--refresh): New targets.
10869 (memmem.o): Remove target.
10870 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10871 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10872 (AC_REPLACE_FUNCS): Remove memmem.
10873 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10874 (AC_OUTPUT): Generate Makefile in gnulib/.
10875 * aclocal.m4, config.in, configure: Regenerated.
10876
367ba2c2
MR
108772012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10878
10879 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10880
9d236627
PA
108812012-04-05 Pedro Alves <palves@redhat.com>
10882
10883 -Werror=strict-aliasing
10884
10885 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10886 pointer.
10887
111217b3
PA
108882012-04-04 Pedro Alves <palves@redhat.com>
10889
10890 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10891 (sparc_store_gregset_from_stack, sparc_store_gregset)
10892 (sparc_breakpoint_at): Fix formatting.
10893
8365dcf5
TJB
108942012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10895
10896 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10897 are available.
10898 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10899 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10900 * config.in: Regenerate.
10901 * configure: Likewise.
10902
689cc2ae
PA
109032012-03-29 Pedro Alves <palves@redhat.com>
10904
10905 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10906 Correct ptrace arguments.
10907
c14dfd32
PA
109082012-03-28 Pedro Alves <palves@redhat.com>
10909
10910 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10911 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10912 (IA64_FR1_REGNUM): New defines.
10913 (ia64_fetch_register): New.
10914 (the_low_target): Install it.
10915 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10916 field.
10917 * linux-low.c (linux_fetch_registers): Try the
10918 the_low_target.fetch_register hook first.
10919
10920 * linux-arm-low.c (the_low_target): Adjust.
10921 * linux-bfin-low.c (the_low_target): Adjust.
10922 * linux-cris-low.c (the_low_target): Adjust.
10923 * linux-crisv32-low.c (the_low_target): Adjust.
10924 * linux-m32r-low.c (the_low_target): Adjust.
10925 * linux-m68k-low.c (the_low_target): Adjust.
10926 * linux-mips-low.c (the_low_target): Adjust.
10927 * linux-ppc-low.c (the_low_target): Adjust.
10928 * linux-s390-low.c (the_low_target): Adjust.
10929 * linux-sh-low.c (the_low_target): Adjust.
10930 * linux-sparc-low.c (the_low_target): Adjust.
10931 * linux-tic6x-low.c (the_low_target): Adjust.
10932 * linux-x86-low.c (the_low_target): Adjust.
10933 * linux-xtensa-low.c (the_low_target): Adjust.
10934
63c88e13
PA
109352012-03-26 Pedro Alves <palves@redhat.com>
10936
10937 * server.c (handle_qxfer_libraries): Don't bail early if
10938 the_target->qxfer_libraries_svr4 is not NULL.
10939
fb723180
PA
109402012-03-26 Pedro Alves <palves@redhat.com>
10941
10942 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10943
0afae3cf
PA
109442012-03-23 Pedro Alves <palves@redhat.com>
10945
10946 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10947 "library-list-svr4" element's start tag when the the DSO list is
10948 empty.
10949
485f1ee4
PA
109502012-03-23 Pedro Alves <palves@redhat.com>
10951
10952 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10953 a variable whose type size is the same as the inferior's pointer
10954 size.
10955
a5362b9a
TS
109562012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10957
10958 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10959 struct siginfo.
10960 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10961 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10962 * linux-low.h: Include <signal.h>.
10963 (struct siginfo): Remove forward declaration.
10964 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10965 struct siginfo.
10966
d226c142
MF
109672012-03-21 Mike Frysinger <vapier@gentoo.org>
10968
10969 * .gitignore: Ignore more files.
10970
122f36ef
PA
109712012-03-19 Pedro Alves <palves@redhat.com>
10972 Jan Kratochvil <jan.kratochvil@redhat.com>
10973
10974 * server.c (cont_thread, general_thread): Add describing comments.
10975 (start_inferior): Clear `cont_thread'.
10976 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10977 of a process.
10978
fc3e5175
YQ
109792012-03-15 Yao Qi <yao@codesourcery.com>
10980
10981 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10982 handling to ...
10983 (cmd_qtdp): ... here.
10984
8d0d92cd
YQ
109852012-03-15 Yao Qi <yao@codesourcery.com>
10986
10987 * tracepoint.c (struct tracepoint_action_ops): New.
10988 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10989 (m_tracepoint_action_download): New.
10990 (r_tracepoint_action_download): New.
10991 (x_tracepoint_action_download): New.
10992 (l_tracepoint_action_download): New.
10993 (add_tracepoint_action): Install `action->ops' according type.
10994 (download_tracepoint_1): Move code `download' function pointer
10995 of various tracepoint_action_ops.
10996
87b0bb13
JK
109972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10998
10999 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11000 linux_ptrace_attach_warnings.
11001
5f572dec
JK
110022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11003
11004 * Makefile.in (linux-ptrace.o): New.
11005 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11006 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11007 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11008 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11009 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11010 of these targets.
11011 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11012
f4647387
YQ
110132012-03-08 Yao Qi <yao@codesourcery.com>
11014 Pedro Alves <palves@redhat.com>
11015
11016 Fix PR server/13392.
11017 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11018 offset of JMP insn.
11019 * tracepoint.c (remove_tracepoint): New.
11020 (cmd_qtdp): Call remove_tracepoint when failed to install.
11021
9b224c5e
PA
110222012-03-07 Pedro Alves <palves@redhat.com>
11023
11024 * linux-low.c (get_detach_signal): New.
11025 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11026 Pass on pending signals to PTRACE_DETACH. Check the result of the
11027 ptrace call.
11028 * server.c (program_signals, program_signals_p): New.
11029 (handle_general_set): Handle QProgramSignals.
11030 * server.h (program_signals, program_signals_p): Declare.
11031
e237a7e2
JK
110322012-03-05 Pedro Alves <palves@redhat.com>
11033 Jan Kratochvil <jan.kratochvil@redhat.com>
11034
11035 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11036 New comment why.
11037
5808517f
YQ
110382012-03-03 Yao Qi <yao@codesourcery.com>
11039
11040 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11041 agent_look_up_symbols.
11042
58b4daa5
YQ
110432012-03-03 Yao Qi <yao@codesourcery.com>
11044
11045 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11046 (linux-x86-low.o): Likewise.
11047 * server.h: Remove in_process_agent_loaded.
11048 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11049 common/agent.c.
11050 Update callers.
11051
8ffcbaaf
YQ
110522012-03-03 Yao Qi <yao@codesourcery.com>
11053
11054 * tracepoint.c (gdb_agent_capability): New global.
11055 (in_process_agent_loaded_ust): Renamed to
11056 `in_process_agent_supports_ust'.
11057 Update callers.
11058 (in_process_agent_supports_ust): Call agent_capability_check.
11059 (clear_installed_tracepoints): Assert that agent supports
11060 agent.
11061
d1feda86
YQ
110622012-03-03 Yao Qi <yao@codesourcery.com>
11063
11064 * linux-low.c (linux_supports_agent): New.
11065 (linux_target_ops): Initialize field `supports_agent' with
11066 linux_supports_agent.
11067 * target.h (struct target_ops) <supports_agent>: New.
11068 (target_supports_agent): New macro.
11069 * server.c (handle_general_set): Handle packet 'QAgent'.
11070 (handle_query): Send `QAgent+'.
11071 * Makefile.in (server.o): Depends on agent.h.
11072
2fa291ac
YQ
110732012-03-03 Yao Qi <yao@codesourcery.com>
11074
11075 * Makefile.in (OBS): Add agent.o.
11076 Add new rule for agent.o.
11077 Track dependence of tracepoint.c on agent.h.
11078 * tracepoint.c (run_inferior_command_1):
11079 (run_inferior_command): Call agent_run_command.
11080 (gdb_ust_connect_sync_socket): Deleted. Move it to
11081 common/agent.c.
11082 (resume_thread, stop_thread): Likewise.
11083 (gdb_ust_socket_init): Renamed to ...
11084 (gdb_agent_socket_init): ... New.
11085 (gdb_ust_thread): Renamed to ...
11086 (gdb_agent_helper_thread): ... New.
11087 (gdb_ust_init): Move some code to ...
11088 (gdb_agent_init): ... here. New.
11089 [HAVE_UST]: Call gdb_ust_init.
11090 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11091 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11092 * config.in, configure: Regenerated.
11093
05044653
PA
110942012-03-02 Pedro Alves <palves@redhat.com>
11095
11096 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11097 * linux-low.c (struct simple_pid_list): New.
11098 (stopped_pids): New a struct simple_pid_list pointer.
11099 (add_to_pid_list, pull_pid_from_list): New.
11100 (handle_extended_wait): Don't assume the first signal new children
11101 report is SIGSTOP. Adjust call to pull_pid_from_list.
11102 (linux_wait_for_lwp): Adjust.
11103
8d00225b
YQ
111042012-03-02 Yao Qi <yao@codesourcery.com>
11105
11106 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11107 debug log.
11108
19560ba5
YQ
111092012-03-02 Yao Qi <yao@codesourcery.com>
11110
11111 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11112 `stop_pc' and `tpoint'. Update caller.
11113
1faeff08
MR
111142012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11115
11116 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11117 * linux-low.c (use_linux_regsets): New macro.
11118 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11119 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11120 (linux_register_in_regsets): New function.
11121 (usr_fetch_inferior_registers): Skip registers covered by
11122 regsets.
11123 (usr_store_inferior_registers): Likewise.
11124 (usr_fetch_inferior_registers): New macro.
11125 (usr_store_inferior_registers): Likewise.
11126 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11127 (linux_store_registers): Likewise.
11128 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11129 prototype.
11130 (init_registers_mips64_dsp_linux): Likewise.
11131 (init_registers_mips_linux): New macro.
11132 (init_registers_mips_dsp_linux): Likewise.
11133 (mips_dsp_num_regs): Likewise.
11134 (DSP_BASE, DSP_CONTROL): New fallback macros.
11135 (mips_base_regs): New macro.
11136 (mips_regmap): Use it. Fix the size.
11137 (mips_dsp_regmap): New variable.
11138 (mips_dsp_regset_bitmap): Likewise.
11139 (mips_arch_setup): New function.
11140 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11141 than mips_regmap.
11142 (mips_cannot_store_register): Likewise.
11143 (the_low_target): Update .arch_setup, .num_regs and .regmap
11144 initializers. Add .regset_bitmap initializer.
11145 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11146 initializer.
11147 * linux-bfin-low.c (the_low_target): Likewise.
11148 * linux-cris-low.c (the_low_target): Likewise.
11149 * linux-crisv32-low.c (the_low_target): Likewise.
11150 * linux-ia64-low.c (the_low_target): Likewise.
11151 * linux-m32r-low.c (the_low_target): Likewise.
11152 * linux-m68k-low.c (the_low_target): Likewise.
11153 * linux-ppc-low.c (the_low_target): Likewise.
11154 * linux-s390-low.c (the_low_target): Likewise.
11155 * linux-sh-low.c (the_low_target): Likewise.
11156 * linux-sparc-low.c (the_low_target): Likewise.
11157 * linux-tic6x-low.c (the_low_target): Likewise.
11158 * linux-x86-low.c (the_low_target): Likewise.
11159 * linux-xtensa-low.c (the_low_target): Likewise.
11160 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11161 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11162 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11163 srv_xmlfiles.
11164 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11165 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11166
c03e6ccc
YQ
111672012-02-29 Yao Qi <yao@codesourcery.com>
11168 Pedro Alves <palves@redhat.com>
11169
11170 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11171 `step_over_finished' is true.
11172
644cebc9
PA
111732012-02-27 Pedro Alves <palves@redhat.com>
11174
11175 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11176 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11177
c14d7ab2
PA
111782012-02-27 Pedro Alves <palves@redhat.com>
11179
11180 PR server/9684
11181 * linux-low.c (pid_is_stopped): New.
11182 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11183
412c89dd
LM
111842012-02-25 Luis Machado <lgustavo@codesourcery.com>
11185
11186 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11187 of conditions.
11188
b745defe
MR
111892012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11190
11191 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11192
9f3a5c85
LM
111932012-02-24 Luis Machado <lgustavo@codesourcery>
11194
11195 * server.c (handle_query): Advertise support for target-side
11196 breakpoint condition evaluation.
11197 (process_point_options): New function.
11198 (process_serial_event): When inserting a breakpoint, check for
11199 a target-side condition that should be evaluated.
11200
11201 * mem-break.c: Include regcache.h and ax.h.
11202 (point_cond_list_t): New data structure.
11203 (breakpoint) <cond_list>: New field.
11204 (find_gdb_breakpoint_at): Make non-static.
11205 (delete_gdb_breakpoint_at): Clear any target-side
11206 conditions.
11207 (clear_gdb_breakpoint_conditions): New function.
11208 (add_condition_to_breakpoint): Likewise.
11209 (add_breakpoint_condition): Likewise.
11210 (gdb_condition_true_at_breakpoint): Likewise.
11211 (gdb_breakpoint_here): Return result directly instead
11212 of going through a local variable.
11213
11214 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11215 (clear_gdb_breakpoint_conditions): Likewise.
11216 (add_breakpoint_condition): Likewise.
11217 (gdb_condition_true_at_breakpoint): Likewise.
11218
11219 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11220 (need_step_over_p): Take target-side breakpoint condition into
11221 consideration.
11222
5e1dc496
LM
112232012-02-24 Luis Machado <lgustavo@codesourcery>
11224
11225 * server.h: Include tracepoint.h.
11226 (agent_mem_read, agent_get_trace_state_variable_value,
11227 agent_set_trace_state_variable_value,
11228 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11229 get_set_tsv_func_addr): New prototypes.
11230
11231 * ax.h: New include file.
11232 * ax.c: New source file.
11233
11234 * tracepoint.c: Include ax.h.
11235 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11236 agent_expr, eval_result_type): Move to ax.h.
11237 (parse_agent_expr): Rename to ...
11238 (gdb_parse_agent_expr): ... this, make it non-static and move
11239 to ax.h.
11240 (unparse_agent_expr) Rename to ...
11241 (gdb_unparse_agent_expr): ... this, make it non-static and move
11242 to ax.h.
11243 (eval_agent_expr): Rename to ...
11244 (eval_tracepoint_agent_expr): ... this.
11245 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11246 forward declarations.
11247 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11248 (agent_get_trace_state_variable_value): New function.
11249 (agent_set_trace_state_variable_value): New function.
11250 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11251 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11252 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11253 (condition_true_at_tracepoint): Likewise.
11254 (parse_agent_expr): Rename to ...
11255 (gdb_parse_agent_expr): ... this and move to ax.c.
11256 (unparse_agent_expr): Rename to ...
11257 (gdb_unparse_agent_expr): ... this and move to ax.c.
11258 (gdb_agent_op_name): Move to ax.c.
11259 (eval_agent_expr): Rename to ...
11260 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11261 and move to ax.c.
11262 (eval_tracepoint_agent_expr): New function.
11263 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11264 non-static.
5e1dc496
LM
11265 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11266 ax.c.
11267 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11268 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11269 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11270 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11271 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11272 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11273 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11274 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11275 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11276 (compile_bytecodes): Remove forward declaration.
11277 (is_goto_target): Move to ax.c.
11278 (compile_bytecodes): Move to ax.c and call
11279 agent_get_trace_state_variable_value (...) and
11280 agent_set_trace_state_variable_value (...).
11281
11282 * Makefile.in: Update ax.c and IPA dependencies.
11283
277e4e52
PA
112842012-02-24 Pedro Alves <palves@redhat.com>
11285
11286 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11287 (cmd_bigqtbuffer_circular): ... this. Only handle
11288 'QTBuffer:circular:'.
11289 (handle_tracepoint_general_set): Adjust.
11290
bf4c19f7
YQ
112912012-02-16 Yao Qi <yao@codesourcery.com>
11292
11293 * inferiors.c: Move code to ...
11294 * dll.c: .... here. New.
11295 * server.h: Declare clear_dlls.
11296 * Makefile.in (SFILES): Add dll.c.
11297 (OBS): Add dll.o
11298 (dll.o): New rule.
11299
d73f2619
YQ
113002012-02-11 Yao Qi <yao@codesourcery.com>
11301
11302 * server.c: (handle_monitor_command): Add a new parameter
11303 `own_buf'.
11304 (handle_query): Update caller.
11305
f8255c2a
JB
113062012-02-09 Joel Brobecker <brobecker@adacore.com>
11307
11308 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11309 * configure, config.in: Regenerate.
11310 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11311 is not defined.
11312
da84f473
PA
113132012-02-02 Pedro Alves <palves@redhat.com>
11314
11315 Try SIGKILL first, then PTRACE_KILL.
11316 * linux-low.c (linux_kill_one_lwp): New.
11317 (linux_kill_one_lwp): Rename to ...
11318 (kill_one_lwp_callback): ... this. Use the new
11319 linux_kill_one_lwp.
11320
e886a173
PA
113212012-02-02 Pedro Alves <palves@redhat.com>
11322
11323 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11324 inferior.
11325
be07f1a2
PA
113262012-01-27 Pedro Alves <palves@redhat.com>
11327
11328 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11329 (elf_64_file_p): Make static.
11330 (linux_pid_exe_is_elf_64_file): New.
11331 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11332 Delete declarations.
11333 (linux_pid_exe_is_elf_64_file): Declare.
11334 * linux-x86-low.c (x86_arch_setup): Use
11335 linux_pid_exe_is_elf_64_file.
11336
d8301ad1
JK
113372012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11338
11339 * linux-low.c (linux_wait_for_event_1): Rename to ...
11340 (linux_wait_for_event): ... here and merge it with former
11341 linux_wait_for_event - new variable wait_ptid, use it.
11342 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11343
01b17894
PA
113442012-01-23 Pedro Alves <palves@redhat.com>
11345
11346 * server.c (main): Avoid yet another case of infinite loop while
11347 detaching/killing after a longjmp.
11348
e825046f
JK
113492012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11350
11351 Code cleanup.
11352 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11353
b9e7b9c3
UW
113542012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11355
11356 * hostio.c (handle_readlink): New function.
11357 (handle_vFile): Call it to handle "vFile:readlink" packets.
11358
901f9912
UW
113592012-01-20 Pedro Alves <palves@redhat.com>
11360 Ulrich Weigand <ulrich.weigand@linaro.org>
11361
11362 * server.c (handle_v_requests): Only support vAttach and vRun to
11363 start multiple processes when in extended protocol mode.
11364
fc1ab1a0
PA
113652012-01-17 Pedro Alves <palves@redhat.com>
11366
11367 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11368 memalign plus mprotect to allocate the scratch buffer.
11369
7d5d4e98
PA
113702012-01-13 Pedro Alves <palves@redhat.com>
11371
11372 * server.c (attach_inferior): Clear `cont_thread'.
11373
f128d5e9
PA
113742012-01-13 Pedro Alves <palves@redhat.com>
11375
11376 * server.c (main): Avoid infinite loop while detaching/killing
11377 after a longjmp.
11378
06db92f0
DE
113792012-01-09 Doug Evans <dje@google.com>
11380
11381 * server.c (start_inferior): Set last_ptid in --wrapper case.
11382
32d92999
YQ
113832012-01-06 Yao Qi <yao@codesourcery.com>
11384
11385 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11386 defined.
11387 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11388
5e0a92a9
YQ
113892012-01-04 Yao Qi <yao@codesourcery.com>
11390
11391 * tracepoint.c (cmd_qtdp): Print debug message
11392 for static tracepoint.
11393
ae639e8c
YQ
113942012-01-04 Yao Qi <yao@codesourcery.com>
11395
11396 * tracepoint.c (trace_vdebug): Differentiate debug message
11397 between gdbserver and IPA.
11398
f72429c5
YQ
113992012-01-03 Yao Qi <yao@codesourcery.com>
11400
11401 * tracepoint.c (tracepoint_was_hit): Don't collect for
11402 static tracepoint.
11403
12c3e59c
JB
114042012-01-02 Joel Brobecker <brobecker@adacore.com>
11405
11406 * terminal.h: Reformat copyright header.
11407
67827812
JB
114082012-01-02 Joel Brobecker <brobecker@adacore.com>
11409
11410 * server.c (gdbserver_version): Update copyright year.
11411 * gdbreplay.c (gdbreplay_version): Likewise.
11412
3e52c33d
JK
114132011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11414
11415 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11416
11417 Revert:
11418 2011-12-18 Hui Zhu <teawater@gmail.com>
11419 * linux-low.c (linux_create_inferior): Save return value to ret.
11420
66f1260e
HZ
114212011-12-18 Hui Zhu <teawater@gmail.com>
11422
11423 * linux-low.c (linux_create_inferior): Save return value to ret.
11424
e77616d7
DE
114252011-12-16 Doug Evans <dje@google.com>
11426
e7b06c57
DE
11427 * linux-low.c (linux_create_inferior): If stdio connection,
11428 redirect stdin from /dev/null, stdout to stderr.
11429 * remote-utils.c (remote_is_stdio): New static global.
11430 (remote_connection_is_stdio): New function.
11431 (remote_prepare): Handle stdio connection.
11432 (remote_open): Ditto.
11433 (remote_close): Don't close stdin for stdio connections.
11434 (read_prim,write_prim): New functions. Replace all calls to
11435 read/write to these.
11436 * server.c (main): Watch for "-" argument. Move call to
11437 remote_prepare before start_inferior.
11438 * server.h (STDIO_CONNECTION_NAME): New macro.
11439 (remote_connection_is_stdio): Declare.
11440
e77616d7
DE
11441 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11442 in debugging output.
11443
82067193
YQ
114442011-12-15 Yao Qi <yao@codesourcery.com>
11445
11446 * tracepoint.c: Include sys/syscall.h.
11447 (gdb_ust_thread): Remove preprocessor conditional.
11448
82bfbe7e
PA
114492011-12-14 Pedro Alves <pedro@codesourcery.com>
11450
11451 * linux-low.c (linux_detach_one_lwp): Call
11452 the_low_target.prepare_to_resume before detaching.
11453
712c6575
YQ
114542011-12-14 Yao Qi <yao@codesourcery.com>
11455
11456 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11457 of write.
11458
d54d1edf
YQ
114592011-12-14 Yao Qi <yao@codesourcery.com>
11460
11461 * i386-low.c (i386_low_stopped_data_address): Initialize local
11462 variable `control'.
11463
6210a125
PA
114642011-12-13 Pedro Alves <pedro@codesourcery.com>
11465
11466 PR remote/13492
11467
11468 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11469 DR_CONTROL unless necessary. Extend comments.
11470 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11471 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11472
2ece8244
YQ
114732011-12-13 Yao Qi <yao@codesourcery.com>
11474
11475 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11476 macros.
11477 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11478
784867a5
JK
114792011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11480
11481 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11482 Print new debug message for such case.
11483
6bf36717
JK
114842011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11485
11486 Fix overlapping memcpy.
11487 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11488 the read_inferior_memory transfer.
11489 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11490 write_inferior_memory transfer.
11491 (set_fast_tracepoint_jump): New variable buf. Use it for the
11492 read_inferior_memory and write_inferior_memory transfers.
11493 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11494 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11495 Use it for the write_inferior_memory transfer.
11496 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11497 buffers.
11498
50275556
MR
114992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11500
11501 * linux-low.c (fetch_register, store_register): Make code
11502 consistent, fix formatting.
11503
7325beb4
MR
115042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11505
11506 * linux-low.c (usr_store_inferior_registers): Factor out code
11507 to handle individual registers into...
11508 (store_register): ... this new function.
11509
c642a434
UW
115102011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11511
11512 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11513 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11514 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11515 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11516 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11517 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11518 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11519 (srv_xmlfiles): Add new XML files.
11520
11521 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11522 and <sys/uio.h>.
11523 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11524 (init_registers_s390_linux32v1): Add prototype.
11525 (init_registers_s390_linux32v2): Likewise.
11526 (init_registers_s390_linux64v1): Likewise.
11527 (init_registers_s390_linux64v2): Likewise.
11528 (init_registers_s390x_linux64v1): Likewise.
11529 (init_registers_s390x_linux64v2): Likewise.
11530 (s390_num_regs): Increment to 52.
11531 (s390_regmap): Add orig_r2 register.
11532 (s390_num_regs_3264): Increment to 68.
11533 (s390_regmap_3264): Add orig_r2 register.
11534 (s390_collect_ptrace_register): Handle orig_r2 register.
11535 (s390_supply_ptrace_register): Likewise.
11536 (s390_fill_last_break): New function.
11537 (s390_store_last_break): Likewise.
11538 (s390_fill_system_call): New function.
11539 (s390_store_system_call): Likewise.
11540 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11541 register sets.
11542 (s390_check_regset): New function.
11543 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11544 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11545 Update target_regsets for available register sets.
11546
2268b414
JK
115472011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11548 Jan Kratochvil <jan.kratochvil@redhat.com>
11549
11550 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11551 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11552 New.
11553 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11554 * linux-low.h (struct process_info_private): New member r_debug.
11555 * server.c (handle_qxfer_libraries): Call
11556 the_target->qxfer_libraries_svr4.
11557 (handle_qxfer_libraries_svr4): New function.
11558 (qxfer_packets): New entry "libraries-svr4".
11559 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11560 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11561 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11562 PACKET_qXfer_libraries_svr4.
11563
d6db1fab
UW
115642011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11565
11566 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11567 PSW address/mask between 8-byte and 16-byte formats.
11568 (s390_supply_ptrace_register): Likewise.
11569 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11570 basic addressing mode bit.
11571
242f5f1c
SS
115722011-11-24 Stan Shebs <stan@codesourcery.com>
11573
11574 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11575
f196051f
SS
115762011-11-17 Stan Shebs <stan@codesourcery.com>
11577
11578 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11579 (tracing_start_time): New global.
11580 (tracing_stop_time): New global.
11581 (tracing_user_name): New global.
11582 (tracing_notes): New global.
11583 (tracing_stop_note): New global.
11584 (cmd_qtstart): Set traceframe_usage, start_time.
11585 (stop_tracing): Set stop_time.
11586 (cmd_qtstatus): Report additional status.
11587 (cmd_qtp): New function.
11588 (handle_tracepoint_query): Call it.
11589 (cmd_qtnotes): New function.
11590 (handle_tracepoint_general_set): Call it.
11591 (get_timestamp): Rename from tsv_get_timestamp.
11592
405f8e94
SS
115932011-11-14 Stan Shebs <stan@codesourcery.com>
11594 Kwok Cheung Yeung <kcy@codesourcery.com>
11595
11596 * linux-x86-low.c (small_jump_insn): New.
11597 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11598 trampoline and error message, build a trampoline and issue a small
11599 jump instruction to it.
11600 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11601 trampoline and error message.
11602 (x86_get_min_fast_tracepoint_insn_len): New.
11603 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11604 * linux-low.h (struct linux_target_ops): Add arguments to
11605 install_fast_tracepoint_jump_pad operation, add new operation.
11606 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11607 arguments.
11608 (linux_get_min_fast_tracepoint_insn_len): New function.
11609 (linux_target_op): Add new operation.
11610 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11611 (gdb_trampoline_buffer_end): Ditto.
11612 (gdb_trampoline_buffer_error): Ditto.
11613 (struct ipa_sym_addresses): Add fields for new IPA variables.
11614 (symbol_list): Add entries for new IPA variables.
11615 (struct tracepoint): Add fields to hold the address range of the
11616 trampoline used by the tracepoint.
11617 (trampoline_buffer_head): New static variable.
11618 (trampoline_buffer_tail): Ditto.
11619 (claim_trampoline_space): New function.
11620 (have_fast_tracepoint_trampoline_buffer): New function.
11621 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11622 structure.
11623 (install_fast_tracepoint): Ditto, also add error buffer argument.
11624 (cmd_qtminftpilen): New function.
11625 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11626 (fast_tracepoint_from_trampoline_address): New function.
11627 (fast_tracepoint_collecting): Handle trampoline as part of jump
11628 pad space.
11629 (set_trampoline_buffer_space): New function.
11630 (initialize_tracepoint): Initialize new IPA variables.
11631 * target.h (struct target_ops): Add arguments to
11632 install_fast_tracepoint_jump_pad operation, add new
11633 get_min_fast_tracepoint_insn_len operation.
11634 (target_get_min_fast_tracepoint_insn_len): New.
11635 (install_fast_tracepoint_jump_pad): Add arguments.
11636 * server.h (IPA_BUFSIZ): Define.
11637 * linux-i386-ipa.c: Include extra header files.
11638 (initialize_fast_tracepoint_trampoline_buffer): New function.
11639 (initialize_low_tracepoint): Call it.
11640 * server.h (set_trampoline_buffer_space): Declare.
11641 (claim_trampoline_space): Ditto.
11642 (have_fast_tracepoint_trampoline_buffer): Ditto.
11643
1e4d1764
YQ
116442011-11-14 Yao Qi <yao@codesourcery.com>
11645
11646 * server.c (handle_query): Handle InstallInTrace for qSupported.
11647 * tracepoint.c (add_tracepoint): Sort list.
11648 (install_tracepoint, download_tracepoint): New.
11649 (cmd_qtdp): Call them to install and download tracepoints.
11650 (sort_tracepoints): Removed.
11651 (cmd_qtstart): Update.
11652
5c73ff4e
YQ
116532011-11-14 Yao Qi <yao@codesourcery.com>
11654
11655 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11656 * mem-break.h: Declare.
11657 * tracepoint.c (cmd_qtstart): Move some code to ...
11658 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11659 New.
11660 (download_tracepoints): Move some code to ...
11661 (download_tracepoint_1): ... here. New.
11662
86a30030
YQ
116632011-11-08 Yao Qi <yao@codesourcery.com>
11664
11665 * remote-utils.c (relocate_instruction): A comment fix.
11666
8d26e50c
JB
116672011-11-07 Joel Brobecker <brobecker@adacore.com>
11668
11669 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11670 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11671 dr_status_mirror and dr_control_mirror from debug_reg_state.
11672 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11673 (i386_initial_stuff): Remove use of deleted globals.
11674 (i386_get_thread_context, i386_set_thread_context,
11675 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11676 from debug_reg_state.
11677
a59306a3
YQ
116782011-11-05 Yao Qi <yao@codesourcery.com>
11679
11680 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11681 address as TPOINT's.
11682
3065dfb6
SS
116832011-11-02 Stan Shebs <stan@codesourcery.com>
11684
11685 * tracepoint.c (agent_mem_read_string): New function.
11686 (eval_agent_expr): Call it for tracenz.
11687 * server.c (handle_query): Report support for tracenz.
11688
fd0d8c7c
YQ
116892011-11-02 Yao Qi <yao@codesourcery.com>
11690
11691 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11692
609086b1
YQ
116932011-11-02 Yao Qi <yao@codesourcery.com>
11694
11695 * target.h: Fix a typo in comment.
11696
b9fd1791
PA
116972011-10-31 Pedro Alves <pedro@codesourcery.com>
11698
11699 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11700 clobber the breakpoints' shadows with fast tracepoint jumps.
11701 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11702 * target.c (write_inferior_memory): Also pass MYADDR down to
11703 check_mem_write.
11704
03583c20
UW
117052011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11706
11707 * configure.ac: Check support for personality routine.
11708 * configure: Regenerate.
11709 * config.in: Likewise.
11710 * linux-low.c: Include <sys/personality.h>.
11711 Define ADDR_NO_RANDOMIZE if necessary.
11712 (linux_create_inferior): Disable address space randomization when
11713 forking inferior, if requested.
11714 (linux_supports_disable_randomization): New function.
11715 (linux_target_ops): Install it.
11716 * server.h (disable_randomization): Declare.
11717 * server.c (disable_randomization): New global variable.
11718 (handle_general_set): Handle QDisableRandomization.
11719 (handle_query): Likewise for qSupported.
11720 (main): Support --disable-randomization and --no-disable-randomization
11721 command line arguments.
11722 * target.h (struct target_ops): Add supports_disable_randomization.
11723 (target_supports_disable_randomization): New macro.
11724
723b724b
MF
117252011-09-29 Mike Frysinger <vapier@gentoo.org>
11726
11727 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11728 ifdef check.
11729 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11730 [!PT_GETDSBT] (target_loadmap): New definition.
11731 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11732 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11733 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11734 and PT_GETDSBT to LINUX_LOADMAP.
11735 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11736 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11737
55329a5c 117382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11739
11740 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11741 (arm_linux_hwbp_cap): New static variable.
11742 (arm_linux_get_hwbp_cap): Replace by ...
11743 (arm_linux_init_hwbp_cap): ... this new function.
11744 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11745 (arm_linux_get_hw_watchpoint_count): Likewise.
11746 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11747 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11748 (arm_prepare_to_resume): Use perror_with_name instead of error.
11749
55329a5c 117502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11751
11752 * linux-arm-low.c: Include <signal.h>.
11753 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11754 (struct arm_linux_hwbp_cap): New data type.
11755 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11756 (struct arm_linux_hw_breakpoint): New data type.
11757 (MAX_BPTS, MAX_WPTS): Define.
11758 (struct arch_process_info, struct arch_lwp_info): New data types.
11759 (arm_linux_get_hwbp_cap): New function.
11760 (arm_linux_get_hw_breakpoint_count): Likewise.
11761 (arm_linux_get_hw_watchpoint_count): Likewise.
11762 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11763 (arm_hwbp_control_initialize): Likewise.
11764 (arm_hwbp_control_is_enabled): Likewise.
11765 (arm_hwbp_control_is_initialized): Likewise.
11766 (arm_hwbp_control_disable): Likewise.
11767 (arm_linux_hw_breakpoint_equal): Likewise.
11768 (arm_linux_hw_point_initialize): Likewise.
11769 (struct update_registers_data): New data structure.
11770 (update_registers_callback: New function.
11771 (arm_insert_point): Likewise.
11772 (arm_remove_point): Likewise.
11773 (arm_stopped_by_watchpoint): Likewise.
11774 (arm_stopped_data_address): Likewise.
11775 (arm_new_process): Likewise.
11776 (arm_new_thread): Likewise.
11777 (arm_prepare_to_resume): Likewise.
11778 (the_low_target): Register arm_insert_point, arm_remove_point,
11779 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11780 arm_new_thread, and arm_prepare_to_resume.
11781
6b9801d4
SS
117822011-09-15 Stan Shebs <stan@codesourcery.com>
11783
11784 * server.h (struct emit_ops): Add compare-goto fields.
11785 * tracepoint.c (gdb_agent_op_sizes): New table.
11786 (emit_eq_goto): New function.
11787 (emit_ne_goto): New function.
11788 (emit_lt_goto): New function.
11789 (emit_le_goto): New function.
11790 (emit_gt_goto): New function.
11791 (emit_ge_goto): New function.
11792 (is_goto_target): New function.
11793 (compile_bytecodes): Recognize special cases of compare-goto
11794 combinations and call specialized emitters for them.
11795 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11796 (amd64_emit_ne_goto): New function.
11797 (amd64_emit_lt_goto): New function.
11798 (amd64_emit_le_goto): New function.
11799 (amd64_emit_gt_goto): New function.
11800 (amd64_emit_ge_goto): New function.
11801 (amd64_emit_ops): Add the new functions.
11802 (i386_emit_eq_goto): New function.
11803 (i386_emit_ne_goto): New function.
11804 (i386_emit_lt_goto): New function.
11805 (i386_emit_le_goto): New function.
11806 (i386_emit_gt_goto): New function.
11807 (i386_emit_ge_goto): New function.
11808 (i386_emit_ops): Add the new functions.
11809
bf15cbda
SS
118102011-09-08 Stan Shebs <stan@codesourcery.com>
11811
11812 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11813 (i386_emit_epilogue): Restore %ebx.
11814
943ca1dd
JZ
118152011-08-31 Jie Zhang <jzhang918@gmail.com>
11816
11817 * server.c (step_thread): Remove definition.
11818 (process_serial_event): Don't handle Hs.
11819 * server.h (step_thread): Remove declaration.
11820 * target.c (set_desired_inferior): Remove use of step_thread.
11821
e3deef73
LM
118222011-08-24 Luis Machado <lgustavo@codesourcery.com>
11823
11824 * linux-low.c: Include linux-procfs.h.
11825 (linux_attach_lwp_1): Update comments.
11826 (linux_attach): Scan for existing threads when attaching to a
11827 process that is the tgid.
11828 * Makefile.in: Update dependencies.
11829
13da1c97
LM
118302011-08-24 Luis Machado <lgustavo@codesourcery.com>
11831
11832 * configure.srv: Add linux-procfs.o dependencies.
11833
881127c9
YQ
118342011-08-14 Yao Qi <yao@codesourcery.com>
11835
11836 * target.h (struct target_ops): Fix indent.
11837 * win32-low.c (win32_target_ops): Fix comment.
11838
58dbd541
YQ
118392011-08-14 Andrew Jenner <andrew@codesourcery.com>
11840 Yao Qi <yao@codesourcery.com>
11841
11842 * Makefile.in (clean): Remove tic6x-*.c files.
11843 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11844 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11845 (tic6x-c64xp-linux.c): Likewise.
11846 * configure.srv: Add support for tic6x-*-uclinux.
11847 * linux-tic6x-low.c: New.
11848 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11849
78d85199
YQ
118502011-08-14 Andrew Stubbs <ams@codesourcery.com>
11851 Yao Qi <yao@codesourcery.com>
11852
11853 * target.h (struct target_ops): Add read_loadmap.
11854 * linux-low.c (struct target_loadseg): New type.
11855 (struct target_loadmap): New type.
11856 (linux_read_loadmap): New function.
11857 (linux_target_ops): Add linux_read_loadmap.
11858 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11859 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11860 to NULL.
78d85199 11861
a959a88d
EZ
118622011-08-05 Eli Zaretskii <eliz@gnu.org>
11863
11864 * win32-low.c: Include <stdint.h>.
11865
1ced966e
PA
118662011-07-22 Pedro Alves <pedro@codesourcery.com>
11867
11868 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11869 to the inferior here.
11870 (i386_remove_aligned_watchpoint): Ditto.
11871 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11872 fit part of the watchpoint in the debug registers.
11873 (i386_update_inferior_debug_regs): New.
11874 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11875 registers, and only update the inferior on success.
11876 (i386_low_remove_watchpoint): Ditto.
11877
d26e3629
KY
118782011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11879
11880 * linux-low.c (compare_ints, unique, list_threads, show_process,
11881 linux_core_of_thread): Delete.
11882 (linux_target_ops): Change linux_core_of_thread to
11883 linux_common_core_of_thread.
11884 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11885 * utils.c (malloc_failure): Change type of argument.
11886 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11887 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11888 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11889 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11890 (IPA_OBJS): Add common-utils-ipa.o.
11891 (ptid_h, linux_osdata_h): New macros.
11892 (server_h): Add common/common-utils.h, common/xml-utils.h,
11893 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11894 common/ptid.h.
11895 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11896 ptid.o, buffer.o): New rules.
11897 (linux-low.o): Add common/linux-osdata.h as a dependency.
11898 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11899 * configure.ac: Add AC_HEADER_DIRENT check.
11900 * config.in: Regenerate.
11901 * configure: Regenerate.
11902 * remote-utils.c (xml_escape_text): Delete.
11903 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11904 buffer_xml_printf): Move to common/buffer.c.
11905 * server.c (main): Remove call to initialize_inferiors.
11906 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11907 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11908 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11909 internal_error, gdb_assert, gdb_assert_fail): Delete.
11910 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11911 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11912 common/buffer.h.
11913 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11914 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11915 initialize_inferiors): Delete.
11916
2275a1a7
PA
119172011-07-20 Pedro Alves <pedro@codesourcery.com>
11918
11919 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11920 symbol error.
11921
0a5b1e09
PA
119222011-05-31 Pedro Alves <pedro@codesourcery.com>
11923
11924 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11925 assertion.
11926 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11927
6938fd34
YQ
119282011-05-26 Yao Qi <yao@codesourcery.com>
11929
11930 * Makefile.in (thread-db.o): Track dependence to
11931 common/gdb_thread_db.h.
11932 * thread-db.c: include gdb_thread_db.h from right place.
11933
b481f9e0
TT
119342011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11935
11936 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11937 __FILE__ and __LINE__ to internal_error.
11938
98a5dd13
DE
119392011-05-13 Doug Evans <dje@google.com>
11940
11941 * thread-db.c (try_thread_db_load_from_sdir): New function.
11942 (try_thread_db_load_from_dir): New function.
11943 (thread_db_load_search): Handle $sdir, ignore $pdir.
11944 Remove trying of system directories if search of
11945 libthread-db-search-path fails, that is now done via $sdir.
11946
d248b706
KY
119472011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11948
11949 * server.c (handle_query): Add EnableDisableTracepoints to the list
11950 of supported features.
43aaf8b6 11951 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11952 tracepoints.
43aaf8b6
PA
11953 (cmd_qtenable_disable): New.
11954 (cmd_qtstart): Install tracepoints even if disabled.
11955 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11956 receiving a QTEnable or QTDisable packet.
11957 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11958 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11959 tracepoints.
11960 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11961
84e578fb
DE
119622011-05-10 Doug Evans <dje@google.com>
11963
11964 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11965
71f55dd8
DE
119662011-05-04 Doug Evans <dje@google.com>
11967
11968 * linux-low.c (linux_join): Skip process lookup.
11969 * spu-low.c (spu_join): Ditto.
11970 * server.c (join_inferiors_callback): Delete.
11971 (process_serial_event): For 'D' packet (detach) call join_inferior
11972 directly.
11973
4d393d60
JM
119742011-05-04 Joseph Myers <joseph@codesourcery.com>
11975
11976 * README: Don't mention xscale*-*-linux*.
11977 * configure.srv (xscale*-*-linux*): Don't handle target.
11978
b00ad6ff
NF
119792011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11980
11981 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11982 casting pointers.
11983 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11984 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11985 (i386_emit_void_call_2): Likewise.
11986
af96c192
YQ
119872011-04-26 Yao Qi <yao@codesourcery.com>
11988
43aaf8b6
PA
11989 * linux-low.c: Move common macros to linux-ptrace.h.
11990 Include linux-ptrace.h.
af96c192
YQ
11991 * Makefile.in (linux_ptrace_h): New.
11992 (linux-low.o): Depends on linux-ptrace.h.
11993
03f2bd59
JK
119942011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11995
11996 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11997 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11998 (remote_prepare): New function with most of the TCP code from ...
11999 (remote_open): ... here. Detect PORT here unconditionally. Move also
12000 setting transport_is_reliable.
12001 * server.c (run_once): New variable.
12002 (gdbserver_usage): Document it.
12003 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12004 the first run if RUN_ONCE.
12005 * server.h (run_once, remote_prepare): New declarations.
12006
7a9dd1b2
TT
120072011-04-19 Tom Tromey <tromey@redhat.com>
12008
12009 * win32-low.c (handle_load_dll): Remove duplicate "the".
12010
81239425
PM
120112011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12012
12013 Remove support for old Cygwin 1.5 versions.
12014 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12015 function to avoid warning.
12016 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12017 warning.
12018
9e0627f1
PM
120192011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12020
12021 * gdbserver/server.h (Macro _): Define it if not available.
12022
588eebee
MS
120232011-03-14 Michael Snyder <msnyder@vmware.com>
12024
348af9f7 12025 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12026
43f70d4c
JB
120272011-03-10 Joel Brobecker <brobecker@adacore.com>
12028
12029 * Makefile.in (maintainer-clean realclean distclean): Remove
12030 "make ... subdir_do" command.
12031
348af9f7
MS
120322011-03-10 Michael Snyder <msnyder@vmware.com>
12033
12034 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12035
12036 * server.c (handle_v_run): Free alloced buffer on early return.
12037
e637a4f5
YQ
120382011-03-09 Yao Qi <yao@codesourcery.com>
12039
12040 Revert:
12041 2011-03-04 Yao Qi <yao@codesourcery.com>
12042
12043 * Makefile.in: Remove GNU make feature --directory.
12044
12045 2011-03-05 Yao Qi <yao@codesourcery.com>
12046
12047 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12048 (subdir_do): New make target. Copied from gdb/Makefile.
12049 (maintainer-clean, realclean, distclean, clean): Call corresponding
12050 make targets in common/Makefile.
12051
12052 2011-02-11 Yao Qi <yao@codesourcery.com>
12053
12054 * configure.ac: Call AC_PROG_RANLIB.
12055 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12056 * configure: Regenerate.
12057
e6edda56
JK
120582011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12059
12060 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12061
e5141119
JB
120622011-03-06 Yao Qi <yao@codesourcery.com>
12063
12064 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12065
64794aa4
JB
120662011-03-05 Yao Qi <yao@codesourcery.com>
12067
12068 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12069 (subdir_do): New make target. Copied from gdb/Makefile.
12070 (maintainer-clean, realclean, distclean, clean): Call corresponding
12071 make targets in common/Makefile.
12072
7a762829
YQ
120732011-03-04 Yao Qi <yao@codesourcery.com>
12074
12075 * Makefile.in: Remove GNU make feature --directory.
12076
348af9f7
MS
120772011-03-04 Michael Snyder <msnyder@vmware.com>
12078
12079 * server.c (queue_stop_reply): Call xmalloc not malloc.
12080
120812011-03-02 Michael Snyder <msnyder@vmware.com>
12082
12083 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12084
9f72fee2
MS
120852011-02-28 Michael Snyder <msnyder@vmware.com>
12086
588eebee
MS
12087 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12088 (cmd_qtframe): Ditto.
12089 (cmd_qtbuffer): Ditto.
12090 (cmd_bigqtbuffer): Ditto.
12091
9f72fee2
MS
12092 * utils.c (decimal2str): Initialize 'width' to nine, then
12093 don't mess with it.
12094
8040bd49
UW
120952011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12096
12097 * hostio.c (require_data): Free *data, not data.
12098
7e52cbd0
JK
120992011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12100
12101 * hostio.c (require_data): Use free, not xfree.
12102
9130f83e
MS
121032011-02-27 Michael Snyder <msnyder@vmware.com>
12104
4b812f4e
MS
12105 * server.c (handle_query): Discard unused value.
12106
9130f83e
MS
12107 * hostio.c (require_data): Free malloc memory before returning
12108 error.
12109
69d37113
MS
121102011-02-26 Michael Snyder <msnyder@vmware.com>
12111
12112 * linux-low.c (list_threads): Call closedir for dirent.
12113
35f5825a
MS
121142011-02-27 Michael Snyder <msnyder@vmware.com>
12115
2a589cef
MS
12116 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12117 a case statement falls through.
12118
0adea5f7
MS
12119 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12120
35f5825a
MS
12121 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12122 in comparison.
12123
238f1c74
MS
121242011-02-26 Michael Snyder <msnyder@vmware.com>
12125
12126 * utils.c (decimal2str): Eliminate dead code and dead param.
12127 (pulongest): Drop dead param from call to decimal2str.
12128 (plongest): Ditto.
12129
633ff500
JB
121302011-02-24 Joel Brobecker <brobecker@adacore.com>
12131
12132 Revert the following patch (not approved yet):
12133 2011-02-21 Hui Zhu <teawater@gmail.com>
12134 * tracepoint.c (tp_printf): New function.
12135 (eval_agent_expr): Handle gdb_agent_op_printf.
12136
f9c6ff72
HZ
121372011-02-21 Hui Zhu <teawater@gmail.com>
12138
12139 * tracepoint.c (tp_printf): New function.
12140 (eval_agent_expr): Handle gdb_agent_op_printf.
12141
94d5e490
TT
121422011-02-18 Tom Tromey <tromey@redhat.com>
12143
12144 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12145 (tracepoint.o): Likewise.
12146 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12147 (gdb_agent_op_names): Likewise.
12148
c7f96d2b
TT
121492011-02-18 Tom Tromey <tromey@redhat.com>
12150
12151 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12152 gdb_agent_op_rot>: New constants.
12153 (gdb_agent_op_names): Add pick and roll.
12154 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12155 cases.
12156
0feedb2c
JK
121572011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12158
12159 * aclocal.m4: Regenerated with aclocal-1.11.1.
12160
b3b9301e
PA
121612011-02-14 Pedro Alves <pedro@codesourcery.com>
12162
12163 * server.c (handle_qxfer_traceframe_info): New.
12164 (qxfer_packets): Register "traceframe-info".
12165 (handle_query): Report support for qXfer:traceframe-info:read+.
12166 * tracepoint.c (match_blocktype): New.
12167 (traceframe_find_block_type): Rename to ...
12168 (traceframe_walk_blocks): ... this. Add callback filter argument,
12169 and use it.
12170 (traceframe_find_block_type): New, reimplemented on top of
12171 traceframe_walk_blocks.
12172 (build_traceframe_info_xml): New.
12173 (traceframe_read_info): New.
12174 * server.h (traceframe_read_info): Declare.
12175
4f3e6fb7
YQ
121762011-02-11 Yao Qi <yao@codesourcery.com>
12177
12178 * configure.ac: Call AC_PROG_RANLIB.
12179 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12180 * configure: Regenerate.
12181
764880b7
PA
121822011-02-07 Pedro Alves <pedro@codesourcery.com>
12183
12184 * server.c (gdb_read_memory): Change return semantics to allow
12185 partial transfers.
12186 (handle_search_memory_1): Adjust.
12187 (process_serial_event) <'m' packet>: Handle partial transfers.
12188 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12189
1c79eb8a
PA
121902011-01-28 Pedro Alves <pedro@codesourcery.com>
12191
12192 * regcache.c (init_register_cache): Initialize
12193 regcache->register_status.
12194 (free_register_cache): Release regcache->register_status.
12195 (regcache_cpy): Copy register_status.
12196 (registers_to_string): Print 'x's for unavailable registers.
12197 (supply_register): Mark the register's status valid or
12198 unavailable, depending on whether a buffer was passed in or not.
12199 (supply_register_zeroed): New.
12200 (supply_regblock): Mark the registers' status valid or
12201 unavailable, depending on whether a buffer was passed in or not.
12202 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12203 (struct regcache): New `register_status' field.
12204 (supply_register_zeroed): Declare.
12205 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12206 supply_register_zeroed, rather than passing a NULL buffer to
12207 supply_register.
12208 * tracepoint.c (fetch_traceframe_registers): Update comment.
12209
85724a0e
PA
122102011-01-28 Pedro Alves <pedro@codesourcery.com>
12211
12212 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12213 buffer explicit.
12214
d08aafef
PA
122152011-01-25 Pedro Alves <pedro@codesourcery.com>
12216
12217 * server.h (decode_xfer_write): Change prototype.
12218 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12219 and don't extract the annex here.
12220 * server.c (decode_xfer_read): Remove `annex' parameter,
12221 and don't extract the annex here.
12222 (decode_xfer): New.
12223 (struct qxfer): New.
12224 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12225 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12226 (handle_qxfer_statictrace): New functions, abstracted out from
12227 handle_query, and made to use the struct qxfer interface.
12228 (handle_threads_qxfer_proper): Rename to ...
12229 (handle_qxfer_threads_proper): ... this.
12230 (handle_threads_qxfer): Rename to ...
12231 (handle_qxfer_threads): ... this. Adjust.
12232 (qxfer_packets): New array.
12233 (handle_qxfer): New function.
12234 (handle_query): Use handle_qxfer.
12235
493e2a69
MS
122362011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12237
12238 * gdbreplay.c: Shorten lines of >= 80 columns.
12239 * linux-low.c: Ditto.
12240 * linux-ppc-low.c: Ditto.
12241 * linux-s390-low.c: Ditto.
12242 * linux-sparc-low.c: Ditto.
12243 * linux-x86-low.c: Ditto.
12244 * linux-xtensa-low.c: Ditto.
12245 * mem-break.c: Ditto.
12246 * nto-low.c: Ditto.
12247 * regcache.h: Ditto.
12248 * remote-utils.c: Ditto.
12249 * server.c: Ditto.
12250 * server.h: Ditto.
12251 * thread-db.c: Ditto.
12252 * tracepoint.c: Ditto.
12253 * utils.c: Ditto.
12254 * win32-low.h: Ditto.
12255
44944448
JB
122562011-01-05 Joel Brobecker <brobecker@adacore.com>
12257
12258 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12259 update.
12260
71ce852c
JB
122612011-01-01 Joel Brobecker <brobecker@adacore.com>
12262
12263 * server.c (gdbserver_version): Update copyright year in version
12264 output.
12265 * gdbreplay.c (gdbreplay_version): Ditto.
12266
eb826dc6
MF
122672010-12-29 Jie Zhang <jie.zhang@analog.com>
12268
12269 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12270 * linux-bfin-low.c: New file.
12271 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12272 PT_DATA_ADDR for BFIN targets.
12273 * Makefile.in (SFILES): Add linux-bfin-low.c.
12274 (clean): Remove reg-bfin.c.
12275 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12276 * README: Mention supported Blackfin targets.
12277
39ab222a
MF
122782010-12-23 Mike Frysinger <vapier@gentoo.org>
12279
12280 * .gitignore: New file.
12281
a1f2ce7d
MF
122822010-11-16 Mike Frysinger <vapier@gentoo.org>
12283
12284 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12285
f474844c
JZ
122862010-10-22 Jie Zhang <jie@codesourcery.com>
12287
12288 * Makefile.in: Add FLAGS_TO_PASS variable.
12289 (install): Remove dependency of install-only and recursively
12290 invoke make for install-only.
12291
f1048712
DE
122922010-10-04 Doug Evans <dje@google.com>
12293
12294 * Makefile.in (uninstall): Use $(DESTDIR).
12295
b53a1623
PA
122962010-09-24 Pedro Alves <pedro@codesourcery.com>
12297
e6ee044d
PA
12298 PR gdb/11842
12299
b53a1623
PA
12300 * linux-x86-low.c (compat_siginfo_from_siginfo)
12301 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12302 si_code is < 0. Check for si_code == SI_TIMER before checking for
12303 si_code < 0.
12304
fa1bd1e4
JB
123052010-09-13 Joel Brobecker <brobecker@adacore.com>
12306
12307 * lynx-i386-low.c: New file.
12308 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12309
47fac8f8
JB
123102010-09-13 Joel Brobecker <brobecker@adacore.com>
12311
12312 * lynx-low.c (ptrace_request_to_str): Remove handling for
12313 request values that have been removed in LynxOS 5.x.
12314
1adfc54d
JB
123152010-09-13 Joel Brobecker <brobecker@adacore.com>
12316
12317 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12318 <ptrace.h>
12319
c2a66c29
NS
123202010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12321
12322 * configure.ac: Add --enable-inprocess-agent option.
12323 * configure: Rebuilt.
12324
32fcada3
YQ
123252010-09-06 Yao Qi <yao@codesourcery.com>
12326
12327 * linux-low.c (linux_kill): Remove unused variable.
12328 (linux_stabilize_threads): Likewise.
12329 * server.c (start_inferior): Likewise.
12330 (queue_stop_reply_callback): Likewise.
12331 * tracepoint.c (do_action_at_tracepoint): Likewise.
12332
0cccb683
YQ
123332010-09-06 Yao Qi <yao@codesourcery.com>
12334
12335 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12336 on return.
12337
423ec54c
JK
123382010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12339
12340 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12341
12ac6819
PA
123422010-09-06 Pedro Alves <pedro@codesourcery.com>
12343
12344 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12345 "$(IPA_DEPFILES)".
12346
8ed54b31
JB
123472010-09-01 Joel Brobecker <brobecker@adacore.com>
12348
12349 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12350 gdbserver/lynx-ppc-low.c: New files.
12351 * Makefile.in (lynx_low_h): New variable.
12352 (lynx-low.o, lynx-ppc-low.o): New rules.
12353 * configure.ac: On LynxOS, link with -lnetinet.
12354 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12355 * configure: regenerate.
12356
bb0116a4
JB
123572010-09-01 Joel Brobecker <brobecker@adacore.com>
12358
12359 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12360 * configure.ac: Add check for vasprintf and vsnprintf.
12361 * configure, config.in: Regenerate.
12362 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12363
a778ab81 123642010-09-01 Joel Brobecker <brobecker@adacore.com>
12365
12366 * gdbreplay.c: Move include of alloca.h up, next to include of
12367 malloc.h.
12368 * server.h: Add include of malloc.h.
12369 * mem-break.c: Remove include of malloc.h.
12370 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12371
8b034a19 123722010-09-01 Joel Brobecker <brobecker@adacore.com>
12373
12374 * Makefile.in (memmem.o): Build with -Wno-error.
12375
123762010-09-01 Joel Brobecker <brobecker@adacore.com>
12377
12378 * utils.c (xsnprintf): Make non-static.
12379 * server.h: Add xsnprintf declaration.
12380 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12381 replace calls to snprintf by calls to xsnprintf throughout.
12382
123832010-09-01 Joel Brobecker <brobecker@adacore.com>
12384
12385 * configure.ac: Add configure check for alloca.
12386 * configure, config.in: Regenerate.
12387 * server.h: Include alloca.h if it exists.
12388 * gdbreplay.c: Include alloca.h if it exists.
12389
1a981360
PA
123902010-08-28 Pedro Alves <pedro@codesourcery.com>
12391
12392 * linux-low.c (__SIGRTMIN): Define if not already defined.
12393 (linux_create_inferior): Check for __ANDROID__ rather than
12394 __SIGRTMIN.
12395 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12396 are already deferred.
12397 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12398 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12399 stopped and already has a pending signal to report.
12400 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12401 a pending signal to report or is moving out of a jump pad.
12402 (linux_init_signals): Check for __ANDROID__ rather than
12403 __SIGRTMIN.
12404
b4d51a55
PA
124052010-08-28 Pedro Alves <pedro@codesourcery.com>
12406
12407 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12408 debug_threads check. Avoid a linear search when not doing debug
12409 output.
12410
ec48365d
PA
124112010-08-27 Pedro Alves <pedro@codesourcery.com>
12412
12413 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12414 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12415 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12416 (process_event): Change local fd's type to gdb_fildes_t.
12417 (create_file_handler): Adjust prototype.
12418 (delete_file_handler): Adjust prototype.
12419 (handle_file_event): Adjust prototype. Use pfildes.
12420 (create_file_event): Adjsut prototype.
12421 * remote-utils.c (remote_desc, listen_desc): Change type to
12422 gdb_fildes_t.
12423 * server.h: New gdb_fildes_t typedef.
12424 [USE_WIN32API]: Include winsock2.h.
12425 (delete_file_handler, add_file_handler): Adjust prototypes.
12426 (pfildes): Declare.
12427 * utils.c (pfildes): New.
12428
854d88f0
PA
124292010-08-27 Pedro Alves <pedro@codesourcery.com>
12430
12431 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12432 * configure: Regenerate.
12433
0146f85b
PA
124342010-08-27 Pedro Alves <pedro@codesourcery.com>
12435
12436 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12437 (linux_done_accessing_memory): ... this.
12438 (linux_target_ops): Adjust.
12439 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12440 * nto-low.c (nto_target_ops): Adjust comment.
12441 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12442 * spu-low.c (spu_target_ops): Adjust comment.
12443 * target.h (target_ops): Rename unprepare_to_access_memory field
12444 to done_accessing_memory.
12445 (unprepare_to_access_memory): Rename to ...
12446 (done_accessing_memory): ... this.
12447
90d74c30
PA
124482010-08-26 Pedro Alves <pedro@codesourcery.com>
12449
12450 * linux-low.c (linux_prepare_to_access_memory): New.
12451 (linux_unprepare_to_access_memory): New.
12452 (linux_target_ops): Install them.
12453 * server.c (read_memory): Rename to ...
12454 (gdb_read_memory): ... this. Use
12455 prepare_to_access_memory/prepare_to_access_memory.
12456 (write_memory): Rename to ...
12457 (gdb_write_memory): ... this. Use
12458 prepare_to_access_memory/prepare_to_access_memory.
12459 (handle_search_memory_1): Adjust.
12460 (process_serial_event): Adjust.
12461 * target.h (struct target_ops): New fields
12462 prepare_to_access_memory and unprepare_to_access_memory.
12463 (prepare_to_access_memory, unprepare_to_access_memory): New.
12464 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12465 prepare_to_access_memory/prepare_to_access_memory.
12466 * nto-low.c (nto_target_ops): Adjust.
12467 * spu-low.c (spu_target_ops): Adjust.
12468 * win32-low.c (win32_target_ops): Adjust.
12469
fd467969
PA
124702010-08-26 Pedro Alves <pedro@codesourcery.com>
12471
12472 * Makefile.in (WARN_CFLAGS): Get it from configure.
12473 (WERROR_CFLAGS): New.
12474 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12475 * configure.ac: Introduce --enable-werror, which adds -Werror to
12476 the compiler command line. Enabled by default. Disable with
12477 --disable-werror. Add -Wdeclaration-after-statement
12478 Wpointer-arith and -Wformat-nonliteral to warning flags.
12479 * configure: Regenerate.
12480
331e2f5f
PA
124812010-08-26 Pedro Alves <pedro@codesourcery.com>
12482
12483 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12484
e581f2b4
PA
124852010-08-26 Pedro Alves <pedro@codesourcery.com>
12486
12487 * gdbreplay.c (remote_error): New.
12488 (gdbchar): New.
12489 (expect): Use gdbchar. Check for error reading from GDB.
12490 Clarify sync error output.
12491 (play): Check for errors writing to GDB.
12492 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12493 * remote-utils.c (getpkt): Check for errors writing to the remote
12494 descriptor.
12495
3c11dd79
PA
124962010-08-25 Pedro Alves <pedro@codesourcery.com>
12497
12498 * linux-low.c (linux_wait_1): Move non-debugging code out of
12499 `debug_threads' control.
12500
d20a8ad9
PA
125012010-08-25 Pedro Alves <pedro@codesourcery.com>
12502
12503 * linux-low.c (linux_wait_1): Don't set last_status here.
12504 * server.c (push_event, queue_stop_reply_callback): Assert we're
12505 not pushing a TARGET_WAITKIND_IGNORE event.
12506 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12507 (myresume, handle_target_event): Set the thread's last_resume_kind
12508 and last_status from the target returned status.
12509
964e4306
PA
125102010-08-25 Pedro Alves <pedro@codesourcery.com>
12511
12512 PR threads/10729
12513
12514 * linux-x86-low.c (update_debug_registers_callback): New.
12515 (i386_dr_low_set_addr): Use it.
12516 (i386_dr_low_get_addr): New.
12517 (i386_dr_low_set_control): Use update_debug_registers_callback.
12518 (i386_dr_low_get_control): New.
12519 (i386_dr_low_get_status): Adjust.
12520 * linux-low.c (linux_stop_lwp): New.
12521 * linux-low.h (linux_stop_lwp): Declare.
12522
12523 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12524 argument instead of a i386_debug_reg_state.
12525 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12526 a i386_debug_reg_state.
12527 (i386_insert_aligned_watchpoint): Adjust.
12528 (i386_remove_aligned_watchpoint): Adjust.
12529 (i386_low_stopped_data_address): Read the debug registers from the
12530 inferior instead of from the mirrors.
12531 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12532 (i386_dr_low_get_addr): Declare.
12533 (i386_dr_low_get_control): Declare.
12534 (i386_dr_low_get_status): Change prototype.
12535
12536 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12537 (i386_dr_low_get_addr): New.
12538 (i386_dr_low_get_control): New.
12539 (i386_dr_low_get_status): Adjust prototype. Return
12540 dr_status_mirror.
12541 (i386_initial_stuff): Clear dr_status_mirror and
12542 dr_control_mirror.
12543 (i386_get_thread_context): Adjust.
12544 (i386_set_thread_context): Adjust.
12545 (i386_thread_added): Adjust.
12546
5f21a75b
PA
125472010-08-24 Pedro Alves <pedro@codesourcery.com>
12548
12549 * linux-low.h (linux_thread_area): Delete declaration.
12550
3e4c1235
TS
125512010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12552
12553 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12554 after its termination.
12555
1971b033
PA
125562010-08-09 Pedro Alves <pedro@codesourcery.com>
12557
12558 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12559 (gdb_wants_all_stopped): Delete.
12560 (linux_wait_1): Don't call them.
12561 * server.c (handle_v_cont): Tag all threads as want-stopped.
12562 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12563 stopped as "client-wants-stopped".
12564
310444ac
PA
125652010-07-31 Pedro Alves <pedro@codesourcery.com>
12566
12567 * Makefile.in (signals_h): New.
12568 (server_h): Depend on it.
12569 (server.o): Don't depend on $(signals_def).
12570 (signals.o): Depend on $(signals_def).
12571
a19cae16
JK
125722010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12573
12574 * Makefile.in (signals_def): New.
12575 (server_h): Append include/gdb/signals.h and signals_def.
12576 (server.o): Append signals_def.
12577
30d50328
JK
125782010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12579
12580 * server.c (handle_target_event): Use target_signal_to_host for
12581 resume_info.sig initialization.
12582 * target.h (struct thread_resume) <sig>: New comment.
12583
5c3216e2
OS
125842010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12585
c6f46ca0
OS
12586 * server.c (handle_query): strcpy() the returned string from paddress()
12587 instead of sprintf().
5c3216e2
OS
12588 * utils.c (paddress): Return phex_nz().
12589
6bd31874
JB
125902010-07-07 Joel Brobecker <brobecker@adacore.com>
12591
12592 * server.c (handle_v_cont): Call mourn_inferior if process
12593 just exited.
12594 (myresume): Likewise.
12595
0fb4aa4b
PA
125962010-07-01 Pedro Alves <pedro@codesourcery.com>
12597
12598 Static tracepoints, and integration with UST.
12599
12600 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12601 * mem-break.c (uninsert_all_breakpoints)
12602 (reinsert_all_breakpoints): New.
12603 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12604 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12605 (gdb_agent_ust_loaded, helper_thread_id)
12606 (gdb_agent_helper_thread_id): New macros.
12607 (struct ipa_sym_addresses): Add addr_ust_loaded,
12608 addr_helper_thread_id, addr_cmd_buf.
12609 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12610 (in_process_agent_loaded_ust): New.
12611 (write_e_ust_not_loaded): New.
12612 (maybe_write_ipa_ust_not_loaded): New.
12613 (struct collect_static_trace_data_action): New.
12614 (enum tracepoint_type) <static_tracepoint>: New.
12615 (struct tracepoint) <handle>: Mention static tracepoints.
12616 (struct static_tracepoint_ctx): New.
12617 (CMD_BUF_SIZE): New.
12618 (add_tracepoint_action): Handle static tracepoint actions.
12619 (unprobe_marker_at): New.
12620 (clear_installed_tracepoints): Handle static tracepoints.
12621 (cmd_qtdp): Handle static tracepoints.
12622 (probe_marker_at): New.
12623 (cmd_qtstart): Handle static tracepoints.
12624 (response_tracepoint): Handle static tracepoints.
12625 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12626 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12627 (get_context_regcache): Handle static tracepoints.
12628 (do_action_at_tracepoint): Handle static tracepoint actions.
12629 (traceframe_find_block_type): Handle static trace data blocks.
12630 (traceframe_read_sdata): New.
12631 (download_tracepoints): Download static tracepoint actions.
12632 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12633 (GDB_PROBE_NAME): New.
12634 (ust_ops): New.
12635 (GET_UST_SYM): New.
12636 (USTF): New.
12637 (dlsym_ust): New.
12638 (ust_marker_to_static_tracepoint): New.
12639 (gdb_probe): New.
12640 (collect_ust_data_at_tracepoint): New.
12641 (gdb_ust_probe): New.
12642 (UNIX_PATH_MAX, SOCK_DIR): New.
12643 (gdb_ust_connect_sync_socket): New.
12644 (resume_thread, stop_thread): New.
12645 (run_inferior_command): New.
12646 (init_named_socket): New.
12647 (gdb_ust_socket_init): New.
12648 (cstr_to_hexstr): New.
12649 (next_st): New.
12650 (first_marker, next_marker): New.
12651 (response_ust_marker): New.
12652 (cmd_qtfstm, cmd_qtsstm): New.
12653 (unprobe_marker_at, probe_marker_at): New.
12654 (cmd_qtstmat, gdb_ust_thread): New.
12655 (gdb_ust_init): New.
12656 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12657 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12658 (ST_REGENTRY): New.
12659 (x86_64_st_collect_regmap): New.
12660 (X86_64_NUM_ST_COLLECT_GREGS): New.
12661 (AMD64_RIP_REGNUM): New.
12662 (supply_static_tracepoint_registers): New.
12663 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12664 (ST_REGENTRY): New.
12665 (i386_st_collect_regmap): New.
12666 (i386_NUM_ST_COLLECT_GREGS): New.
12667 (supply_static_tracepoint_registers): New.
12668 * server.c (handle_query): Handle qXfer:statictrace:read.
12669 <qSupported>: Report support for StaticTracepoints, and
12670 qXfer:statictrace:read features.
12671 * server.h (traceframe_read_sdata)
12672 (supply_static_tracepoint_registers): Declare.
12673 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12674 (unpack_varlen_hex): Include in IPA build.
12675 * Makefile.in (ustlibs, ustinc): New.
12676 (IPA_OBJS): Add remote-utils-ipa.o.
12677 ($(IPA_LIB)): Link -ldl and -lpthread.
12678 (UST_CFLAGS): New.
12679 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12680 * config.in, configure: Regenerate.
12681
9e4344e5
PA
126822010-06-20 Ian Lance Taylor <iant@google.com>
12683 Pedro Alves <pedro@codesourcery.com>
12684
12685 * linux-x86-low.c (always_true): Delete.
12686 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12687 trying to fool the compiler with always_true.
12688
c6beb2cb
PA
126892010-06-20 Pedro Alves <pedro@codesourcery.com>
12690
12691 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12692 conditions in gdbserver.
12693
d2ed6730
UW
126942010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12695
12696 * spu-low.c (spu_read_memory): Wrap around local store limit.
12697 (spu_write_memory): Likewise.
12698
4e29fb54
PA
126992010-06-15 Pedro Alves <pedro@codesourcery.com>
12700
12701 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12702 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12703 LONGEST uses.
12704 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12705 uses.
12706 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12707 uses with LONGEST uses.
12708
6a271cae
PA
127092010-06-14 Stan Shebs <stan@codesourcery.com>
12710 Pedro Alves <pedro@codesourcery.com>
12711
12712 Bytecode compiler.
12713
12714 * linux-x86-low.c: Include limits.h.
12715 (add_insns): New.
12716 (always_true): New.
12717 (EMIT_ASM): New.
12718 (EMIT_ASM32): New.
12719 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12720 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12721 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12722 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12723 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12724 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12725 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12726 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12727 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12728 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12729 (amd64_emit_void_call_2): New.
12730 (amd64_emit_ops): New.
12731 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12732 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12733 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12734 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12735 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12736 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12737 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12738 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12739 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12740 (i386_emit_stack_adjust, i386_emit_int_call_1)
12741 (i386_emit_void_call_2): New.
12742 (i386_emit_ops): New.
12743 (x86_emit_ops): New.
12744 (the_low_target): Install x86_emit_ops.
12745 * server.h (struct emit_ops): New.
12746 (get_raw_reg_func_addr): Declare.
12747 (current_insn_ptr, emit_error): Declare.
12748 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12749 (set_trace_state_variable_value): New defines.
12750 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12751 addr_get_trace_state_variable_value and
12752 addr_set_trace_state_variable_value.
12753 (symbol_list): New fields for get_raw_reg,
12754 get_trace_state_variable_value and set_trace_state_variable_value.
12755 (condfn): New typedef.
12756 (struct tracepoint): New field `compiled_cond'.
12757 (do_action_at_tracepoint): Clear compiled_cond.
12758 (get_trace_state_variable_value, set_trace_state_variable_value):
12759 Export in the IPA.
12760 (condition_true_at_tracepoint): If there's a compiled condition,
12761 run that.
12762 (current_insn_ptr, emit_error): New globals.
12763 (struct bytecode_address): New.
12764 (get_raw_reg_func_addr): New.
12765 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12766 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12767 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12768 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12769 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12770 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12771 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12772 (compile_tracepoint_condition, compile_bytecodes): New.
12773 * target.h (emit_ops): Forward declare.
12774 (struct target_ops): New field emit_ops.
12775 (target_emit_ops): New.
12776 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12777 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12778 * linux-low.c (linux_emit_ops): New.
12779 (linux_target_ops): Install it.
12780 * linux-low.h (struct linux_target_ops): New field emit_ops.
12781
92b72907
UW
127822010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12783
12784 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12785 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12786
fa593d66
PA
127872010-06-01 Pedro Alves <pedro@codesourcery.com>
12788 Stan Shebs <stan@codesourcery.com>
12789
12790 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12791 (all): Depend on $(extra_libraries).
12792 (install-only): Install the IPA.
12793 (IPA_OBJS, IPA_LIB): New.
12794 (clean): Remove the IPA lib.
12795 (IPAGENT_CFLAGS): New.
12796 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12797 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12798 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12799 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12800 * configure.ac: Check for atomic builtins support in the compiler.
12801 (IPA_DEPFILES, extra_libraries): Define.
12802 * configure.srv (ipa_obj): Add description.
12803 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12804 (i[34567]86-*-linux*): Set ipa_obj.
12805 (x86_64-*-linux*): Set ipa_obj.
12806 * linux-low.c (stabilizing_threads): New.
12807 (supports_fast_tracepoints): New.
12808 (linux_detach): Stabilize threads before detaching.
12809 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12810 the lwp is either not stabilizing, or is moving out of a jump pad.
12811 (linux_fast_tracepoint_collecting): New.
12812 (maybe_move_out_of_jump_pad): New.
12813 (enqueue_one_deferred_signal): New.
12814 (dequeue_one_deferred_signal): New.
12815 (linux_wait_for_event_1): If moving out of a jump pad, defer
12816 pending signals to later.
12817 (linux_stabilize_threads): New.
12818 (linux_wait_1): Check if threads need moving out of jump pads, and
12819 do it if so.
12820 (stuck_in_jump_pad_callback): New.
12821 (move_out_of_jump_pad_callback): New.
12822 (lwp_running): New.
12823 (linux_resume_one_lwp): Handle moving out of jump pads.
12824 (linux_set_resume_request): Dequeue deferred signals.
12825 (need_step_over_p): Also step over fast tracepoint jumps.
12826 (start_step_over): Also uninsert fast tracepoint jumps.
12827 (finish_step_over): Also reinsert fast tracepoint jumps.
12828 (linux_install_fast_tracepoint_jump): New.
12829 (linux_target_ops): Install linux_stabilize_threads and
12830 linux_install_fast_tracepoint_jump_pad.
12831 * linux-low.h (linux_target_ops) <get_thread_area,
12832 install_fast_tracepoint_jump_pad>: New fields.
12833 (struct lwp_info) <collecting_fast_tracepoint,
12834 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12835 (linux_get_thread_area): Declare.
12836 * linux-x86-low.c (jump_insn): New.
12837 (x86_get_thread_area): New.
12838 (append_insns): New.
12839 (push_opcode): New.
12840 (amd64_install_fast_tracepoint_jump_pad): New.
12841 (i386_install_fast_tracepoint_jump_pad): New.
12842 (x86_install_fast_tracepoint_jump_pad): New.
12843 (the_low_target): Install x86_get_thread_area and
12844 x86_install_fast_tracepoint_jump_pad.
12845 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12846 (struct fast_tracepoint_jump): New.
12847 (fast_tracepoint_jump_insn): New.
12848 (fast_tracepoint_jump_shadow): New.
12849 (find_fast_tracepoint_jump_at): New.
12850 (fast_tracepoint_jump_here): New.
12851 (delete_fast_tracepoint_jump): New.
12852 (set_fast_tracepoint_jump): New.
12853 (uninsert_fast_tracepoint_jumps_at): New.
12854 (reinsert_fast_tracepoint_jumps_at): New.
12855 (set_breakpoint_at): Use write_inferior_memory.
12856 (uninsert_raw_breakpoint): Use write_inferior_memory.
12857 (check_mem_read): Mask out fast tracepoint jumps.
12858 (check_mem_write): Mask out fast tracepoint jumps.
12859 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12860 (set_fast_tracepoint_jump): Declare.
12861 (delete_fast_tracepoint_jump)
12862 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12863 (reinsert_fast_tracepoint_jumps_at): Declare.
12864 * regcache.c: Don't compile many functions when building the
12865 in-process agent library.
12866 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12867 the register buffer in the heap.
12868 (free_register_cache): If the register buffer isn't owned by the
12869 regcache, don't free it.
12870 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12871 pre-existing register caches.
12872 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12873 type.
12874 (convert_ascii_to_int): : Constify `from' parameter type.
12875 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12876 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12877 the needed buffer in-place.
12878 (relocate_instruction): New.
12879 * server.c (handle_query) <qSymbols>: If the target supports
12880 tracepoints, give it a chance of looking up symbols. Report
12881 support for fast tracepoints.
12882 (handle_status): Stabilize threads.
12883 (process_serial_event): Adjust.
12884 * server.h (struct fast_tracepoint_jump): Forward declare.
12885 (struct process_info) <fast_tracepoint_jumps>: New field.
12886 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12887 (decode_X_packet, decode_M_packet): Adjust.
12888 (relocate_instruction): Declare.
12889 (in_process_agent_loaded): Declare.
12890 (tracepoint_look_up_symbols): Declare.
12891 (struct fast_tpoint_collect_status): Declare.
12892 (fast_tracepoint_collecting): Declare.
12893 (force_unlock_trace_buffer): Declare.
12894 (handle_tracepoint_bkpts): Declare.
12895 (initialize_low_tracepoint)
12896 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12897 * target.h (struct target_ops) <stabilize_threads,
12898 install_fast_tracepoint_jump_pad>: New fields.
12899 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12900 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12901 [HAVE_STDINT_H]: Include stdint.h.
12902 (trace_debug_1): Rename to ...
12903 (trace_vdebug): ... this.
12904 (trace_debug): Rename to ...
12905 (trace_debug_1): ... this. Add `level' parameter.
12906 (trace_debug): New.
12907 (ATTR_USED, ATTR_NOINLINE): New.
12908 (IP_AGENT_EXPORT): New.
12909 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12910 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12911 (about_to_request_buffer_space, trace_buffer_is_full)
12912 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12913 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12914 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12915 (traceframe_write_count, traceframes_created)
12916 (trace_state_variables)
12917 New renaming defines.
12918 (struct ipa_sym_addresses): New.
12919 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12920 (symbol_list): New.
12921 (ipa_sym_addrs): New.
12922 (all_tracepoint_symbols_looked_up): New.
12923 (in_process_agent_loaded): New.
12924 (write_e_ipa_not_loaded): New.
12925 (maybe_write_ipa_not_loaded): New.
12926 (tracepoint_look_up_symbols): New.
12927 (debug_threads) [IN_PROCESS_AGENT]: New.
12928 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12929 (UNKNOWN_SIDE_EFFECTS): New.
12930 (stop_tracing): New.
12931 (flush_trace_buffer): New.
12932 (stop_tracing_bkpt): New.
12933 (flush_trace_buffer_bkpt): New.
12934 (read_inferior_integer): New.
12935 (read_inferior_uinteger): New.
12936 (read_inferior_data_pointer): New.
12937 (write_inferior_data_pointer): New.
12938 (write_inferior_integer): New.
12939 (write_inferior_uinteger): New.
12940 (struct collect_static_trace_data_action): Delete.
12941 (enum tracepoint_type): New.
12942 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12943 <actions_str, step_actions, step_actions_str>: Only include in
12944 GDBserver.
fa593d66
PA
12945 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12946 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12947 (tracepoints): Use IP_AGENT_EXPORT.
12948 (last_tracepoint): Don't include in the IPA.
12949 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12950 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12951 (alloced_trace_state_variables): New.
12952 (trace_state_variables): Use IP_AGENT_EXPORT.
12953 (traceframe_t): Delete unused variable.
12954 (circular_trace_buffer): Don't include in the IPA.
12955 (trace_buffer_start): Delete.
12956 (struct trace_buffer_control): New.
12957 (trace_buffer_free): Delete.
12958 (struct ipa_trace_buffer_control): New.
12959 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12960 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12961 New.
12962 (trace_buffer_ctrl): New.
12963 (TRACE_BUFFER_CTRL_CURR): New.
12964 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12965 Reimplement as macros.
12966 (trace_buffer_wrap): Delete.
12967 (traceframe_write_count, traceframe_read_count)
12968 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12969 (struct tracepoint_hit_ctx) <type>: New field.
12970 (struct fast_tracepoint_ctx): New.
12971 (memory_barrier): New.
12972 (cmpxchg): New.
12973 (record_tracepoint_error): Update atomically in the IPA.
12974 (clear_inferior_trace_buffer): New.
12975 (about_to_request_buffer_space): New.
12976 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12977 updating the same buffer.
12978 (add_tracepoint): Default the tracepoint's type to trap
12979 tracepoint, and orig_size to -1.
12980 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12981 internal variables.
12982 (create_trace_state_variable): New parameter `gdb'. Handle it.
12983 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12984 (cmd_qtdp): Handle fast tracepoints.
12985 (cmd_qtdv): Adjust.
12986 (max_jump_pad_size): New.
12987 (gdb_jump_pad_head): New.
12988 (get_jump_space_head): New.
12989 (claim_jump_space): New.
12990 (sort_tracepoints): New.
12991 (MAX_JUMP_SIZE): New.
12992 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12993 IPA.
12994 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12995 support. Upload fast traceframes, and delete internal IPA
12996 breakpoints.
12997 (stop_tracing_handler): New.
12998 (flush_trace_buffer_handler): New.
12999 (cmd_qtstop): Upload fast tracepoints.
13000 (response_tracepoint): Handle fast tracepoints.
13001 (tracepoint_finished_step): Upload fast traceframes. Set the
13002 tracepoint hit context's tracepoint type.
13003 (handle_tracepoint_bkpts): New.
13004 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13005 type. Add comment about fast tracepoints.
13006 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13007 non-existing action_str field.
13008 (get_context_regcache): Handle fast tracepoints.
13009 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13010 to the regcache.
13011 (fast_tracepoint_from_jump_pad_address): New.
13012 (fast_tracepoint_from_ipa_tpoint_address): New.
13013 (collecting_t): New.
13014 (force_unlock_trace_buffer): New.
13015 (fast_tracepoint_collecting): New.
13016 (collecting): New.
13017 (gdb_collect): New.
13018 (write_inferior_data_ptr): New.
13019 (target_tp_heap): New.
13020 (target_malloc): New.
13021 (download_agent_expr): New.
13022 (UALIGN): New.
13023 (download_tracepoints): New.
13024 (download_trace_state_variables): New.
13025 (upload_fast_traceframes): New.
13026 (IPA_FIRST_TRACEFRAME): New.
13027 (IPA_NEXT_TRACEFRAME_1): New.
13028 (IPA_NEXT_TRACEFRAME): New.
13029 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13030 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13031 (gdb_jump_pad_buffer_end): New.
13032 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13033 (initialize_tracepoint): Adjust.
13034 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13035 buffer. Initialize the low module.
13036 * utils.c (PREFIX, TOOLNAME): New.
13037 (malloc_failure): Use PREFIX.
13038 (error): In the IPA, an error causes an exit.
13039 (fatal, warning): Use PREFIX.
13040 (internal_error): Use TOOLNAME.
13041 (NUMCELLS): Increase to 10.
13042 * configure, config.in: Regenerate.
13043
d149dd1d
PA
130442010-06-01 Pedro Alves <pedro@codesourcery.com>
13045
13046 * server.c (handle_query) <qSupported>: Do two passes over the
13047 qSupported string to avoid nesting strtok.
13048
f6528abd
JK
130492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13050
13051 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13052 (CDEPS): New.
13053 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13054 -Wl,--dynamic-list.
13055 * configure: Regenerate.
13056 * proc-service.list: New.
13057
ca2a87a0
JK
130582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13059
13060 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13061 New comment.
13062
363a6e9f
OS
130632010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13064
13065 * gdbreplay.c (remote_open): Check error return from socket() call by
13066 its equality to -1 not by it being negative.
13067 * remote-utils.c (remote_open): Likewise.
13068
d23b6cb1
PA
130692010-05-23 Pedro Alves <pedro@codesourcery.com>
13070
13071 * config.h: Regenerate.
13072
28d3cf85
MK
130732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13074
13075 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13076 doesn't provide PTRACE_GET_THREAD_AREA.
13077
fea36a59
MK
130782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13079
13080 * linux-m68k-low.c: Include <asm/ptrace.h>
13081 (ps_get_thread_area): Implement.
13082
24b066ba
DE
130832010-05-03 Doug Evans <dje@google.com>
13084
13085 * event-loop.c (struct callback_event): New struct.
13086 (callback_list): New global.
13087 (append_callback_event, delete_callback_event): New functions.
13088 (process_callback): New function.
13089 (start_event_loop): Call it.
13090 * remote-utils.c (NOT_SCHEDULED): Define.
13091 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13092 moved out of readchar.
13093 (readchar): Rewrite. Call reschedule before returning.
13094 (reset_readchar): New function.
13095 (remote_close): Call it.
13096 (process_remaining, reschedule): New functions.
13097 * server.h (callback_handler_func): New typedef.
13098 (append_callback_event, delete_callback_event): Declare.
13099
9836d6ea
PA
131002010-05-03 Pedro Alves <pedro@codesourcery.com>
13101
13102 * proc-service.c (ps_pglobal_lookup): Use
13103 thread_db_look_up_one_symbol.
13104 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13105 parameter. Use it instead of all_symbols_looked_up.
13106 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13107 field.
13108 (all_symbols_looked_up): Don't declare.
13109 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13110 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13111 field.
13112 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13113 Set all_symbols_looked_up here.
13114 (thread_db_look_up_one_symbol): New.
13115 (thread_db_get_tls_address): Adjust.
13116 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13117 thread_db object on the heap, and tentatively set it in the
13118 process structure.
13119 (thread_db_init): Don't set all_symbols_looked_up here.
13120 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13121
7984d532
PA
131222010-05-03 Pedro Alves <pedro@codesourcery.com>
13123
13124 * linux-low.c (linux_kill, linux_detach): Adjust.
13125 (status_pending_p_callback): Remove redundant statement. Check
13126 for !TARGET_WAITIKIND_IGNORE, instead of
13127 TARGET_WAITKIND_STOPPED.
13128 (handle_tracepoints): Make sure LWP is locked. Adjust.
13129 (linux_wait_for_event_1): Adjust.
13130 (linux_cancel_breakpoints): New.
13131 (unsuspend_one_lwp): New.
13132 (unsuspend_all_lwps): New.
13133 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13134 (send_sigstop_callback): Change return type to int, add new
13135 `except' parameter and handle it.
13136 (suspend_and_send_sigstop_callback): New.
13137 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13138 pass them down. If SUSPEND, also increment the lwp's suspend
13139 count.
13140 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13141 (need_step_over_p): Don't consider suspended LWPs.
13142 (start_step_over): Adjust.
13143 (proceed_one_lwp): Change return type to int, add new `except'
13144 parameter and handle it.
13145 (unsuspend_and_proceed_one_lwp): New.
13146 (proceed_all_lwps): Use find_inferior instead of
13147 for_each_inferior.
13148 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13149 also decrement the suspend count of LWPs. Pass `except' down,
13150 instead of hacking its suspend count.
13151 (linux_pause_all): Add `freeze' parameter. Adjust.
13152 (linux_unpause_all): New.
13153 (linux_target_ops): Install linux_unpause_all.
13154 * server.c (handle_status): Adjust.
13155 * target.h (struct target_ops): New fields `unpause_all' and
13156 `cancel_breakpoints'. Add new parameter to `pause_all'.
13157 (pause_all): Add new `freeze' parameter.
13158 (unpause_all): New.
13159 (cancel_breakpoints): New.
13160 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13161 cancel breakpoints.
13162 (cmd_qtstart): Pause threads.
13163 (stop_tracing): Pause threads, and cancel breakpoints.
13164 * win32-low.c (win32_target_ops): Adjust.
13165
e471f25b
PA
131662010-05-03 Pedro Alves <pedro@codesourcery.com>
13167
13168 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13169 the inferior right away from here...
13170 (linux_wait_1): ... to here, and adjust to check the thread's
13171 last_resume_kind instead of the lwp's step or stop_expected flags.
13172
1915ef4f
PA
131732010-05-02 Pedro Alves <pedro@codesourcery.com>
13174
13175 * README: Use consistent `GDB' and `GDBserver' spellings.
13176
f9e39928
PA
131772010-05-02 Pedro Alves <pedro@codesourcery.com>
13178
13179 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13180 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13181 (linux_detach_one_lwp): Assume the lwp is stopped.
13182 (any_thread_of): Delete.
13183 (linux_detach): Stop all lwps here. Don't blindly delete all
13184 breakpoints.
13185 (delete_lwp_callback): New.
13186 (linux_mourn): Delete all lwps of the process that is gone.
13187 (linux_wait_1): Don't delete the last lwp of the process here.
13188 * mem-break.h (mark_breakpoints_out): Declare.
13189 * mem-break.c (mark_breakpoints_out): New.
13190 (free_all_breakpoints): Use it.
13191 * server.c (handle_target_event): If the process is gone, mark
13192 breakpoints out.
13193 * thread-db.c (struct thread_db) <create_bp>: New field.
13194 (thread_db_enable_reporting): Fix prototype. Store a thread event
13195 breakpoint reference in the thread_db struct.
13196 (thread_db_load_search): Clear the thread_db object.
13197 (try_thread_db_load_1): Ditto.
13198 (switch_to_process): New.
13199 (disable_thread_event_reporting): Use it.
13200 (remove_thread_event_breakpoints): New.
13201 (thread_db_detach, thread_db_mourn): Use it.
13202
1e7fc18c
PA
132032010-05-01 Pedro Alves <pedro@codesourcery.com>
13204
13205 * linux-low.c (linux_enable_event_reporting): New.
13206 (linux_wait_for_event_1, handle_extended_wait): Use it.
13207
02fc4de7
PA
132082010-04-30 Pedro Alves <pedro@codesourcery.com>
13209
13210 * linux-low.c (linux_kill_one_lwp, linux_kill)
13211 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13212 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13213 SIGSTOP even if the LWP is stopped.
13214 (send_sigstop_callback): New.
13215 (stop_all_lwps): Use send_sigstop_callback instead.
13216 (linux_resume_one_thread): Adjust.
13217 (proceed_one_lwp): Still proceed an LWP that the client has
13218 requested to stop, if we haven't reported it as stopped yet. Make
13219 sure that LWPs the client want stopped, have a pending SIGSTOP.
13220
bc3b5632
DE
132212010-04-26 Doug Evans <dje@google.com>
13222
ae1ada35
DE
13223 * server.c (handle_general_set): Make static.
13224
bc3b5632
DE
13225 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13226 Print received char after testing for error/eof instead of before.
13227 (input_interrupt): Tweak comment.
13228
65730243
DE
132292010-04-23 Doug Evans <dje@google.com>
13230
13231 * server.c (start_inferior): Print inferior argv if --debug.
13232
a8ae7dc0
AR
132332010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13234
13235 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13236 * nto-x86-low.c: Include server.h
13237
1c07cc19
PM
132382010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13239
13240 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13241 be consistent with other sources of this directory.
13242 (init_registers_amd64): Correct name of source file of this function
13243 in the comment.
13244
e0a61e09
PM
132452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13246
13247 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13248 64-bit executables.
13249
54709339
PM
132502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13251
13252 * win32-i386-low.c: Add 64-bit support.
13253 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13254 (init_registers_amd64): Declare.
13255 (mappings): Add 64-bit version of array.
13256 (init_windows_x86): New function.
13257 (the_low_target): Change init_arch field to init_windows_x86.
13258
e8f0053d
PM
132592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13260
13261 * win32-low.c: Adapt to support also 64-bit architecture.
13262 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13263 (get_image_name): Use SIZE_T type for local variable `done'.
13264 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13265 (toolhelp_get_dll_name): Idem.
13266 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13267 Use uintptr_t typecast to avoid warning.
13268 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13269 (handle_exception): Use phex_nz to avoid warning.
13270 (win32_wait): Remove unused local variable `process'.
13271
c481e77e
PM
132722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13273
13274 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13275 `amd64-avx.o'.
13276
12ea4b69
PM
132772010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13278
13279 * configure.ac: Use `ws2_32' library for srv_mingw.
13280 * configure: Regenerate.
13281 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13282 * remote-utils.c: Likewise.
13283
f6d1620c
L
132842010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13285
13286 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13287 if __x86_64__ is defined.
13288
8e642873
PM
132892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13290
13291 * configure: Regenerate.
13292
711e434b
PM
132932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13294
13295 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13296 * target.h (target_ops): New get_tib_address field.
13297 * win32-low.h (win32_thread_info): Add thread_local_base field.
13298 * win32-low.c (child_add_thread): Add tlb argument.
13299 Set thread_local_base field to TLB.
13300 (get_child_debug_event): Adapt to child_add_thread change.
13301 (win32_get_tib_address): New function.
13302 (win32_target_ops): Set get_tib_address field to
13303 win32_get_tib_address.
13304 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13305
505106cd
PA
133062010-04-12 Pedro Alves <pedro@codesourcery.com>
13307
505106cd
PA
13308 * linux-low.c (linux_mourn): Also remove the process.
13309 * server.c (handle_target_event): Don't remove the process here.
13310 * nto-low.c (nto_mourn): New.
13311 (nto_target_ops): Install it.
13312 * spu-low.c (spu_mourn): New.
13313 (spu_target_ops): Install it.
13314 * win32-low.c (win32_mourn): New.
13315 (win32_target_ops): Install it.
13316
e8470a06
PA
133172010-04-12 Pedro Alves <pedro@codesourcery.com>
13318
13319 * server.h (buffer_xml_printf): Remove redundant `;'.
13320
45ba0d02
PA
133212010-04-12 Pedro Alves <pedro@codesourcery.com>
13322
13323 * regcache.c (set_register_cache): Invalidate regcaches before
13324 changing the register cache layout.
13325 (regcache_invalidate_one): Allow a NULL regcache.
13326 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13327 regcaches before changing the register cache layout or the target
13328 regsets.
13329
59e04013
L
133302010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13331
13332 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13333 variable warning on Linux/x86-64.
13334
8336d594
PA
133352010-04-11 Pedro Alves <pedro@codesourcery.com>
13336
13337 GDBserver disconnected tracing support.
13338
13339 * linux-low.c (linux_remove_process): Delete.
13340 (add_lwp): Don't set last_resume_kind here.
13341 (linux_kill): Use `mourn'.
13342 (linux_detach): Use `thread_db_detach', and `mourn'.
13343 (linux_mourn): New.
13344 (linux_attach_lwp_1): Adjust comment.
13345 (linux_attach): last_resume_kind moved the thread_info; adjust.
13346 (status_pending_p_callback): Adjust.
13347 (linux_wait_for_event_1): Adjust.
13348 (count_events_callback, select_singlestep_lwp_callback)
13349 (select_event_lwp_callback, cancel_breakpoints_callback)
13350 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13351 (proceed_one_lwp): Adjust.
13352 (linux_async): Add debug output.
13353 (linux_thread_stopped): New.
13354 (linux_pause_all): New.
13355 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13356 linux_pause_all.
13357 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13358 (thread_db_free): Delete declaration.
13359 (thread_db_detach, thread_db_mourn): Declare.
13360 * thread-db.c (thread_db_init): Use thread_db_mourn.
13361 (thread_db_free): Delete, split in two.
13362 (disable_thread_event_reporting): New.
13363 (thread_db_detach): New.
13364 (thread_db_mourn): New.
13365
13366 * server.h (struct thread_info) <last_resume_kind>: New field.
13367 <attached>: Add comment.
13368 <gdb_detached>: New field.
13369 (handler_func): Change return type to int.
13370 (handle_serial_event, handle_target_event): Ditto.
13371 (gdb_connected): Declare.
13372 (tracing): Delete.
13373 (disconnected_tracing): Declare.
13374 (stop_tracing): Declare.
13375
13376 * server.c (handle_query) <qSupported>: Report support for
13377 disconnected tracing.
13378 (queue_stop_reply_callback): Account for running threads.
13379 (gdb_wants_thread_stopped): New.
13380 (gdb_wants_all_threads_stopped): New.
13381 (gdb_reattached_process): New.
13382 (handle_status): Clear the `gdb_detached' flag of all processes.
13383 In all-stop, stop all threads.
13384 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13385 (process_serial_event): If the remote connection breaks, or if an
13386 exit was forced with "monitor exit", force an event loop exit.
13387 Handle disconnected tracing on detach.
13388 (handle_serial_event): Adjust.
13389 (handle_target_event): If GDB isn't connected, forward events back
13390 to the inferior, unless the last process exited, in which case,
13391 exit gdbserver. Adjust interface.
13392
13393 * remote-utils.c (remote_open): Don't block in accept. Instead
13394 register an event loop source on the listen socket file
13395 descriptor. Refactor bits into ...
13396 (listen_desc): ... this new global.
13397 (gdb_connected): ... this new function.
13398 (enable_async_notification): ... this new function.
13399 (handle_accept_event): ... this new function.
13400 (remote_close): Clear remote_desc.
13401
13402 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13403
13404 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13405 New fields.
13406 (mourn_inferior): Define.
13407 (target_process_qsupported): Avoid the dangling else problem.
13408 (thread_stopped): Define.
13409 (pause_all): Define.
13410 (target_waitstatus_to_string): Declare.
13411 * target.c (target_waitstatus_to_string): New.
13412
13413 * tracepoint.c (tracing): Make extern.
13414 (disconnected_tracing): New.
13415 (stop_tracing): Make extern. Handle tracing stops due to GDB
13416 disconnecting.
13417 (cmd_qtdisconnected): New.
13418 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13419 (handle_tracepoint_general_set): Handle QTDisconnected.
13420
13421 * event-loop.c (event_handler_func): Change return type to int.
13422 (process_event): Bail out if the event handler wants the event
13423 loop to stop.
13424 (handle_file_event): Ditto.
13425 (start_event_loop): Bail out if the event handler wants the event
13426 loop to stop.
13427
13428 * nto-low.c (nto_target_ops): Adjust.
13429 * spu-low.c (spu_wait): Don't remove the process here.
13430 (spu_target_ops): Adjust.
13431 * win32-low.c (win32_wait): Don't remove the process here.
13432 (win32_target_ops): Adjust.
13433
5d267c4c
PA
134342010-04-11 Pedro Alves <pedro@codesourcery.com>
13435
13436 * regcache.c (realloc_register_cache): Invalidate inferior's
13437 regcache before recreating it.
13438
623ccd72
PA
134392010-04-09 Pedro Alves <pedro@codesourcery.com>
13440
13441 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13442
219f2f23
PA
134432010-04-09 Stan Shebs <stan@codesourcery.com>
13444 Pedro Alves <pedro@codesourcery.com>
13445
13446 * server.h (LONGEST): New.
13447 (struct thread_info) <while_stepping>: New field.
13448 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13449 Declare.
13450 (initialize_tracepoint, handle_tracepoint_general_set)
13451 (handle_tracepoint_query, tracepoint_finished_step)
13452 (tracepoint_was_hit, release_while_stepping_state_list):
13453 (current_traceframe): Declare.
13454 * server.c (handle_general_set): Handle tracepoint packets.
13455 (read_memory): New.
13456 (write_memory): New.
13457 (handle_search_memory_1): Use read_memory.
13458 (handle_query): Report support for conditional tracepoints, trace
13459 state variables, and tracepoint sources. Handle tracepoint
13460 queries.
13461 (main): Initialize the tracepoints module.
13462 (process_serial_event): Handle traceframe reads/writes.
13463
13464 * linux-low.c (handle_tracepoints): New.
13465 (linux_wait_1): Call it.
13466 (linux_resume_one_lwp): Handle while-stepping.
13467 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13468 (linux_target_ops): Install them.
13469 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13470 New field.
13471 * linux-x86-low.c (x86_supports_tracepoints): New.
13472 (the_low_target). Install it.
13473
13474 * mem-break.h (delete_breakpoint): Declare.
13475 * mem-break.c (delete_breakpoint): Make external.
13476
13477 * target.h (struct target_ops): Add `supports_tracepoints',
13478 `read_pc', and `write_pc' fields.
13479 (target_supports_tracepoints): Define.
13480 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13481 (phex_nz): New.
13482
13483 * regcache.h (struct regcache) <registers_owned>: New field.
13484 (init_register_cache, regcache_cpy): Declare.
13485 (regcache_read_pc, regcache_write_pc): Declare.
13486 (register_cache_size): Declare.
13487 (supply_regblock): Declare.
13488 * regcache.c (init_register_cache): New.
13489 (new_register_cache): Use it.
13490 (regcache_cpy): New.
13491 (register_cache_size): New.
13492 (supply_regblock): New.
13493 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13494
219f2f23
PA
13495 * tracepoint.c: New.
13496
13497 * Makefile.in (OBS): Add tracepoint.o.
13498 (tracepoint.o): New rule.
13499
3a13a53b
L
135002010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13501
13502 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13503 (i386-mmx.o): New.
13504 (i386-mmx.c): Likewise.
13505 (i386-mmx-linux.o): Likewise.
13506 (i386-mmx-linux.c): Likewise.
13507
13508 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13509 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13510 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13511 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13512
13513 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13514 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13515 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13516
1570b33e
L
135172010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13518
13519 * Makefile.in (clean): Updated.
13520 (i386-avx.o): New.
13521 (i386-avx.c): Likewise.
13522 (i386-avx-linux.o): Likewise.
13523 (i386-avx-linux.c): Likewise.
13524 (amd64-avx.o): Likewise.
13525 (amd64-avx.c): Likewise.
13526 (amd64-avx-linux.o): Likewise.
13527 (amd64-avx-linux.c): Likewise.
13528
13529 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13530 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13531 (srv_amd64_regobj): Add amd64-avx.o.
13532 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13533 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13534 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13535 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13536 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13537 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13538 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13539
13540 * i387-fp.c: Include "i386-xstate.h".
13541 (i387_xsave): New.
13542 (i387_cache_to_xsave): Likewise.
13543 (i387_xsave_to_cache): Likewise.
13544 (x86_xcr0): Likewise.
13545
13546 * i387-fp.h (i387_cache_to_xsave): Likewise.
13547 (i387_xsave_to_cache): Likewise.
13548 (x86_xcr0): Likewise.
13549
13550 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13551 * linux-crisv32-low.c (target_regsets): Likewise.
13552 * linux-m68k-low.c (target_regsets): Likewise.
13553 * linux-mips-low.c (target_regsets): Likewise.
13554 * linux-ppc-low.c (target_regsets): Likewise.
13555 * linux-s390-low.c (target_regsets): Likewise.
13556 * linux-sh-low.c (target_regsets): Likewise.
13557 * linux-sparc-low.c (target_regsets): Likewise.
13558 * linux-xtensa-low.c (target_regsets): Likewise.
13559
13560 * linux-low.c: Include <sys/uio.h>.
13561 (regsets_fetch_inferior_registers): Support nt_type.
13562 (regsets_store_inferior_registers): Likewise.
13563 (linux_process_qsupported): New.
13564 (linux_target_ops): Add linux_process_qsupported.
13565
13566 * linux-low.h (regset_info): Add nt_type.
13567 (linux_target_ops): Add process_qsupported.
13568
13569 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13570 and <sys/uio.h>.
13571 (init_registers_i386_avx_linux): New.
13572 (init_registers_amd64_avx_linux): Likewise.
13573 (xmltarget_i386_linux_no_xml): Likewise.
13574 (xmltarget_amd64_linux_no_xml): Likewise.
13575 (PTRACE_GETREGSET): Likewise.
13576 (PTRACE_SETREGSET): Likewise.
13577 (x86_fill_xstateregset): Likewise.
13578 (x86_store_xstateregset): Likewise.
13579 (use_xml): Likewise.
13580 (x86_linux_update_xmltarget): Likewise.
13581 (x86_linux_process_qsupported): Likewise.
13582 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13583 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13584 init_registers_i386_linux here. Call
13585 x86_linux_update_xmltarget.
13586 (the_low_target): Add x86_linux_process_qsupported.
13587
13588 * server.c (handle_query): Call target_process_qsupported.
13589
13590 * target.h (target_ops): Add process_qsupported.
13591 (target_process_qsupported): New.
13592
fc7238bb
PA
135932010-04-03 Pedro Alves <pedro@codesourcery.com>
13594
13595 * inferiors.c (add_thread): Set last_status kind to
13596 TARGET_WAITKIND_IGNORE.
13597 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13598 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13599 (linux_wait_1): Move `thread' local definition to block that uses
13600 it. Don't NULL initialize `event_child'.
13601 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13602 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13603 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13604
bdabb078
PA
136052010-04-01 Pedro Alves <pedro@codesourcery.com>
13606
13607 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13608 an extended waitstatus, or by a watchpoint.
13609 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13610 thread was stepping or has been stopped by a watchpoint.
13611
d3bbe7a0
PA
136122010-04-01 Pedro Alves <pedro@codesourcery.com>
13613
13614 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13615 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13616 of another, then delete the previous, and validate all
13617 breakpoints.
13618 (validate_inserted_breakpoint): New.
13619 (delete_disabled_breakpoints): New.
13620 (validate_breakpoints): New.
13621 (check_mem_read): Validate breakpoints before trusting their
13622 shadow. Delete disabled breakpoints.
13623 (check_mem_write): Validate breakpoints before trusting they
13624 should be inserted. Delete disabled breakpoints.
13625 * mem-break.h (validate_breakpoints):
13626 * server.c (handle_query): Validate breakpoints when we see a
13627 qSymbol query.
13628
8b07ae33
PA
136292010-04-01 Pedro Alves <pedro@codesourcery.com>
13630
13631 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13632 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13633 if we could tell there's a GDB breakpoint at stop_pc.
13634 (need_step_over_p): Don't do a step over if we find a GDB
13635 breakpoint at the resume PC.
13636
13637 * mem-break.c (struct raw_breakpoint): New.
13638 (enum bkpt_type): New type `gdb_breakpoint'.
13639 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13640 fields. New field `raw'.
13641 (find_raw_breakpoint_at): New.
13642 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13643 breakpoint instead.
13644 (set_breakpoint_at): Adjust.
13645 (delete_raw_breakpoint): New.
13646 (release_breakpoint): New.
13647 (delete_breakpoint): Rename to...
13648 (delete_breakpoint_1): ... this. Add proc parameter. Use
13649 release_breakpoint. Return ENOENT.
13650 (delete_breakpoint): Reimplement.
13651 (find_breakpoint_at): Delete.
13652 (find_gdb_breakpoint_at): New.
13653 (delete_breakpoint_at): Delete.
13654 (set_gdb_breakpoint_at): New.
13655 (delete_gdb_breakpoint_at): New.
13656 (gdb_breakpoint_here): New.
13657 (set_reinsert_breakpoint): Use release_breakpoint.
13658 (uninsert_breakpoint): Rename to ...
13659 (uninsert_raw_breakpoint): ... this.
13660 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13661 (reinsert_raw_breakpoint): Change parameter type to
13662 raw_breakpoint.
13663 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13664 instead.
13665 (check_breakpoints): Adjust. Use release_breakpoint.
13666 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13667 (breakpoint_inserted_here): Ditto.
13668 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13669 Don't trust the breakpoint's shadow if it is not inserted.
13670 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13671 (delete_all_breakpoints): Adjust.
13672 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13673 use delete_breakpoint_1.
13674
13675 * mem-break.h (breakpoints_supported): Delete declaration.
13676 (set_gdb_breakpoint_at): Declare.
13677 (gdb_breakpoint_here): Declare.
13678 (delete_breakpoint_at): Delete.
13679 (delete_gdb_breakpoint_at): Declare.
13680
13681 * server.h (struct raw_breakpoint): Forward declare.
13682 (struct process_info): New field `raw_breakpoints'.
13683
13684 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13685 breakpoints.
13686
6bf5e0ba
PA
136872010-03-24 Pedro Alves <pedro@codesourcery.com>
13688
13689 * linux-low.c (status_pending_p_callback): Fix comment.
13690 (linux_wait_for_event_1): Move most of the internal breakpoint
13691 handling from here...
13692 (linux_wait_1): ... to here.
13693 (count_events_callback): New.
13694 (select_singlestep_lwp_callback): New.
13695 (select_event_lwp_callback): New.
13696 (cancel_breakpoints_callback): New.
13697 (select_event_lwp): New.
13698 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13699 priority to all LWPs that have had events that should be reported
13700 to the client. Cancel breakpoints when about to reporting the
13701 event to the client, not while stopping lwps. No longer cancel
13702 finished single-steps here.
13703 (cancel_finished_single_step): Delete.
13704 (cancel_finished_single_steps): Delete.
13705
414a389f
PA
137062010-03-24 Pedro Alves <pedro@codesourcery.com>
13707
13708 * mem-break.c (enum bkpt_type): New.
13709 (struct breakpoint): New field `type'.
13710 (set_breakpoint_at): Change return type to struct breakpoint
13711 pointer. Set type to `other_breakpoint' by default.
13712 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13713 in the breakpoint list.
13714 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13715 (reinsert_breakpoint): Rename to ...
13716 (reinsert_raw_breakpoint): ... this.
13717 (reinsert_breakpoints_at): Adjust.
13718 * mem-break.h (struct breakpoint): Declare.
13719 (set_breakpoint_at): Change return type to struct breakpoint
13720 pointer.
13721
2280c721
PA
137222010-03-24 Pedro Alves <pedro@codesourcery.com>
13723
13724 * server.c (handle_query): Assign, not compare.
13725
d50171e4
PA
137262010-03-24 Pedro Alves <pedro@codesourcery.com>
13727
13728 Teach linux gdbserver to step-over-breakpoints.
13729
13730 * linux-low.c (can_hardware_single_step): New.
13731 (supports_breakpoints): New.
13732 (handle_extended_wait): If stopping threads, read the stop pc of
13733 the new cloned LWP.
13734 (get_pc): New.
13735 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13736 low target doesn't support retrieving the PC.
13737 (add_lwp): Set last_resume_kind to resume_continue.
13738 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13739 (linux_attach): Don't clear stop_expected. Set the lwp's
13740 last_resume_kind to resume_stop.
13741 (linux_detach_one_lwp): Don't check for removed breakpoints.
13742 (check_removed_breakpoint): Delete.
13743 (status_pending_p): Rename to ...
13744 (status_pending_p_callback): ... this. Don't check for removed
13745 breakpoints. Don't consider threads that are stopped from GDB's
13746 perspective.
13747 (linux_wait_for_lwp): Always read the stop_pc here.
13748 (cancel_breakpoint): New.
13749 (step_over_bkpt): New global.
13750 (linux_wait_for_event_1): Implement stepping over breakpoints.
13751 (gdb_wants_lwp_stopped): New.
13752 (gdb_wants_all_stopped): New.
13753 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13754 single-step traps here. Store the thread's last reported target
13755 wait status.
13756 (send_sigstop): Don't clear stop_expected. Always set it,
13757 instead.
13758 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13759 (cancel_finished_single_step): New.
13760 (cancel_finished_single_steps): New.
13761 (wait_for_sigstop): Don't cancel finished single-step traps here.
13762 (linux_resume_one_lwp): Don't check for removed breakpoints.
13763 Don't set `step' on non-hardware step archs.
13764 (linux_set_resume_request): Ignore resume_stop requests if already
13765 stopping or stopped. Set the lwp's last_resume_kind.
13766 (resume_status_pending_p): Don't check for removed breakpoints.
13767 (need_step_over_p): New.
13768 (start_step_over): New.
13769 (finish_step_over): New.
13770 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13771 requests. Clear the thread's last reported target waitstatus.
13772 Don't use the `suspended' flag. Don't consider pending breakpoints.
13773 (linux_resume): Start a step-over if necessary.
13774 (proceed_one_lwp): New.
13775 (proceed_all_lwps): New.
13776 (unstop_all_lwps): New.
13777 * linux-low.h (struct lwp_info): Rewrite comment for the
13778 `suspended' flag. Add the `stop_pc' field. Delete the
13779 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13780 Add `'last_resume_kind' and `need_step_over' fields.
13781 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13782 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13783 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13784 (set_raw_breakpoint_at): New.
13785 (set_breakpoint_at): Rewrite to use it.
13786 (reinsert_breakpoint_handler): Delete.
13787 (set_reinsert_breakpoint): New.
13788 (reinsert_breakpoint_by_bp): Delete.
13789 (delete_reinsert_breakpoints): New.
13790 (uninsert_breakpoint): Rewrite.
13791 (uninsert_breakpoints_at): New.
13792 (reinsert_breakpoint): Rewrite.
13793 (reinsert_breakpoints_at): New.
13794 (check_breakpoints): Rewrite.
13795 (breakpoint_here): New.
13796 (breakpoint_inserted_here): New.
13797 (check_mem_read): Adjust.
13798 * mem-break.h (breakpoints_supported, breakpoint_here)
13799 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13800 (reinsert_breakpoint_by_bp): Delete declaration.
13801 (delete_reinsert_breakpoints): Declare.
13802 (reinsert_breakpoint): Delete declaration.
13803 (reinsert_breakpoints_at): Declare.
13804 (uninsert_breakpoint): Delete declaration.
13805 (uninsert_breakpoints_at): Declare.
13806 (check_breakpoints): Adjust prototype.
13807 * server.h: Adjust include order.
13808 (struct thread_info): Declare here. Add a `last_status' field.
13809
30ba68cb
MS
138102010-03-23 Michael Snyder <msnyder@vmware.com>
13811
13812 * server.c (crc32): New function.
13813 (handle_query): Add handling for 'qCRC:' request.
13814
b9a881c2
PA
138152010-03-23 Pedro Alves <pedro@codesourcery.com>
13816
13817 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13818 lwp had been stopped by a watchpoint.
13819
e92d13d5
PA
138202010-03-16 Pedro Alves <pedro@codesourcery.com>
13821
13822 * server.h (internal_error): Declare.
13823 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13824 * utils.c (internal_error): New function.
13825
64daa791
AS
138262010-03-15 Andreas Schwab <schwab@redhat.com>
13827
13828 * configure.srv: Fix typo setting srv_regobj.
13829
f52cd8cd
PA
138302010-03-15 Pedro Alves <pedro@codesourcery.com>
13831
13832 * linux-low.c (fetch_register): Avoid passing a non string literal
13833 format to `error'.
13834 (usr_store_inferior_registers): Ditto.
13835
93ae6fdc
PA
138362010-03-14 Pedro Alves <pedro@codesourcery.com>
13837
13838 * linux-low.c (linux_write_memory): Bail out early if peeking
13839 memory failed.
13840
c3adc08c
PA
138412010-03-14 Pedro Alves <pedro@codesourcery.com>
13842
13843 * linux-low.h (struct lwp_info): New fields
13844 `stopped_by_watchpoint' and `stopped_data_address'.
13845 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13846 here, and cache them in the lwp object.
13847 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13848 directly.
13849 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13850 field.
13851 (linux_stopped_by_watchpoint): Rewrite.
13852 (linux_stopped_data_address): Rewrite.
13853
bce522a2
PA
138542010-03-06 Simo Melenius <simo.melenius@iki.fi>
13855
13856 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13857 switching the current inferior, not before.
13858
90884b2b
L
138592010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13860
13861 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13862 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13863 i386-linux.c and amd64-linux.c.
13864 (reg-i386.o): Removed.
13865 (reg-i386.c): Likewise.
13866 (reg-i386-linux.o): Likewise.
13867 (reg-i386-linux.c): Likewise.
13868 (reg-x86-64.o): Likewise.
13869 (reg-x86-64.c): Likewise.
13870 (reg-x86-64-linux.o): Likewise.
13871 (reg-x86-64-linux.c): Likewise.
13872 (i386.o): New.
13873 (i386.c): Likewise.
13874 (i386-linux.o): Likewise.
13875 (i386-linux.c): Likewise.
13876 (amd64.o): Likewise.
13877 (amd64.c): Likewise.
13878 (amd64-linux.o): Likewise.
13879 (amd64-linux.c): Likewise.
13880
13881 * configure.srv (srv_i386_regobj): New.
13882 (srv_i386_linux_regobj): Likewise.
13883 (srv_amd64_regobj): Likewise.
13884 (srv_amd64_linux_regobj): Likewise.
13885 (srv_i386_32bit_xmlfiles): Likewise.
13886 (srv_i386_64bit_xmlfiles): Likewise.
13887 (srv_i386_xmlfiles): Likewise.
13888 (srv_amd64_xmlfiles): Likewise.
13889 (srv_i386_linux_xmlfiles): Likewise.
13890 (srv_amd64_linux_xmlfiles): Likewise.
13891 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13892 srv_xmlfiles to $srv_i386_xmlfiles.
13893 (i[34567]86-*-mingw32ce*): Likewise.
13894 (i[34567]86-*-mingw*): Likewise.
13895 (i[34567]86-*-nto*): Likewise.
13896 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13897 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13898 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13899 (x86_64-*-linux*): Likewise.
13900
13901 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13902 (init_registers_amd64_linux): New.
13903 (x86_arch_setup): Replace init_registers_x86_64_linux with
13904 init_registers_amd64_linux.
13905
193f13e6
MK
139062010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13907
13908 * configure.ac: Check for libdl. If it is not available link against
13909 static libthread_db.
13910 * configure: Regenerate.
13911
85d721b8
PA
139122010-02-22 Pedro Alves <pedro@codesourcery.com>
13913
13914 PR9605
13915
13916 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13917 handing a read watchpoint.
13918 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13919
6076632b
DE
139202010-02-12 Doug Evans <dje@google.com>
13921
13922 * linux-low.c (linux_supports_tracefork_flag): Document.
13923 (linux_look_up_symbols): Add comment.
13924
3327ccf7
L
139252010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13926
13927 * regcache.c (supply_register): Clear regcache if buf is NULL.
13928
0718675c 139292010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13930 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13931
13932 * inferiors.c (find_inferior): Add function documentation.
13933 (unloaded_dll): Handle the case where the unloaded dll has not
13934 been previously registered in the dll list.
13935
177321bd
DJ
139362010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13939 (thumb2_breakpoint): New.
13940 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13941
2b009048
DJ
139422010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13945 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13946 breakpoints.
13947
3be029c7
PA
139482010-01-21 Pedro Alves <pedro@codesourcery.com>
13949
13950 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13951
18f5de3b
JK
139522010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13953
13954 * linux-s390-low.c (s390_collect_ptrace_register)
13955 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13956
3743bb4f
DE
139572010-01-21 Doug Evans <dje@google.com>
13958
14ce3065
DE
13959 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13960 (PTRACE_ARG4_TYPE): New macro.
13961 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13962 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13963 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13964 (usr_store_inferior_registers): Ditto.
13965 (linux_read_memory, linux_write_memory): Ditto.
13966 (linux_test_for_tracefork): Ditto.
13967
3743bb4f
DE
13968 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13969 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13970
8b315be5
PA
139712010-01-21 Pedro Alves <pedro@codesourcery.com>
13972
13973 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13974 target.
13975
85492558
PA
139762010-01-21 Pedro Alves <pedro@codesourcery.com>
13977
13978 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13979 prototype to take a regcache. Adjust.
13980
442ea881
PA
139812010-01-20 Pedro Alves <pedro@codesourcery.com>
13982
13983 * regcache.h (struct thread_info): Forward declare.
13984 (struct regcache): New.
13985 (new_register_cache): Adjust prototype.
13986 (get_thread_regcache): Declare.
13987 (free_register_cache): Adjust prototype.
13988 (registers_to_string, registers_from_string): Ditto.
13989 (supply_register, supply_register_by_name, collect_register)
13990 (collect_register_as_string, collect_register_by_name): Ditto.
13991 * regcache.c (struct inferior_regcache_data): Delete.
13992 (get_regcache): Rename to ...
13993 (get_thread_regcache): ... this. Adjust. Switch inferior before
13994 fetching registers.
13995 (regcache_invalidate_one): Adjust.
13996 (regcache_invalidate): Fix prototype.
13997 (new_register_cache): Return the new register cache.
13998 (free_register_cache): Change prototype.
13999 (realloc_register_cache): Adjust.
14000 (registers_to_string): Change prototype to take a regcache. Adjust.
14001 (registers_from_string): Ditto.
14002 (register_data): Ditto.
14003 (supply_register): Ditto.
14004 (supply_register_by_name): Ditto.
14005 (collect_register): Ditto.
14006 (collect_register_as_string): Ditto.
14007 (collect_register_by_name): Ditto.
14008 * server.c (process_serial_event): Adjust.
14009 * linux-low.h (regset_fill_func, regset_store_func): Change
14010 prototype.
14011 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14012 Change prototype.
14013 * linux-low.c (get_stop_pc): Adjust.
14014 (check_removed_breakpoint): Adjust.
14015 (linux_wait_for_event): Adjust.
14016 (linux_resume_one_lwp): Adjust.
14017 (fetch_register): Add regcache parameter. Adjust.
14018 (usr_store_inferior_registers): Ditto.
14019 (regsets_fetch_inferior_registers): Ditto.
14020 (regsets_store_inferior_registers): Ditto.
14021 (linux_fetch_registers, linux_store_registers): Ditto.
14022 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14023 regcache. Adjust.
43aaf8b6
PA
14024 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14025 Ditto.
442ea881
PA
14026 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14027 prototype to take a regcache.
14028 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14029 * remote-utils.c (convert_ascii_to_int, outreg)
14030 (prepare_resume_reply): Change prototype to take a regcache.
14031 Adjust.
14032 * target.h (struct target_ops) <fetch_registers, store_registers>:
14033 Change prototype to take a regcache.
14034 (fetch_inferior_registers, store_inferior_registers): Change
14035 prototype to take a regcache. Adjust.
14036 * proc-service.c (ps_lgetregs): Adjust.
14037 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14038 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14039 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14040 take a regcache. Adjust.
14041 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14042 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14043 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14044 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14045 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14046 (cris_cannot_fetch_register):
14047 (cris_breakpoint_at): Change prototype to take a regcache.
14048 Adjust.
14049 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14050 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14051 to take a regcache. Adjust.
14052 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14053 Adjust.
14054 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14055 take a regcache. Adjust.
14056 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14057 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14058 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14059 * linux-mips-low.c (mips_get_pc):
14060 (mips_set_pc): Change prototype to take a regcache. Adjust.
14061 (mips_reinsert_addr): Adjust.
14062 (mips_collect_register): Change prototype to take a regcache.
14063 Adjust.
14064 (mips_supply_register):
14065 (mips_collect_register_32bit, mips_supply_register_32bit)
14066 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14067 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14068 * linux-ppc-low.c (ppc_supply_ptrace_register)
14069 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14070 (parse_spufs_run): Adjust.
14071 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14072 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14073 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14074 take a regcache. Adjust.
14075 * linux-s390-low.c (s390_collect_ptrace_register)
14076 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14077 (s390_set_pc): Change prototype to take a regcache. Adjust.
14078 (s390_arch_setup): Adjust.
14079 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14080 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14081 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14082 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14083 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14084 regcache. Adjust.
14085 (sparc_breakpoint_at): Adjust.
14086 * linux-xtensa-low.c (xtensa_fill_gregset):
14087 (xtensa_store_gregset):
14088 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14089 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14090 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14091 prototype to take a regcache. Adjust.
14092 * win32-arm-low.c (arm_fetch_inferior_register)
14093 (arm_store_inferior_register): Change prototype to take a
14094 regcache. Adjust.
14095 * win32-i386-low.c (i386_fetch_inferior_register)
14096 (i386_store_inferior_register): Change prototype to take a
14097 regcache. Adjust.
14098 * win32-low.c (child_fetch_inferior_registers)
14099 (child_store_inferior_registers): Change prototype to take a
14100 regcache. Adjust.
14101 (win32_wait): Adjust.
14102 (win32_fetch_inferior_registers): Change prototype to take a
14103 regcache. Adjust.
14104 (win32_store_inferior_registers): Adjust.
14105 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14106 store_inferior_register>: Change prototype to take a regcache.
14107
60c3d7b0
DE
141082010-01-20 Doug Evans <dje@google.com>
14109
14110 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14111 #ifdef.
14112 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14113 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14114
dc146f7c
VP
141152010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14116
14117 * linux-low.c (linux_core_of_thread): New.
14118 (compare_ints, show_process, list_threads): New.
14119 (linux_qxfer_osdata): Report threads and cores.
14120 (linux_target_op): Register linux_core_of_thread.
14121 * remote-utils.c (prepare_resume_reply): Report the core.
14122 (buffer_xml_printf): Support %d specifier.
14123 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14124 New.
14125 (handle_query): Handle qXfer:threads. Announce availability
14126 thereof.
14127 * target.h (struct target_ops): New field core_of_thread.
14128
7803799a
UW
141292010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14130
14131 * Makefile.in (clean): Remove new generated files.
14132 (reg-s390.o, reg-s390.c): Remove rules.
14133 (reg-s390x.o, reg-s390x.c): Likewise.
14134 (s390-linux32.o, s390-linux32.c): Add rules.
14135 (s390-linux64.o, s390-linux64.c): Likewise.
14136 (s390x-linux64.o, s390x-linux64.c): Likewise.
14137 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14138 * linux-s390-low.c: Include <elf.h>.
14139 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14140 (init_registers_s390): Remove prototype.
14141 (init_registers_s390x): Likewise.
14142 (init_registers_s390_linux32): Add prototype.
14143 (init_registers_s390_linux64): Likewise.
14144 (init_registers_s390x_linux64): Likewise.
14145 (s390_num_regs_3264): New define.
14146 (s390_regmap_3264): New global variable.
14147 (s390_cannot_fetch_register): Remove obsolete check.
14148 (s390_cannot_store_register): Likewise.
14149 (s390_collect_ptrace_register): Handle upper/lower register halves.
14150 (s390_supply_ptrace_register): Likewise.
14151 (s390_fill_gregset): Update to register number changes.
14152 (s390_get_hwcap): New routine.
14153 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14154 Install appropriate regmap and register set.
14155
6e7ffa39
JB
141562010-01-01 Joel Brobecker <brobecker@adacore.com>
14157
14158 * server.c (gdbserver_version): Update copyright year to 2010.
14159 * gdbreplay.c (gdbreplay_version): Likewise.
14160
957f3f49
DE
141612009-12-28 Doug Evans <dje@google.com>
14162
14163 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14164 elf/external.h. Include <elf.h> instead but only if necessary.
14165
ca5c370d
PA
141662009-12-28 Pedro Alves <pedro@codesourcery.com>
14167
14168 * linux-low.c (linux_remove_process): Remove `detaching'
14169 parameter. Don't release/detach from thread_db here.
14170 (linux_kill): Release/detach from thread_db here, ...
14171 (linux_detach): ... and here, before actually detaching.
14172 (linux_wait_1): ... and here, when a process exits.
14173 * thread-db.c (any_thread_of): New.
14174 (thread_db_free): Switch the current inferior to a thread of the
14175 passed in process.
14176
4ee62156
DE
141772009-12-21 Doug Evans <dje@google.com>
14178
d90e6a88
DE
14179 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14180
c5f62d5f
DE
14181 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14182 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14183 warning ifndef __NR_tkill. Move setting of errno there too.
14184 Delete unnecessary resetting of errno after syscall.
14185 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14186
10e86dd7
DE
14187 * configure.ac: Check for dladdr.
14188 * config.in: Regenerate.
14189 * configure: Regenerate.
14190 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14191 (try_thread_db_load): Update.
14192
4ee62156
DE
14193 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14194
00f515da
DE
141952009-12-18 Doug Evans <dje@google.com>
14196
e9464885
DE
14197 * event-loop.c: Include unistd.h if it exists.
14198
07d4f67e
DE
14199 * linux-low.c (my_waitpid): Move definition away from being in
14200 between linux_tracefork_child/linux_test_for_tracefork.
14201
00f515da
DE
14202 * gdb_proc_service.h (psaddr_t): Fix type.
14203 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14204 signature to match glibc.
14205
1de1badb
DE
142062009-12-16 Doug Evans <dje@google.com>
14207
14208 * linux-low.c (linux_read_memory): Fix argument to read.
14209
aeeb81d1
PA
142102009-11-26 Pedro Alves <pedro@codesourcery.com>
14211
14212 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14213 events, don't leave current_inferior pointing at null.
14214
10357975
PA
142152009-11-26 Pedro Alves <pedro@codesourcery.com>
14216
14217 * win32-low.c (LOG): Delete.
14218 (OUTMSG): Output to stderr.
14219 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14220 on compile time LOG macro.
14221 (win32_wait): Fix debug output.
14222
cf6e3471
PA
142232009-11-26 Pedro Alves <pedro@codesourcery.com>
14224
14225 * win32-low.c (win32_add_one_solib): If the dll name is
14226 "ntdll.dll", prepend the system directory to the dll path.
14227
0c85e18e
MK
142282009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14229
14230 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14231
9ac544ce 142322009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14233 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14234
14235 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14236 * configure.ac: Check for __mcoldfire__ and set
14237 gdb_cv_m68k_is_coldfire.
14238 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14239 reg-cf.o and reg-m68k.o.
14240 * configure: Regenerated.
14241
fd7dd3e6
PA
142422009-11-16 Pedro Alves <pedro@codesourcery.com>
14243
14244 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14245 Pass it to thread_db_free.
14246 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14247 proper `detaching' argument to linux_remove_process.
14248 * linux-low.h (thread_db_free): Add `detaching' parameter.
14249 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14250 to thread_db_free.
14251 (thread_db_free): Add `detaching' parameter. Only
14252 call td_ta_clear_event if detaching from process.
14253
75aa492e
MK
142542009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14255
14256 * thread-db.c (thread_db_free): Fix typo.
14257
21e1bee4
PP
142582009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14259
14260 PR gdb/10838
14261 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14262
8838b45e
NS
142632009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14264
14265 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14266 with an i686 compiler.
14267 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14268 needed.
14269 * configure: Rebuilt.
14270
8a35fb51
SL
142712009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14272
14273 PR gdb/10783
14274
14275 * server.c (handle_search_memory_1): Correct read_addr initialization
14276 in loop for searching subsequent chunks.
14277
96f15937
PP
142782009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14279
14280 * configure.ac: New --with-libthread-db option.
14281 * thread-db.c: Allow direct dependence on libthread_db.
14282 (thread_db_free): Adjust.
14283 * config.in: Regenerate.
14284 * configure: Likewise.
889bf7c5 14285
5f7d1694
PP
142862009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14287
14288 PR gdb/10757
14289 * thread-db.c (attach_thread): New function.
14290 (maybe_attach_thread): Return success/failure.
14291 (find_new_threads_callback): Adjust.
889bf7c5
PA
14292 (thread_db_find_new_threads): Loop until no new threads.
14293
88e3b899
PA
142942009-10-13 Pedro Alves <pedro@codesourcery.com>
14295
14296 * proc-service.c (ps_lgetregs): Formatting.
14297
cdbfd419
PP
142982009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14299
14300 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14301 * configure.ac: Adjust.
14302 * linux-low.h (struct process_info_private): Move members to struct
14303 thread_db.
14304 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14305 * linux-low.c (linux_remove_process): Adjust.
14306 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14307 * server.c (handle_query): Move code ...
14308 (handle_monitor_command): ... here. New function.
14309 * target.h (struct target_ops): New member.
14310 * thread-db.c (struct thread_db): New.
14311 (libthread_db_search_path): New variable.
14312 (thread_db_create_event, thread_db_enable_reporting)
14313 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14314 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14315 (try_thread_db_load_1, dladdr_to_soname): New functions.
14316 (try_thread_db_load, thread_db_load_search): New functions.
14317 (thread_db_init): Search for libthread_db.
14318 (thread_db_free): New function.
14319 (thread_db_handle_monitor_command): Likewise.
14320 * config.in: Regenerate.
14321 * configure: Regenerate.
889bf7c5 14322
4168d2d6
UW
143232009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14324
14325 * spu-low.c (spu_kill): Wait for inferior to terminate.
14326 Call clear_inferiors.
14327 (spu_detach): Call clear_inferiors.
14328
81ecdfbb
RW
143292009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14330
14331 * aclocal.m4: Regenerate.
14332 * config.in: Likewise.
14333 * configure: Likewise.
14334
0b9ff2c0
UW
143352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14336
14337 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14338 (parse_spufs_run): New function.
14339 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14340 (ppc_breakpoint_at): Handle SPU breakpoints.
14341
efcbbd14
UW
143422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14343
14344 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14345 (SPUFS_MAGIC): Define.
14346 (spu_enumerate_spu_ids): New function.
14347 (linux_qxfer_spu): New function.
14348 (linux_target_ops): Install linux_qxfer_spu.
14349
f4d9bade
UW
143502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14351
14352 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14353 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14354 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14355 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14356 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14357 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14358 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14359 (init_registers_powerpc_cell32l): Add prototype.
14360 (init_registers_powerpc_cell64l): Likewise.
14361 (ppc_arch_setup): Detect Cell/B.E. architecture.
14362
96e946ca
RW
143632009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14364
14365 * Makefile.in (datarootdir): New variable.
14366
58d6951d
DJ
143672009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * linux-low.c (linux_write_memory): Update debugging output.
14370 * Makefile.in (clean): Add new descriptions.
14371 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14372 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14373 * configure.srv: Add new files for arm*-*-linux*.
14374 * linux-arm-low.c: Add new declarations.
14375 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14376 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14377 (HWCAP_VFPv3D16): New.
14378 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14379 instead of __IWMMXT__.
14380 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14381 (arm_arch_setup): New.
14382 (target_regsets): Remove #ifdef. Add VFP regset.
14383 (the_low_target): Use arm_arch_setup.
14384
12b42a12
DJ
143852009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14388 the main thread again.
14389
ac8c974e
AR
143902009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14391
14392 Adding Neutrino gdbserver.
14393 * configure: Regenerated.
14394 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14395 * configure.srv (i[34567]86-*-nto*): New target.
14396 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14397 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14398 (nto_comctrl) [__QNX__]: New function.
14399 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14400
4424e0c3 144012009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14402
14403 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14404 srv_tgtobj.
14405
912cf4ba
PA
144062009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14407 Pedro Alves <pedro@codesourcery.com>
14408
14409 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14410 don't support CONTEXT_EXTENDED_REGISTERS.
14411 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14412 (the_low_target): Install them.
14413 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14414 failing with ERROR_PIPE_NOT_CONNECTED.
14415
aa5ca48f
DE
144162009-06-30 Doug Evans <dje@google.com>
14417 Pierre Muller <muller@ics.u-strasbg.fr>
14418
14419 Add h/w watchpoint support to x86-linux, win32-i386.
14420 * Makefile.in (SFILES): Add i386-low.c
14421 (i386_low_h): Define.
14422 (i386-low.o): Add dependencies.
14423 (linux-x86-low.o): Add i386-low.h dependency.
14424 (win32-i386-low.o): Ditto.
14425 * i386-low.c: New file.
14426 * i386-low.h: New file.
14427 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14428 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14429 * linux-low.c (linux_add_process): Initialize arch_private.
14430 (linux_remove_process): Free arch_private.
14431 (add_lwp): Initialize arch_private.
14432 (delete_lwp): Free arch_private.
14433 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14434 provided.
14435 * linux-low.h (process_info_private): New member arch_private.
14436 (lwp_info): New member arch_private.
14437 (linux_target_ops): New members new_process, new_thread,
14438 prepare_to_resume.
14439 (ptid_of): New macro.
14440 * linux-x86-low.c: Include stddef.h, i386-low.h.
14441 (arch_process_info): New struct.
14442 (arch_lwp_info): New struct.
14443 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14444 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14445 (i386_dr_low_get_status): New function.
14446 (x86_insert_point, x86_remove_point): New functions.
14447 (x86_stopped_by_watchpoint): New function.
14448 (x86_stopped_data_address): New function.
14449 (x86_linux_new_process, x86_linux_new_thread): New functions.
14450 (x86_linux_prepare_to_resume): New function.
14451 (the_low_target): Add entries for insert_point, remove_point,
14452 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14453 prepare_to_resume.
14454 * server.c (debug_hw_points): New global.
14455 (monitor_show_help): Document set debug-hw-points.
14456 (handle_query): Process "set debug-hw-points".
14457 * server.h (debug_hw_points): Declare.
14458 (paddress): Declare.
14459 * utils.c (NUMCELLS, CELLSIZE): New macros.
14460 (get_sell, xsnprintf, paddress): New functions.
14461 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14462 remove_point, stopped_by_watchpoint, stopped_data_address.
14463 * win32-i386-low.c: Include i386-low.h.
14464 (debug_reg_state): Replaces dr.
14465 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14466 (i386_dr_low_get_status): New function.
14467 (i386_insert_point, i386_remove_point): New functions.
14468 (i386_stopped_by_watchpoint): New function.
14469 (i386_stopped_data_address): New function.
14470 (i386_initial_stuff): Update.
14471 (get_thread_context,set_thread_context,i386_thread_added): Update.
14472 (the_low_target): Add entries for insert_point,
14473 remove_point, stopped_by_watchpoint, stopped_data_address.
14474 * win32-low.c (win32_insert_watchpoint): New function.
14475 (win32_remove_watchpoint): New function.
14476 (win32_stopped_by_watchpoint): New function.
14477 (win32_stopped_data_address): New function.
14478 (win32_target_ops): Add entries for insert_watchpoint,
14479 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14480 * win32-low.h (win32_target_ops): New members insert_point,
14481 remove_point, stopped_by_watchpoint, stopped_data_address.
14482
d993e290
PA
144832009-06-25 Pedro Alves <pedro@codesourcery.com>
14484
14485 * server.c (process_serial_event): Re-return unsupported, not
14486 error, if the type isn't recognized. Re-allow supporting only
14487 insert or remove packets. Also call require_running for
14488 breakpoints. Add missing break statement to default case. Tidy.
14489 * target.h (struct target_ops): Rename insert_watchpoint to
14490 insert_point, and remove_watchpoint to remove_point.
14491
14492 * linux-low.h (struct linux_target_ops): Likewise.
14493 * linux-low.c (linux_insert_watchpoint): Rename to ...
14494 (linux_insert_point): ... this. Adjust.
14495 (linux_remove_watchpoint): Rename to ...
14496 (linux_remove_point): ... this. Adjust.
14497 (linux_target_ops): Adjust.
14498 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14499 (cris_insert_point): ... this.
14500 (cris_remove_watchpoint): Rename to ...
14501 (cris_remove_point): ... this.
14502 (the_low_target): Adjust.
14503
0f54c268
PM
145042009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14505
14506 * server.c (handle_v_kill): Pass signal_pid to
14507 kill_inferior if multi_process is zero.
14508
c6314022
AR
145092009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14510
14511 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14512 * target.h (target_ops): Comment for *_watchpoint to make it clear
14513 the functions can get types '0' and '1'.
14514
4463ce24
AR
145152009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14516
14517 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14518 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14519 * regcache.c (get_regcache): Likewise.
14520 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14521 * win32-low.c (child_fetch_inferior_registers): Remove check for
14522 regno 0.
14523
cf8fd78b
PA
145242009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14525 Pedro Alves <pedro@codesourcery.com>
14526
14527 * target.h (struct target_ops) <supports_multi_process>: New
14528 callback.
14529 (target_supports_multi_process): New.
14530 * server.c (handle_query): Even if GDB reports support, only
14531 enable multi-process if the target also supports it. Report
14532 multi-process support only if the target backend supports it.
14533 * linux-low.c (linux_supports_multi_process): New function.
14534 (linux_target_ops): Install it as target_supports_multi_process
14535 callback.
14536
47c0c975
DE
145372009-05-24 Doug Evans <dje@google.com>
14538
e09875d4
DE
14539 Global renaming of find_thread_pid to find_thread_ptid.
14540 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14541 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14542 All callers updated.
14543
e27d73f6
DE
14544 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14545 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14546 directly.
14547
47c0c975
DE
14548 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14549 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14550 (linux_resume_one_lwp): Ditto.
14551
2acc282a
DE
145522009-05-23 Doug Evans <dje@google.com>
14553
14554 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14555 from struct inferior_list_entry * to struct lwp_info *.
14556 All callers updated.
14557
9f1036c1
DE
145582009-05-13 Doug Evans <dje@google.com>
14559
14560 * linux-x86-low.c: Don't include assert.h.
14561 (x86_siginfo_fixup): Use fatal, not assert.
14562 (x86_arch_setup): Fix comment.
14563
d0722149
DE
145642009-05-12 Doug Evans <dje@google.com>
14565
14566 Biarch support for i386/amd64 gdbserver.
14567 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14568 Add linux-x86-low.c.
14569 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14570 (linux-x86-low.o): Add.
14571 * linux-x86-64-low.c: Delete.
14572 * linux-i386-low.c: Delete.
14573 * linux-x86-low.c: New file.
14574 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14575 linux-x86-low.o.
14576 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14577 linux-x86-low.o.
14578 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14579 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14580 (linux_child_pid_to_exec_file): New function.
14581 (elf_64_header_p, elf_64_file_p): New functions.
14582 (siginfo_fixup): New function.
14583 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14584 give target a chance to convert layout.
14585 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14586 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14587
fdeb2a12
DE
145882009-05-07 Doug Evans <dje@google.com>
14589
14590 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14591 (regsets_store_inferior_registers): Ditto.
14592
a6dbe5df
PA
145932009-05-06 Pedro Alves <pedro@codesourcery.com>
14594
14595 PR server/10048
14596
14597 * linux-low.c (must_set_ptrace_flags): Delete.
14598 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14599 of the global.
14600 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14601 `lwp->must_set_ptrace_flags' instead.
ba42693b 14602 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14603 (linux_wait_1): ... not here.
14604
5091eb23
DE
146052009-04-30 Doug Evans <dje@google.com>
14606
9f767825
DE
14607 * inferiors.c (started_inferior_callback): New function.
14608 (attached_inferior_callback): New function.
14609 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14610 * server.c (print_started_pid, print_attached_pid): New functions.
14611 (detach_or_kill_for_exit): New function.
14612 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14613 * server.h (have_started_inferiors_p): Declare.
14614 (have_attached_inferiors_p): Declare.
14615
5091eb23
DE
14616 * inferiors.c (remove_process): Fix memory leak, free process.
14617 * linux-low.c (linux_remove_process): New function.
14618 (linux_kill): Call it instead of remove_process.
14619 (linux_detach, linux_wait_1): Ditto.
14620
155c8968
PA
146212009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14622
14623 * configure.srv: Add x86 Windows CE target.
14624
7fe519cb
UW
146252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14626
14627 * inferiors.c (get_thread_process): Make global.
14628 * server.h (get_thread_process): Add prototype.
14629 * thread-db.c (find_one_thread): Use get_thread_process
14630 instead of current_process.
14631 (thread_db_get_tls_address): Do not crash if called when
14632 thread layer is not yet initialized.
14633
5472f405
UW
146342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14635
14636 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14637 * spu-low.c (current_tid): Rename to ...
14638 (current_ptid): ... this.
14639 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14640 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14641 ptid_get_lwp (current_ptid) instead of current_tid.
14642 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14643 instead of current_tid. Use find_process_pid to verify pid
14644 argument is valid. Pass proper argument to remove_process.
14645 (spu_thread_alive): Compare current_ptid instead of current_tid.
14646 (spu_resume): Likewise.
14647
55ac2b99
PA
146482009-04-02 Pedro Alves <pedro@codesourcery.com>
14649
14650 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14651 variable.
14652
95954743
PA
146532009-04-01 Pedro Alves <pedro@codesourcery.com>
14654
14655 Implement the multiprocess extensions, and add linux multiprocess
14656 support.
14657
14658 * server.h (ULONGEST): Declare.
14659 (struct ptid, ptid_t): New.
14660 (minus_one_ptid, null_ptid): Declare.
14661 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14662 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14663 (struct inferior_list_entry): Change `id' type from unsigned from
14664 to ptid_t.
14665 (struct sym_cache, struct breakpoint, struct
14666 process_info_private): Forward declare.
14667 (struct process_info): Declare.
14668 (current_process): Declare.
14669 (all_processes): Declare.
14670 (initialize_inferiors): Declare.
14671 (add_thread): Adjust to use ptid_t.
14672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14673 (add_process, remove_process, find_thread_pid): Declare.
14674 (find_inferior_id): Adjust to use ptid_t.
14675 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14676 (multi_process): Declare.
14677 (push_event): Adjust to use ptid_t.
14678 (read_ptid, write_ptid): Declare.
14679 (prepare_resume_reply): Adjust to use ptid_t.
14680 (clear_symbol_cache): Declare.
14681 * inferiors.c (all_processes): New.
14682 (null_ptid, minus_one_ptid): New.
14683 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14684 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14685 (add_thread): Change unsigned long to ptid. Remove gdb_id
14686 parameter. Adjust.
14687 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14688 (gdb_id_to_thread): Rename to ...
14689 (find_thread_pid): ... this. Change unsigned long to ptid.
14690 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14691 (loaded_dll, pull_pid_from_list): Adjust.
14692 (add_process, remove_process, find_process_pid)
14693 (get_thread_process, current_process, initialize_inferiors): New.
14694 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14695 (struct target_waitstatus) <related_pid>: Ditto.
14696 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14697 return type to int.
14698 (struct target_ops) <join>: Add `pid' argument.
14699 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14700 (struct target_ops) <wait>: Add `ptid' field. Change return type
14701 to ptid.
14702 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14703 (mywait): Add `ptid' argument. Change return type to ptid_t.
14704 (target_pid_to_str): Declare.
14705 * target.c (set_desired_inferior): Adjust to use ptids.
14706 (mywait): Add new `ptid' argument. Adjust.
14707 (target_pid_to_str): New.
14708 * mem-break.h (free_all_breakpoints): Declare.
14709 * mem-break.c (breakpoints): Delelete.
14710 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14711 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14712 to use per-process breakpoint list.
14713 (free_all_breakpoints): New.
14714 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14715 (symbol_cache, all_symbols_looked_up): Delete.
14716 (hexchars): New.
14717 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14718 read_ptid): New.
14719 (prepare_resume_reply): Change ptid argument's type from unsigned
14720 long to ptid_t. Adjust. Implement W;process and X;process.
14721 (free_sym_cache, clear_symbol_cache): New.
14722 (look_up_one_symbol): Adjust to per-process symbol cache. *
14723 * server.c (cont_thread, general_thread, step_thread): Change type
14724 to ptid_t.
14725 (attached): Delete.
14726 (multi_process): New.
14727 (last_ptid): Change type to ptid_t.
14728 (struct vstop_notif) <ptid>: Change type to ptid_t.
14729 (queue_stop_reply, push_event): Change `ptid' argument's type to
14730 ptid_t.
14731 (discard_queued_stop_replies): Add `pid' argument.
14732 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14733 changes. Don't reference the `attached' global.
14734 (attach_inferior): Adjust to mywait interface changes.
14735 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14736 features. Handle and report "multiprocess+". Handle
14737 "qAttached:PID".
14738 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14739 changes.
14740 (handle_v_kill): New.
14741 (handle_v_stopped): Adjust to use target_pid_to_str.
14742 (handle_v_requests): Allow multiple attaches and runs when
14743 multiprocess extensions are in effect. Handle "vKill".
14744 (myresume): Adjust to use ptids.
14745 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14746 (handle_status): Adjust to discard_queued_stop_replies interface
14747 change.
14748 (first_thread_of, kill_inferior_callback)
14749 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14750 (main): Call initialize_inferiors. Adjust to use ptids, killing
14751 and detaching from all inferiors. Handle multiprocess packet
14752 variants.
14753 * linux-low.h: Include gdb_proc_service.h.
14754 (struct process_info_private): New.
14755 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14756 <lwpid_of>: Use ptid_get_lwp.
14757 (get_lwp_thread): Adjust.
14758 (struct lwp_info): Add `dead' member.
14759 (find_lwp_pid): Declare.
14760 * linux-low.c (thread_db_active): Delete.
14761 (new_inferior): Adjust comment.
14762 (inferior_pid): Delete.
14763 (linux_add_process): New.
14764 (handle_extended_wait): Adjust.
14765 (add_lwp): Change unsigned long to ptid.
14766 (linux_create_inferior): Add process to processes table. Adjust
14767 to use ptids. Don't set new_inferior here.
14768 (linux_attach_lwp): Rename to ...
14769 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14770 it. Adjust to use ptids.
14771 (linux_attach_lwp): New.
14772 (linux_attach): Add process to processes table. Don't set
14773 new_inferior here.
14774 (struct counter): New.
14775 (second_thread_of_pid_p, last_thread_of_process_p): New.
14776 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14777 multiple processes.
14778 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14779 processes. Remove process from process table.
14780 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14781 to multiple processes.
14782 (any_thread_of): New.
14783 (linux_detach): Add `pid' argument, and handle it. Remove process
14784 from processes table.
14785 (linux_join): Add `pid' argument. Handle it.
14786 (linux_thread_alive): Change unsighed long argument to ptid_t.
14787 Consider dead lwps as not being alive.
14788 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14789 threads we're not interested in.
14790 (same_lwp, find_lwp_pid): New.
14791 (linux_wait_for_lwp): Change `pid' argument's type from int to
14792 ptid_t. Adjust.
14793 (linux_wait_for_event): Rename to ...
14794 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14795 from int to ptid_t. Adjust.
14796 (linux_wait_for_event): New.
14797 (linux_wait_1): Add `ptid' argument. Change return type to
14798 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14799 that exit from the process table.
14800 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14801 Adjust.
14802 (mark_lwp_dead): New.
14803 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14804 stopping all threads, mark its main lwp as dead.
14805 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14806 ptids.
14807 (fetch_register, usr_store_inferior_registers)
14808 (regsets_fetch_inferior_registers)
14809 (regsets_store_inferior_registers, linux_read_memory)
14810 (linux_write_memory): Inline `inferior_pid'.
14811 (linux_look_up_symbols): Adjust to use per-process
14812 `thread_db_active'.
14813 (linux_request_interrupt): Adjust to use ptids.
14814 (linux_read_auxv): Inline `inferior_pid'.
14815 (initialize_low): Don't reference thread_db_active.
14816 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14817 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14818 (ps_getpid): Return the pid of the current inferior.
14819 * thread-db.c (proc_handle, thread_agent): Delete.
14820 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14821 per-process data.
14822 (find_one_thread): Change argument type to ptid_t. Adjust to
14823 per-process data.
14824 (maybe_attach_thread): Adjust to per-process data and ptids.
14825 (thread_db_find_new_threads): Ditto.
14826 (thread_db_init): Ditto.
14827 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14828 processes table. Adjust to use ptids.
14829 (spu_kill, spu_detach): Adjust interface. Remove process from
14830 processes table.
14831 (spu_join, spu_thread_alive): Adjust interface.
14832 (spu_wait): Adjust interface. Remove process from processes
14833 table. Adjust to use ptids.
14834 * win32-low.c (current_inferior_tid): Delete.
14835 (current_inferior_ptid): New.
14836 (debug_event_ptid): New.
14837 (thread_rec): Take a ptid. Adjust.
14838 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14839 (child_delete_thread): Ditto.
14840 (do_initial_child_stuff): Add `attached' argument. Add process to
14841 processes table.
14842 (child_fetch_inferior_registers, child_store_inferior_registers):
14843 Adjust.
14844 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14845 (win32_attach): Pass 1 to do_initial_child_stuff.
14846 (win32_kill): Adjust interface. Remove process from processes
14847 table.
14848 (win32_detach): Ditto.
14849 (win32_join): Adjust interface.
14850 (win32_thread_alive): Take a ptid.
14851 (win32_resume): Adjust to use ptids.
14852 (get_child_debug_event): Ditto.
14853 (win32_wait): Adjust interface. Remove exiting process from
14854 processes table.
14855
bd99dc85
PA
148562009-04-01 Pedro Alves <pedro@codesourcery.com>
14857
14858 Non-stop mode support.
14859
14860 * server.h (non_stop): Declare.
14861 (gdb_client_data, handler_func): Declare.
14862 (delete_file_handler, add_file_handler, start_event_loop):
14863 Declare.
14864 (handle_serial_event, handle_target_event, push_event)
14865 (putpkt_notif): Declare.
14866 * target.h (enum resume_kind): New.
14867 (struct thread_resume): Replace `step' field by `kind' field.
14868 (TARGET_WNOHANG): Define.
14869 (struct target_ops) <wait>: Add `options' argument.
14870 <supports_non_stop, async, start_non_stop>: New fields.
14871 (target_supports_non_stop, target_async): New.
14872 (start_non_stop): Declare.
14873 (mywait): Add `options' argument.
14874 * target.c (mywait): Add `options' argument. Print child exit
14875 notifications here.
14876 (start_non_stop): New.
14877 * server.c (non_stop, own_buf, mem_buf): New globals.
14878 (struct vstop_notif): New.
14879 (notif_queue): New global.
14880 (queue_stop_reply, push_event, discard_queued_stop_replies)
14881 (send_next_stop_reply): New.
14882 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14883 interface changes.
14884 (attach_inferior): In non-stop mode, don't wait for the target
14885 here.
14886 (handle_general_set): Handle QNonStop.
14887 (handle_query): When handling qC, return the current general
14888 thread, instead of the first thread of the list.
14889 (handle_query): If the backend supports non-stop mode, include
14890 QNonStop+ in the qSupported query response.
14891 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14892 and non-stop mode.
14893 (handle_v_attach, handle_v_run): Handle non-stop mode.
14894 (handle_v_stopped): New.
14895 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14896 (myresume): Adjust to use resume_kind. Handle non-stop.
14897 (queue_stop_reply_callback): New.
14898 (handle_status): Handle non-stop mode.
14899 (main): Clear non_stop flag on reconnection. Use the event-loop.
14900 Refactor serial protocol handling from here ...
14901 (process_serial_event): ... to this new function. When GDB
14902 selects any thread, select one here. In non-stop mode, wait until
14903 GDB acks all pending events before exiting.
14904 (handle_serial_event, handle_target_event): New.
14905 * remote-utils.c (remote_open): Install remote_desc in the event
14906 loop.
14907 (remote_close): Remove remote_desc from the event loop.
14908 (putpkt_binary): Rename to...
14909 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14910 (putpkt_binary): New as wrapper around putpkt_binary_1.
14911 (putpkt_notif): New.
14912 (prepare_resume_reply): In non-stop mode, don't change the
14913 general_thread.
14914 * event-loop.c: New.
14915 * Makefile.in (OBJ): Add event-loop.o.
14916 (event-loop.o): New rule.
14917
14918 * linux-low.h (pid_of): Moved here.
14919 (lwpid_of): New.
14920 (get_lwp_thread): Use lwpid_of.
14921 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14922 * linux-low.c (pid_of): Delete.
14923 (inferior_pid): Use lwpid_of.
14924 (linux_event_pipe): New.
14925 (target_is_async_p): New.
14926 (delete_lwp): New.
14927 (handle_extended_wait): Use lwpid_of.
14928 (add_lwp): Don't set lwpid field.
14929 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14930 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14931 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14932 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14933 first. Adjust to linux_wait_for_event interface changes. Use
14934 lwpid_of.
14935 (linux_detach): Don't delete the main lwp here.
14936 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14937 (status_pending_p): Don't consider explicitly suspended lwps.
14938 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14939 pointer. Add OPTIONS argument. Change return type to int. Use
14940 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14941 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14942 pointer. Add status pointer argument. Return a pid instead of a
14943 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14944 changes. In non-stop mode, don't switch to a random thread.
14945 (linux_wait): Rename to...
14946 (linux_wait_1): ... this. Add target_options argument, and handle
14947 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14948 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14949 clean exit and signal exit code. Don't stop all threads in
14950 non-stop mode. In all-stop mode, only stop all threads when
14951 reporting a stop to GDB. Handle explicit thread stop requests.
14952 (async_file_flush, async_file_mark): New.
14953 (linux_wait): New.
14954 (send_sigstop): Use lwpid_of.
14955 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14956 interface changes. In non-stop mode, don't switch to a random
14957 thread.
14958 (linux_resume_one_lwp): Use lwpid_of.
14959 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14960 (linux_resume_one_thread): ... this. Handle resume_stop. In
14961 non-stop mode, don't look for pending flag in all threads.
14962 (resume_status_pending_p): Don't consider explicitly suspended
14963 threads.
14964 (my_waitpid): Reimplement. Emulate __WALL.
14965 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14966 Use lwpid_of.
14967 (sigchld_handler, linux_supports_non_stop, linux_async)
14968 (linux_start_non_stop): New.
14969 (linux_target_ops): Register linux_supports_non_stop, linux_async
14970 and linux_start_non_stop.
14971 (initialize_low): Install SIGCHLD handler.
14972 * thread-db.c (thread_db_create_event, find_one_thread)
14973 (thread_db_get_tls_address): Use lwpid_of.
14974 * win32-low.c (win32_detach): Adjust to use resume_kind.
14975 (win32_wait): Add `options' argument.
14976 * spu-low.c (spu_resume): Adjust to use resume_kind.
14977 (spu_wait): Add `options' argument.
14978
5b1c542e
PA
149792009-04-01 Pedro Alves <pedro@codesourcery.com>
14980
14981 Decouple target code from remote protocol.
14982
14983 * target.h (enum target_waitkind): New.
14984 (struct target_waitstatus): New.
14985 (struct target_ops) <wait>: Return an unsigned long. Take a
14986 target_waitstatus pointer instead of a char pointer.
14987 (mywait): Likewise.
14988 * target.c (mywait): Change prototype to return an unsigned long.
14989 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14990 * server.h (thread_from_wait, old_thread_from_wait): Delete
14991 declarations.
14992 (prepare_resume_reply): Change prototype to take a
14993 target_waitstatus.
14994 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14995 (last_status, last_ptid): New.
14996 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14997 pid instead of a signal.
14998 (attach_inferior): Remove "status" and "signal" parameters.
14999 Adjust.
15000 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15001 not as an address.
15002 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15003 (handle_v_requests, myresume): Remove "status" and "signal"
15004 parameters. Adjust.
15005 (handle_status): New.
15006 (main): Delete local `status'. Adjust.
15007 * remote-utils.c: Include target.h.
15008 (prepare_resume_reply): Change prototype to take a
15009 target_waitstatus. Adjust.
15010
15011 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15012 interface.
15013 * spu-low.c (spu_wait): Adjust.
15014 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15015 Delete.
15016 (win32_wait): Adjust.
15017
2bd7c093
PA
150182009-04-01 Pedro Alves <pedro@codesourcery.com>
15019
15020 * target.h (struct thread_resume): Delete leave_stopped member.
15021 (struct target_ops): Add a `n' argument to the `resume' callback.
15022 * server.c (start_inferior): Adjust.
15023 (handle_v_cont, myresume): Adjust.
15024 * linux-low.c (check_removed_breakpoint): Adjust to resume
15025 interface change, and to removed leave_stopped field.
15026 (resume_ptr): Delete.
15027 (struct thread_resume_array): New.
15028 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15029 resume interface change.
15030 (linux_continue_one_thread, linux_queue_one_thread)
15031 (resume_status_pending_p): Check if the resume field is NULL
15032 instead of checking the leave_stopped member.
15033 (linux_resume): Adjust to the target resume interface change.
15034 * spu-low.c (spu_resume): Adjust to the target resume interface
15035 change.
15036 * win32-low.c (win32_detach, win32_resume): Ditto.
15037
c35fafde
PA
150382009-04-01 Pedro Alves <pedro@codesourcery.com>
15039
15040 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15041 flag.
15042 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15043 pending.
15044 (linux_continue_one_thread): Only preserve the stepping flag if
15045 there's a pending breakpoint.
15046
0a59d50b
PA
150472009-03-31 Pedro Alves <pedro@codesourcery.com>
15048
15049 * server.c (main): After the inferior having exited, call
15050 remote_close before exiting gdbserver.
15051
f04c6d38
TJB
150522009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15053
15054 Fix size of FPSCR in Power 7 processors.
15055 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15056 (PPC_FEATURE_HAS_DFP): New #define.
15057 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15058 size of the FPSCR.
15059
78e5cee6
PA
150602009-03-23 Pedro Alves <pedro@codesourcery.com>
15061
15062 * server.c (handle_query) Whitespace and formatting.
15063
1b3f6016
PA
150642009-03-22 Pedro Alves <pedro@codesourcery.com>
15065
15066 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15067 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15068 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15069 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15070 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15071 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15072 Makefile.in, configure.ac: Fix whitespace throughout.
15073 * configure: Regenerate.
15074
a07b2135
PA
150752009-03-22 Pedro Alves <pedro@codesourcery.com>
15076
15077 * inferiors.c (find_inferior): Make it safe for the callback
15078 function to delete the currently iterated inferior.
15079
67cc2626
PA
150802009-03-22 Pedro Alves <pedro@codesourcery.com>
15081
15082 * Makefile.in (linuw_low_h): Move higher.
15083 (thread-db.o): Depend on $(linux_low_h).
15084
54a0b537
PA
150852009-03-17 Pedro Alves <pedro@codesourcery.com>
15086
15087 Rename "process" to "lwp" throughout.
15088
15089 * linux-low.c (all_processes): Rename to...
15090 (all_lwps): ... this.
15091 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15092 (add_process): Rename to ...
15093 (add_lwp): ... this. Adjust.
15094 (linux_create_inferior): Adjust.
15095 (linux_attach_lwp): Adjust.
15096 (linux_attach): Adjust.
15097 (linux_kill_one_process): Rename to ...
15098 (linux_kill_one_lwp): ... this. Adjust.
15099 (linux_kill): Adjust.
15100 (linux_detach_one_process): Rename to ...
15101 (linux_detach_one_lwp): ... this. Adjust.
15102 (linux_detach): Adjust.
15103 (check_removed_breakpoint): Adjust.
15104 (status_pending_p): Adjust.
15105 (linux_wait_for_process): Rename to ...
15106 (linux_wait_for_lwp): ... this. Adjust.
15107 (linux_wait_for_event): Adjust.
15108 (send_sigstop): Adjust.
15109 (wait_for_sigstop): Adjust.
15110 (stop_all_processes): Rename to ...
15111 (stop_all_lwps): ... this.
15112 (linux_resume_one_process): Rename to ...
15113 (linux_resume_one_lwp): ... this. Adjust.
15114 (linux_set_resume_request, linux_continue_one_thread)
15115 (linux_queue_one_thread, resume_status_pending_p)
15116 (usr_store_inferior_registers, regsets_store_inferior_registers)
15117 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15118 Adjust.
15119 * linux-low.h (get_process): Rename to ...
15120 (get_lwp): ... this. Adjust.
15121 (get_thread_process): Rename to ...
15122 (get_thread_lwp): ... this. Adjust.
15123 (get_process_thread): Rename to ...
15124 (get_lwp_thread): ... this. Adjust.
15125 (struct process_info): Rename to ...
15126 (struct lwp_info): ... this.
15127 (all_processes): Rename to ...
15128 (all_lwps): ... this.
15129 * proc-service.c (ps_lgetregs): Adjust.
15130 * thread-db.c (thread_db_create_event, find_one_thread)
15131 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15132
0b16c5cf
PA
151332009-03-14 Pedro Alves <pedro@codesourcery.com>
15134
15135 * server.c (handle_query): Handle "qAttached".
15136
32de4b9d
NS
151372009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15138
15139 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15140 GPLv3, update license URL.
15141
2aecd87f
DE
151422009-03-01 Doug Evans <dje@google.com>
15143
93efd302 15144 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15145 (server_h): Add gdb_signals.h.
15146 (signals.o): Update.
15147 * server.h (target_signal_from_host,target_signal_to_host_p)
15148 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15149
86b1f9c5
PM
151502009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15151
15152 * remote-utils.c (getpkt): Also generate remote-debug
15153 information if noack_mode is set.
15154
4aa995e1
PA
151552009-02-06 Pedro Alves <pedro@codesourcery.com>
15156
15157 * server.c (handle_query): Report qXfer:siginfo:read and
15158 qXfer:siginfo:write as supported and handle them.
15159 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15160 * linux-low.c (linux_xfer_siginfo): New.
15161 (linux_target_ops): Set it.
15162
62709adf
PA
151632009-01-26 Pedro Alves <pedro@codesourcery.com>
15164
15165 * server.c (gdbserver_usage): Mention --remote-debug.
15166 (main): Accept '--remote-debug' switch.
15167
aef93bd7
DE
151682009-01-18 Doug Evans <dje@google.com>
15169
15170 * regcache.c (new_register_cache): No need to check result of xcalloc.
15171 * server.c (handle_search_memory): Back out calls to xmalloc,
15172 result is checked and error is returned to user upon failure.
15173 (handle_query): Ditto. Add more checks for result of malloc.
15174 (handle_v_cont): Check result of malloc, report error back to
15175 user upon failure.
15176 (handle_v_run): Ditto. Call freeargv.
15177 * server.h (freeargv): Declare.
15178 * utils.c (freeargv): New fn.
15179
54363045
DE
151802009-01-15 Doug Evans <dje@google.com>
15181
f626972c
DE
15182 * gdbreplay.c (perror_with_name): Make arg const char *.
15183 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15184 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15185 * utils.c (perror_with_name): Make arg const char *.
54363045 15186
18aae699
PA
151872009-01-14 Pedro Alves <pedro@codesourcery.com>
15188
15189 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15190 when handling a EXIT_PROCESS_DEBUG_EVENT.
15191
ff703abe
JB
151922009-01-06 Joel Brobecker <brobecker@adacore.com>
15193
15194 * gdbreplay.c (gdbreplay_version): Update copyright year.
15195 * server.c (gdbserver_version): Likewise.
15196
f21cc1a2 151972009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15198
15199 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15200 (handle_extended_wait): Improve comment.
0e21c1ec 15201
bca929d3
DE
152022008-12-13 Doug Evans <dje@google.com>
15203
15204 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15205 * server.h (ATTR_MALLOC): New macro.
15206 (xmalloc,xcalloc,xstrdup): Declare.
15207 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15208 * inferiors.c: Ditto.
15209 * linux-low.c: Ditto.
15210 * mem-break.c: Ditto.
15211 * regcache.c: Ditto.
15212 * remote-utils.c: Ditto.
15213 * server.c: Ditto.
15214 * target.c: Ditto.
15215 * win32-low.c: Ditto.
15216
97438e3f
DE
152172008-12-12 Doug Evans <dje@google.com>
15218
896c7fbb
DE
15219 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15220 in debugging printf.
15221
97438e3f
DE
15222 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15223
e3b886f8
DE
152242008-12-09 Doug Evans <dje@google.com>
15225
15226 * linux-low.h (struct process_info): Delete member tid, unused.
15227 * thread-db.c (find_one_thread): Update.
15228 (maybe_attach_thread): Update.
15229
07e059b5
VP
152302008-12-02 Pedro Alves <pedro@codesourcery.com>
15231
889bf7c5
PA
15232 * target.h (struct target_ops): Add qxfer_osdata member.
15233 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15234 and dirent.h.
15235 (linux_qxfer_osdata): New functions.
15236 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15237 callback.
15238 * server.c (handle_query): Handle "qXfer:osdata:read:".
15239 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15240 (buffer_xml_printf): New functions.
15241 * server.h (struct buffer): New.
15242 (buffer_grow_str, buffer_grow_str0): New macros.
15243 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15244 (buffer_xml_printf): Declare.
07e059b5 15245
4cab47ab
DE
152462008-11-24 Doug Evans <dje@google.com>
15247
15248 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15249
f142445f
DJ
152502008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15251
15252 * server.c (handle_v_run): Always use the supplied argument list.
15253
d0107bb6 152542008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15255
d0107bb6
BW
15256 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15257 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15258
2c4ad781
TJB
152592008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15260
15261 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15262 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15263 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15264 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15265 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15266 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15267 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15268 XML target descriptions.
15269 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15270 when inferior is running on an ISA 2.05 or later processor. Add
15271 special case to return offset for full 64-bit slot of FPSCR when
15272 in 32-bits.
15273
dfb64f85
DJ
152742008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15275
15276 * Makefile.in (SFILES, clean): Added sparc64 files.
15277 (reg-sparc64.o, reg-sparc64.c): New.
15278 * configure.srv (sparc*-*-linux*): New configuration.
15279 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15280 syscall arguments for SPARC.
15281 (regsets_store_inferior_registers): Likewise.
15282 * linux-sparc-low.c: New file.
15283
66b6e1dd
DE
152842008-10-21 Doug Evans <dje@google.com>
15285
15286 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15287 (READLINE_DIR,READLINE_DEP): Delete.
15288 (INTERNAL_CFLAGS): Update.
15289 (LINTFLAGS): Update.
15290
9b710a42
PA
152912008-10-10 Pedro Alves <pedro@codesourcery.com>
15292
15293 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15294 whole argv from the last run, not just argv[0].
15295
5822d809
PA
152962008-09-08 Pedro Alves <pedro@codesourcery.com>
15297
15298 * regcache.c (new_register_cache): Return NULL if the register
15299 cache size isn't known yet.
15300 (free_register_cache): Avoid dereferencing a NULL regcache.
15301
74aac56f
DJ
153022008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15303
15304 * configure.srv: Merge MIPS and MIPS64.
15305
400b20f5
MR
153062008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15307
15308 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15309
677c5bb1
LM
153102008-08-18 Luis Machado <luisgpm@br.ibm.com>
15311
15312 * Makefile.in: Add required vsx dependencies.
15313
15314 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15315 Declare init_registers_powerpc_vsx32l.
15316 Declare init_registers_powerpc_vsx64l.
15317 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15318 (ppc_arch_setup): Check for VSX in hwcap.
15319 (ppc_fill_vsxregset): New function.
15320 (ppc_store_vsxregset): New function.
15321 Add new VSX entry in regset_info target_regsets.
15322
15323 * configure.srv: Add new VSX dependencies.
15324
a6f3e723
SL
153252008-08-12 Pedro Alves <pedro@codesourcery.com>
15326
15327 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15328 (remote_open): Set or clear transport_is_reliable.
15329 (putpkt_binary): Don't expect acks in noack mode.
15330 (getpkt): Don't send ack/nac in noack mode.
15331 * server.c (handle_general_set): Handle QStartNoAckMode.
15332 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15333 qSupported.
15334 (main): Reset noack_mode on every connection.
15335 * server.h (noack_mode): Declare.
15336
a417dc56
RW
153372008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15338
15339 * Makefile.in (GDBREPLAY_OBS): New variable.
15340 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15341
3221518c
UW
153422008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15343 Daniel Jacobowitz <dan@codesourcery.com>
15344
15345 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15346 (usr_store_inferior_registers): Likewise.
15347 (regsets_store_inferior_registers): Likewise.
15348
ec56be1b
PA
153492008-07-31 Rolf Jansen <rj@surtec.com>
15350 Pedro Alves <pedro@codesourcery.com>
15351
15352 * configure.ac: Check for memmem declaration.
15353 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15354 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15355 (disable_packet_qfThreadInfo): Unconditionally compile.
15356 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15357 * configure, config.in: Regenerate.
15358
2fe5e3ff
DE
153592008-07-28 Doug Kwan <dougkwan@google.com>
15360
15361 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15362 (linux_write_memory): Remove declaration of errno.
15363
836acd6d
UW
153642008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15365
15366 * linux-low.c (handle_extended_wait): Do not use "status"
15367 variable uninitialized.
15368
aeba519e
PA
153692008-07-07 Pedro Alves <pedro@codesourcery.com>
15370
15371 * server.c (handle_v_attach): Inhibit reporting dll changes.
15372
db42f210
PA
153732008-06-27 Pedro Alves <pedro@codesourcery.com>
15374
15375 * remote-utils.c (prepare_resume_reply): If requested, don't
15376 output "thread:TID" in the T stop reply.
15377
15378 * server.c (disable_packet_vCont, disable_packet_Tthread)
15379 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15380 (handle_query): If requested, disable support for qC, qfThreadInfo
15381 and qsThreadInfo.
15382 (handle_v_requests): If requested, disable support for vCont.
15383 (gdbserver_show_disableable): New.
15384 (main): Handle --disable-packet and --disable-packet=LIST.
15385
15386 * server.h (disable_packet_vCont, disable_packet_Tthread)
15387 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15388
8e4c5421
CD
153892008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15390
15391 * server.c (gdbserver_usage): Mention --version.
15392
6e23a804
DJ
153932008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * Makefile.in (gdbreplay.o): New rule.
15396
90aa6a40
JM
153972008-06-06 Joseph Myers <joseph@codesourcery.com>
15398
15399 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15400 message, not gdbserver.
15401
c16158bc 154022008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15403 Nathan Sidwell <nathan@codesourcery.com>
15404 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15405
15406 * acinclude.m4: Include ../../config/acx.m4.
15407 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15408 * configure, config.in: Regenerate.
15409 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15410 * server.c (gdbserver_version): Print PKGVERSION.
15411 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15412 (main): Adjust gdbserver_usage calls.
15413 * gdbreplay.c (version, host_name): Add declarations.
15414 (gdbreplay_version, gdbreplay_usage): New.
15415 (main): Accept --version and --help options.
15416
aeb75bf5
DJ
154172008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15418
15419 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15420 (arm_breakpoint_at): Handle Thumb.
15421 (the_low_target): Add comment.
15422
76b233dd
UW
154232008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15424
15425 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15426
08388c79
DE
154272008-05-09 Doug Evans <dje@google.com>
15428
a3c83fae
DE
15429 * server.h (decode_search_memory_packet): Declare.
15430 * remote-utils.c (decode_search_memory_packet): New fn.
15431 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15432 (handle_search_memory): New fn.
15433 (handle_query): Process qSearch:memory packets.
15434
bb9c3d36
UW
154352008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15436
15437 * regcache.c (registers_length): Remove.
15438 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15439 full register packet.
15440 * regcache.h (registers_length): Remove prototype.
15441 * server.h (PBUFSIZ): Define to 16384.
15442
7284e1be
UW
154432008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15444
15445 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15446 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15447 powerpc-64l.o, and powerpc-altivec64l.o.
15448 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15449 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15450 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15451 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15452 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15453 to srv_xmlfiles.
15454
15455 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15456 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15457 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15458 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15459 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15460 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15461 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15462 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15463 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15464 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15465 (clean): Update.
15466
15467 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15468 (init_registers_powerpc_32l): ... this new prototype.
15469 (init_registers_powerpc_32): Remove, replace by ...
15470 (init_registers_powerpc_altivec32l): ... this new prototype.
15471 (init_registers_powerpc_e500): Remove, replace by ...
15472 (init_registers_powerpc_e500l): ... this new prototype.
15473 (init_registers_ppc64): Remove, replace by ...
15474 (init_registers_powerpc_64l): ... this new prototype.
15475 (init_registers_powerpc_64): Remove, replace by ...
15476 (init_registers_powerpc_altivec64l): ... this new prototype.
15477 (ppc_num_regs): Set to 73.
15478 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15479 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15480 (ppc_cannot_store_register): Handle orig_r3 and trap.
15481 (ppc_arch_setup): Update init_registers_... calls.
15482 (ppc_fill_gregset): Handle orig_r3 and trap.
15483
15484 * inferiors.c (clear_inferiors): Reset current_inferior.
15485
fdc59709
PB
154862008-04-23 Paolo Bonzini <bonzini@gnu.org>
15487
889bf7c5
PA
15488 * acinclude.m4: Add override.m4.
15489 * configure: Regenerate.
fdc59709 15490
c9b2f845
UW
154912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15492
15493 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15494 initial call to init_register_ppc64.
15495
550512b8
UW
154962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15497
43aaf8b6
PA
15498 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15499 single powerpc*-*-linux* case.
550512b8
UW
15500 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15501
b6430ec3
UW
155022008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15503
15504 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15505 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15506 from reg_xmlfiles.
15507 * linux-ppc-low.c: Include <elf.h>.
15508 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15509 (ppc_hwcap): New global variable.
15510 (ppc_regmap): Remove __SPE__ #ifdef sections.
15511 (ppc_regmap_e500): New global variable.
15512 (ppc_cannot_store_register): Update __SPE__ special case.
15513 (ppc_get_hwcap): New function.
15514 (ppc_arch_setup): Use it to determine whether inferior supports
15515 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15516 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15517 Do not access registers if target does not support AltiVec.
15518 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15519 Do not access registers if target does not support SPE.
15520 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15521
52fa2412
UW
155222008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15523
15524 * linux-low.c (disabled_regsets, num_regsets): New.
15525 (use_regsets_p): Delete.
15526 (linux_wait_for_process): Clear disabled_regsets.
15527 (regsets_fetch_inferior_registers): Check and set it.
15528 (regsets_store_inferior_registers): Likewise.
15529 (linux_fetch_registers, linux_store_registers): Do not use
15530 use_regsets_p.
15531 (initialize_low): Allocate disabled_regsets.
15532
e28b3332
DJ
155332008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15534
15535 * Makefile.in (LIBOBJS): New.
15536 (OBS): Use LIBOBJS.
15537 (memmem.o): New rule.
15538 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15539 * configure: Regenerated.
15540
4536995d
UW
155412008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15542
15543 * server.c (handle_query): Never return "unsupported" for
15544 qXfer:features:read queries.
15545
221c031f
UW
155462008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15547
15548 * server.c (get_features_xml): Fix inverted condition.
15549 (handle_query): Always support qXfer:feature:read.
15550
ccd213ac
DJ
155512008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15552
15553 * server.c (wrapper_argv): New.
15554 (start_inferior): Handle wrapper_argv. If set, expect an extra
15555 trap.
15556 (gdbserver_usage): Document --wrapper.
15557 (main): Parse --wrapper.
15558
6fe305f7
UW
155592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15560
15561 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15562 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15563 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15564 (ppc_set_pc): Likewise.
15565 (ppc_arch_setup): New function.
15566 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15567 of collect_register.
889bf7c5 15568 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15569
5b0a002e
UW
155702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15571
15572 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15573 instead of linux-ppc64-low.o.
15574 * linux-ppc64-low.c: Remove file.
15575 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15576 (linux-ppc64-low.o): Remove rule.
15577
15578 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15579 (init_registers_powerpc_64): Likewise.
15580 (ppc_regmap): Conditionally define depending on __powerpc64__.
15581 (ppc_cannot_store_register): Do not special-case "fpscr" when
15582 compiled on __powerpc64__.
15583 (ppc_collect_ptrace_register): New function.
15584 (ppc_supply_ptrace_register): New function.
15585 (ppc_breakpoint): Change type to "unsigned int".
15586 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15587 (the_low_target): Conditionally provide initializers for the
889bf7c5 15588 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15589 collect_ptrace_register and supply_ptrace_register members.
15590
9b4b61c8
UW
155912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15592
15593 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15594 * server.c (gdbserver_xmltarget): Define.
15595 (get_features_xml): Use it to replace "target.xml" and arch_string.
15596
15597 * configure.srv: Remove srv_xmltarget. Add XML files that were
15598 mentioned there to srv_xmlfiles instead. Remove conditional tests
15599 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15600 srv_xmlfiles and srv_regobj to include all possible choices.
15601 * configure.ac (srv_xmltarget): Remove.
15602 (srv_xmlfiles): Do not add "target.xml".
15603 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15604 checks for supplementary target information.
15605 * configure: Regenerate.
15606 * Makefile.in (XML_TARGET): Remove.
15607 (target.xml): Remove rule.
15608 (clean): Do not clean up target.xml.
15609 (.PRECIOUS): Do not mention target.xml.
15610
15611 * target.h (struct target_ops): Remove arch_string member.
15612 * linux-low.c (linux_arch_string): Remove.
15613 (linux_target_ops): Remove arch_string initializer.
15614 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15615 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15616 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15617 * spu-low.c (spu_arch_string): Remove.
15618 (spu_target_ops): Remove arch_string initializer.
15619 * win32-low.c (win32_arch_string): Remove.
15620 (win32_target_ops): Remove arch_string initializer.
15621 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15622 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15623 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15624
ee1a7ae4
UW
156252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15626
15627 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15628 by collect_ptrace_register and supply_ptrace_register hooks.
15629 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15630 instead of checking for the_low_target.left_pad_xfer.
15631 (usr_store_inferior_registers): Use collect_ptrace_register callback
15632 instead of checking for the_low_target.left_pad_xfer.
15633
15634 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15635 (s390_supply_ptrace_register): Likewise.
15636 (s390_fill_gregset): Call s390_collect_ptrace_register.
15637 (the_low_target): Update.
15638
15639 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15640 (ppc_supply_ptrace_register): Likewise.
15641 (the_low_target): Update.
15642
15643 * linux-i386-low.c (the_low_target): Update.
15644 * linux-x86-64-low.c (the_low_target): Update.
15645
d61ddec4
UW
156462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15647
15648 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15649 reg-s390.o and reg-s390x.o.
15650
15651 * linux-low.c (new_inferior): New global variable.
15652 (linux_create_inferior, linux_attach): Set it.
15653 (linux_wait_for_process): Call the_low_target.arch_setup after the
15654 target has stopped for the first time.
15655 (initialize_low): Do not call the_low_target.arch_setup.
15656
15657 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15658 (s390_set_pc): Likewise.
15659 (s390_arch_setup): New function.
15660 (the_low_target): Use s390_arch_setup as arch_setup routine.
15661
15662 * regcache.c (realloc_register_cache): New function.
15663 (set_register_cache): Call it for each existing regcache.
15664
d05b4ac3
UW
156652008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15666
15667 * server.h (init_registers): Remove prototype.
15668
15669 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15670 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15671 instead of init_registers ().
15672 * linux-arm-low.c (init_registers_arm): Add prototype.
15673 (init_registers_arm_with_iwmmxt): Likewise.
15674 (the_low_target): Add initializer for arch_setup field.
15675 * linux-cris-low.c (init_registers_cris): Add prototype.
15676 (the_low_target): Add initializer for arch_setup field.
15677 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15678 (the_low_target): Add initializer for arch_setup field.
15679 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15680 (the_low_target): Add initializer for arch_setup field.
15681 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15682 (the_low_target): Add initializer for arch_setup field.
15683 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15684 (the_low_target): Add initializer for arch_setup field.
15685 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15686 (the_low_target): Add initializer for arch_setup field.
15687 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15688 (init_registers_mips64_linux): Likewise.
15689 (the_low_target): Add initializer for arch_setup field.
15690 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15691 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15692 (the_low_target): Add initializer for arch_setup field.
15693 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15694 (init_registers_powerpc_64): Likewise.
15695 (the_low_target): Add initializer for arch_setup field.
15696 * linux-s390-low.c (init_registers_s390): Add prototype.
15697 (init_registers_s390x): Likewise.
15698 (the_low_target): Add initializer for arch_setup field.
15699 * linux-sh-low.c (init_registers_sh): Add prototype.
15700 (the_low_target): Add initializer for arch_setup field.
15701 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15702 (the_low_target): Add initializer for arch_setup field.
15703 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15704 (the_low_target): Add initializer for arch_setup field.
15705
15706 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15707 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15708 instead of init_registers ().
15709 * win32-arm-low.c (init_registers_arm): Add prototype.
15710 (the_low_target): Add initializer for arch_setup field.
15711 * win32-i386-low.c (init_registers_i386): Add prototype.
15712 (the_low_target): Add initializer for arch_setup field.
15713
15714 * spu-low.c (init_registers_spu): Add prototype.
15715 (initialize_low): Call initialie_registers_spu () instead of
15716 initialize_registers ().
15717
fd96d250
PA
157182008-02-19 Pedro Alves <pedro@codesourcery.com>
15719
15720 * server.c (handle_v_requests): When handling the vRun and vAttach
15721 packets, if already debugging a process, don't kill it. Return an
15722 error instead.
15723
d41b6bb4
DJ
157242008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * server.c (handle_query): Correct length check.
15727
5ac588cf
PA
157282008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15729
15730 * win32-low.c (do_initial_child_stuff): Add process handle
15731 parameter. Set current_process_handle and current_process_id from the
15732 parameters. Clear globals.
15733 (win32_create_inferior): Don't set current_process_handle and
15734 current_process_id here. Instead pass them on the call to
15735 do_initial_child_stuff.
15736 (win32_attach): Likewise.
15737 (win32_clear_inferiors): New.
15738 (win32_kill): Don't close the current process handle or the
15739 current thread handle here. Instead call win32_clear_inferiors.
15740 (win32_detach): Don't open a new handle to the process. Call
15741 win32_clear_inferiors.
15742 (win32_join): Don't rely on current_process_handle; open a new
15743 handle using the process id.
15744 (win32_wait): Call win32_clear_inferiors when the inferior process
15745 has exited.
15746
ecd7ecbc
DJ
157472008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15748
15749 * server.c (monitor_show_help): Add "exit".
15750
1525d545
MG
157512008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15752
ecd7ecbc 15753 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15754 (clean): Add reg-xtensa.c.
15755 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15756 * configure.srv (xtensa*-*-linux*) New target.
15757 * linux-xtensa-low.c: New.
15758 * xtensa-xtregs.c: New.
1525d545 15759
59a016f0
PA
157602008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15761
15762 * hostio.c: Don't include errno.h.
15763 (errno_to_fileio_errno): Move to hostio-errno.
15764 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15765 error number outputting to the target->hostio_last_error callback.
15766 (hostio_packet_error): Use FILEIO_EINVAL directly.
15767 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15768 calls to hostio_error.
15769 * hostio-errno.c: New.
15770 * server.h (hostio_last_error_from_errno): Declare.
15771 * target.h (target_ops): Add hostio_last_error member.
15772 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15773 as hostio_last_error handler.
889bf7c5 15774 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15775 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15776 (wince_hostio_last_error): New functions.
15777 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15778 as hostio_last_error handler.
15779 (win32_target_ops) [!_WIN32_WCE]: Register
15780 hostio_last_error_from_errno as hostio_last_error handler.
15781 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15782 (hostio-errno.o): New rule.
15783 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15784 * configure.srv (srv_hostio_err_objs): New variable. Default to
15785 hostio-errno.o.
15786 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15787 * configure: Regenerate.
15788
2d717e4f
DJ
157892008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15790
15791 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15792 (linux_kill, linux_detach): Clean up the process list.
15793 * remote-utils.c (remote_open): Improve port number parsing.
15794 (putpkt_binary, input_interrupt): Only send interrupts if the target
15795 is running.
15796 * server.c (extended_protocol): Make static.
15797 (attached): Define earlier.
15798 (exit_requested, response_needed, program_argv): New variables.
15799 (target_running): New.
15800 (start_inferior): Clear attached here.
15801 (attach_inferior): Set attached here.
15802 (require_running): Define.
15803 (handle_query): Use require_running and target_running. Implement
15804 "monitor exit".
15805 (handle_v_attach, handle_v_run): New.
15806 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15807 (gdbserver_usage): Update.
15808 (main): Redo argument parsing. Handle --debug and --multi. Handle
15809 --attach along with other options or after the port. Save
15810 program_argv. Support no initial program. Resynchronize
15811 communication with GDB after an error. Handle "monitor exit".
15812 Use require_running and target_running. Always allow the extended
15813 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15814 restart in extended mode.
15815 * README: Refer to the GDB manual. Update --attach usage.
15816
7407e2de
AS
158172007-12-20 Andreas Schwab <schwab@suse.de>
15818
15819 * linux-low.c (STACK_SIZE): Define.
15820 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15821 (linux_test_for_tracefork): Likewise.
15822
b65d95c5
DJ
158232007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15824
15825 * linux-low.c (linux_wait_for_event): Update messages. Do not
15826 reinsert auto-delete breakpoints.
15827 * mem-break.c (struct breakpoint): Change return type of handler to
15828 int.
15829 (set_breakpoint_at): Update handler type.
15830 (reinsert_breakpoint_handler): Return 1 instead of calling
15831 delete_breakpoint.
15832 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15833 setting a new one.
15834 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15835 * mem-break.h (set_breakpoint_at): Update handler type.
15836 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15837 * win32-low.c (auto_delete_breakpoint): New.
15838 (get_child_debug_event): Use it.
15839
4e799345
DJ
158402007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15841
15842 * configure.ac: Check for pread and pwrite.
15843 * hostio.c (handle_pread): Fall back to lseek and read.
15844 (handle_pwrite): Fall back to lseek and write.
15845 * config.in, configure: Regenerated.
15846
27524b67
DJ
158472007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * server.c (myresume): Add own_buf argument.
15850 (main): Update calls.
15851
a20d5e98
DJ
158522007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15853
15854 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15855 * remote-utils.c (remote_open): Do not call disable_async_io.
15856 (block_async_io): Delete.
15857 (unblock_async_io): Make static.
15858 (initialize_async_io): New.
15859 * server.c (handle_v_cont): Handle async I/O here.
15860 (myresume): Likewise. Move other common resume tasks here...
15861 (main): ... from here. Call initialize_async_io. Disable async
15862 I/O before the main loop.
15863 * server.h (initialize_async_io): Declare.
15864 (block_async_io, unblock_async_io): Delete prototypes.
15865 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15866
b79d787e
DJ
158672007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15868
15869 * remote-utils.c (readchar): Allow binary data in received messages.
15870
d97903b2
PA
158712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15872
15873 * win32-low.c (attaching): New global.
15874 (win32_create_inferior): Clear the `attaching' global.
15875 (win32_attach): Set the `attaching' global.
15876 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15877 attaching. Only set a breakpoint at the entry point if not
15878 attaching.
15879
311de423
PA
158802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15881
15882 * server.c (main): Don't report dll events on the initial
15883 connection on attaches.
15884
6c2d16d2
PA
158852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15886
15887 * server.c (main): Relax numerical bases supported for the pid of
15888 the --attach command line argument.
15889
5ca906e6
PA
158902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15891
15892 * win32-low.c (win32_attach): Call OpenProcess before
15893 DebugActiveProcess, not after. Add last error output to error
15894 call.
15895
9c6c8194
PA
158962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15897
15898 * win32-low.c (win32_get_thread_context)
15899 (win32_set_thread_context): New functions.
15900 (thread_rec): Use win32_get_thread_context.
15901 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15902 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15903 field.
15904
4d5d1aaa
PA
159052007-12-03 Leo Zayas
15906 Pedro Alves <pedro_alves@portugalmail.pt>
15907
15908 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15909 global variables.
15910 (child_add_thread): Minor cleanup.
15911 (child_continue): Resume artificially suspended threads before
15912 calling ContinueDebugEvent.
15913 (suspend_one_thread): New.
15914 (fake_breakpoint_event): New.
15915 (get_child_debug_event): Change return type to int. Check here if
15916 gdb sent an interrupt request. If a soft interrupt was requested,
15917 fake a breakpoint event. Return 0 if there is no event to handle,
15918 and 1 otherwise.
15919 (win32_wait): Don't check here if gdb sent an interrupt request.
15920 Ensure there is a valid event to handle.
15921 (win32_request_interrupt): Add soft interruption method as last
15922 resort.
15923
c436e841
PA
159242007-12-03 Leo Zayas
15925 Pedro Alves <pedro_alves@portugalmail.pt>
15926
15927 * win32-low.h (win32_thread_info): Add descriptions to the
15928 structure members. Replace `suspend_count' counter by a
15929 `suspended' flag.
15930 * win32-low.c (thread_rec): Update condition of when to get the
15931 context from the inferior. Rely on ContextFlags being set if it
15932 has already been retrieved. Only suspend the inferior thread if
15933 we haven't already. Warn if that fails.
15934 (continue_one_thread): s/suspend_count/suspended/. Only call
15935 ResumeThread once. Warn if that fails.
15936
e7b5fa67
PA
159372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15938
15939 * win32-low.c (win32_wait): Don't read from the inferior when it
15940 has already exited.
15941
a385171d
PA
159422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15943
15944 * Makefile.in (win32_low_h): New variable.
15945 (win32-low.o): Add dependency on $(win32_low_h).
15946 (win32-arm-low.o, win32-i386-low.o): New rules.
15947
f80c84b3
DJ
159482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15949
15950 * hostio.c: Correct copyright year.
15951
a6b151f1
DJ
159522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15953
15954 * Makefile.in (OBS): Add hostio.o.
15955 (hostio.o): New rule.
15956 * server.h (handle_vFile): Declare.
15957 * hostio.c: New file.
15958 * server.c (handle_v_requests): Take packet_len and new_packet_len
15959 for binary packets. Call handle_vFile.
15960 (main): Update call to handle_v_requests.
15961
f9387fc3
DJ
159622007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15963
15964 * linux-low.c: Include <sched.h>.
15965
51c2684e
DJ
159662007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15967
15968 * linux-low.c (linux_tracefork_grandchild): New.
15969 (linux_tracefork_child): Use clone.
15970 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15971
75f83163
JB
159722007-10-31 Joel Brobecker <brobecker@adacore.com>
15973
15974 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15975
da5898ce
DJ
159762007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15977
15978 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15979
24a09b5f
DJ
159802007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15981
15982 * inferiors.c (change_inferior_id): Delete.
15983 (add_pid_to_list, pull_pid_from_list): New.
15984 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15985 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15986 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15987 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15988 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15989 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15990 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15991 (using_threads): Always set to 1.
15992 (handle_extended_wait): New.
15993 (add_process): Do not set TID.
15994 (linux_create_inferior): Set must_set_ptrace_flags.
15995 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15996 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15997 (linux_thread_alive): Rename TID argument to LWPID.
15998 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15999 (linux_wait_for_event): Do not use TID or check using_threads. Update
16000 call to dead_thread_notify. Call handle_extended_wait.
16001 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16002 (send_sigstop): Delete sigstop_sent.
16003 (wait_for_sigstop): Avoid TID.
16004 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16005 (linux_test_for_tracefork): New.
16006 (linux_lookup_signals): Use thread_db_active and
16007 linux_supports_tracefork_flag.
16008 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16009 * linux-low.h (get_process_thread): Avoid TID.
16010 (struct process_ifo): Move thread_known and tid to the end. Remove
16011 sigstop_sent.
16012 (linux_attach_lwp, thread_db_init): Update prototypes.
16013 * server.h (change_inferior_id): Delete prototype.
16014 (add_pid_to_list, pull_pid_from_list): New prototypes.
16015 * thread-db.c (thread_db_use_events): New.
16016 (find_first_thread): Rename to...
16017 (find_one_thread): ...this. Update callers and messages. Do not
16018 call fatal. Check thread_db_use_events. Do not call
16019 change_inferior_id or new_thread_notify.
16020 (maybe_attach_thread): Update. Do not call new_thread_notify.
16021 (thread_db_init): Set thread_db_use_events. Check use_events.
16022 * utils.c (fatal, warning): Correct message prefix.
16023
30ed0a8f
DJ
160242007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16025
16026 * Makefile.in (clean): Remove new files.
16027 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16028 (powerpc-64.o, powerpc-64.c): New rules.
16029 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16030 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16031 with SPE.
16032 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16033 SPE targets.
16034 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16035 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16036 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16037 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16038 (target_regsets): Add AltiVec and SPE register sets.
16039 * configure.ac: Check for AltiVec and SPE.
16040 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16041 (ppc_fill_vrregset, ppc_store_vrregset): New.
16042 (target_regsets): Add AltiVec register set.
16043 * configure: Regenerated.
16044
fd462a61
DJ
160452007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16046
16047 * linux-low.c (O_LARGEFILE): Define.
16048 (linux_read_memory): Use /proc/PID/mem.
16049 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16050 * configure, config.in: Regenerated.
16051
69f223ed
DJ
160522007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16053
16054 * linux-low.c (linux_wait_for_event): Do not pass signals while
16055 single-stepping.
16056
aec18585
PA
160572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16058
16059 * win32-low.c (create_process): New.
16060 (win32_create_inferior): Use create_process instead of
16061 CreateProcess. If create_process failed retry appending an ".exe"
16062 suffix. Store the GetLastError result immediatelly after
16063 create_process calls and use it on the call to error.
16064
34d86ddd
PA
160652007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16066
16067 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16068
5a0e3bd0
JB
160692007-08-23 Joel Brobecker <brobecker@adacore.com>
16070
16071 * configure.ac: Switch license to GPLv3.
16072
f88c79e6
MS
160732007-08-01 Michael Snyder <msnyder@access-company.com>
16074
16075 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16076
6b3d9b83
PA
160772007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16078
16079 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16080 typedef.
16081 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16082 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16083 CloseToolhelp32Snapshot.
16084 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16085 CloseToolhelp32Snapshot.
16086
c588c53c
MS
160872007-07-27 Michael Snyder <michael.snyder@access-company.com>
16088
16089 * server.c (main): Check for inferior exit before main loop.
16090
aa0403d9
PA
160912007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16092
16093 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16094 instead of on tmp_desc.
16095
255e7678
DJ
160962007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16097 Daniel Jacobowitz <dan@codesourcery.com>
16098
16099 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16100 (add_thread): Minor cleanups.
16101 (clear_inferiors): Move lower in the file. Clear the DLL
16102 list.
16103 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16104 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16105 (xml_escape_text): New.
16106 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16107 for qSupported.
16108 (handle_v_cont): Report errors.
16109 (gdbserver_version): Update.
16110 (main): Correct size of own_buf. Do not report initial DLL events.
16111 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16112 (unloaded_dll, xml_escape_text): New.
16113 * win32-low.c (enum target_waitkind): Update comments.
16114 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16115 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16116 (win32_EnumProcessModules, win32_GetModuleInformation)
16117 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16118 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16119 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16120 (win32_Module32First, win32_Module32Next, load_toolhelp)
16121 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16122 (get_child_debug_event): Handle DLL events.
16123 (win32_wait): Likewise.
16124
0d37add9
DJ
161252007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16126
16127 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16128 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16129
45e2715e
PA
161302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16131
16132 * win32-low.c (handle_output_debug_string): Ignore event if not
16133 waiting.
16134
c5674cf1
PA
161352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16136
16137 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16138
2bbe3cc1
DJ
161392007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16140
16141 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16142
ae13219e
DJ
161432007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16144
16145 * inferiors.c (change_inferior_id): Add comment.
16146 * linux-low.c (check_removed_breakpoint): Add an early
16147 prototype. Improve debug output.
16148 (linux_attach): Doc update.
16149 (linux_detach_one_process, linux_detach): Clean up before releasing
16150 each process.
16151 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16152 * linux-low.h (struct process_info): Doc improvement.
16153 * mem-break.c (delete_all_breakpoints): New.
16154 * mem-break.h (delete_all_breakpoints): New prototype.
16155 * thread-db.c (find_first_thread): New.
16156 (thread_db_create_event): Call it instead of
16157 thread_db_find_new_threads. Clean up unused variables.
16158 (maybe_attach_thread): Remove first thread handling.
16159 (thread_db_find_new_threads): Use find_first_thread.
16160 (thread_db_get_tls_address): Likewise.
16161
4105de34
DJ
161622007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16163
16164 * thread-db.c (thread_db_find_new_threads): Add prototype.
16165 (thread_db_create_event): Check for the main thread before adding
16166 a new thread.
16167 (maybe_attach_thread): Only enable event reporting if TID == 0.
16168 (thread_db_get_tls_address): Check for new threads.
16169
2b876972
DJ
161702007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16171
16172 * linux-low.c (linux_create_inferior): Try execv before execvp.
16173 * spu-low.c (spu_create_inferior): Likewise.
16174
7a245884
DJ
161752007-06-13 Mike Frysinger <vapier@gentoo.org>
16176
16177 * linux-low.c (linux_create_inferior): Change execv to execvp.
16178 * spu-low.c (spu_create_inferior): Likewies.
16179
117ce543
DJ
161802007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16181
16182 * Makefile.in (clean): Clean new files instead of deleted ones.
16183 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16184 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16185 rules.
16186 * configure.srv: Specify XML files and new regformats for MIPS and
16187 MIPS64 GNU/Linux.
16188 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16189 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16190 an entry for the restart register.
16191 (mips_cannot_fetch_register, mips_cannot_store_register)
16192 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16193 register names to match the XML descriptions.
16194 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16195 restart register instead of $0.
16196
0e7f50da
UW
161972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16198 Markus Deuling <deuling@de.ibm.com>
16199
16200 * remote-utils.c (decode_xfer_write): New function.
16201 * server.h (decode_xfer_write): Add prototype.
16202 * server.c (handle_query): Add PACKET_LEN argument. Support
16203 qXfer:spu:read and qXfer:spu:write packets.
16204 (main): Pass packet_len to handle_query.
16205 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16206 * target.h (target_ops): Add qxfer_spu.
16207
374c1d38
UW
162082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16209
16210 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16211 accessing non-seekable spufs files.
16212
bb63802a
UW
162132007-05-16 Markus Deuling <deuling@de.ibm.com>
16214
889bf7c5 16215 * server.c (handle_query): Add reply for qC packet.
bb63802a 16216
7390519e
PA
162172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16218 Leo Zayas <lerele@champenstudios@com>
16219
16220 * server.h (check_remote_input_interrupt_request): New function.
16221 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16222 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16223 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16224 (check_remote_input_interrupt_request): New function.
16225 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16226 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16227 winapi_GenerateConsoleCtrlEvent): New typedefs.
16228 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16229 to 250 ms.
16230 (win32_wait): Check for remote interrupt request
16231 with check_remote_input_interrupt_request.
16232 (win32_request_interrupt): New function.
16233 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16234
34b34921
PA
162352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16236
16237 * win32-low.c (debug_registers_changed,
16238 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16239 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16240 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16241 (thread_rec): Get context using the low target.
16242 (child_add_thread): Call thread_added on the low target,
16243 which does the same thing.
16244 (regptr): Delete.
16245 (do_initial_child_stuff): Remove debug registers references.
16246 Set context using the low target. Resume threads after
16247 setting the contexts.
16248 (child_continue): Remove dead variable. Remove debug
16249 registers references.
16250 (child_fetch_inferior_registers): Go through the low target.
16251 (do_child_store_inferior_registers): Remove.
16252 (child_store_inferior_registers): Go through the low target.
16253 (win32_resume): Remove debug registers references.
16254 Set context using the low target.
16255 (handle_exception): Change return type to void. Don't record
16256 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16257 first chance exception.
889bf7c5 16258 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16259 goto loop. Always return after waiting for debug event.
16260 (win32_wait): Convert to switch statement. Handle spurious
16261 events.
16262
16263 * win32-i386-low.c (debug_registers_changed,
16264 debug_registers_used): New.
16265 (initial_stuff): Rename to ...
16266 (i386_initial_stuff): ... this. Clear debug registers
16267 state variables.
16268 (store_debug_registers): Delete.
16269 (i386_get_thread_context): New.
16270 (load_debug_registers): Delete.
16271 (i386_set_thread_context): New.
16272 (i386_thread_added): New.
16273 (single_step): Rename to ...
16274 (i386_single_step): ... this.
16275 (do_fetch_inferior_registers): Rename to ...
16276 (i386_fetch_inferior_register): ... this.
16277 (i386_store_inferior_register): New.
16278 (the_low_target): Adapt to new interface.
16279
16280 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16281 (arm_get_thread_context): New.
16282 (arm_set_thread_context): New.
16283 (regptr): New.
16284 (do_fetch_inferior_registers): Rename to ...
16285 (arm_fetch_inferior_register): ... this.
16286 (arm_store_inferior_register): New.
16287 (arm_wince_breakpoint): Reimplement as unsigned long.
16288 (arm_wince_breakpoint_len): Define.
16289 (the_low_target): Adapt to new interface.
16290
16291 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16292 load_debug_registers. Add get_thread_context, set_thread_context,
16293 thread_added and store_inferior_register. Rename
16294 fetch_inferior_registers to fetch_inferior_register.
16295 (regptr): Remove declaration.
16296
dd6953e1
PA
162972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16298
16299 * linux-low.c (linux_detach): Change return type to int. Return 0.
16300 * spu-low.c (spu_detach): Likewise.
16301
444d6139
PA
163022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16303
16304 * target.h (target_ops): Change return type of detach to int.
16305 Add join.
16306 (join_inferior): New.
16307 * server.c (main): Don't skip detach support on mingw32.
16308 If the inferior doesn't support detaching return error.
16309 Call join_inferior instead of using waitpid.
16310 * linux-low.c (linux_join): New.
16311 (linux_target_op): Add linux_join.
16312 * spu-low.c (spu_join): New.
16313 (spu_target_ops): Add spu_join.
16314 * win32-low.c (win32_detach): Adapt to new interface.
16315 Reopen current_process_handle before detaching. Issue a child
16316 resume before detaching.
16317 (win32_join): New.
16318 (win32_target_op): Add win32_join.
16319
1d5315fe
PA
163202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16321
16322 * win32-low.c (win32-attach): Fix return value.
16323 * target.h (target_ops): Describe ATTACH return values.
16324
bf914831
PA
163252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16326
16327 * win32-low.c (GETPROCADDRESS): Define.
16328 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16329 (winapi_DebugSetProcessKillOnExit): Likewise.
16330 (win32_create_inferior): Force usage of ansi CreateProcessA.
16331 (win32_attach): Use GETPROCADDRESS.
16332 (win32_detach): Likewise.
16333
f72f3e60
PA
163342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16335
16336 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16337
ed50f18f
PA
163382007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16339
16340 * win32-low.c: Commit leftover changes from 2007-03-29.
16341
0c2ead7e
DJ
163422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16343
16344 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16345 fields short instead of int. Add explicit padding.
16346 (i387_cache_to_fsave): Remove unnecessary casts.
16347 (i387_fsave_to_cache): Doc fix.
16348 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16349
73725ff3
DJ
163502007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16351
16352 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16353 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16354
d99f33d8
PA
163552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16356
16357 * configure.srv (arm*-*-mingw32ce*): Move near the other
16358 arm targets.
16359
68070c10
PA
163602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16361
2482afc6 16362 * configure.ac: Add errno checking.
68070c10
PA
16363 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16364 sys/file.h and malloc.h.
16365 (AC_CHECK_DECLS): Add perror.
16366 (srv_mingwce): Handle.
2482afc6 16367 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16368 win32-i386-low.o to srv_tgtobj.
16369 (i[34567]86-*-mingw*): Likewise.
16370 (arm*-*-mingw32ce*): Add case.
16371 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16372 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16373 [__MINGW32CE__] (strerror): New function.
16374 [__MINGW32CE__] (errno): Define to GetLastError.
16375 [__MINGW32CE__] (COUNTOF): New macro.
16376 (remote_open): Remove extra close call.
16377 * mem-break.c (delete_breakpoint_at): New function.
16378 * mem-break.h (delete_breakpoint_at): Declare.
16379 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16380 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16381 [USE_WIN32API] (read, write): Add char* casts.
16382 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16383 * server.h: Include wincecompat.h on Windows CE.
16384 [HAVE_ERRNO_H]: Check.
16385 (perror): Declare if not declared.
16386 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16387 (perror_with_name): Remove errno declaration.
16388 * wincecompat.h: New.
16389 * wincecompat.c: New.
16390 * win32-low.h: New.
16391 * win32-arm-low.c: New.
16392 * win32-i386-low.c: New.
16393 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16394 (OUTMSG2): Make it safe.
16395 (_T): New macro.
16396 (COUNTOF): New macro.
16397 (NUM_REGS): Get it from the low target.
16398 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16399 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16400 (thread_rec): Let low target handle debug registers.
16401 (child_add_thread): Likewise.
16402 (child_init_thread_list): Likewise.
16403 (continue_one_thread): Likewise.
16404 (regptr): New.
16405 (do_child_fetch_inferior_registers): Move to ...
16406 * win32-i386-low.c: ... here, and rename to ...
16407 (do_fetch_inferior_registers): ... this.
889bf7c5 16408 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16409 Go through the low target.
16410 (do_child_store_inferior_registers): Use regptr.
16411 (strwinerror): New function.
16412 (win32_create_inferior): Handle Windows CE.
16413 Use strwinerror instead of strerror on Windows error
16414 codes. Add program to the error output.
16415 Don't close the main thread handle on Windows CE.
16416 (win32_attach): Use coredll.dll on Windows CE.
16417 (win32_kill): Close current process and current
16418 thread handles.
16419 (win32_detach): Use coredll.dll on Windows CE.
16420 (win32_resume): Let low target handle debug registers, and
16421 step request.
16422 (handle_exception): Add/Remove initial breakpoint. Avoid
16423 non-existant WSTOPSIG on Windows CE.
16424 (win32_read_inferior_memory): Cast to remove warning.
16425 (win32_arch_string): Go through the low target.
16426 (initialize_low): Call set_breakpoint_data with the low
16427 target's breakpoint.
16428 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16429 FOP_REGNUM, mappings): Move to ...
16430 * win32-i386-low.c: ... here.
16431 * win32-low.c (win32_thread_info): Move to ...
16432 * win32-low.h: ... here.
16433 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16434 win32-arm-low.c and wincecompat.c.
16435 (all:): Add $EXEEXT.
16436 (install-only:): Likewise.
16437 (gdbserver:): Likewise.
16438 (gdbreplay:): Likewise.
16439 * config.in: Regenerate.
16440 * configure: Regenerate.
16441
41093d81
PA
164422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16443
16444 * win32-low.c: Rename typedef thread_info to
16445 win32_thread_info throughout.
16446
544afa54
PA
164472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16448
16449 * win32-i386-low.c: Rename to ...
16450 * win32-low.c: ... this.
16451 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16452 * Makefile.in: Likewise.
16453
bce7165d
PA
164542007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16455
16456 * remote-utils.c (monitor_output): Constify msg parameter.
16457 * server.h (monitor_output): Likewise.
16458 * win32-i386-low.c (handle_output_debug_string): New.
16459 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16460 handle_output_debug_string.
16461 (get_child_debug_event): Likewise.
16462
506c7aa0
DJ
164632007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16464
16465 * server.c (main): Correct strtoul check.
16466
42c81e2a
DJ
164672007-03-27 Jon Ringle <jon@ringle.org>
16468
16469 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16470
9453113a
DJ
164712007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16472
16473 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16474
64a69107
DJ
164752007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16476
16477 * terminal.h: Check HAVE_SGTTY_H.
16478
164792007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16480
16481 * remote-utils.c (remote_open): Print out the assigned port number.
16482
c74d0ad8
DJ
164832007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16484
16485 * remote-utils.c (monitor_output): New function.
16486 * server.c (debug_threads): Define here.
16487 (monitor_show_help): New function.
16488 (handle_query): Handle qRcmd.
16489 (main): Do not handle 'd' packet.
16490 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16491 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16492 of debug_threads.
16493
de7c3b4a
PA
164942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16495
16496 * Makefile.in (EXEEXT): New.
16497 (clean): Use $(EXEEXT).
16498
ef57601b
PA
164992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16500
16501 * target.h (target_ops): Rename send_signal to request_interrupt,
16502 and remove enum target_signal parameter.
16503 * linux-low.c (linux_request_interrupt): Rename from
16504 linux_send_signal, and always send SIGINT.
16505 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16506 and always send SIGINT.
16507 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16508 of send_signal.
16509 (input_interrupt): Likewise.
16510
820f2bda
PA
165112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16512
16513 * server.c (get_features_xml): Check if target implemented
16514 arch_string.
16515 * win32-i386-low.c (win32_arch_string): New.
16516 (win32_target_ops): Add win32_arch_string as arch_string member.
16517
ab39bf24
UW
165182007-02-22 Markus Deuling <deuling@de.ibm.com>
16519
16520 * spu-low.c (spu_arch_string): New.
16521 (spu_target_ops): Add spu_arch_string.
16522
61ff6e04
DJ
165232007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16524
16525 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16526 * configure.ac: Do not check for terminal.h.
16527 * configure, config.in: Regenerated.
16528
fb1e4ffc
DJ
165292007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16530
16531 * Makefile.in (OBS): Add $(XML_BUILTIN).
16532 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16533 (clean): Update.
16534 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16535 (arm-with-iwmmxt.c): New.
16536 * config.in, configure: Regenerate.
16537 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16538 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16539 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16540 (arm*-*-linux*): Add iWMMXt and regset support.
16541 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16542 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16543 (arm_store_wmmxregset, target_regsets): New.
16544 * server.c (get_features_xml): Take annex argument. Check builtin
16545 XML documents.
16546 (handle_query): Handle multiple annexes.
16547
0f48aa01
DJ
165482007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16549
16550 * remote-utils.c [USE_WIN32API] (read, write): Define.
16551 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16552 write.
16553
23181151
DJ
165542007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16555
16556 * linux-i386-low.c (the_low_target): Set arch_string.
16557 * linux-x86-64-low.c (the_low_target): Likewise.
16558 * linux-low.c (linux_arch_string): New.
16559 (linux_target_ops): Add it.
16560 * linux-low.h (struct linux_target_ops): Add arch_string.
16561 * server.c (write_qxfer_response): Use const void * for DATA.
16562 (get_features_xml): New.
16563 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16564 * target.h (struct target_ops): Add arch_string method.
16565
9d606399
DJ
165662007-01-03 Denis Pilat <denis.pilat@st.com>
16567 Daniel Jacobowitz <dan@codesourcery.com>
16568
16569 * linux-low.c (linux_kill): Handle being called with no threads.
16570 * win32-i386-low.c (win32_kill): Likewise.
16571 (get_child_debug_event): Clear current_process_handle.
16572
165732006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16574 Daniel Jacobowitz <dan@codesourcery.com>
16575
16576 * remote-utils.c (remote_open): Check the type of specified
16577 serial port devices before opening them.
16578 * server.c (main): Kill the inferior if an error occurs during
16579 the first remote_open.
16580
a5e13d24
DJ
165812006-12-05 Markus Deuling <deuling@de.ibm.com>
16582
16583 * README: Update supported targets.
16584
186947f7
DJ
165852006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16586
16587 * Makefile.in (clean): Remove reg-mips64.c.
16588 (reg-mips64.c, reg-mips64.o): New rules.
16589 * configure.srv: Handle mips64. Include regset support for mips.
16590 * linux-mips-low.c (union mips_register): New.
16591 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16592 (mips_breakpoint, mips_breakpoint_at): Use int.
16593 (mips_collect_register, mips_supply_register)
16594 (mips_collect_register_32bit, mips_supply_register_32bit)
16595 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16596 (mips_store_fpregset, target_regsets): New.
16597 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16598
a13e2c95
UW
165992006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16600
16601 * configure.srv: Add target "spu*-*-*".
16602 * Makefile.in (clean): Remove reg-spu.c.
16603 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16604 * spu-low.c: New file.
16605
cb7283db
DJ
166062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16607
16608 * configure.ac: Correct td_thr_tls_get_addr test.
16609 * configure: Regenerated.
16610
89be2091
DJ
166112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16612
16613 * linux-low.c (linux_wait_for_event): Reformat. Use the
16614 pass_signals array.
16615 * remote-utils.c (decode_address_to_semicolon): New.
16616 * server.c (pass_signals, handle_general_set): New.
16617 (handle_query): Mention QPassSignals for qSupported.
16618 (main): Call handle_general_set.
16619 * server.h (pass_signals, decode_address_to_semicolon): New.
16620
000ef4f0
DJ
166212006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16622
16623 * server.c (handle_query): Correct error handling for read_auxv.
16624
b7149293
UW
166252005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16626
16627 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16628 and srv_linux_thread_db to yes.
16629 * linux-s390-low.c (s390_fill_gregset): New function.
16630 (target_regsets): Define data structure.
16631
dae5f5cf
DJ
166322006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16633
16634 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16635 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16636 * config.in, configure: Regenerated.
16637 * inferiors.c (gdb_id_to_thread): New function.
16638 (gdb_id_to_thread_id): Use it.
16639 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16640 * linux-low.h (struct process_info): Add th member.
16641 (thread_db_get_tls_address): New prototype.
16642 * remote-utils.c (decode_address): Make non-static.
16643 * server.c (handle_query): Handle qGetTLSAddr.
16644 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16645 * target.h (struct target_ops): Add get_tls_address.
16646 * thread-db.c (maybe_attach_thread): Save the thread handle.
16647 (thread_db_get_tls_address): New.
16648
32ca6d61
DJ
166492006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16650
16651 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16652 (linux_resume_one_process): Take a siginfo_t *. Update all
16653 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16654 (struct pending_signals): Add a siginfo_t.
16655 (linux_wait_for_process): Always set last_status.
16656 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16657 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16658 * linux-low.h (struct process_info): Add last_status.
16659
5ffff7c1
DJ
166602006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16661
16662 * remote-utils.c (try_rle): New function.
16663 (putpkt_binary): Use it.
16664
8695c747
DJ
166652006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16666
16667 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16668 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16669 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16670 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16671 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16672 point registers.
16673
290fadea
RS
166742006-08-08 Richard Sandiford <richard@codesourcery.com>
16675
16676 * server.c (terminal_fd): New variable.
16677 (old_foreground_pgrp): Likewise.
16678 (restore_old_foreground_pgrp): New function.
16679 (start_inferior): Record the terminal file descriptor in terminal_fd
16680 and its original foreground group in old_foreground_pgrp. Register
16681 restore_old_foreground_pgrp with atexit().
16682
9f2e1e63
DJ
166832006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * server.c (handle_query): Correct qPart to qXfer.
16686
b80864fb
DJ
166872006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16688
16689 * configure.ac: Check for more headers which are missing on
16690 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16691 * configure.srv: Add Cygwin and mingw32.
16692 * remote-utils.c: Don't include headers unconditionally which
16693 are missing on mingw32. Include <winsock.h> for mingw32.
16694 (remote_open): Adjust for mingw32 support. Flush
16695 standard error after writing to it.
16696 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16697 (unblock_async_io, enable_async_io, disable_async_io)
16698 (readchar, getpkt): Update for Winsock support.
16699 (prepare_resume_reply): Expect a protocol signal number.
16700 * server.c: Disable <sys/wait.h> on mingw32.
16701 (start_inferior): Adjust for mingw32 support. Flush
16702 standard error after writing to it.
16703 (attach_inferior): Likewise. Use protocol signal
16704 numbers.
16705 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16706 and names.
16707 * win32-i386-low.c: New file.
16708 * Makefile.in (XM_CLIBS): Set.
16709 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16710 (win32-i386-low.o): New dependency rule.
16711 * linux-low.c (linux_wait): Use target signal numbers.
16712 * target.h (struct target_ops): Doc fix.
16713 * server.h (target_signal_to_name): New prototype.
16714 * gdbreplay.c: Don't include headers unconditionally which
16715 are missing on mingw32. Include <winsock.h> for mingw32.
16716 (remote_close, remote_open): Adjust for Winsock support.
16717 * configure, config.in: Regenerated.
16718
0876f84a
DJ
167192006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16720
16721 * server.c (decode_xfer_read, write_qxfer_response): New.
16722 (handle_query): Take a packet length argument. Handle
16723 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16724 the qSupported response.
16725 (main): Update call to handle_query.
16726
01f9e8fa
DJ
167272006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16728
16729 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16730 (putpkt_binary): Renamed from putpkt and adjusted for binary
16731 data.
16732 (putpkt): New wrapper for putpkt_binary.
16733 (readchar): Don't mask off the high bit.
16734 (decode_X_packet): New function.
16735 * server.c (main): Call putpkt_binary if a handler sets the packet
16736 length. Save the length of the incoming packet. Handle 'X'.
16737 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16738
be2a5f71
DJ
167392006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16740
16741 * server.c (handle_query): Handle qSupported.
16742
ea025f5f
DJ
167432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16744
16745 * remote-utils.c (all_symbols_looked_up): New variable.
16746 (look_up_one_symbol): Check it.
16747 * server.h (look_up_one_symbol): New declaration.
16748 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16749
9308fc88
DJ
167502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16751
16752 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16753 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16754 (PTRACE_GET_THREAD_AREA): Define.
16755 (ps_get_thread_area): New function.
16756
52fb6437
NS
167572006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16758
16759 * configure.srv (m68k*-*-uclinux*): New target.
16760 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16761 (linux_resume_one_process): Remove extraneous cast.
16762 (linux_read_offsets): New.
16763 (linux_target_op): Add linux_read_offsets on mmuless systems.
16764 * server.c (handle_query): Add qOffsets logic.
16765 * target.h (struct target_ops): Add read_offsets.
16766
21b0f40c
DJ
167672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16768
16769 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16770 (PTRACE_GET_THREAD_AREA): Define.
16771 (ps_get_thread_area): New function.
16772 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16773 (linux-x86-64-low.o): Update.
16774
0050a760
DJ
167752006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16776
16777 * configure.ac: Remove checks for prfpregset_t.
16778 * gdb_proc_service.h: New file.
16779 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16780 new "gdb_proc_service.h".
16781 * proc-service.c: Likewise.
16782 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16783 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16784 * Makefile.in (gdb_proc_service_h): Updated.
16785 * configure, config.in: Regenerated.
16786
b92a518e
DJ
167872006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16788
16789 * remote-utils.c (prepare_resume_reply): Move declaration
16790 of gdb_id_from_wait to the top of the block.
16791
545587ee
DJ
167922006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16793
16794 * linux-low.c (regsets_store_inferior_registers): Read the regset
16795 from the target before filling it.
16796
9db87ebd
DJ
167972006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16798
16799 * server.c (attach_inferior): Return SIGTRAP for a successful
16800 attach.
16801
dd24457d
DJ
168022006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16803
16804 * Makefile.in (OBS): Add version.o.
16805 (STAGESTUFF): Delete.
16806 (version.o): Add dependencies.
16807 (version.c): Replace rule.
16808 (clean): Remove version.c.
16809 * server.c (gdbserver_version): New.
16810 (gdbserver_usage): Use printf.
16811 (main): Handle --version and --help.
16812 * server.h (version, host_name): Add declarations.
16813
6f0f660e
EZ
168142005-12-23 Eli Zaretskii <eliz@gnu.org>
16815
889bf7c5
PA
16816 * linux-arm-low.c:
16817 * linux-arm-low.c:
16818 * inferiors.c:
16819 * i387-fp.h:
16820 * i387-fp.c:
16821 * gdbreplay.c:
16822 * regcache.c:
16823 * proc-service.c:
16824 * mem-break.h:
16825 * mem-break.c:
16826 * linux-x86-64-low.c:
16827 * linux-sh-low.c:
16828 * linux-s390-low.c:
16829 * linux-ppc64-low.c:
16830 * linux-ppc-low.c:
16831 * linux-mips-low.c:
16832 * linux-m68k-low.c:
16833 * linux-m32r-low.c:
16834 * linux-low.h:
16835 * linux-low.c:
16836 * linux-ia64-low.c:
16837 * linux-i386-low.c:
16838 * linux-crisv32-low.c:
16839 * thread-db.c:
16840 * terminal.h:
16841 * target.h:
16842 * target.c:
16843 * server.h:
16844 * server.c:
16845 * remote-utils.c:
16846 * regcache.h:
16847 * utils.c:
16848 * Makefile.in:
16849 * configure.ac:
6f0f660e
EZ
16850 * gdbserver.1: Add (C) after Copyright. Update the FSF
16851 address.
16852
9d1fb177
DJ
168532005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16854
16855 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16856 (arm_breakpoint_at): Recognize both breakpoints.
16857 (the_low_target): Use the correct breakpoint instruction.
16858
011a70c2
DJ
168592005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16860
16861 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16862 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16863 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16864 (the_low_target): Update.
16865
7fb85e41
AS
168662005-10-25 Andreas Schwab <schwab@suse.de>
16867
16868 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16869
16870 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16871 (ia64_num_regs): Reduce to 462.
16872
3db0444b
DJ
168732005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16874
16875 * acinclude.m4: Correct quoting.
16876 * aclocal.m4: Regenerated.
16877
16878 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16879 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16880 (thread_db_init): Call thread_db_err_str.
16881 * configure.ac: Check for TD_VERSION.
16882 * config.in, configure: Regenerated.
16883
bee0189a
DJ
168842005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16885
16886 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16887
e9d25b98
DJ
168882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16889
16890 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16891 is not available. Define HAVE_PTRACE_GETREGS if it is.
16892 * config.in, configure: Regenerated.
16893 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16894 * linux-i386-low.c, linux-m68k-low.c: Update to use
16895 HAVE_PTRACE_GETREGS.
16896 * linux-low.c (regsets_fetch_inferior_registers)
16897 (regsets_store_inferior_registers): Only return 0 if we processed
16898 GENERAL_REGS.
16899 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16900 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16901
a06660f7
DJ
169022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16903
16904 * inferiors.c (struct thread_info): Add gdb_id.
16905 (add_thread): Add gdb_id argument.
16906 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16907 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16908 calls to add_thread.
16909 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16910 * server.c (handle_query): Use thread_to_gdb_id.
16911 (handle_v_cont, main): Use gdb_id_to_thread_id.
16912 * server.h (add_thread): Update prototype.
16913 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16914 prototypes.
16915
5a1f5858
DJ
169162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16917
16918 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16919 left-padded registers.
16920 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16921 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16922
e122f1f5
SE
169232005-07-01 Steve Ellcey <sje@cup.hp.com>
16924
16925 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16926 * configure: Regenerate.
16927 * config.in: Regenerate.
16928 * server.h (NEED_DECLARATION_STRERROR):
16929 Replace with !HAVE_DECL_STRERROR.
16930
d592fa2f
DJ
169312005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16932
16933 * linux-low.c (linux_wait, linux_send_signal): Don't test
16934 an unsigned long variable for > 0 if it could be MAX_ULONG.
16935 * server.c (myresume): Likewise.
16936 * target.c (set_desired_inferior): Likewise.
16937
ccbd4912
MK
169382005-06-13 Mark Kettenis <kettenis@gnu.org>
16939
16940 * configure.ac: Simplify and improve check for socklen_t.
16941 * configure, config.in: Regenerate.
16942
f450004a
DJ
169432005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16944
16945 * acconfig.h: Remove.
16946 * configure.ac: Add a test for socklen_t. Use three-argument
16947 AC_DEFINE throughout.
16948 * config.in: Regenerated using autoheader 2.59.
16949 * configure: Regenerated.
16950
16951 * gdbreplay.c (socklen_t): Provide a default.
16952 (remote_open): Use socklen_t.
16953 * remote-utils.c (socklen_t): Provide a default.
16954 (remote_open): Use socklen_t.
16955 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16956 unsigned char.
16957
16958 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16959 char for buffers.
16960 * linux-low.c (linux_read_memory, linux_write_memory)
16961 (linux_read_auxv): Likewise.
16962 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16963 (check_mem_write): Likewise.
16964 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16965 Likewise.
16966 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16967 (registers_from_string, register_data): Likewise.
16968 * server.c (handle_query, main): Likewise.
16969 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16970 (decode_M_packet): Likewise.
16971 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16972 * target.h (struct target_ops): Update read_memory, write_memory,
16973 and read_auxv.
16974 (read_inferior_memory, write_inferior_memory): Update.
16975 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16976 to unsigned char *.
16977 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16978 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16979 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16980 linux-s390-low.c, linux-sh-low.c: Update for changes in
16981 read_inferior_memory and the_low_target->breakpoint.
16982
eee84df1
DJ
169832005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16984
16985 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16986 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16987 * configure.srv: Add powerpc64-*-linux*.
16988 * linux-ppc64-low.c: New file.
16989
45b134e5
OF
169902005-05-23 Orjan Friberg <orjanf@axis.com>
16991
16992 * linux-cris-low.c: New file with support for CRIS.
16993 * linux-crisv32-low.c: Ditto for CRISv32.
16994 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16995 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16996 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16997 reg-crisv32.o, and reg-crisv32.c to make rules.
16998 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16999 recognized targets.
17000
48d93c75
UW
170012005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17002
17003 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17004 of sizeof (PTRACE_XFER_TYPE).
17005 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17006
e013ee27
OF
170072005-05-12 Orjan Friberg <orjanf@axis.com>
17008
889bf7c5 17009 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17010 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17011 pointers for hardware watchpoint support.
17012 * linux-low.h (struct linux_target_ops): Ditto.
17013 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17014 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17015 to linux_target_ops.
17016 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17017 reply packet.
17018 * server.c (main): Recognize 'Z' and 'z' packets.
17019
b0ded00b
UW
170202005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17021
17022 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17023 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17024 (the_low_target): Add new members.
17025
8643e2ad
DJ
170262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17027
17028 * proc-service.c (ps_lgetregs): Search all_processes instead of
17029 all_threads.
17030
fc620387
DJ
170312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17032
17033 * server.c (start_inferior): Change return type to int.
17034 (attach_inferior): Change sigptr to int *.
17035 (handle_v_cont, handle_v_requests): Change signal to int *.
17036 (main): Change signal to int.
17037
170382005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17039
17040 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17041 * configure.srv: Add m32r*-*-linux*.
17042 * linux-m32r-low.c: New file.
17043
e0e76420
DJ
170442005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17045
17046 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17047
a1928bad
DJ
170482005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17049
17050 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17051 Take unsigned long arguments for PIDs.
17052 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17053 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17054 (wait_for_sigstop, linux_resume_one_process)
17055 (regsets_fetch_inferior_registers, linux_send_signal)
17056 (linux_read_auxv): Likewise. Update the types of variables holding
17057 PIDs. Update format string specifiers.
17058 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17059 * remote-utils.c (prepare_resume_reply): Likewise.
17060 * server.c (cont_thread, general_thread, step_thread)
17061 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17062 unsigned long.
17063 (handle_query): Update format specifiers.
17064 (handle_v_cont, main): Use strtoul for thread IDs.
17065 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17066 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17067 (general_thread, step_thread, thread_from_wait)
17068 (old_thread_from_wait): Update.
17069 * target.h (struct thread_resume): Use unsigned long for THREAD.
17070 (struct target_ops): Use unsigned long for arguments to attach and
17071 thread_alive.
17072
dcdb98d2
DJ
170732005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17074
17075 * acinclude.m4: Include bfd/bfd.m4 directly.
17076 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17077 <agriffis@toolchain.org>.
17078 * aclocal.m4, configure: Regenerated.
17079
bec39cab
AC
170802005-01-07 Andrew Cagney <cagney@gnu.org>
17081
17082 * configure.ac: Rename configure.in, require autoconf 2.59.
17083 * configure: Re-generate.
17084
434c4c77
DJ
170852004-12-08 Daniel Jacobowitz <dan@debian.org>
17086
17087 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17088 LIBS when finished.
17089 * aclocal.m4: Regenerated.
17090 * configure: Regenerated.
17091
db1d3e1b
AS
170922004-11-21 Andreas Schwab <schwab@suse.de>
17093
17094 * linux-m68k-low.c (m68k_num_gregs): Define.
17095 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17096 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17097 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17098 (m68k_breakpoint_at): New. Add to the_low_target.
17099
17100 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17101 srv_linux_thread_db to yes.
17102
43360365
JB
171032004-10-20 Joel Brobecker <brobecker@gnat.com>
17104
17105 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17106 (ARCH_SET_FS): Likewise.
17107 (ARCH_GET_FS): Likewise.
17108 (ARCH_GET_GS): Likewise.
17109
fd500816
DJ
171102004-10-16 Daniel Jacobowitz <dan@debian.org>
17111
17112 * linux-i386-low.c (ps_get_thread_area): New.
17113 * linux-x86-64-low.c (ps_get_thread_area): New.
17114 * linux-low.c: Include <sys/syscall.h>.
17115 (linux_kill_one_process): Don't kill the first thread here.
17116 (linux_kill): Kill the first thread here.
17117 (kill_lwp): New function.
17118 (send_sigstop, linux_send_signal): Use it.
17119 * proc-service.c: Clean up #ifdefs.
17120 (fpregset_info): Delete.
17121 (ps_lgetregs): Update and enable implementation.
17122 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17123 implementations.
17124 * remote-utils.c (struct sym_cache, symbol_cache): New.
17125 (input_interrupt): Print a clearer message.
17126 (async_io_enabled): New variable.
17127 (enable_async_io, disable_async_io): Use it. Update comments.
17128 (look_up_one_symbol): Use the symbol cache.
17129 * thread-db.c (thread_db_look_up_symbols): New function.
17130 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17131
f6de3c42
DJ
171322004-10-16 Daniel Jacobowitz <dan@debian.org>
17133
17134 * configure.in: Test for -rdynamic.
17135 * configure: Regenerated.
17136 * Makefile (INTERNAL_LDFLAGS): New.
17137 (gdbserver, gdbreplay): Use it.
17138
2c0fc042
AC
171392004-09-02 Andrew Cagney <cagney@gnu.org>
17140
17141 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17142
075b3282
DJ
171432004-03-23 Daniel Jacobowitz <drow@mvista.com>
17144
17145 * linux-low.c (linux_wait): Clear all_processes list also.
17146
fa6a77dc
DJ
171472004-03-12 Daniel Jacobowitz <drow@mvista.com>
17148
17149 * linux-low.c: Include <errno.h>. Remove extern declaration of
17150 errno.
17151
6d782a97
DJ
171522004-03-12 Daniel Jacobowitz <drow@mvista.com>
17153
17154 * gdbreplay.c, server.h, utils.c: Update copyright years.
17155
3a7fb99b
DJ
171562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17157
17158 * server.c (main): Print child status or termination signal from
17159 variable 'signal', not 'sig'.
17160
c3e735a6
DJ
171612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17162
17163 * linux-low.c (linux_read_memory): Change return type to
17164 int. Check for and return error from ptrace().
17165 * target.c (read_inferior_memory): Change return type to int. Pass
17166 back return status from the_target->read_memory().
17167 * target.h (struct target_ops): Adapt *read_memory() prototype.
17168 Update comment.
17169 (read_inferior_memory): Adapt prototype.
17170 * server.c (main): Return an error packet if
17171 read_inferior_memory() returns an error.
17172
a59d1c82
DJ
171732004-03-04 Daniel Jacobowitz <drow@mvista.com>
17174
17175 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17176 Unify with other clean targets.
17177
dc3f8883
DJ
171782004-02-29 Daniel Jacobowitz <drow@mvista.com>
17179
17180 * server.c (handle_v_cont): Call set_desired_inferior.
17181
89a208da
DJ
171822004-02-29 Daniel Jacobowitz <drow@mvista.com>
17183
17184 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17185
62ea82f5
DJ
171862004-02-29 Daniel Jacobowitz <drow@mvista.com>
17187
17188 * linux-low.c (linux_wait): Unblock async I/O.
17189 (linux_resume): Block and enable async I/O.
17190 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17191 * server.h (block_async_io, unblock_async_io): Add prototypes.
17192
6910d122
DJ
171932004-02-29 Daniel Jacobowitz <drow@mvista.com>
17194
17195 * remote-utils.c (remote_open): Print a status notice after
17196 opening a TCP port.
17197 * server.c (attach_inferior): Print a status notice after
17198 attaching.
17199
172002004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17201
17202 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17203
c89dc5d4
DJ
172042004-02-26 Daniel Jacobowitz <drow@mvista.com>
17205
17206 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17207 error packet.
17208 * server.c, target.h: Update copyright years.
17209
4b8dad4a
RM
172102004-02-25 Roland McGrath <roland@redhat.com>
17211
17212 * target.h (struct target_ops): New member `read_auxv'.
17213 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17214 * linux-low.c (linux_read_auxv): New function.
17215 (linux_target_ops): Initialize `read_auxv' member to that.
17216
d7446758
JB
172172004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17218
17219 Committed by Jim Blandy <jimb@redhat.com>.
17220
17221 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17222 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17223 instead of GPR_SIZE to distiguish s390 and s390x targets.
17224
5544ad89
DJ
172252004-01-31 Daniel Jacobowitz <drow@mvista.com>
17226
17227 * linux-low.c: Update copyright year.
17228 (check_removed_breakpoint): Clear pending_is_breakpoint.
17229 (linux_set_resume_request, linux_queue_one_thread)
17230 (resume_status_pending_p): New functions.
17231 (linux_continue_one_thread): Use process->resume.
17232 (linux_resume): Only resume threads if there are no pending events.
17233 * linux-low.h (struct process_info): Add resume request
17234 pointer.
17235
2a68b70e
DJ
172362004-01-30 Daniel Jacobowitz <drow@mvista.com>
17237
17238 * regcache.c (new_register_cache): Clear the allocated register
17239 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17240
64386c31
DJ
172412003-10-13 Daniel Jacobowitz <drow@mvista.com>
17242
17243 * linux-low.c (linux_resume): Take a struct thread_resume *
17244 argument.
17245 (linux_wait): Update call.
17246 (resume_ptr): New static variable.
17247 (linux_continue_one_thread): Renamed from
17248 linux_continue_one_process. Use resume_ptr.
17249 (linux_resume): Use linux_continue_one_thread.
17250 * server.c (handle_v_cont, handle_v_requests): New functions.
17251 (myresume): New function.
17252 (main): Handle 'v' case.
17253 * target.h (struct thread_resume): New type.
17254 (struct target_ops): Change argument of "resume" to struct
17255 thread_resume *.
17256 (myresume): Delete macro.
17257
c938e9b0
L
172582003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17259
17260 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17261 (uninstall): Support DESTDIR.
17262
7f313d07
BC
17263Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17264
17265 * configure.srv: Add xscale*linux copy of arm*linux entry.
17266
3b2fc2ea
DJ
172672003-07-24 Daniel Jacobowitz <drow@mvista.com>
17268
17269 * linux-arm-low.c (arm_reinsert_addr): New function.
17270 (the_low_target): Add arm_reinsert_addr.
17271
1c0a559e
MK
172722003-07-08 Mark Kettenis <kettenis@gnu.org>
17273
17274 * mem-break.c: Remove whitespace at end of file.
17275
43d5792c
DJ
172762003-06-28 Daniel Jacobowitz <drow@mvista.com>
17277
17278 * configure.in: Check whether we need to prototype strerror.
17279 * server.h: Optionally prototype strerror.
17280 * gdbreplay.c (perror_with_name): Use strerror.
17281 * linux-low.c (linux_attach_lwp): Use strerror.
17282 * utils.c (perror_with_name): Use strerror.
17283 * config.in, configure: Regenerated.
17284
c8a86edf
DJ
172852003-06-28 Daniel Jacobowitz <drow@mvista.com>
17286
17287 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17288 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17289
73d37363
DJ
172902003-06-20 Daniel Jacobowitz <drow@mvista.com>
17291
17292 * Makefile.in (SFILES): Update.
17293 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17294 low-sun3.c: Remove files.
17295
6ad8ae5c
DJ
172962003-06-17 Daniel Jacobowitz <drow@mvista.com>
17297
17298 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17299 (linux_detach_one_process, linux_detach): New functions.
17300 (linux_target_ops): Add linux_detach.
17301 * server.c (main): Handle 'D' packet.
17302 * target.h (struct target_ops): Add "detach" member.
17303 (detach_inferior): Define.
17304
1581182a
MK
173052003-06-13 Mark Kettenis <kettenis@gnu.org>
17306
17307 From Kelley Cook <kelleycook@wideopenwest.com>:
17308 * configure.srv: Accept i[34567]86 variants.
17309
e5379b03
DJ
173102003-06-05 Daniel Jacobowitz <drow@mvista.com>
17311
17312 * linux-low.c (linux_wait_for_event): Correct comment typos.
17313 (linux_resume_one_process): Call check_removed_breakpoint.
17314 (linux_send_signal): New function.
17315 (linux_target_ops): Add linux_send_signal.
17316 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17317 of kill.
17318 * target.h (struct target_ops): Add send_signal.
17319
2ff29de4
JB
173202003-05-29 Jim Blandy <jimb@redhat.com>
17321
17322 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17323 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17324 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17325 away part of the register's value.
17326
254787d4
DJ
173272003-03-26 Daniel Jacobowitz <drow@mvista.com>
17328
17329 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17330 (linux_wait_for_event, linux_init_signals): Likewise.
17331
94e10508
DJ
173322003-03-17 Daniel Jacobowitz <drow@mvista.com>
17333
17334 * configure.in: Check for stdlib.h.
17335 * configure: Regenerated.
17336 * config.in: Regenerated.
17337
4c0711e0
DJ
173382003-01-04 Andreas Schwab <schwab@suse.de>
17339
17340 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17341
ef66e766
AC
173422003-01-02 Andrew Cagney <ac131313@redhat.com>
17343
17344 * Makefile.in: Remove obsolete code.
17345
a1358604
DJ
173462002-11-20 Daniel Jacobowitz <drow@mvista.com>
17347
17348 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17349 defined(PT_FPR0_HI).
17350
23ce3b1c
DJ
173512002-11-17 Stuart Hughes <seh@zee2.com>
17352
17353 * linux-arm-low.c (arm_num_regs): Increase.
17354 (arm_regmap): Include status register.
17355
173562002-11-17 Daniel Jacobowitz <drow@mvista.com>
17357
17358 * linux-low.c (register_addr): Remove incorrect -1 check.
17359
a9fa9f7d
DJ
173602002-08-29 Daniel Jacobowitz <drow@mvista.com>
17361
17362 * linux-low.c (linux_create_inferior): Call setpgid. Return
17363 the new PID.
17364 (unstopped_p, linux_signal_pid): Remove.
17365 (linux_target_ops): Remove linux_signal_pid.
17366 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17367 global instead of target method.
17368 * target.h (struct target_ops): Remove signal_pid. Update comment
17369 for create_inferior.
17370 * server.c (signal_pid): New variable.
17371 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17372 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17373 (attach_inferior): Set signal_pid.
17374
17574093
DJ
173752002-08-23 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17378
173792002-08-20 Jim Blandy <jimb@redhat.com>
17380
17381 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17382 default for this.
17383
173842002-08-01 Andrew Cagney <cagney@redhat.com>
17385
17386 * Makefile.in: Make chill references obsolete.
17387
173882002-07-24 Kevin Buettner <kevinb@redhat.com>
17389
17390 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17391 * configure: Regenerate.
17392 * config.in: Regenerate.
17393
173942002-07-09 David O'Brien <obrien@FreeBSD.org>
17395
17396 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17397 (perror_with_name, remote_close, remote_open, expect, play): Static.
17398
173992002-07-04 Michal Ludvig <mludvig@suse.cz>
17400
4b8dad4a 17401 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17402 byte offsets instead of an array of indexes.
17403 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17404
174052002-06-13 Daniel Jacobowitz <drow@mvista.com>
17406
17407 * regcache.c: Add comment.
17408
174092002-06-11 Daniel Jacobowitz <drow@mvista.com>
17410
17411 * thread-db.c: New file.
17412 * proc-service.c: New file.
17413 * acinclude.m4: New file.
17414 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17415 proc-service.o, and thread-db.o.
17416 (linux-low.o): Add USE_THREAD_DB.
17417 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17418 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17419 * aclocal.m4: Regenerated.
17420 * config.in: Regenerated.
17421 * configure: Regenerated.
17422 * configure.in: Check for proc_service.h, sys/procfs.h,
17423 thread_db.h, and linux/elf.h headrs.
17424 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17425 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17426 Check for -lthread_db and thread support.
17427 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17428 PowerPC, and SuperH.
17429 * i387-fp.c: Constify arguments.
17430 * i387-fp.h: Likewise.
17431 * inferiors.c: (struct thread_info): Renamed from
17432 `struct inferior_info'. Remove PID member. Use generic inferior
17433 list header. All uses updated.
17434 (inferiors, signal_pid): Removed.
17435 (all_threads): New variable.
17436 (get_thread): Define.
17437 (add_inferior_to_list): New function.
17438 (for_each_inferior): New function.
17439 (change_inferior_id): New function.
17440 (add_inferior): Removed.
17441 (remove_inferior): New function.
17442 (add_thread): New function.
17443 (free_one_thread): New function.
17444 (remove_thread): New function.
17445 (clear_inferiors): Use for_each_inferior and free_one_thread.
17446 (find_inferior): New function.
17447 (find_inferior_id): New function.
17448 (inferior_target_data): Update argument type.
17449 (set_inferior_target_data): Likewise.
17450 (inferior_regcache_data): Likewise.
17451 (set_inferior_regcache_data): Likewise.
17452 * linux-low.c (linux_bp_reinsert): Remove.
17453 (all_processes, stopping_threads, using_thrads)
17454 (struct pending_signals, debug_threads, pid_of): New.
17455 (inferior_pid): Replace with macro.
17456 (struct inferior_linux_data): Remove.
17457 (get_stop_pc, add_process): New functions.
17458 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17459 Use add_process and add_thread.
17460 (linux_attach_lwp): New function, based on old linux_attach. Use
17461 add_process and add_thread. Set stop_expected for new threads.
17462 (linux_attach): New function.
17463 (linux_kill_one_process): New function.
17464 (linux_kill): Kill all LWPs.
17465 (linux_thread_alive): Use find_inferior_id.
17466 (check_removed_breakpoints, status_pending_p): New functions.
17467 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17468 Update. Use WNOHANG. Wait for cloned processes also. Update process
17469 struct for the found process.
17470 (linux_wait_for_event): New function.
17471 (linux_wait): Use it. Support LWPs.
17472 (send_sigstop, wait_for_sigstop, stop_all_processes)
17473 (linux_resume_one_process, linux_continue_one_process): New functions.
17474 (linux_resume): Support LWPs.
17475 (REGISTER_RAW_SIZE): Remove.
17476 (fetch_register): Use register_size instead. Call supply_register.
17477 (usr_store_inferior_registers): Likewise. Call collect_register.
17478 Fix recursive case.
17479 (regsets_fetch_inferior_registers): Improve error message.
17480 (regsets_store_inferior_registers): Add debugging.
17481 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17482 (unstopped_p, linux_signal_pid): New functions.
17483 (linux_target_ops): Add linux_signal_pid.
17484 (linux_init_signals): New function.
17485 (initialize_low): Call it. Initialize using_threads.
17486 * regcache.c (inferior_regcache_data): Add valid
17487 flag.
17488 (get_regcache): Fetch registers lazily. Add fetch argument
17489 and update all callers.
17490 (regcache_invalidate_one, regcache_invalidate): New
17491 functions.
17492 (new_register_cache): Renamed from create_register_cache.
17493 Return the new regcache.
17494 (free_register_cache): Change argument to a void *.
17495 (registers_to_string, registers_from_string): Call get_regcache
17496 with fetch flag set.
17497 (register_data): Make static. Pass fetch flag to get_regcache.
17498 (supply_register): Call get_regcache with fetch flag clear.
17499 (collect_register): Call get_regcache with fetch flag set.
17500 (collect_register_as_string): New function.
17501 * regcache.h: Update.
17502 * remote-utils.c (putpkt): Flush after debug output and use
17503 stderr.
17504 Handle input interrupts while waiting for an ACK.
17505 (input_interrupt): Use signal_pid method.
17506 (getpkt): Flush after debug output and use stderr.
17507 (outreg): Use collect_register_as_string.
17508 (new_thread_notify, dead_thread_notify): New functions.
17509 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17510 and general_thread.
17511 (look_up_one_symbol): Flush after debug output.
17512 * server.c (step_thread, server_waiting): New variables.
17513 (start_inferior): Don't use signal_pid. Update call to mywait.
17514 (attach_inferior): Update call to mywait.
17515 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17516 (main): Don't fetch/store registers explicitly. Use
17517 set_desired_inferior. Support proposed ``Hs'' packet. Update
17518 calls to mywait.
17519 * server.h: Update.
17520 (struct inferior_list, struct_inferior_list_entry): New.
17521 * target.c (set_desired_inferior): New.
17522 (write_inferior_memory): Constify.
17523 (mywait): New function.
17524 * target.h: Update.
17525 (struct target_ops): New signal_pid method.
17526 (mywait): Removed macro, added prototype.
17527
17528 * linux-low.h (regset_func): Removed.
17529 (regset_fill_func, regset_store_func): New.
17530 (enum regset_type): New.
17531 (struct regset_info): Add type field. Use new operation types.
17532 (struct linux_target_ops): stop_pc renamed to get_pc.
17533 Add decr_pc_after_break and breakpoint_at.
17534 (get_process, get_thread_proess, get_process_thread)
17535 (strut process_info, all_processes, linux_attach_lwp)
17536 (thread_db_init): New.
17537
17538 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17539 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17540 (the_low_target): Add new members.
17541 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17542 (i386_store_fpxregset): Constify.
17543 (target_regsets): Add new kind identifier.
17544 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17545 (i386_set_pc): Add debugging.
17546 (i386_breakpoint_at): New function.
17547 (the_low_target): Add new members.
17548 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17549 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17550 (mips_breakpoint_at): New.
17551 (the_low_target): Add new members.
17552 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17553 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17554 (the_low_target): Add new members.
17555 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17556 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17557 (the_low_target): Add new members.
17558 * linux-x86-64-low.c (target_regsets): Add new kind
17559 identifier.
17560
175612002-05-15 Daniel Jacobowitz <drow@mvista.com>
17562
17563 From Martin Pool <mbp@samba.org>:
17564 * server.c (gdbserver_usage): New function.
17565 (main): Call it.
17566
175672002-05-14 Daniel Jacobowitz <drow@mvista.com>
17568
17569 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17570 stop_at -> stop_pc.
17571
175722002-05-04 Andrew Cagney <ac131313@redhat.com>
17573
17574 * Makefile.in: Remove obsolete code.
17575
175762002-04-24 Michal Ludvig <mludvig@suse.cz>
17577
17578 * linux-low.c (regsets_fetch_inferior_registers),
17579 (regsets_store_inferior_registers): Removed cast to int from
17580 ptrace() calls.
17581 * regcache.h: Added declaration of struct inferior_info.
17582
175832002-04-20 Daniel Jacobowitz <drow@mvista.com>
17584
17585 * inferiors.c (struct inferior_info): Add regcache_data.
17586 (add_inferior): Call create_register_cache.
17587 (clear_inferiors): Call free_register_cache.
17588 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17589 * regcache.c (struct inferior_regcache_data): New.
17590 (registers): Remove.
17591 (get_regcache): New function.
17592 (create_register_cache, free_register_cache): New functions.
17593 (set_register_cache): Don't initialize the register cache here.
17594 (registers_to_string, registers_from_string, register_data): Call
17595 get_regcache.
17596 * regcache.h: Add prototypes.
17597 * server.h: Likewise.
17598
175992002-04-20 Daniel Jacobowitz <drow@mvista.com>
17600
17601 * mem-break.c: New file.
17602 * mem-break.h: New file.
17603 * Makefile.in: Add mem-break.o rule; update server.h
17604 dependencies.
17605 * inferiors.c (struct inferior_info): Add target_data
17606 member.
17607 (clear_inferiors): Free target_data member if set.
17608 (inferior_target_data, set_inferior_target_data): New functions.
17609 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17610 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17611 * linux-low.c (linux_bp_reinsert): New variable.
17612 (struct inferior_linux_data): New.
17613 (linux_create_inferior): Use set_inferior_target_data.
17614 (linux_attach): Likewise. Call add_inferior.
17615 (linux_wait_for_one_inferior): New function.
17616 (linux_wait): Call it.
17617 (linux_write_memory): Add const.
17618 (initialize_low): Call set_breakpoint_data.
17619 * linux-low.h (struct linux_target_ops): Add breakpoint
17620 handling members.
17621 * server.c (attach_inferior): Remove extra add_inferior
17622 call.
17623 * server.h: Include mem-break.h. Update inferior.c
17624 prototypes.
17625 * target.c (read_inferior_memory)
17626 (write_inferior_memory): New functions.
17627 * target.h (read_inferior_memory)
17628 (write_inferior_memory): Change macros to prototypes.
17629 (struct target_ops): Update comments. Add const to write_memory
17630 definition.
17631
176322002-04-11 Daniel Jacobowitz <drow@mvista.com>
17633
17634 * linux-low.c (usr_store_inferior_registers): Support
17635 registers which are allowed to fail to store.
17636 * linux-low.h (linux_target_ops): Likewise.
17637 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17638 (ppc_cannot_store_register): FPSCR may not be storable.
17639
176402002-04-09 Daniel Jacobowitz <drow@mvista.com>
17641
17642 * server.h: Include <string.h> if HAVE_STRING_H.
17643 * ChangeLog: Correct paths in last ChangeLog entry.
17644
176452002-04-09 Daniel Jacobowitz <drow@mvista.com>
17646
17647 * linux-low.h: Remove obsolete prototypes.
17648 (struct linux_target_ops): New.
17649 (extern the_low_target): New.
17650 * linux-low.c (num_regs, regmap): Remove declarations.
17651 (register_addr): Use the_low_target explicitly.
17652 (fetch_register): Likewise.
17653 (usr_fetch_inferior_registers): Likewise.
17654 (usr_store_inferior_registers): Likewise.
17655 * linux-arm-low.c (num_regs): Remove.
17656 (arm_num_regs): Define.
17657 (arm_regmap): Renamed from regmap, made static.
17658 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17659 made static.
17660 (arm_cannot_store_register): Renamed from cannot_store_register,
17661 made static.
17662 (the_low_target): New.
17663 * linux-i386-low.c (num_regs): Remove.
17664 (i386_num_regs): Define.
17665 (i386_regmap): Renamed from regmap, made static.
17666 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17667 made static.
17668 (i386_cannot_store_register): Renamed from cannot_store_register,
17669 made static.
17670 (the_low_target): New.
17671 * linux-ia64-low.c (num_regs): Remove.
17672 (ia64_num_regs): Define.
17673 (ia64_regmap): Renamed from regmap, made static.
17674 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17675 made static.
17676 (ia64_cannot_store_register): Renamed from cannot_store_register,
17677 made static.
17678 (the_low_target): New.
17679 * linux-m68k-low.c (num_regs): Remove.
17680 (m68k_num_regs): Define.
17681 (m68k_regmap): Renamed from regmap, made static.
17682 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17683 made static.
17684 (m68k_cannot_store_register): Renamed from cannot_store_register,
17685 made static.
17686 (the_low_target): New.
17687 * linux-mips-low.c (num_regs): Remove.
17688 (mips_num_regs): Define.
17689 (mips_regmap): Renamed from regmap, made static.
17690 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17691 made static.
17692 (mips_cannot_store_register): Renamed from cannot_store_register,
17693 made static.
17694 (the_low_target): New.
17695 * linux-ppc-low.c (num_regs): Remove.
17696 (ppc_num_regs): Define.
17697 (ppc_regmap): Renamed from regmap, made static.
17698 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17699 made static.
17700 (ppc_cannot_store_register): Renamed from cannot_store_register,
17701 made static.
17702 (the_low_target): New.
17703 * linux-s390-low.c (num_regs): Remove.
17704 (s390_num_regs): Define.
17705 (s390_regmap): Renamed from regmap, made static.
17706 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17707 made static.
17708 (s390_cannot_store_register): Renamed from cannot_store_register,
17709 made static.
17710 (the_low_target): New.
17711 * linux-sh-low.c (num_regs): Remove.
17712 (sh_num_regs): Define.
17713 (sh_regmap): Renamed from regmap, made static.
17714 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17715 made static.
17716 (sh_cannot_store_register): Renamed from cannot_store_register,
17717 made static.
17718 (the_low_target): New.
17719 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17720 (the_low_target): New.
17721
177222002-04-09 Daniel Jacobowitz <drow@mvista.com>
17723
17724 * Makefile.in: Add stamp-h target.
17725 * configure.in: Create stamp-h.
17726 * configure: Regenerated.
17727
177282002-04-09 Daniel Jacobowitz <drow@mvista.com>
17729
17730 * inferiors.c: New file.
17731 * target.c: New file.
17732 * target.h: New file.
17733 * Makefile.in: Add target.o and inferiors.o. Update
17734 dependencies.
17735 * linux-low.c (inferior_pid): New static variable,
17736 moved from server.c.
17737 (linux_create_inferior): Renamed from create_inferior.
17738 Call add_inferior. Return 0 on success instead of a PID.
17739 (linux_attach): Renamed from myattach.
17740 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17741 (linux_thread_alive): Renamed from mythread_alive.
17742 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17743 child dies.
17744 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17745 (regsets_store_inferior_registers): Correct error message.
17746 Add missing ``return 0''.
17747 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17748 (linux_store_registers): Renamed from store_inferior_registers.
17749 (linux_read_memory): Renamed from read_inferior_memory.
17750 (linux_write_memory): Renamed from write_inferior_memory.
17751 (linux_target_ops): New structure.
17752 (initialize_low): Call set_target_ops ().
17753 * remote-utils.c (unhexify): New function.
17754 (hexify): New function.
17755 (input_interrupt): Send signals to ``signal_pid''.
17756 * server.c (inferior_pid): Remove.
17757 (start_inferior): Update create_inferior call.
17758 (attach_inferior): Call add_inferior.
17759 (handle_query): New function.
17760 (main): Call handle_query for `q' packets.
17761 * server.h: Include "target.h". Remove obsolete prototypes.
17762 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17763
177642002-04-09 Daniel Jacobowitz <drow@mvista.com>
17765
17766 * Makefile.in: Add WARN_CFLAGS. Update configury
17767 dependencies.
17768 * configure.in: Check for <string.h>
17769 * configure: Regenerate.
17770 * config.in: Regenerate.
17771 * gdbreplay.c: Include needed system headers.
17772 (remote_open): Remove strchr prototype.
17773 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17774 * regcache.c (supply_register): Change buf argument to const void *.
17775 (supply_register_by_name): Likewise.
17776 (collect_register): Change buf argument to void *.
17777 (collect_register_by_name): Likewise.
17778 * regcache.h: Add missing prototypes.
17779 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17780 * server.c (handle_query): New function.
17781 (attached): New static variable, moved out of main.
17782 (main): Quiet longjmp clobber warnings.
17783 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17784 * utils.c (error): Remove NORETURN.
17785 (fatal): Likewise.