Fix gdbserver ChangeLog entry
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
6cdd651f
LM
12019-11-20 Luis Machado <luis.machado@linaro.org>
2
3 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4 instead of register count.
5 * tdesc.c (tdesc_contains_feature): New function.
6 * tdesc.h (tdesc_contains_feature): New prototype.
7
cd850b40
CB
82019-11-15 Christian Biesinger <cbiesinger@google.com>
9
10 * Makefile.in: Add safe-strerror.c.
11 * configure: Regenerate.
12 * configure.ac: Don't source common.host.
13
5abebf3c
CB
142019-11-15 Christian Biesinger <cbiesinger@google.com>
15
16 * config.in: Regenerate.
17 * configure: Regenerate.
18
e06f3d6e
AB
192019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
20
21 * ax.c (ax_printf): Handle size_t_arg.
22
ca3a04f6
CB
232019-11-06 Christian Biesinger <cbiesinger@google.com>
24
25 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
26 * mi/mi-main.c (output_cores): Likewise.
27 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
28 (linux_xfer_osdata_modules): Likewise.
29 * remote.c (register_remote_support_xml): Likewise.
30 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
31 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
32
e48f6033
CB
332019-11-01 Christian Biesinger <cbiesinger@google.com>
34
35 * configure: Regenerate.
36 * configure.ac: Remove check for strerror_r.
37
e7e97a2e
CB
382019-10-31 Christian Biesinger <cbiesinger@google.com>
39
40 * config.in: Regenerate.
41 * configure: Regenerate.
42 * configure.ac: Also check for strerror_r.
43
75cafaa6
CB
442019-10-31 Christian Biesinger <cbiesinger@google.com>
45
46 * ax.h (debug_agent): Remove duplicate declaration.
47
30baf67b
TV
482019-10-26 Tom de Vries <tdevries@suse.de>
49
50 * linux-aarch64-low.c: Fix typos in comments.
51 * linux-arm-low.c: Same.
52 * linux-low.c: Same.
53 * linux-ppc-low.c: Same.
54 * proc-service.c: Same.
55 * regcache.h: Same.
56 * server.c: Same.
57 * tracepoint.c: Same.
58 * win32-low.c: Same.
59
52c64cf7
TT
602019-10-25 Tom Tromey <tromey@adacore.com>
61
62 * utils.c (xstrdup): Remove.
63
c12d372d
TT
642019-10-23 Tom Tromey <tom@tromey.com>
65
66 * configure, config.in: Rebuild.
67
4d0b984b
TT
682019-10-23 Tom Tromey <tom@tromey.com>
69
70 * configure: Rebuild.
71 * acinclude.m4: Use m4_include, not sinclude.
72
c5adaa19
TT
732019-10-17 Tom Tromey <tromey@adacore.com>
74
75 * configure: Rebuild.
76 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
77 in AC_CONFIG_FILES invocation.
78 * Makefile.in (stamp-h, Makefile): Use new-style config.status
79 invocation.
80
fec4e896
CB
812019-10-16 Christian Biesinger <cbiesinger@google.com>
82
83 * server.c: Include xml-builtin.h.
84 (get_xml_features): Don't declare xml_builtins here.
85
00975ff6
AB
862019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
87
88 * Makefile.in: Remove references to vec-ipa.o.
89
0dc32745
AB
902019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
91
92 * Makefile.in: Remove references to vec.c.
93
3e6ec53a
CB
942019-10-02 Christian Biesinger <cbiesinger@google.com>
95
96 * server.c (server_waiting): Change to bool.
97 (extended_protocol): Likewise.
98 (response_needed): Likewise.
99 (exit_requested): Likewise.
100 (run_once): Likewise.
101 (report_no_resumed): Likewise.
102 (non_stop): Likewise.
103 (disable_packet_vCont): Likewise.
104 (disable_packet_Tthread): Likewise.
105 (disable_packet_qC): Likewise.
106 (disable_packet_qfThreadInfo): Likewise.
107 (handle_general_set): Update.
108 (handle_detach): Update.
109 (handle_monitor_command): Update.
110 (handle_query): Update.
111 (captured_main): Update.
112 (process_serial_event): Update.
113 * server.h (server_waiting): Change to bool.
114 (disable_packet_vCont): Likewise.
115 (disable_packet_Tthread): Likewise.
116 (disable_packet_qC): Likewise.
117 (disable_packet_qfThreadInfo): Likewise.
118 (run_once): Likewise.
119 (non_stop): Likewise.
120 * target.c (target_stop_and_wait): Update.
121
80fd2826
TT
1222019-10-02 Tom Tromey <tromey@adacore.com>
123
124 * Makefile.in (SFILES): Add common-inferior.c.
125 (OBS): Add common-inferior.o.
126 * server.c (startup_with_shell): Don't define.
127
46f29a9a
AB
1282019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
129
130 * linux-low.c (linux_low_read_btrace): Update for change to
131 std::vector.
132
f9d949fb
CB
1332019-09-20 Christian Biesinger <cbiesinger@google.com>
134
135 * debug.c (debug_threads): Remove comment in favor of the header.
136 * debug.h (using_threads): Add declaration.
137 (debug_threads): Add comment.
138 * linux-aarch64-low.c: Include debug.h and remove declaration of
139 debug_threads.
140 * nto-low.c: Likewise.
141 * remote-utils.c: Likewise.
142 * thread-db.c: Likewise.
143
abf516c6
UW
1442019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
145
146 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
147 and powerpc-cell64l-ipa.o.
148 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
149 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
150 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
151 (spu*-*-*): Remove.
152
153 * spu-low.c: Remove file.
154
155 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
156 (parse_spufs_run): Remove.
157 (ppc_get_pc): Remove Cell/B.E. support.
158 (ppc_set_pc): Likewise.
159 (ppc_breakpoint_at): Likewise.
160 (ppc_arch_setup): Likewise.
161 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
162 tdesc_powerpc_cell32l.
163 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
164 or init_registers_powerpc_cell32l.
165 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
166 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
167 or init_registers_powerpc_cell32l.
168 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
169 (init_registers_powerpc_cell32l): Remove prototype.
170 (init_registers_powerpc_cell64l): Likewise.
171
172 * target.h (struct target_ops): Remove qxfer_spu member.
173 * server.c (handle_qxfer_spu): Remove.
174 (qxfer_packets): Remove entry for "spu".
175 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
176 * linux-low.c (SPUFS_MAGIC): Remove.
177 (spu_enumerate_spu_ids): Remove.
178 (linux_qxfer_spu): Remove.
179 (linux_target_ops): Remove qxfer_spu member.
180 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
181 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
182 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
183
2d41fa11
SDJ
1842019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
185
186 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
187 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
188 * config.in: Regenerate.
189 * configure: Regenerate.
190
d59b55f0
TT
1912019-08-15 Tom Tromey <tromey@adacore.com>
192
193 * target.c (target_write_memory): Use gdb::byte_vector.
194
4196ab2a
TT
1952019-08-15 Tom Tromey <tromey@adacore.com>
196
197 * tracepoint.c (write_inferior_data_pointer)
198 (write_inferior_integer, write_inferior_int8)
199 (write_inferior_uinteger, m_tracepoint_action_download)
200 (r_tracepoint_action_download, x_tracepoint_action_download)
201 (l_tracepoint_action_download, clear_inferior_trace_buffer)
202 (download_agent_expr, download_tracepoint_1)
203 (download_trace_state_variables, upload_fast_traceframes): Update.
204 * server.c (gdb_write_memory): Update.
205 * remote-utils.c (relocate_instruction): Update.
206 * proc-service.c (ps_pdwrite): Update.
207 * mem-break.c (remove_memory_breakpoint)
208 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
209 (uninsert_fast_tracepoint_jumps_at)
210 (reinsert_fast_tracepoint_jumps_at): Update.
211 * linux-x86-low.c (append_insns)
212 (i386_install_fast_tracepoint_jump_pad)
213 (amd64_write_goto_address, i386_write_goto_address): Update.
214 * linux-s390-low.c (append_insns, s390_write_goto_address):
215 Update.
216 * linux-ppc-low.c (ppc_relocate_instruction)
217 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
218 (ppc_write_goto_address): Update.
219 * linux-aarch64-low.c (append_insns): Update.
220 * target.h (struct target_ops): Update.
221 (write_inferior_memory): Don't declare.
222 * target.c (target_write_memory): Rename from
223 write_inferior_memory. Remove old target_write_memory.
224
c6778d00
TT
2252019-08-15 Tom Tromey <tromey@adacore.com>
226
227 * target.c (write_inferior_memory): Use std::vector.
228
404f2902
FCE
2292019-08-06 Frank Ch. Eigler <fche@redhat.com>
230
231 PR build/24886
232 * configure.ac: Drop enable-libmcheck support.
233 * configure, config.in: Rebuild.
234 * acinclude.m4: Don't include it.
235
4c5aa8e0
AH
2362019-07-19 Alan Hayward <alan.hayward@arm.com>
237
238 * configure.srv: Remove Arm xml files.
239
7cc17433
AH
2402019-07-19 Alan Hayward <alan.hayward@arm.com>
241
242 * configure.srv: Add new files. Remove xml generated files.
243 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
244 registers.
245 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
246 * linux-aarch32-tdesc.c: New file.
247 * linux-aarch32-tdesc.h: New file.
248 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
249 * linux-arm-low.c (init_registers_arm, tdesc_arm)
250 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
251 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
252 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
253 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
254 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
255 (arm_read_description): Call arm_linux_read_description.
256 (initialize_low_arch): Don't init registers.
257 * linux-arm-tdesc.c: New file.
258 * linux-arm-tdesc.h: New file.
259
166a82be
AH
2602019-07-10 Alan Hayward <alan.hayward@arm.com>
261
262 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
263 Move counter inside for.
264 (arm_read_description): Check ptrace earlier.
265 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
266
268a13a5
TT
2672019-07-09 Tom Tromey <tom@tromey.com>
268
269 * configure: Rebuild.
270 * configure.ac: Change common to gdbsupport.
271 * acinclude.m4: Change common to gdbsupport.
272 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
273 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
274 common to gdbsupport.
275 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
276 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
277 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
278 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
279 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
280 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
281 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
282 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
283 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
284 common to gdbsupport.
285
350fab54
AH
2862019-07-04 Alan Hayward <alan.hayward@arm.com>
287
288 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
289 defines.
290 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
291
2b40fda7
AH
2922019-07-04 Alan Hayward <alan.hayward@arm.com>
293
294 * configure.srv: Remove legacy xml.
295 * linux-aarch64-low.c (initialize_low_arch): Remove
296 initialize_low_tdesc call.
297 * linux-aarch64-tdesc-selftest.c: Remove file.
298 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
299 * linux-x86-low.c (initialize_low_arch): Remove
300 initialize_low_tdesc call.
301 * linux-x86-tdesc-selftest.c: Remove file.
302 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
303
7d10623d
TV
3042019-06-20 Tom de Vries <tdevries@suse.de>
305
306 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
307 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
308
8d6a48df
TV
3092019-06-19 Tom de Vries <tdevries@suse.de>
310
311 * debug.h (debug_write): Change return type to ssize_t.
312 * debug.c (debug_write): Same.
313
73cc7272
TT
3142019-06-14 Tom Tromey <tom@tromey.com>
315
316 * configure.ac: Use new path to gnulib.
317 * configure: Rebuild.
318 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
319 to gnulib.
320
08f10e02
TT
3212019-06-11 Tom Tromey <tom@tromey.com>
322
323 * Makefile.in (SFILES): Add alloc.c.
324 (OBS): Add alloc.o.
325 (IPA_OBJS): Add alloc-ipa.o.
326 (alloc-ipa.o): New target.
327 (%.o: ../%.c): New pattern rule.
328
422186a9
TT
3292019-06-10 Tom Tromey <tromey@adacore.com>
330
331 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
332 end warning with a newline.
333 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
334 newline.
335 * thread-db.c (attach_thread): Don't end warning with a newline.
336 (thread_db_notice_clone): Likewise.
337 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
338 newline.
339 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
340 end warning with a newline.
341
b02f78f9
PA
3422019-06-04 Pedro Alves <palves@redhat.com>
343
344 * server.c (captured_main): Use make_unique_xstrdup.
345
88ed7edb
TT
3462019-06-02 Tom Tromey <tom@tromey.com>
347
348 * gdbreplay.c (fromhex): Remove.
349 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
350
33a6bc35
TT
3512019-05-29 Tom Tromey <tromey@adacore.com>
352
353 * configure: Rebuild.
354
e90a813d
KB
3552019-05-06 Kevin Buettner <kevinb@redhat.com>
356
357 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
358 sign extension code on 32-bit builds.
359
353ea2d1
EZ
3602019-05-03 Eli Zaretskii <eliz@gnu.org>
361
362 * remote-utils.c:
363 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
364
b494cdff
TT
3652019-04-19 Tom Tromey <tom@tromey.com>
366
367 * server.c (struct vstop_notif): Derive from notif_event.
368 <base>: Remove.
369 (queue_stop_reply): Update.
370 (remove_all_on_match_ptid): Change type. Rewrite.
371 (discard_queued_stop_replies): Rewrite.
372 (in_queued_stop_replies_ptid): Change type.
373 (in_queued_stop_replies): Rewrite.
374 (notif_stop): Update.
375 (queue_stop_reply_callback): Update.
376 (captured_main): Don't call initialize_notif.
377 (push_stop_notification): Update.
378 * notif.c (notif_write_event, handle_notif_ack)
379 (notif_event_enque, notif_push): Update.
380 (notif_event_xfree, initialize_notif): Remove.
381 * notif.h (struct notif_event): Include <list>, not
382 "common/queue.h".
383 (struct notif_server) <queue>: Now a std::list.
384 (notif_event_p): Remove typedef.
385 (initialize_notif): Don't declare.
386 (struct notif_event): Add virtual destructor.
387
a7e559cc
AH
3882019-04-17 Alan Hayward <alan.hayward@arm.com>
389
390 * ax.c (ax_vdebug): Call debug_printf.
391 * debug.c (debug_write): New function.
392 * debug.h (debug_write): New declaration.
393 * linux-low.c (sigchld_handler): Call debug_write.
394
aeb2e706
AH
3952019-04-17 Alan Hayward <alan.hayward@arm.com>
396
397 * debug.c (debug_set_output): New function.
398 (debug_vprintf): Send output to debug_file.
399 (debug_flush): Likewise.
400 * debug.h (debug_set_output): New declaration.
401 * server.c (handle_monitor_command): Add debug-file option.
402 (captured_main): Likewise.
403
c1bc0935
AH
4042019-04-17 Alan Hayward <alan.hayward@arm.com>
405
406 * debug.c (remote_debug): Add definition.
407 * debug.h (remote_debug): Add declaration.
408 * hostio.c (remote_debug): Remove declaration.
409 * remote-utils.c (struct ui_file): Likewise.
410 (remote_debug): Likewise.
411 * remote-utils.h (remote_debug): Likewise,
412 * server.c (remote_debug): Remove definition.
413
3f52fdbc
KB
4142019-04-10 Kevin Buettner <kevinb@redhat.com>
415
416 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
417 when using a 64-bit gdbserver.
418
b0319eaa
TT
4192019-04-09 Tom Tromey <tromey@adacore.com>
420
421 * linux-low.c (select_event_lwp): Use find_thread_in_random.
422
eedc3f4f
TT
4232019-04-08 Tom Tromey <tom@tromey.com>
424
425 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
426 throw.
427 (linux_resume_one_lwp): Likewise.
428
230d2906
TT
4292019-04-08 Tom Tromey <tom@tromey.com>
430
431 * gdbreplay.c: Update.
432 * linux-low.c: Update.
433 * server.c: Update.
434
a70b8144
TT
4352019-04-08 Tom Tromey <tom@tromey.com>
436
437 * server.c: Use C++ exception handling.
438 * linux-low.c: Use C++ exception handling.
439 * gdbreplay.c: Use C++ exception handling.
440
3d6e9d23
TT
4412019-04-08 Tom Tromey <tom@tromey.com>
442
443 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
444 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
445 (captured_main, main): Update.
446 * gdbreplay.c (main): Update.
447
0570503d
PFC
4482019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
449
450 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
451 value in argument pointer, return 1 if the entry is found and 0
452 otherwise. Move comment.
453 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
454 * linux-low.h (linux_get_auxv): Declare.
455 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
456
227a9e65
TT
4572019-04-05 Tom Tromey <tromey@adacore.com>
458
459 * server.c (gdbserver_usage): Use upper-case for metasyntactic
460 variables.
461
69f4c9cc
AH
4622019-03-28 Alan Hayward <alan.hayward@arm.com>
463
464 * linux-low.c (AT_HWCAP2): Add define if not already included.
465
974c89e0
AH
4662019-03-26 Alan Hayward <alan.hayward@arm.com>
467
468 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
469 (aarch64_arch_setup): Call linux_get_hwcap.
470 * linux-arm-low.c (arm_get_hwcap): Remove function.
471 (arm_read_description): Call linux_get_hwcap.
472 * linux-low.c (linux_get_auxv): New function.
473 (linux_get_hwcap): Likewise.
474 (linux_get_hwcap2): Likewise.
475 * linux-low.h (linux_get_hwcap): New declaration.
476 (linux_get_hwcap2): Likewise.
477 * linux-ppc-low.c (ppc_get_auxv): Remove function.
478 (ppc_arch_setup): Call linux_get_hwcap.
479 * linux-s390-low.c (s390_get_hwcap): Remove function.
480 (s390_arch_setup): Call linux_get_hwcap.
481
1ef53e6b
AH
4822019-03-22 Alan Hayward <alan.hayward@arm.com>
483 Jiong Wang <jiong.wang@arm.com>
484
485 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
486 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
487 to fail.
488 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
489
ee4fbcfa
AH
4902019-03-22 Alan Hayward <alan.hayward@arm.com>
491 Jiong Wang <jiong.wang@arm.com>
492
493 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
494 (aarch64_get_hwcap): New function.
495 (aarch64_arch_setup): Read APIA hwcap.
496
6dc0ebde
AH
4972019-03-22 Alan Hayward <alan.hayward@arm.com>
498 Jiong Wang <jiong.wang@arm.com>
499
500 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
501 (initialize_low_tracepoint): Likewise.
502 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
503 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
504 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
505 (aarch64_linux_read_description): Likewise.
506 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
507
1163a4b7
JB
5082019-03-12 John Baldwin <jhb@FreeBSD.org>
509
510 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
511 i386_create_target_description for 'segments' parameter.
512 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
513 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
514 * win32-i386-low.c (i386_arch_setup): Likewise.
515
d3a70e03
TT
5162019-03-12 Tom Tromey <tromey@adacore.com>
517
518 * linux-low.c (iterate_over_lwps): Update.
519
37991b4f
TT
5202019-03-06 Tom Tromey <tom@tromey.com>
521
522 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
523 (captured_main): Use SCOPE_EXIT.
524
45950eb6
SDJ
5252019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
526
527 * configure.srv: Use '$enable_unittest' instead of '$development'
528 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
529 case.
530
43ac54fc
TT
5312019-02-27 Tom Tromey <tromey@adacore.com>
532
533 * gdbreplay.c (logchar): Handle \r\n.
534
df0da8a2
AH
5352019-02-07 Alan Hayward <alan.hayward@arm.com>
536
537 * linux-low.c (linux_attach): Add process before lwp.
538 * server.c (attach_inferior): Check if already attached.
539
1a5c2598
TT
5402019-02-07 Tom Tromey <tom@tromey.com>
541
542 * x86-tdesc.h: Rename include guard.
543 * x86-low.h: Add include guard.
544 * wincecompat.h: Rename include guard.
545 * win32-low.h: Add include guard.
546 * utils.h: Rename include guard.
547 * tracepoint.h: Rename include guard.
548 * tdesc.h: Rename include guard.
549 * target.h: Rename include guard.
550 * server.h: Rename include guard.
551 * remote-utils.h: Rename include guard.
552 * regcache.h: Rename include guard.
553 * nto-low.h: Rename include guard.
554 * notif.h: Add include guard.
555 * mem-break.h: Rename include guard.
556 * lynx-low.h: Add include guard.
557 * linux-x86-tdesc.h: Add include guard.
558 * linux-s390-tdesc.h: Add include guard.
559 * linux-ppc-tdesc-init.h: Add include guard.
560 * linux-low.h: Add include guard.
561 * linux-aarch64-tdesc.h: Add include guard.
562 * linux-aarch32-low.h: Add include guard.
563 * inferiors.h: Rename include guard.
564 * i387-fp.h: Rename include guard.
565 * hostio.h: Rename include guard.
566 * gdbthread.h: Rename include guard.
567 * gdb_proc_service.h: Rename include guard.
568 * event-loop.h: Rename include guard.
569 * dll.h: Rename include guard.
570 * debug.h: Rename include guard.
571 * ax.h: Rename include guard.
572
956cc47c
SN
5732018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
574
575 PR gdb/23985
576 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
577 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
578
a0707f3c
TT
5792019-01-25 Tom Tromey <tom@tromey.com>
580
581 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
582
0747795c
TT
5832019-01-25 Tom Tromey <tom@tromey.com>
584
585 * win32-low.c: Fix common/ includes.
586 * win32-i386-low.c: Fix common/ includes.
587 * tracepoint.c: Fix common/ includes.
588 * thread-db.c: Fix common/ includes.
589 * target.h: Fix common/ includes.
590 * symbol.c: Fix common/ includes.
591 * spu-low.c: Fix common/ includes.
592 * server.h: Fix common/ includes.
593 * server.c: Fix common/ includes.
594 * remote-utils.c: Fix common/ includes.
595 * regcache.h: Fix common/ includes.
596 * regcache.c: Fix common/ includes.
597 * nto-x86-low.c: Fix common/ includes.
598 * notif.h: Fix common/ includes.
599 * mem-break.h: Fix common/ includes.
600 * lynx-low.c: Fix common/ includes.
601 * lynx-i386-low.c: Fix common/ includes.
602 * linux-x86-tdesc-selftest.c: Fix common/ includes.
603 * linux-x86-low.c: Fix common/ includes.
604 * linux-low.c: Fix common/ includes.
605 * inferiors.h: Fix common/ includes.
606 * i387-fp.c: Fix common/ includes.
607 * hostio.c: Fix common/ includes.
608 * hostio-errno.c: Fix common/ includes.
609 * gdbthread.h: Fix common/ includes.
610 * gdbreplay.c: Fix common/ includes.
611 * fork-child.c: Fix common/ includes.
612 * event-loop.c: Fix common/ includes.
613 * ax.c:
614 (enum gdb_agent_op): Fix common/ includes.
615
be6d4f74
TT
6162019-01-21 Tom Tromey <tom@tromey.com>
617
618 * tracepoint.c: Fix includes.
619 * remote-utils.c: Fix includes.
620 * linux-x86-low.c: Fix includes.
621
66d91b39
JB
6222019-01-01 Joel Brobecker <brobecker@adacore.com>
623
624 * gdbreplay.c (gdbreplay_version): Update copyright year in
625 version message.
626 * server.c (gdbserver_version): Likewise.
627
754e3168
AH
6282018-12-05 Alan Hayward <alan.hayward@arm.com>
629
630 * linux-low.c (add_lwp): Switch ordering.
631
d105de22
TT
6322018-11-29 Tom Tromey <tom@tromey.com>
633
634 * win32-low.c (win32_join): Take pid, not process.
635 * target.h (struct target_ops) <join>: Change argument type.
636 (join_inferior): Change argument name.
637 * spu-low.c (spu_join): Take pid, not process.
638 * server.c (handle_detach): Preserve pid before destroying
639 process.
640 * lynx-low.c (lynx_join): Take pid, not process.
641 * linux-low.c (linux_join): Take pid, not process.
642
50138245
AH
6432018-11-23 Alan Hayward <alan.hayward@arm.com>
644
645 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
646 (aarch64_cannot_fetch_register): Likewise.
647 (struct linux_target_ops): Update references.
648
64f57f3d
PFC
6492018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
650
651 * linux-ppc-low.c: Include nat/linux-ptrace.h.
652
8d619c01
EBM
6532018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
654
655 * configure.srv (ipa_ppc_linux_regobj): Add
656 powerpc-isa207-htm-vsx32l-ipa.o and
657 powerpc-isa207-htm-vsx64l-ipa.o.
658 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
659 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
660 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
661 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
662 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
663 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
664 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
665 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
666 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
667 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
668 (init_registers_powerpc_isa207_htm_vsx32l)
669 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
670 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
671 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
672 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
673 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
674 (ppc_store_tm_ctarregset): New functions.
675 (ppc_regsets): Add entries for HTM regsets.
676 (ppc_arch_setup): Set htm in features struct when needed. Set
677 sizes for the HTM regsets.
678 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
679 (initialize_low_arch): Call
680 init_registers_powerpc_isa207_htm_vsx32l and
681 init_registers_powerpc_isa207_htm_vsx64l.
682 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
683 PPC_TDESC_ISA207_HTM_VSX.
684 (initialize_low_tracepoint): Call
685 init_registers_powerpc_isa207_htm_vsx32l and
686 init_registers_powerpc_isa207_htm_vsx64l.
687
232bfb86
EBM
6882018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
689
690 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
691 rs6000/power-linux-pmu.xml to srv_xmlfiles.
692 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
693 (ppc_store_pmuregset): New functions.
694 (ppc_regsets): Add entries for ebb and pmu regsets.
695 (ppc_arch_setup): Set isa207 in features struct if the ebb and
696 pmu regsets are available. Set sizes for these regsets.
697
f2cf6173
EBM
6982018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
699
700 * configure.srv (ipa_ppc_linux_regobj): Add
701 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
702 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
703 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
704 rs6000/powerpc-isa207-vsx32l.xml, and
705 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
706 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
707 <PPC_TDESC_ISA207_VSX>: New enum value.
708 (init_registers_powerpc_isa207_vsx32l): Declare.
709 (init_registers_powerpc_isa207_vsx64l): Declare.
710 * linux-ppc-low.c (ppc_fill_tarregset): New function.
711 (ppc_store_tarregset): New function.
712 (ppc_regsets): Add entry for the TAR regset.
713 (ppc_arch_setup): Set isa207 in features struct when needed. Set
714 size for the TAR regsets.
715 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
716 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
717 and init_registers_powerpc_isa207_vsx64l.
718 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
719 (initialize_low_tracepoint): Call
720 init_registers_powerpc_isa207_vsx32l and
721 init_registers_powerpc_isa207_vsx64l.
722
7ca18ed6
EBM
7232018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
724 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
725
726 * configure.srv (ipa_ppc_linux_regobj): Add
727 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
728 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
729 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
730 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
731 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
732 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
733 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
734 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
735 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
736 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
737 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
738 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
739 (ppc_hwcap): Add comment.
740 (ppc_hwcap2): New global.
741 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
742 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
743 (ppc_regsets): Add entries for the DSCR and PPR regsets.
744 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
745 when needed. Set sizes for the the DSCR and PPR regsets.
746 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
747 (initialize_low_arch): Call
748 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
749 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
750 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
751 PPC_TDESC_ISA205_PPR_DSCR_VSX.
752 (initialize_low_tracepoint): Call
753 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
754 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
755
5c849b22
PFC
7562018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
757
758 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
759
8ecfd7bd
SDJ
7602018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
761 Simon Marchi <simark@simark.ca>
762
763 * acinclude.m4: Include "../selftest.m4".
764 * configure: Regenerate.
765 * configure.ac: Use "GDB_AC_SELFTEST".
766 * configure.srv: Use "$enable_unittests" instead of
767 "$development" when checking whether unit tests have been
768 enabled.
769 * server.c (captured_main): Update message informing that
770 selftests have been disabled.
771
96643e35
TT
7722018-10-04 Tom Tromey <tom@tromey.com>
773
774 * configure: Rebuild.
775
da4ae14a
TT
7762018-10-04 Tom Tromey <tom@tromey.com>
777
778 * server.c (handle_status): Rename inner "thread".
779 (process_serial_event): Declare "res" in 'm' case.
780 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
781 (iterate_over_lwps): Rename inner "thread".
782 (linux_qxfer_libraries_svr4): Rename inner "len".
783 * gdbthread.h (find_thread_in_random): Rename inner "thread".
784
7c619dbd
GB
7852018-10-01 Gary Benson <gbenson@redhat.com>
786
787 * gdb_proc_service.h: Moved common code to
788 common/gdb_proc_service.h.
789
3795e814
GB
7902018-10-01 Gary Benson <gbenson@redhat.com>
791
792 * gdb_proc_service.h: Synchronize comments and whitespace with
793 GDB's version of this file.
794
49b036f1
TT
7952018-09-25 Tom Tromey <tom@tromey.com>
796
797 * configure: Rebuild.
798 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
799
8ff03f0b
SM
8002018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
801
802 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
803 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
804 ($(IPA_LIB)): Sort IPA_OBJS.
805
a1cd91dc
SM
8062018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
807
808 * Makefile.in: Remove references to $(ADD_DEPS).
809
752312ba
TT
8102018-09-16 Tom Tromey <tom@tromey.com>
811
812 * remote-utils.c (remote_open): Use GNU style for metasyntactic
813 variables.
814 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
815 variables.
816
f1628857
TT
8172018-09-05 Tom Tromey <tom@tromey.com>
818
819 * configure: Rebuild.
820
ad202fcc
SM
8212018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
822
823 PR build/23399
824 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
825
d3d8724a
TT
8262018-08-27 Tom Tromey <tom@tromey.com>
827
828 PR build/23087:
829 * configure: Rebuild.
830
b4f183d2
TT
8312018-08-27 Tom Tromey <tom@tromey.com>
832
833 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
834 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
835 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
836 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
837 (s390x_emit_stack_adjust): Add casts to unsigned char.
838
4e2aa472
SM
8392018-08-22 Simon Marchi <simon.marchi@ericsson.com>
840
841 PR gdb/23374
842 PR gdb/23375
843 * server.h (struct client_state) <disable_randomization>:
844 Initialize to 1.
845
cf4088a9
SM
8462018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
847
848 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
849 variable.
850 (mips_supply_ptrace_register): Likewise.
851
a0de763e
TT
8522018-07-22 Tom Tromey <tom@tromey.com>
853
854 * configure: Rebuild.
855
b0a7723d
TT
8562018-07-22 Tom Tromey <tom@tromey.com>
857
858 * win32-low.c (win32_create_inferior): Remove unused variables.
859 * gdbreplay.c (remote_open): Remove unused variable.
860 * remote-utils.c (remote_prepare): Remove unused variable.
861 * x86-tdesc.h (X86_TDESC_H): Define.
862 (amd64_expedite_regs): Define conditionally.
863 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
864 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
865 * remote-utils.c (readchar): Remove unused variable.
866
a780ef4f
PA
8672018-07-13 Pedro Alves <palves@redhat.com>
868
869 * linux-low.c (linux_kill): Change parameter to process_info
870 pointer instead of pid. Adjust.
871 * lynx-low.c (lynx_kill): Likewise.
872 * nto-low.c (nto_kill): Likewise.
873 * spu-low.c (spu_kill): Likewise.
874 * win32-low.c (win32_kill): Likewise.
875 * server.c (handle_v_kill, kill_inferior_callback)
876 (detach_or_kill_for_exit): Adjust.
877 * target.c (kill_inferior): Change parameter to process_info
878 pointer instead of pid. Adjust.
879 * target.h (struct target_ops) <kill>: Change parameter to
880 process_info pointer instead of pid. Adjust all implementations
881 and callers.
882 (kill_inferior): Likewise.
883
ef2ddb33
PA
8842018-07-13 Pedro Alves <palves@redhat.com>
885
886 * linux-low.c (linux_detach, linux_join): Change parameter to
887 process_info pointer instead of pid. Adjust.
888 * lynx-low.c (lynx_detach, lynx_join): Likewise.
889 * nto-low.c (nto_detach): Likewise.
890 * spu-low.c (spu_detach, spu_join): Likewise.
891 * win32-low.c (win32_detach, win32_join): Likewise.
892 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
893 * target.h (struct target_ops) <detach, join>: Change parameter to
894 process_info pointer instead of pid. Adjust all implementations
895 and callers.
896 (detach_inferior, join_inferior): Rename 'pid' parameter to
897 'proc'.
898
c7ab0aef
SDJ
8992018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
900 Jan Kratochvil <jan.kratochvil@redhat.com>
901 Paul Fertser <fercerpav@gmail.com>
902 Tsutomu Seki <sekiriki@gmail.com>
903
904 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
905 (OBS): Add 'common/netstuff.o'.
906 (GDBREPLAY_OBS): Likewise.
907 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
908 (remote_open): Implement support for IPv6
909 connections.
910 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
911 and 'wspiapi.h'.
912 (handle_accept_event): Accept connections from IPv6 sources.
913 (remote_prepare): Handle IPv6-style hostnames; implement
914 support for IPv6 connections.
915 (remote_open): Implement support for printing connections from
916 IPv6 sources.
917
31445d10
PA
9182018-07-11 Pedro Alves <palves@redhat.com>
919
920 PR gdb/23377
921 * mem-break.c (any_persistent_commands): Add process_info
922 parameter and use it instead of relying on the current process.
923 Change return type to bool.
924 * mem-break.h (any_persistent_commands): Add process_info
925 parameter and change return type to bool.
926 * server.c (handle_detach): Remove require_running_or_return call.
927 Look up the process_info for the process we're about to detach.
928 If not found, return back error to GDB. Adjust
929 any_persistent_commands call to pass down a process pointer.
930
cb197132
PA
9312018-07-11 Pedro Alves <palves@redhat.com>
932
933 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
934 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
935 instead of collect_register_by_name.
936 * regcache.c (regcache_raw_get_unsigned_by_name): New.
937 * regcache.h (regcache_raw_get_unsigned_by_name): New.
938
1b919490
VB
9392018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
940 Pedro Alves <palves@redhat.com>
941
942 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
943
d7e15655
TT
9442018-07-03 Tom Tromey <tom@tromey.com>
945
946 * linux-low.c: Update.
947 * lynx-low.c: Update.
948 * mem-break.c: Update.
949 * nto-low.c: Update.
950 * remote-utils.c: Update.
951 * server.c: Update.
952 * spu-low.c: Update.
953 * target.c: Update.
954 * win32-low.c: Update.
955
26a57c92
TT
9562018-07-03 Tom Tromey <tom@tromey.com>
957
958 * server.c: Update.
959
0e998d96
TT
9602018-07-03 Tom Tromey <tom@tromey.com>
961
962 * linux-low.c: Update.
963
cc6bcb54
TT
9642018-07-03 Tom Tromey <tom@tromey.com>
965
966 * target.c: Update.
967
e38504b3
TT
9682018-07-03 Tom Tromey <tom@tromey.com>
969
970 * linux-low.c: Update.
971 * linux-mips-low.c: Update.
972 * lynx-low.c: Update.
973 * nto-low.c: Update.
974 * remote-utils.c: Update.
975 * server.c: Update.
976 * spu-low.c: Update.
977 * target.c: Update.
978 * thread-db.c: Update.
979
e99b03dc
TT
9802018-07-03 Tom Tromey <tom@tromey.com>
981
982 * linux-low.c: Update.
983 * linux-mips-low.c: Update.
984 * lynx-low.c: Update.
985 * mem-break.c: Update.
986 * nto-low.c: Update.
987 * remote-utils.c: Update.
988 * server.c: Update.
989 * spu-low.c: Update.
990 * target.c: Update.
991 * tracepoint.c: Update.
992
f2907e49
TT
9932018-07-03 Tom Tromey <tom@tromey.com>
994
995 * linux-low.c: Update.
996 * linux-ppc-low.c: Update.
997 * linux-x86-low.c: Update.
998 * proc-service.c: Update.
999 * server.c: Update.
1000 * spu-low.c: Update.
1001 * thread-db.c: Update.
1002 * win32-low.c: Update.
1003
fd79271b
TT
10042018-07-03 Tom Tromey <tom@tromey.com>
1005
1006 * linux-low.c: Update.
1007 * lynx-low.c: Update.
1008 * nto-low.c: Update.
1009 * remote-utils.c: Update.
1010 * spu-low.c: Update.
1011 * thread-db.c: Update.
1012 * win32-low.c: Update.
1013
c0867626
SDJ
10142018-06-29 Joel Brobecker <brobecker@adacore.com>
1015
1016 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1017 parameter in call to 'amd64_create_target_description'.
1018
2512d7ef
JK
10192018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1020
1021 * x86-tdesc.h: Remove executable permission flag.
1022
d0ac1c44
SM
10232018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1024
1025 * configure.ac: Remove AC_PREREQ, add missing quoting.
1026 * configure: Re-generate.
1027 * config.in: Re-generate.
1028 * aclocal.m4: Re-generate.
1029
c4eb05ff
SM
10302018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1031
1032 * tracepoint.h (current_traceframe): Remove declaration.
1033
02895270
AH
10342018-06-18 Alan Hayward <alan.hayward@arm.com>
1035
1036 * linux-aarch64-low.c (is_sve_tdesc): New function.
1037 (aarch64_sve_regs_copy_to_regcache): Likewise.
1038 (aarch64_sve_regs_copy_from_regcache): Likewise.
1039 (aarch64_regs_info): Add SVE checks.
1040 (initialize_low_arch): Initialize SVE.
1041
e9902bfc
AH
10422018-06-18 Alan Hayward <alan.hayward@arm.com>
1043
1044 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1045
fefa175e
AH
10462018-06-11 Alan Hayward <alan.hayward@arm.com>
1047
1048 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1049 (initialize_low_tracepoint): Likewise
1050 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1051 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1052 param.
1053 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1054 checks.
1055 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1056
b91ad3ff
AH
10572018-06-11 Alan Hayward <alan.hayward@arm.com>
1058
1059 * server.h (PBUFSIZ): Increase size
1060
f868386e
AH
10612018-06-11 Alan Hayward <alan.hayward@arm.com>
1062
1063 * regcache.c (regcache::raw_compare): New function.
1064 * regcache.h (regcache::raw_compare): New declaration.
1065
9c861883
AH
10662018-06-11 Alan Hayward <alan.hayward@arm.com>
1067
1068 * regcache.c (new_register_cache): Use new.
1069 (free_register_cache): Use delete.
1070 (register_data): Use const.
1071 (supply_register): Move body inside regcache.
1072 (regcache::raw_supply): New override function.
1073 (collect_register): Move body inside regcache.
1074 (regcache::raw_collect): New override function.
1075 (regcache::get_register_status): New override function.
1076 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1077
40591844
TT
10782018-06-09 Tom Tromey <tom@tromey.com>
1079
1080 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1081 declare queue.
1082 (event_queue): Use std::queue.
1083 (gdb_event_xfree): Remove.
1084 (initialize_event_loop, process_event, wait_for_event): Update.
1085
6341380d
SC
10862018-06-08 Stan Cox <scox@redhat.com>
1087
1088 * win32-low.c (win32_create_inferior): last_ptid and last_status
1089 moved to client_state.
1090
03349c93
PA
10912018-06-08 Pedro Alves <palves@redhat.com>
1092
1093 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1094 common/common-exceptions.o, common/common-utils.o,
1095 common/errors.o, common/print-utils.o and utils.o.
1096 * gdbreplay.c: Include "common-defs.h" instead of the two
1097 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1098 string.h or alloca.h.
1099 (perror_with_name): Delete.
1100 (remote_open): Use xstrdup instead of strdup.
1101 (main): Rename to ...
1102 (captured_main): ... this.
1103 (main): New.
1104
8dcc53b3
TT
11052018-06-08 Tom Tromey <tom@tromey.com>
1106
1107 * linux-low.c (linux_low_read_btrace): Update.
1108
c12a5089
SC
11092018-06-04 Stan Cox <scox@redhat.com>
1110
1111 * server.h (struct client_state): New.
1112 * server.c (cont_thread, general_thread, multi_process)
1113 (report_fork_events, report_vfork_events, report_exec_events)
1114 (report_thread_events, swbreak_feature, hwbreak_feature)
1115 (vCont_supported, disable_randomization, pass_signals)
1116 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1117 Moved to client_state.
1118 * remote-utils.c (remote_debug, noack_mode)
1119 (transport_is_reliable): Moved to client_state.
1120 * tracepoint.c (current_traceframe): Moved to client_state.
1121
1122 Update all callers.
1123 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1124 linux-low.c, remote-utils.h, target.c: Use client_state.
1125
122394f1
AH
11262018-05-31 Alan Hayward <alan.hayward@arm.com>
1127
1128 * configure.srv: Add new c/h file.
1129
95228a0d
AH
11302018-05-31 Alan Hayward <alan.hayward@arm.com>
1131
1132 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1133 null VQ.
1134
d8dab6c3
MR
11352018-05-25 Maciej W. Rozycki <macro@mips.com>
1136
1137 * gdb.arch/mips-fpregset-core.exp: New test.
1138 * gdb.arch/mips-fpregset-core.c: New test source.
1139
81e25b7c
EK
11402018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1141
1142 PR server/23198
1143 * hostio.c (require_int): Do not report overflow for integers
1144 between 0xfffffff and 0x7fffffff.
1145
7e947ad3
MR
11462018-05-22 Maciej W. Rozycki <macro@mips.com>
1147
1148 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1149 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1150 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1151 functions.
1152 (the_low_target): Wire them.
1153
1d75a658
PFC
11542018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1155
1156 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1157 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1158 mode. Call collect_register_by_name with vscr using
1159 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1160 (ppc_store_vrregset): Add and set vscr_offset variable as in
1161 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1162 vscr_offset.
1163
d078308a
PFC
11642018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1165
1166 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1167 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1168 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1169
7273b5fc
PFC
11702018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1171
1172 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1173 (ppc_store_vsxregset): Likewise.
1174 (ppc_fill_vrregset): Likewise.
1175 (ppc_store_vrregset): Likewise.
1176 (ppc_fill_evrregset): Likewise.
1177 (ppc_store_evrregset): Likewise.
1178 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1179 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1180 needed.
1181
2e077f5e
PFC
11822018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1183
1184 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1185 wordsize of the inferior. Call ppc_linux_target_wordsize.
1186
bd64614e
PFC
11872018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1188
1189 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1190 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1191 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1192 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1193 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1194 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1195 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1196 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1197 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1198 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1199 (tdesc_powerpc_e500l): Remove.
1200 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1201 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1202 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1203 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1204 linux-ppc-tdesc.h.
1205 (ppc_arch_setup): Remove target description matching code. Fill a
1206 ppc_linux_features struct and call ppc_linux_match_description
1207 with it.
1208
75d74cca
MR
12092018-05-22 Maciej W. Rozycki <macro@mips.com>
1210
1211 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1212 width of the requested register exceeds the width of the
1213 `ptrace' data type.
1214 (mips_cannot_store_register): Likewise.
1215
e4439e43
MR
12162018-05-21 Maciej W. Rozycki <macro@mips.com>
1217
1218 * linux-mips-low.c (mips_fetch_register): New function. Update
1219 preceding comment.
1220 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1221 (the_low_target): Wire `mips_fetch_register'.
1222
55271bf9
JB
12232018-05-10 Joel Brobecker <brobecker@adacore.com>
1224
1225 * lynx-i386-low.c (LYNXOS_178): New macro.
1226 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1227 the layout on LynxOS-178.
1228 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1229 handle floating point registers that are not supported by
1230 LynxOS-178.
1231
1a34f210
TT
12322018-05-10 Tom Tromey <tom@tromey.com>
1233
1234 * configure: Rebuild.
1235
190852c8
JB
12362018-05-10 Joel Brobecker <brobecker@adacore.com>
1237
1238 PR server/23158:
1239 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1240 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1241 Use it to set the expedite_regs field in the given tdesc.
1242 * x86-tdesc.h: New file.
1243 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1244 Adjust following the addition of the new expedite_regs parameter
1245 to init_target_desc.
1246 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1247 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1248 (i386_linux_read_description, amd64_linux_read_description):
1249 Adjust following the addition of the new expedite_regs parameter
1250 to init_target_desc.
1251 * lynx-i386-low.c: #include "x86-tdesc.h".
1252 (lynx_i386_arch_setup): Adjust following the addition of the new
1253 expedite_regs parameter to init_target_desc.
1254 * nto-x86-low.c: #include "x86-tdesc.h".
1255 (nto_x86_arch_setup): Adjust following the addition of the new
1256 expedite_regs parameter to init_target_desc.
1257 * win32-i386-low.c: #include "x86-tdesc.h".
1258 (i386_arch_setup): Adjust following the addition of the new
1259 expedite_regs parameter to init_target_desc.
1260
7dbac825
JB
12612018-05-10 Joel Brobecker <brobecker@adacore.com>
1262
1263 PR server/23158:
1264 * win32-low.c (win32_create_inferior): Add call to my_wait
1265 setting last_status global.
1266
906994d9
JB
12672018-05-10 Joel Brobecker <brobecker@adacore.com>
1268
1269 PR server/23158:
1270 * win32-low.c (create_process): Only call gdb_tilde_expand if
1271 inferior_cwd is not NULL.
1272
8ee22052
AB
12732018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1274
1275 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1276 registers to the cache if their values have changed.
1277 (i387_xsave_to_cache): Provide default values for x87 control
1278 registers when these features are available, but disabled.
1279 * regcache.c (supply_register_by_name_zeroed): New function.
1280 * regcache.h (supply_register_by_name_zeroed): Declare new
1281 function.
1282
aff689d3
TT
12832018-05-07 Tom Tromey <tom@tromey.com>
1284
1285 * configure: Rebuild.
1286
85e26832
TT
12872018-05-04 Tom Tromey <tom@tromey.com>
1288
1289 * configure: Rebuild.
1290
a3b60e45
JK
12912018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1292 Pedro Alves <palves@redhat.com>
1293
1294 * linux-aarch64-low.c (aarch64_stopped_data_address):
1295 Likewise.
1296
632e107b
TT
12972018-04-27 Tom Tromey <tom@tromey.com>
1298
1299 * configure: Rebuild.
1300
458412c3
TT
13012018-04-23 Tom Tromey <tom@tromey.com>
1302
1303 * configure: Rebuild.
1304
f31c089e
SM
13052018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1306
1307 * Makefile.in (depcomp): Add "..".
1308 (all_deps_files): New and use it.
1309
b319b098
AH
13102018-04-18 Alan Hayward <alan.hayward@arm.com>
1311
1312 * configure.srv (aarch64*-*-linux*): Don't include xml.
1313 (i[34567]86-*-cygwin*): Likewise.
1314 (i[34567]86-*-linux*): Likewise.
1315 (i[34567]86-*-lynxos*): Likewise.
1316 (i[34567]86-*-mingw32ce*): Likewise.
1317 (i[34567]86-*-mingw*): Likewise.
1318 (i[34567]86-*-nto*): Likewise.
1319 (tic6x-*-uclinux): Likewise.
1320 (x86_64-*-linux*): Likewise.
1321 (x86_64-*-mingw*): Likewise.
1322 (x86_64-*-cygwin*): Likewise.
1323
3b74854b
AH
13242018-04-18 Alan Hayward <alan.hayward@arm.com>
1325
1326 * tdesc.c: Remove xml parameter.
1327
e98577a9
AH
13282018-04-18 Alan Hayward <alan.hayward@arm.com>
1329
1330 * server.c (get_features_xml): Remove cast.
1331 * tdesc.c (void target_desc::accept): Fill in function.
1332 (tdesc_get_features_xml): Remove old xml creation.
1333 (print_xml_feature::visit_pre): Add xml vistor.
1334 * tdesc.h (struct target_desc): Make xmltarget mutable.
1335 (tdesc_get_features_xml): Remove declaration.
1336
d278f585
AH
13372018-04-18 Alan Hayward <alan.hayward@arm.com>
1338
1339 * tdesc.c (tdesc_architecture_name): Add new function.
1340 (tdesc_osabi_name): Likewise.
1341 (tdesc_get_features_xml): Use new functions.
1342
eee8a18d
AH
13432018-04-18 Alan Hayward <alan.hayward@arm.com>
1344
1345 * tdesc.c (tdesc_create_flags): Remove.
1346 (tdesc_add_flag): Likewise.
1347 (tdesc_named_type): Likewise.
1348 (tdesc_create_union): Likewise.
1349 (tdesc_create_struct): Likewise.
1350 (tdesc_create_vector): Likewise.
1351 (tdesc_add_bitfield): Likewise.
1352 (tdesc_add_field): Likewise.
1353 (tdesc_set_struct_size): Likewise.
1354
82ec9bc7
AH
13552018-04-18 Alan Hayward <alan.hayward@arm.com>
1356
1357 * tdesc.c (~target_desc): Remove implictly deleted items.
1358 (init_target_desc): Iterate all features.
1359 (tdesc_get_features_xml): Use vector.
1360 (tdesc_create_feature): Create feature.
1361 * tdesc.h (tdesc_feature) Remove
1362 (target_desc): Add features.
1363
ea3e7d71
AH
13642018-04-18 Alan Hayward <alan.hayward@arm.com>
1365
1366 * Makefile.in: Add common/tdesc.c
1367 * tdesc.c (init_target_desc): init all reg_defs from register
1368 vector.
1369 (tdesc_create_reg): Create tdesc_reg.
1370 * tdesc.h (tdesc_feature): Add register vector.
1371
17d08cd4
SM
13722018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * tdesc.h (struct target_desc) <features>: Change type to
1375 std::vector<std::string>.
1376 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1377 changes.
1378 (tdesc_get_features_xml): Likewise.
1379 (tdesc_create_feature): Likewise.
1380
5cd3e386
AH
13812018-03-26 Alan Hayward <alan.hayward@arm.com>
1382
1383 * regcache.c (find_register_by_number): Return a ref.
1384 (find_regno): Use references.
1385 (register_size): Likewise.
1386 (register_data): Likewise.
1387 * tdesc.c (target_desc::~target_desc): Remove free calls.
1388 (target_desc::operator==): Use std::vector compare.
1389 (init_target_desc): Use reference.
1390 (tdesc_create_reg): Use reg constructors.
1391 * tdesc.h (struct target_desc): Replace pointer with object.
1392
dff7492c
AH
13932018-03-23 Alan Hayward <alan.hayward@arm.com>
1394
1395 * regcache.c (find_register_by_number): Make static.
1396 (find_regno): Use find_register_by_number
1397 * regcache.h (struct reg): Remove declaration.
1398
d80e5242
AH
13992018-03-23 Alan Hayward <alan.hayward@arm.com>
1400
1401 * tdesc.c (target_desc::~target_desc): Move to here.
1402 (target_desc::operator==): Likewise.
1403 * tdesc.h (target_desc::~target_desc): Move from here.
1404 (target_desc::operator==): Likewise.
1405
f69c5afb
AA
14062018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1407
1408 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1409
ce29f843
AA
14102018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1411
1412 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1413 S390_TDESC_GS.
1414 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1415 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1416 and init_registers_s390_gs_linux64.
1417
c49bd90b
AA
14182018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1419
1420 * linux-s390-low.c (s390_fill_gs): Remove function.
1421 (s390_fill_gsbc): Remove function.
1422 (s390_regsets): Set fill functions for the guarded storage regsets
1423 to NULL.
1424
7edb9bd3
AA
14252018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1426
1427 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1428 the word size. Add comment.
1429 (s390_get_wordsize): New function.
1430 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1431 pswm with it. Instead, use s390_get_wordsize to determine the
1432 word size first and derive the correct tdesc from that directly.
1433
39be3c7e
SM
14342018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * Makefile.in: Include silent-rules.mk.
1437 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1438 (COMPILE): Add ECHO_CXX.
1439 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1440 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1441 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1442 (version-generated.c): Add ECHO_GEN.
1443 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1444 (IPAGENT_COMPILE): Add ECHO_CXX.
1445 (%-generated.c): Add ECHO_REGDAT.
1446
3ae9ce5d
TT
14472018-03-14 Tom Tromey <tom@tromey.com>
1448
1449 PR cli/14977:
1450 * ax.c (ax_printf): Special case for NULL.
1451
e6a58aa8
SM
14522018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1453
1454 * linux-low.c (linux_qxfer_libraries_svr4): Use
1455 xml_escape_text_append.
1456
f6e8a41e
SM
14572018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1460
b9671caf
SM
14612018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1462
1463 * server.c (handle_general_set): Remove unnecessary xstrdup.
1464
e80aaf61
SM
14652018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1466
1467 * server.c (parse_debug_format_options): Adjust to
1468 delim_string_to_char_ptr_vec changes.
1469 * thread-db.c (thread_db_load_search): Adjust to
1470 dirnames_to_char_ptr_vec changes.
1471
b1223e78
MM
14722018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1473
1474 * target.h (target_enable_btrace, target_disable_btrace)
1475 (target_read_btrace, target_read_btrace_conf): Turn macro into
1476 inline function. Throw error if target method is not defined.
1477 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1478 check for btrace target method. Be prepared to handle exceptions
1479 from btrace target methods.
1480
81561546
SDJ
14812018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1482
1483 * server.c (captured_main): Change order of error message printed
1484 when the current working directory cannot be found.
1485
25e3c82c
SDJ
14862018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1487
1488 * server.c: Include "filenames.h" and "pathstuff.h".
1489 (program_name): Delete variable.
1490 (program_path): New anonymous class.
1491 (get_exec_wrapper): Use "program_path" instead of
1492 "program_name".
1493 (handle_v_run): Likewise.
1494 (captured_main): Likewise.
1495 (process_serial_event): Likewise.
1496
b4987c95
SDJ
14972018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1498
1499 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1500 (OBJS): Add "pathstuff.o".
1501 * server.c (current_directory): New global variable.
1502 (captured_main): Initialize "current_directory".
1503
f46cd62a
AH
15042018-02-26 Alan Hayward <alan.hayward@arm.com>
1505
1506 * tdesc.c: Use common/tdesc.h.
1507 * tdesc.h: Likewise.
1508
a543c5ca
AH
15092018-02-20 Alan Hayward <alan.hayward@arm.com>
1510 Simon Marchi <simon.marchi@ericsson.com>
1511
1512 * Makefile.in: Switch order of make rules.
1513
b5884fa7
AH
15142018-02-19 Alan Hayward <alan.hayward@arm.com>
1515
1516 * Makefile.in: Add common directory in build.
1517 * configure.ac: Add common reference.
1518 * configure: Regenerate.
1519
de6242d3
MM
15202018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1521
1522 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1523 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1524 * spu-low.c (spu_target_ops): Likewise.
1525 * win32-low.c (win32_target_ops): Likewise.
1526 * server.c (supported_btrace_packets): Report packets unconditionally.
1527 * target.h (target_ops) <supports_btrace>: Remove.
1528 (target_supports_btrace): Remove.
1529
9ee23a85
MM
15302018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1531
1532 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1533 (handle_btrace_disable): Change return type to void. Use exceptions
1534 to report errors.
1535 (handle_btrace_general_set): Catch exception and copy message to
1536 return message.
1537
8ce47547
TT
15382018-02-08 Tom Tromey <tom@tromey.com>
1539
1540 * linux-low.c (install_software_single_step_breakpoints): Use
1541 make_scoped_restore.
1542 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1543 (do_restore_current_thread_cleanup): Remove.
1544 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1545 declare.
1546
45dd3607
TT
15472018-02-08 Tom Tromey <tom@tromey.com>
1548
1549 * mem-break.c (set_raw_breakpoint_at): Use
1550 gdb::unique_xmalloc_ptr.
1551
e671cd59
PA
15522018-01-30 Pedro Alves <palves@redhat.com>
1553
1554 PR gdb/13211
1555 * target.c (target_terminal::terminal_state): Rename to ...
1556 (target_terminal::m_terminal_state): ... this.
1557
a0aad537
JC
15582018-01-19 James Clarke <jrtc27@jrtc27.com>
1559
1560 * linux-low.c (handle_extended_wait): Surround call to
1561 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1562
4d9b86e1
SM
15632018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1564
1565 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1566 linux_ptrace_attach_fail_reason_string now returning an
1567 std::string.
1568 (linux_attach): Likewise.
1569 * thread-db.c (attach_thread): Likewise.
1570
f517c180
EA
15712018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1572
1573 PR gdb/21559
1574 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1575 checking for fs_base/gs_base fields in struct user_regs_struct.
1576 * configure: Regenerate.
1577
9a70f35c
YQ
15782018-01-16 Yao Qi <yao.qi@linaro.org>
1579
1580 PR gdb/18749
1581 * linux-low.c (fetch_register): Call supply_register instead of
1582 error.
1583
605fd3c6
YQ
15842018-01-08 Yao Qi <yao.qi@linaro.org>
1585 Simon Marchi <simon.marchi@ericsson.com>
1586
1587 * Makefile.in (OBS): Remove selftest.o.
1588 * configure.ac: Set srv_selftest_objs if $development is true.
1589 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1590 * configure: Re-generated.
1591 * server.c (captured_main): Wrap variable selftest_filter with
1592 GDB_SELF_TEST.
1593
2cc05030
SM
15942018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * server.c (parse_debug_format_options): Return std::string.
1597 (handle_monitor_command, captured_main): Adjust.
1598
e379cee6
PA
15992018-01-05 Pedro Alves <palves@redhat.com>
1600
1601 PR gdb/18653
1602 * server.c (captured_main): Pass quiet=false to
1603 save_original_signals_state.
1604
82e1e79a
JB
16052018-01-01 Joel Brobecker <brobecker@adacore.com>
1606
1607 * gdbreplay.c (gdbreplay_version): Update copyright year in
1608 version message.
1609 * server.c (gdbserver_version): Likewise.
1610
8e481c3b
TT
16112017-12-08 Tom Tromey <tom@tromey.com>
1612
1613 * ax.c (ax_printf): Update.
1614
a8806230
YQ
16152017-12-07 Yao Qi <yao.qi@linaro.org>
1616
1617 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1618 aarch64_linux_read_description.
1619 * linux-amd64-ipa.c (idx2mask): New array.
1620 (get_ipa_tdesc): Move idx2mask out.
1621 (initialize_low_tracepoint): Initialize target descriptions.
1622 * linux-i386-ipa.c (idx2mask): New array.
1623 (get_ipa_tdesc): Move idx2mask out.
1624 (initialize_low_tracepoint): Initialize target descriptions.
1625
d4a0e8b5
SM
16262017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1627
1628 * tdesc.c (struct tdesc_type): Change return type.
1629 (tdesc_add_flag): Change parameter type.
1630 (tdesc_add_bitfield): Likewise.
1631 (tdesc_add_field): Likewise.
1632 (tdesc_set_struct_size): Likewise.
1633
798a7429
SM
16342017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1635
1636 * regcache.c (registers_to_string): Remove unused variable.
1637
c0e15c9b
SM
16382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1639
1640 * inferiors.c (for_each_inferior_with_data): Remove.
1641 * inferiors.h (for_each_inferior_with_data): Remove.
1642 * server.c (handle_qxfer_threads_worker): Change parameter type.
1643 (handle_qxfer_threads_proper): Use for_each_thread.
1644
f0045347
SM
16452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1646
1647 * inferiors.c (for_each_inferior): Remove.
1648 (clear_inferiors): Use for_each_thread.
1649 * inferiors.h (for_each_inferior): Remove.
1650 * linux-low.c (linux_wait_for_event_filtered): Use
1651 for_each_thread.
1652 (linux_stabilize_threads): Likewise.
1653 * regcache.c (regcache_release): Likewise.
1654 * server.c (gdb_wants_all_threads_stopped): Likewise.
1655 (clear_pending_status_callback): Remove.
1656 (handle_status): Use for_each_thread.
1657 (captured_main): Likewise.
1658 * win32-low.c (child_init_thread_list): Likewise.
1659 (win32_clear_inferiors): Likewise.
1660 (fake_breakpoint_event): Likewise.
1661
9521758b
SM
16622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1663
1664 * inferiors.h (find_inferior): Remove.
1665 * inferiors.c (find_inferior): Remove.
1666
8f86d7aa
SM
16672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1668
1669 * linux-low.c (resume_status_pending_p): Update comment.
1670 (need_step_over_p): Update comment.
1671
e2b44075
SM
16722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * linux-low.c (proceed_one_lwp): Return void, change parameter
1675 type.
1676 (unsuspend_and_proceed_one_lwp): Likewise.
1677 (proceed_all_lwps): Use for_each_thread.
1678 (unstop_all_lwps): Likewise.
1679
c80825ff
SM
16802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1681
1682 * linux-low.c (linux_resume_one_thread): Return void, take
1683 parameter directly.
1684 (linux_resume): Use for_each_thread.
1685
df3e4dbe
SM
16862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1687
1688 * linux-low.c (send_sigstop_callback): Return void, change
1689 parameter type. Rename to...
1690 (send_sigstop): ... this.
1691 (suspend_and_send_sigstop_callback): Return void, change parameter
1692 type. Rename to...
1693 (suspend_and_send_sigstop): ... this.
1694 (stop_all_lwps): Use for_each_thread.
1695
5a6b0a41
SM
16962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1697
1698 * linux-low.c (lwp_running): Return bool, remove unused
1699 argument.
1700 (linux_stabilize_threads): Use find_thread.
1701
39a64da5
SM
17022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1703
1704 * linux-low.c (select_singlestep_lwp_callback): Remove.
1705 (count_events_callback): Remove.
1706 (select_event_lwp_callback): Remove.
1707 (select_event_lwp): Use find_thread/for_each_thread.
1708
a1385b7b
SM
17092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1710
1711 * linux-low.c (not_stopped_callback): Return bool, take filter
1712 argument directly.
1713 (linux_wait_for_event_filtered): Use find_thread.
1714 (linux_wait_1): Likewise.
1715
454296a2
SM
17162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1717
1718 * linux-low.c (same_lwp): Remove.
1719 (find_lwp_pid): Use find_thread.
1720
6b2a85da
SM
17212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * linux-low.c (delete_lwp_callback): Remove.
1724 (linux_mourn): Use for_each_thread.
1725
798a38e8
SM
17262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1727
1728 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1729 args parameter, don't check for pid.
1730 (linux_detach): Use for_each_thread.
1731
e4eb0dec
SM
17322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1733
1734 * linux-low.c (struct counter): Remove.
1735 (second_thread_of_pid_p): Remove.
1736 (last_thread_of_process_p): Use find_thread.
1737
83e1b6c1
SM
17382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1739
1740 * inferiors.c (find_inferior_in_random): Remove.
1741 * inferiors.h (find_inferior_in_random): Remove.
1742 * linux-low.c (status_pending_p_callback): Return bool, accept
1743 parameter ptid directly.
1744 (linux_wait_for_event_filtered): Use find_thread_in_random.
1745 (linux_wait_1): Likewise.
1746
8dc7b443
SM
17472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1748
1749 * inferiors.c (find_inferior_id): Remove.
1750 (find_thread_ptid): Move implemention from find_inferior_id to
1751 here.
1752 * inferiors.h (find_inferior_id): Remove.
1753 * server.c (handle_status): Use find_thread_ptid.
1754 (process_serial_event): Likewise.
1755 * thread-db.c (find_one_thread): Likewise.
1756 (thread_db_thread_handle): Likewise.
1757 * win32-low.c (thread_rec): Likewise.
1758 (child_delete_thread): Likewise.
1759 (win32_thread_alive): Likewise.
1760 (get_child_debug_event): Likewise.
1761
da25033c
SM
17622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1763
1764 * linux-mips-low.c (update_watch_registers_callback): Return
1765 void, remove pid_p parameter, don't check for pid.
1766 (mips_insert_point, mips_remove_point): Use for_each_thread.
1767
c91bb56b
SM
17682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1769
1770 * lynx.low (lynx_delete_thread_callback): Remove.
1771 (lynx_mourn): Use for_each_thread.
1772
634a3254
SM
17732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1774
1775 * regcache.c (regcache_invalidate_one): Remove.
1776 (regcache_invalidate_pid): use for_each_thread.
1777
41272101
TT
17782017-11-26 Tom Tromey <tom@tromey.com>
1779
1780 * linux-low.c (linux_create_inferior): Update.
1781
f5291a6f
UW
17822017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1783
1784 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1785
6654d750
AH
17862017-11-24 Alan Hayward <alan.hayward@arm.com>
1787
1788 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1789 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1790 * linux-aarch64-tdesc-selftest.c: New file.
1791 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1792
17932017-11-24 Alan Hayward <alan.hayward@arm.com>
1794
1795 * configure.srv: Add new file.
1796 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1797 * linux-aarch64-tdesc-selftest.c: New file.
1798 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1799
49bdb7ee
AH
18002017-11-24 Alan Hayward <alan.hayward@arm.com>
1801
1802 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1803 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1804 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1805
d6d7ce56
AH
18062017-11-24 Alan Hayward <alan.hayward@arm.com>
1807
1808 * configure.srv: Add new files.
1809 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1810 aarch64_linux_read_description.
1811 * linux-aarch64-low.c (aarch64_linux_read_description):
1812 Merge with aarch64_arch_setup.
1813 (aarch64_arch_setup): Call aarch64_linux_read_description.
1814 * linux-aarch64-tdesc.c: New file.
1815 * linux-aarch64-tdesc.h: New file.
1816
506fe5f4
YQ
18172017-11-24 Yao Qi <yao.qi@linaro.org>
1818
1819 * configure.srv: Set $srv_regobj for tic6x-linux.
1820 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1821 (tic6x_read_description): Move some code to tic6x_arch_setup.
1822 (tic6x_tdesc_test): New function.
1823 (initialize_low_arch): Call selftests::register_test.
1824
29f9a567
YQ
18252017-11-22 Yao Qi <yao.qi@linaro.org>
1826
1827 * remote-utils.c (prepare_resume_reply): Use memcpy.
1828
578290ec
SM
18292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1830
1831 * linux-low.c (kill_one_lwp_callback): Return void, take
1832 argument directly, don't filter on pid.
1833 (linux_kill): Use for_each_thread.
1834
eca55aec
SM
18352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1836
1837 * linux-low.c (need_step_over_p): Return bool, remove dummy
1838 argument.
1839 (linux_resume, proceed_all_lwps): Use find_thread.
1840
25c28b4d
SM
18412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1842
1843 * linux-low.c (resume_status_pending_p): Return bool, remove
1844 flag_p argument.
1845 (linux_resume): Use find_thread.
1846
5fdda392
SM
18472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1848
1849 * linux-low.c (struct thread_resume_array): Remove.
1850 (linux_set_resume_request): Return void, take arguments
1851 directly.
1852 (linux_resume): Use for_each_thread.
1853
fcb056a5
SM
18542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1855
1856 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1857 return bool, remove data argument.
1858 (linux_stabilize_threads): Use find_thread.
1859
139720c5
SM
18602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1861
1862 * linux-low.c (unsuspend_one_lwp): Remove.
1863 (unsuspend_all_lwps): Use for_each_thread, inline code from
1864 unsuspend_one_lwp.
1865
6d1e5673
SM
18662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1867
1868 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1869 * linux-low.c (struct iterate_over_lwps_args): Remove.
1870 (iterate_over_lwps_filter): Remove.
1871 (iterate_over_lwps): Use find_thread.
1872
bbf550d5
SM
18732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1874
1875 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1876 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1877 code from reset_lwp_ptrace_options_callback.
1878
00192f77
SM
18792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1880
1881 * linux-arm-low.c (struct update_registers_data): Remove.
1882 (update_registers_callback): Return void, take arguments
1883 directly, don't check thread's pid.
1884 (arm_insert_point, arm_remove_point): Use for_each_thread.
1885
2bee2b6c
SM
18862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1887
1888 * win32-low.c (continue_one_thread): Return void, take argument
1889 directly.
1890 (child_continue): Use for_each_thread.
1891
0b360f19
SM
18922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1893
1894 * win32-i386-low.c (update_debug_registers_callback): Rename
1895 to ...
1896 (update_debug_registers): ... this, return void, remove pid_p arg.
1897 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1898
f27866ba
SM
18992017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1900
1901 * inferiors.h (struct process_info): Add constructor, initialize
1902 fields..
1903 <syscalls_to_catch>: Change type to std::vector<int>.
1904 * inferiors.c (add_process): Allocate process_info with new.
1905 (remove_process): Free process_info with delete.
1906 * linux-low.c (handle_extended_wait): Adjust.
1907 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1908 * server.c (handle_general_set): Adjust.
1909
e849ea89
PA
19102017-11-16 Pedro Alves <palves@redhat.com>
1911
1912 * remote-utils.c (remote_close): Block SIGIO signals instead of
1913 uninstalling the SIGIO handler.
1914
1d0aa65c
AH
19152017-11-16 Alan Hayward <alan.hayward@arm.com>
1916
1917 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1918
3491a34c
YQ
19192017-11-16 Yao Qi <yao.qi@linaro.org>
1920
1921 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1922 (tic6x_store_gregset): Likewise.
1923 (tic6x_usrregs_info): Move it up.
1924
a602f924
AH
19252017-11-15 Alan Hayward <alan.hayward@arm.com>
1926
1927 * Makefile.in: Update arch rules.
1928 * configure.srv: Explicitly mark arch/ files.
1929
5616b6c3
AS
19302017-11-13 Andreas Schwab <schwab@suse.de>
1931
1932 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1933 function.
1934 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1935
d1928160
PA
19362017-11-06 Pedro Alves <palves@redhat.com>
1937
1938 * config.in, configure: Regenerate.
1939
bac608e7
SM
19402017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1941
1942 * target.c (struct thread_search): Remove.
1943 (thread_search_callback): Remove.
1944 (prepare_to_access_memory): Use for_each_thread instead of
1945 find_inferior. Inline code from thread_search_callback.
1946
eaddb425
SM
19472017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1948
1949 * server.c (struct visit_actioned_threads_data): Remove.
1950 (visit_actioned_threads): Change prototype to take arguments
1951 directly.
1952 (resume): Use find_thread instead of find_inferior.
1953
99078d34
SM
19542017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1955
1956 * server.c (queue_stop_reply_callback): Change prototype, return
1957 void.
1958 (find_status_pending_thread_callback): Remove.
1959 (handle_status): Replace find_inferior with find_thread and
1960 for_each_thread.
1961
cc628f3d
AH
19622017-10-25 Alan Hayward <alan.hayward@arm.com>
1963
1964 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1965 with REGNO.
1966 (aarch64_store_gregset): Likewise.
1967 (aarch64_fill_fpregset): Likewise.
1968 (aarch64_store_fpregset): Likewise.
1969
4d3bb80e
SM
19702017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1971
1972 * gdbthread.h (find_thread, for_each_thread): New functions.
1973 * inferiors.c (thread_of_pid): Remove.
1974 (find_any_thread_of_pid): Use find_thread.
1975 * linux-low.c (num_lwps): Use for_each_thread.
1976
7a7cdfa0
YQ
19772017-10-17 Yao Qi <yao.qi@linaro.org>
1978
1979 * Makefile.in: Remove one rule.
1980 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1981
e675d170
YQ
19822017-10-17 Yao Qi <yao.qi@linaro.org>
1983
1984 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1985 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1986
7eb4e0f9
YQ
19872017-10-17 Yao Qi <yao.qi@linaro.org>
1988
1989 * configure.srv: Rename arm.o with arch/arm.o.
1990
60d6cfc9
YQ
19912017-10-17 Yao Qi <yao.qi@linaro.org>
1992
1993 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1994 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1995 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1996 (arch-i386.o, arch-amd64.o): Remove rules.
1997 (arch/%.o): New rule.
1998 Update POSTCOMPILE and COMPILE.pre.
1999 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2000 * configure: Re-generated.
2001 * configure.srv: Replace arch-i386.o with arch/i386.o.
2002 Replace arch-amd64.o with arch/amd64.o.
2003
5bfda255
YQ
20042017-10-16 Yao Qi <yao.qi@linaro.org>
2005
2006 * configure: Regenerated.
2007
9c80ecd6
SM
20082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2009
2010 * inferiors.h: (struct inferior_list): Remove.
2011 (struct inferior_list_entry); Remove.
2012 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2013 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2014 get_first_inferior): Remove.
2015 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2016 find_inferior_id, find_inferior_in_random): Change signature.
2017 * inferiors.c (all_threads): Change type to
2018 std::list<thread_info *>.
2019 (get_thread): Remove macro.
2020 (find_inferior, find_inferior_id): Change signature, implement
2021 using find_thread.
2022 (find_inferior_in_random): Change signature, implement using
2023 find_thread_in_random.
2024 (for_each_inferior, for_each_inferior_with_data): Change
2025 signature, implement using for_each_thread.
2026 (add_inferior_to_list, remove_inferior): Remove.
2027 (add_thread, get_first_thread, thread_of_pid,
2028 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2029 (get_first_inferior, one_inferior_p, clear_inferior_list):
2030 Remove.
2031 (clear_inferiors, get_thread_process): Update.
2032 * gdbthread.h: Include <list>.
2033 (struct thread_info) <entry>: Remove field.
2034 <id>: New field.
2035 (all_threads): Change type to std::list<thread_info *>.
2036 (get_first_inferior): Add doc.
2037 (find_thread, for_each_thread, find_thread_in_random): New
2038 functions.
2039 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2040 * linux-arm-low.c (update_registers_callback): Update.
2041 * linux-low.c (second_thread_of_pid_p): Update.
2042 (kill_one_lwp_callback, linux_detach_lwp_callback,
2043 delete_lwp_callback, status_pending_p_callback, same_lwp,
2044 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2045 iterate_over_lwps, not_stopped_callback,
2046 resume_stopped_resumed_lwps, count_events_callback,
2047 select_singlestep_lwp_callback, select_event_lwp_callback,
2048 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2049 suspend_and_send_sigstop_callback, wait_for_sigstop,
2050 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2051 lwp_running, linux_set_resume_request, resume_status_pending_p,
2052 need_step_over_p, start_step_over, linux_resume_one_thread,
2053 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2054 reset_lwp_ptrace_options_callback): Update.
2055 * linux-mips-low.c (update_watch_registers_callback): Update.
2056 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2057 Update.
2058 (free_register_cache_thread_one): Remove.
2059 (regcache_release): Update.
2060 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2061 handle_qxfer_threads_worker): Update.
2062 (handle_query): Update, use list iterator.
2063 (visit_actioned_threads, handle_pending_status,
2064 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2065 clear_pending_status_callback, set_pending_status_callback,
2066 find_status_pending_thread_callback, handle_status,
2067 process_serial_event): Update.
2068 * target.c (thread_search_callback): Update.
2069 * thread-db.c (thread_db_get_tls_address): Update.
2070 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2071 Update.
2072 * win32-i386-low.c (update_debug_registers_callback): Update.
2073 * win32-low.c (delete_thread_info, child_delete_thread,
2074 continue_one_thread, suspend_one_thread,
2075 get_child_debug_event): Adjust.
2076
9179355e
SM
20772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2078
2079 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2080 * inferiors.h: Include <list>.
2081 (struct process_info) <entry>: Remove field.
2082 <pid>: New field.
2083 (pid_of): Change macro to function.
2084 (ptid_of, lwpid_of): Remove macro.
2085 (all_processes): Change type to std::list<process_info *>.
2086 (ALL_PROCESSES): Remove macro.
2087 (for_each_process, find_process): New function.
2088 * inferiors.c (all_processes): Change type to
2089 std::list<process_info *>.
2090 (find_thread_process): Adjust.
2091 (add_process): Likewise.
2092 (remove_process): Likewise.
2093 (find_process_pid): Likewise.
2094 (get_first_process): Likewise.
2095 (started_inferior_callback): Remove.
2096 (have_started_inferiors_p): Adjust.
2097 (attached_inferior_callback): Remove.
2098 (have_attached_inferiors_p): Adjust.
2099 * linux-low.c (check_zombie_leaders): Likewise.
2100 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2101 (x86_linux_update_xmltarget): Adjust.
2102 * server.c (handle_query): Likewise.
2103 (gdb_reattached_process): Remove.
2104 (handle_status): Adjust.
2105 (kill_inferior_callback): Likewise.
2106 (detach_or_kill_inferior): Remove.
2107 (print_started_pid): Likewise.
2108 (print_attached_pid): Likewise.
2109 (detach_or_kill_for_exit): Update.
2110 (process_serial_event): Likewise.
2111 * linux-arm-low.c (arm_new_fork): Likewise.
2112
c9cb8905
SM
21132017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2114
2115 * dll.h: Include <list>.
2116 (struct dll_info): Add constructor.
2117 <entry>: Remove field.
2118 (all_dlls): Change type to std::list<dll_info>.
2119 * dll.c: Include <algorithm>.
2120 (get_dll): Remove macro.
2121 (all_dlls): Change type to std::list<dll_info *>.
2122 (free_one_dll): Remove.
2123 (match_dll): Likewise.
2124 (loaded_dll): Adjust.
2125 (unloaded_dll): Adjust to all_dlls type change, use
2126 std::find_if. Inline code from match_dll.
2127 (clear_dlls): Adjust to all_dlls type change.
2128 * server.c (emit_dll_description): Remove.
2129 (handle_qxfer_libraries): Adjust to all_dlls type change,
2130 integrate emit_dll_description's functionality.
2131
04ec7890
SM
21322017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * linux-low.h (struct linux_target_ops) <delete_process>: New
2135 field.
2136 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2137 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2138 (struct linux_target_ops): Add delete_process callback.
2139 * linux-arm-low.c (arm_delete_process): New.
2140 (struct linux_target_ops): Add delete_process callback.
2141 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2142 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2143 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2144 * linux-mips-low.c (mips_linux_delete_process): New.
2145 (struct linux_target_ops): Add delete_process callback.
2146 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2147 * linux-s390-low.c (struct linux_target_ops): Likewise.
2148 * linux-sh-low.c (struct linux_target_ops): Likewise.
2149 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2150 * linux-tile-low.c (struct linux_target_ops): Likewise.
2151 * linux-x86-low.c (x86_linux_delete_process): New.
2152 (struct linux_target_ops): Add delete_process callback.
2153 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2154
466eecee
SM
21552017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2156
2157 * linux-aarch64-low.c (the_low_target): Add thread delete
2158 callback.
2159 * linux-arm-low.c (arm_delete_thread): New function.
2160 (the_low_target): Add thread delete callback.
2161 * linux-bfin-low.c (the_low_target): Likewise.
2162 * linux-crisv32-low.c (the_low_target): Likewise.
2163 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2164 set.
2165 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2166 field.
2167 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2168 * linux-mips-low.c (mips_linux_delete_thread): New function.
2169 (the_low_target): Add thread delete callback.
2170 * linux-ppc-low.c (the_low_target): Likewise.
2171 * linux-s390-low.c (the_low_target): Likewise.
2172 * linux-sh-low.c (the_low_target): Likewise.
2173 * linux-tic6x-low.c (the_low_target): Likewise.
2174 * linux-tile-low.c (the_low_target): Likewise.
2175 * linux-x86-low.c (the_low_target): Likewise.
2176 * linux-xtensa-low.c (the_low_target): Likewise.
2177
b79f7801
YZ
21782017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2179
2180 * win32-low.c: Include "common-inferior.h".
2181
bc3b087d
SDJ
21822017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2183
2184 * inferiors.c (set_inferior_cwd): New function.
2185 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2186 (handle_query): Inform that QSetWorkingDir is supported.
2187 * win32-low.c (create_process): Pass the inferior's cwd to
2188 CreateProcess.
2189
d092c5a2
SDJ
21902017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2191
2192 * inferiors.c (current_inferior_cwd): New global variable.
2193 (get_inferior_cwd): New function.
2194 * inferiors.h (struct process_info) <cwd>: New field.
2195
7da0a886
SDJ
21962017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2197
2198 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2199 (OBS): Add gdb_tilde_expand.o.
2200
289a6840
SM
22012017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2202
2203 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2204 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2205
256642e8
PA
22062017-09-29 Pedro Alves <palves@redhat.com>
2207
2208 * ax.c (gdb_parse_agent_expr): Constify.
2209 * ax.h (gdb_parse_agent_expr): Constify.
2210 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2211 Constify.
2212 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2213 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2214 * remote-utils.h (read_ptid): Constify.
2215 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2216 (process_point_options, process_serial_event): Constify.
2217 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2218 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2219 (cmd_qtbuffer): Constify.
2220
5b9ca4d4
PA
22212017-09-29 Pedro Alves <palves@redhat.com>
2222
2223 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2224 fails.
2225
94c207e0
PA
22262017-09-29 Pedro Alves <palves@redhat.com>
2227
2228 * linux-low.c (handle_extended_wait): Pass parent thread instead
2229 of process to thread_db_notice_clone.
2230 * linux-low.h (thread_db_notice_clone): Replace parent process
2231 parameter with parent thread parameter.
2232 * thread-db.c (find_one_thread): Add comment.
2233 (thread_db_notice_clone): Replace parent process parameter with
2234 parent thread parameter. Temporarily switch to the parent thread.
2235
75352e28
SDJ
22362017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2237
2238 * gdbthread.h: Include "common-gdbthread.h".
2239 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2240 "if" when validating the ptid.
2241 * remote-utils.c: Include "gdbthread.h".
2242 (prepare_resume_reply): Use "switch_to_thread".
2243 * target.c (done_accessing_memory): Likewise.
2244
ad339634
AA
22452017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2246
2247 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2248 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2249 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2250 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2251 s390x-gs-linux64-ipa.o to ipa_obj.
2252 * linux-s390-low.c (HWCAP_S390_GS): New define.
2253 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2254 New functions.
2255 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2256 (s390_arch_setup): Check for guarded-storage support and choose
2257 appropriate tdesc.
2258 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2259 init_registers_s390x_gs_linux64.
2260 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2261 enum value.
2262 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2263 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2264
cc4d742f
SM
22652017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2266
2267 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2268
f6327dcb
KB
22692017-09-21 Kevin Buettner <kevinb@redhat.com>
2270
2271 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2272 (thread_db_thread_handle): Declare.
2273 * linux-low.c (linux_target_ops): Initialize thread_handle.
2274 * server.c (handle_qxfer_threads_worker): Add support for
2275 "handle" attribute.
2276 * target.h (struct target_ops): Add new function pointer,
2277 thread_handle.
2278 (target_thread_handle): Define.
2279 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2280 field in lwp.
2281 (thread_db_thread_handle): New function.
2282
86299109
KB
22832017-09-21 Kevin Buettner <kevinb@redhat.com>
2284
2285 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2286 * linux-low.h (thread_db_notice_clone): Declare.
2287 * thread-db.c (thread_db_notice_clone): New function.
2288
f557a88a
PA
22892017-09-21 Pedro Alves <palves@redhat.com>
2290
2291 * server.c (gdb_read_memory, handle_status, process_serial_event)
2292 (handle_serial_event, handle_target_event): Adjust to
2293 set_desired_thread prototype change.
2294 * target.c (set_desired_thread): Remove 'use_general' parameter
2295 and adjust.
2296 * target.h (set_desired_thread): Remove 'use_general' parameter.
2297
223ffa71
TT
22982017-09-20 Tom Tromey <tom@tromey.com>
2299
2300 * target.c (target_terminal::terminal_state): Define.
2301 (target_terminal::init): Rename from target_terminal_init.
2302 (target_terminal::inferior): Rename from
2303 target_terminal_inferior.
2304 (target_terminal::ours): Rename from target_terminal_ours.
2305 (target_terminal::ours_for_output, target_terminal::info): New.
2306
04fd3ba9
SM
23072017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2308
2309 * server.c (accumulate_file_name_length): Remove.
2310 (emit_dll_description): Adjust to std::string change.
2311 (handle_qxfer_libraries): Use std::string to hold document.
2312
5e187554
SM
23132017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2314
2315 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2316 return type of xml_escape_text.
2317 * server.c (emit_dll_description): Likewise.
2318
1526853e
SM
23192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2320
2321 * server.c (captured_main): Accept argument for --selftest.
2322 Update run_tests call.
2323 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2324 when registering selftests.
2325
c4dfafab
SDJ
23262017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2327
2328 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2329 instead of "VEC" for "target_desc.reg_defs".
2330 (regcache_cpy): Likewise.
2331 (registers_to_string): Likewise.
2332 (registers_from_string): Likewise.
2333 (find_regno): Likewise.
2334 (supply_regblock): Likewise.
2335 (regcache_raw_read_unsigned): Likewise.
2336 * tdesc.c (init_target_desc): Likewise.
2337 (tdesc_create_reg): Likewise.
2338 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2339 (struct target_desc) <reg_defs>: Convert to "std::vector".
2340 (target_desc): Do not initialize "reg_defs".
2341 (~target_desc): Update code to use "std::vector" instead of "VEC"
2342 for "target_desc.reg_defs".
2343 (operator==): Likewise.
2344
124aceb4
SM
23452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2346
2347 * inferiors.h (thread_to_gdb_id): Remove.
2348 * inferiors.c (thread_to_gdb_id): Remove.
2349 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2350 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2351 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2352 Likewise.
2353 * nto-low.c (nto_fetch_registers, nto_store_registers,
2354 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2355
96cde54f
SM
23562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2357
2358 * inferiors.h (gdb_id_to_thread_id): Remove.
2359 * inferiors.c (gdb_id_to_thread_id): Remove.
2360 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2361 removal. Move pid declaration closer to where it's used.
2362
e8ca139e
SM
23632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2364
2365 * server.c (handle_detach): New function.
2366 (process_serial_event): Move code out, call handle_detach.
2367
f8a4e119
SM
23682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2369
2370 * server.c (require_running): Rename to ...
2371 (require_running_or_return): ... this ...
2372 (require_running_or_break): ... and this.
2373 (handle_query, process_serial_event): Adjust.
2374
0eb0a407
SM
23752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2376
2377 * linux-low.c (linux_set_resume_request): Remove unused
2378 variables.
2379
785922a5
SM
23802017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2381
2382 * server.c (first_thread_of): Remove.
2383 (process_serial_event): Replace usage of first_thread_of with
2384 find_any_thread_of_pid.
2385 * tracepoint.c (same_process_p): Remove.
2386 (gdb_agent_about_to_close): Replace usage of same_process_p with
2387 find_any_thread_of_pid.
2388 * linux-x86-low.c (same_process_callback): Remove.
2389 (x86_arch_setup_process_callback): Replace usage of
2390 same_process_callback with find_any_thread_of_pid.
2391 * thread-db.c (any_thread_of): Remove.
2392 (switch_to_process): Replace usage of any_thread_of with
2393 find_any_thread_of_pid.
2394 * inferiors.c (thread_pid_matches_callback): Remove.
2395 (find_thread_process): Adjust to use find_any_thread_of_pid.
2396
a059f00c
SDJ
23972017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2398
2399 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2400 with "!VEC_empty".
a059f00c 2401
cc397f3a
SDJ
24022017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2403
2404 * linux-low.c (handle_extended_wait): Use
2405 "allocate_target_description" instead of "XNEW".
2406 * linux-x86-low.c (initialize_low_arch): Likewise.
2407
22916b07
YQ
24082017-09-05 Yao Qi <yao.qi@linaro.org>
2409
2410 * configure.srv (srv_i386_regobj): Remove.
2411 (srv_amd64_regobj): Remove.
2412 (srv_regobj): Set it to "" for x86 non-linux targets.
2413 * linux-x86-tdesc.c (i386_linux_read_description):
2414 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2415 (init_registers_i386): Remove the declaration.
2416 (tdesc_i386): Remove the declaration.
2417 (lynx_i386_arch_setup): Call i386_create_target_description.
2418 * nto-x86-low.c: Likewise.
2419 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2420 [!__x86_64__]: include arch/i386.h.
2421 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2422
38602d55
YQ
24232017-09-05 Yao Qi <yao.qi@linaro.org>
2424
2425 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2426 i386/amd64-XXX-linux from it.
2427
44b886ff
YQ
24282017-09-05 Yao Qi <yao.qi@linaro.org>
2429
2430 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2431 false.
2432 (ipa_amd64_linux_regobj): Remove.
2433 (ipa_x32_linux_regobj): Remove.
2434
b4570e4b
YQ
24352017-09-05 Yao Qi <yao.qi@linaro.org>
2436
2437 * Makefile.in (arch-amd64.o): New rule.
2438 * configure.srv: Append arch-amd64.o.
2439 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2440 (get_ipa_tdesc): Call amd64_linux_read_description.
2441 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2442 and init_registers_amd64_XXX.
2443 * linux-x86-low.c (x86_linux_read_description): Call
2444 amd64_linux_read_description.
2445 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2446 (initialize_low_arch): Don't call init_registers_x32_XXX and
2447 init_registers_amd64_XXX.
2448 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2449 and tdesc_amd64_XXX.
2450 [__x86_64__] (amd64_tdesc_test): New function.
2451 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2452 and init_registers_amd64_XXX.
2453 * linux-x86-tdesc.c: Include arch/amd64.h.
2454 (xcr0_to_tdesc_idx): New function.
2455 (i386_linux_read_description): New function.
2456 (amd64_get_ipa_tdesc_idx): New function.
2457 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2458 (amd64_get_ipa_tdesc): Declare.
2459
d1f28ea2
YQ
24602017-09-05 Yao Qi <yao.qi@linaro.org>
2461
2462 * configure.srv (srv_i386_linux_xmlfiles): Remove
2463 i386/i386-XXX-linux.xml from it.
2464
25a93583
YQ
24652017-09-05 Yao Qi <yao.qi@linaro.org>
2466
2467 * configure.srv: Set srv_i386_linux_regobj empty if $development
2468 is false.
2469 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2470 initialize_low_tdesc.
2471 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2472 with #if initialize_low_tdesc.
2473 * linux-x86-tdesc-selftest.c: New file.
2474 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2475
5f035c07
YQ
24762017-09-05 Yao Qi <yao.qi@linaro.org>
2477
2478 * Makefile.in (arch-i386.o): New rule.
2479 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2480 (x86_64-*-linux*): Likewise.
2481 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2482 include arch/i386.h.
2483 (i386_linux_read_description): Remove code and call
2484 i386_create_target_description.
2485 * tdesc.c (allocate_target_description): New function.
2486 * tdesc.h (set_tdesc_architecture): Remove declaration.
2487 (set_tdesc_osabi): Likewise.
2488
0abe8a89
YQ
24892017-09-05 Yao Qi <yao.qi@linaro.org>
2490
2491 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2492 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2493 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2494 .xmltarget.
2495 * server.c (get_features_xml): Call tdesc_get_features_xml.
2496 * tdesc.c (set_tdesc_architecture): New function.
2497 (set_tdesc_osabi): New function.
2498 (tdesc_get_features_xml): New function.
2499 (tdesc_create_feature): Add an argument.
2500 * tdesc.h (struct target_desc) <features>: New field.
2501 <arch, osabi>: New field.
2502 (~target_desc): xfree features, arch, and osabi.
2503 (target_desc::oerator==): Don't compare .xmltarget.
2504 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2505 (set_tdesc_osabi): Likewise.
2506 (tdesc_get_features_xml): Likewise.
2507
0a188386
YQ
25082017-09-05 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-x86-tdesc.c: Include selftest.h.
2511 (i386_tdesc_test): New function.
2512 (initialize_low_tdesc): Call selftests::register_test.
2513 * tdesc.h: Include regdef.h.
2514 (target_desc): Override operator == and !=.
2515
f49ff000
YQ
25162017-09-05 Yao Qi <yao.qi@linaro.org>
2517
2518 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2519 (ipa_obj): Likewise.
2520 * linux-i386-ipa.c: Include common/x86-xstate.h
2521 (get_ipa_tdesc): Call i386_linux_read_description.
2522 (initialize_low_tracepoint): Don't call init_registers_XXX
2523 functions, call initialize_low_tdesc instead.
2524 * linux-x86-low.c (x86_linux_read_description): Call
2525 i386_linux_read_description.
2526 (initialize_low_arch): Don't call init_registers_i386_XXX
2527 functions, call initialize_low_tdesc.
2528 * linux-x86-tdesc.c: New file.
2529 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2530 (i386_get_ipa_tdesc_idx): Declare.
2531 (i386_get_ipa_tdesc): Declare.
2532 (initialize_low_tdesc): Declare.
2533
2b68ef2f
YQ
25342017-09-05 Yao Qi <yao.qi@linaro.org>
2535
2536 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2537 instead of 0.
2538
f7000548
YQ
25392017-09-05 Yao Qi <yao.qi@linaro.org>
2540
2541 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2542 * regcache.c (get_thread_regcache): Use VEC_length.
2543 (init_register_cache): Likewise.
2544 (regcache_cpy): Likewise.
2545 (registers_to_string): Iterate reg_defs via VEC_iterate.
2546 (find_regno): Likewise.
2547 (find_register_by_number): Use VEC_index.
2548 (register_size): Call find_register_by_number.
2549 (register_data): Call find_register_by_number.
2550 (supply_regblock): Use VEC_length.
2551 (regcache_raw_read_unsigned): Likewise.
2552 * tdesc.c (init_target_desc): Iterate reg_defs via
2553 VEC_iterate.
2554 (default_description): Update initializer.
2555 (copy_target_description): Don't update field num_registers.
2556 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2557 <num_registers>: Remove.
2558
50a421ac
SM
25592017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2560
2561 * Makefile.in (.SECONDARY): Define target.
2562
23fdd69e
SM
25632017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2564
2565 * linux-low.c (linux_wait_1): Adjust.
2566 * server.c (queue_stop_reply_callback): Adjust.
2567
0a2dde4a
SDJ
25682017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2569
2570 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2571 QEnvironmentUnset and QEnvironmentReset packets.
2572 (handle_query): Inform remote that QEnvironmentHexEncoded,
2573 QEnvironmentUnset and QEnvironmentReset are supported.
2574
6afd337d
SM
25752017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2576
2577 * inferiors.h (inferior_target_data): Rename to ...
2578 (thread_target_data): ... this.
2579 (inferior_regcache_data): Rename to ...
2580 (thread_regcache_data): ... this.
2581 (set_inferior_regcache_data): Rename to ...
2582 (set_thread_regcache_data): ... this.
2583 * inferiors.c (inferior_target_data): Rename to ...
2584 (thread_target_data): ... this.
2585 (inferior_regcache_data): Rename to ...
2586 (thread_regcache_data): ... this.
2587 (set_inferior_regcache_data): Rename to ...
2588 (set_thread_regcache_data): ... this.
2589 (free_one_thread): Update.
2590 * linux-low.h (get_thread_lwp): Update.
2591 * regcache.c (get_thread_regcache): Update.
2592 (regcache_invalidate_thread): Update.
2593 (free_register_cache_thread): Update.
2594 * win32-i386-low.c (update_debug_registers_callback): Update.
2595 (win32_get_current_dr): Update.
2596 * win32-low.c (thread_rec): Update.
2597 (delete_thread_info): Update.
2598 (continue_one_thread): Update.
2599 (suspend_one_thread): Update.
2600
a160cc46
SM
26012017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2602
2603 * inferiors.c (set_inferior_target_data): Remove.
2604 * inferiors.h (set_inferior_target_data): Remove.
2605
6d580b63
YQ
26062017-08-18 Yao Qi <yao.qi@linaro.org>
2607
2608 * Makefile.in (OBS): Add selftest.o.
2609 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2610 * configure, config.in: Re-generated.
2611 * server.c: Include common/sefltest.h.
2612 (captured_main): Handle option --selftest.
2613
f5a29eb0
YQ
26142017-08-09 Yao Qi <yao.qi@linaro.org>
2615
2616 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2617 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2618 i386-avx-mpx.o and i386-mmx.o.
2619 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2620 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2621 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2622 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2623 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2624 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2625 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2626 i386/amd64-avx-mpx.xml.
2627
57757c2f
YQ
26282017-08-09 Yao Qi <yao.qi@linaro.org>
2629
2630 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2631 and x32-avx-avx512.o.
2632 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2633 i386/x32-avx-avx512.xml.
2634
229d26fc
SM
26352017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * tracepoint.h (enum class fast_tpoint_collect_result): New
2638 enumeration.
2639 (fast_tracepoint_collecting): Change return type to
2640 fast_tpoint_collect_result.
2641 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2642 * linux-low.h: Include tracepoint.h.
2643 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2644 fast_tpoint_collect_result.
2645 * linux-low.c (handle_tracepoints): Adjust.
2646 (linux_fast_tracepoint_collecting): Change return type to
2647 fast_tpoint_collect_result.
2648 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2649 linux_wait_1, stuck_in_jump_pad_callback,
2650 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2651 proceed_one_lwp): Adjust to type change.
2652
2e1e43e1
YQ
26532017-07-10 Yao Qi <yao.qi@linaro.org>
2654
2655 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2656
adc764e7
YQ
26572017-06-29 Yao Qi <yao.qi@linaro.org>
2658
2659 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2660 Remove.
2661 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2662
a206891a
SM
26632017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2664
2665 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2666
9a6c7d9c
SDJ
26672017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2668
2669 * linux-low.c (linux_create_inferior): Adjust code to access the
2670 environment information via 'gdb_environ' class.
2671 * lynx-low.c (lynx_create_inferior): Likewise.
2672 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2673 (get_environ): Return a pointer to 'our_environ'.
2674 (captured_main): Initialize 'our_environ'.
2675 * server.h (get_environ): Adjust prototype.
2676 * spu-low.c (spu_create_inferior): Adjust code to access the
2677 environment information via 'gdb_environ' class.
2678
ae3e2ccf
SM
26792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2680
2681 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2682 usage of "register" keyword.
2683
3e019bdc
SM
26842017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * configure: Re-generate.
2687
8465943a
SM
26882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2689
2690 * configure: Re-generate.
2691
cf0dd6f0
SM
26922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2693
2694 * Makefile.in (COMPILE.pre): Add "-x c++".
2695
9845682b
SDJ
26962017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2697
2698 * fork-child.c: Conditionally include <signal.h>.
2699
aefd8b33
SDJ
27002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2701
2702 * server.c (handle_general_set): Handle new packet
2703 "QStartupWithShell".
2704 (handle_query): Add "QStartupWithShell" to the list of supported
2705 packets.
2706 (gdbserver_usage): Add help text explaining the
2707 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2708 options.
2709 (captured_main): Recognize and act upon the presence of the new
2710 CLI options.
2711
2090129c
SDJ
27122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2713 Pedro Alves <palves@redhat.com>
2714
2715 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2716 * configure: Regenerate.
2717 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2718 "fork-inferior.o".
2719 (i[34567]86-*-lynxos*): Likewise.
2720 (spu*-*-*): Likewise.
2721 * fork-child.c: New file.
2722 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2723 and "environ.h".
2724 (linux_ptrace_fun): New function.
2725 (linux_create_inferior): Adjust function prototype to reflect
2726 change on "target.h". Adjust function code to use
2727 "fork_inferior".
2728 (linux_request_interrupt): Delete "signal_pid".
2729 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2730 (lynx_ptrace_fun): New function.
2731 (lynx_create_inferior): Adjust function prototype to reflect
2732 change on "target.h". Adjust function code to use
2733 "fork_inferior".
2734 * nto-low.c (nto_create_inferior): Adjust function prototype and
2735 code to reflect change on "target.h". Update comments.
2736 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2737 "common-terminal.h" and "environ.h".
2738 (terminal_fd): Moved to fork-child.c.
2739 (old_foreground_pgrp): Likewise.
2740 (restore_old_foreground_pgrp): Likewise.
2741 (last_status): Make it global.
2742 (last_ptid): Likewise.
2743 (our_environ): New variable.
2744 (startup_with_shell): Likewise.
2745 (program_name): Likewise.
2746 (program_argv): Rename to...
2747 (program_args): ...this.
2748 (wrapper_argv): New variable.
2749 (start_inferior): Delete function.
2750 (get_exec_wrapper): New function.
2751 (get_exec_file): Likewise.
2752 (get_environ): Likewise.
2753 (prefork_hook): Likewise.
2754 (post_fork_inferior): Likewise.
2755 (postfork_hook): Likewise.
2756 (postfork_child_hook): Likewise.
2757 (handle_v_run): Update code to deal with arguments coming from the
2758 remote host. Update calls from "start_inferior" to
2759 "create_inferior".
2760 (captured_main): Likewise. Initialize environment variable. Call
2761 "have_job_control".
2762 * server.h (post_fork_inferior): New prototype.
2763 (get_environ): Likewise.
2764 (last_status): Declare.
2765 (last_ptid): Likewise.
2766 (signal_pid): Likewise.
2767 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2768 (spu_ptrace_fun): New function.
2769 (spu_create_inferior): Adjust function prototype to reflect change
2770 on "target.h". Adjust function code to use "fork_inferior".
2771 * target.c (target_terminal_init): New function.
2772 (target_terminal_inferior): Likewise.
2773 (target_terminal_ours): Likewise.
2774 * target.h: Include <vector>.
2775 (struct target_ops) <create_inferior>: Update prototype.
2776 (create_inferior): Update macro.
2777 * utils.c (gdb_flush_out_err): New function.
2778 * win32-low.c (win32_create_inferior): Adjust function prototype
2779 and code to reflect change on "target.h".
2780
043a4934
SDJ
27812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2782
2783 * inferiors.c (switch_to_thread): New function.
2784
15652511
SDJ
27852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2786
2787 * Makefile.in (SFILE): Add "common/job-control.c".
2788 (OBS): Add "job-control.o".
2789
21ea5acd
SDJ
27902017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2791
2792 * Makefile: Remove "@host_makefile_frag@".
2793
e13cb306
PA
27942017-05-05 Pedro Alves <palves@redhat.com>
2795
2796 * configure: Regenerate.
2797
c94fee56
SDJ
27982017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2799
2800 * configure: Regenerate.
2801
a0ff9e1a
SM
28022017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2803
2804 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2805 software_single_step change of return type to
2806 std::vector<CORE_ADDR>.
2807 * linux-low.c (install_software_single_step_breakpoints):
2808 Likewise.
2809 * linux-low.h (install_software_single_step_breakpoints):
2810 Likewise.
2811
be628ab8
SDJ
28122017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2813
2814 * remote-utils.c: Include "gdb_termios.h" instead of
2815 "terminal.h".
2816 * terminal.h: Delete file.
2817
7c5ded6a
SDJ
28182017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2819
2820 * server.c: Include <vector>.
2821 <program_argv, wrapper_argv>: Convert to std::vector.
2822 (start_inferior): Rewrite function to use C++.
2823 (handle_v_run): Likewise. Update code that calculates the argv
2824 based on the vRun packet; use C++.
2825 (captured_main): Likewise.
2826
436252de
SM
28272017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2828
2829 * server.c (handle_v_cont): Initialize thread_resume::thread
2830 with null_ptid.
2831
9bf2a700
PA
28322017-04-05 Pedro Alves <palves@redhat.com>
2833
2834 * configure: Regenerate.
2835
a121b7c1
PA
28362017-04-05 Pedro Alves <palves@redhat.com>
2837
2838 * gdbreplay.c (sync_error): Constify.
2839 * linux-x86-low.c (push_opcode): Constify.
2840
21c8a587
PA
28412017-04-05 Pedro Alves <palves@redhat.com>
2842
2843 * win32-low.c (get_child_debug_event)
2844 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2845 Report TARGET_WAITKIND_SPURIOUS instead.
2846
fb32b4f7
PA
28472017-04-05 Pedro Alves <palves@redhat.com>
2848
e79be6e5
SM
2849 * remote-utils.c (remote_prepare, remote_open): Constify.
2850 * remote-utils.h (remote_prepare, remote_open): Constify.
2851 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2852
65dd1e59
SM
28532017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2854
2855 * Makefile.in (clean): Clear .deps.
2856
8fa5b777
SM
28572017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2858
2859 * .gitignore: Remove generated files, replace with wildcard.
2860 * (clean): Replace removal of generated files with wildcard.
2861 (version.c): Replace with...
2862 (version-generated.c): ...this.
2863 (xml-builtin.c): Replace with...
2864 (xml-builtin-generated.c): ...this.
2865 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2866 (%.c: *regformats*): Replace with...
2867 (%-generated.c: *regformats*): ...this.
2868
a12e714b
MF
28692017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2870
2871 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2872 (xtensa_fill_gregset): Call collect_register_by_name for
2873 threadptr register.
2874 (xtensa_store_gregset): Call supply_register_by_name for
2875 threadptr register.
2876
1a09b50a
MF
28772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2878
2879 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2880 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2881 (xtensa_store_gregset): Call supply_register for all registers in
2882 a0_regnum..a0_regnum + C0_NREGS range.
2883
1a01e7c6
SM
28842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2885
2886 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2887 (ax-ipa.o: ax.c): Remove.
2888 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2889 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2890 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2891 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2892 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2893
36bc18a8
SM
28942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2895
2896 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2897 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2898 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2899 (errors-ipa.o: ../common/errors.c): Remove.
2900 (format-ipa.o: ../common/format.c): Remove.
2901 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2902
a8ebe3d5
SM
29032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2904
2905 * Makefile.in (%-ipa.o: %.c): New rule.
2906 (tracepoint-ipa.o: tracepoint.c): Remove.
2907 (utils-ipa.o: utils.c): Remove.
2908 (remote-utils-ipa.o: remote-utils.c): Remove.
2909 (regcache-ipa.o: regcache.c): Remove.
2910 (i386-linux-ipa.o: i386-linux.c): Remove.
2911 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2912 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2913 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2914 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2915 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2916 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2917 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2918 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2919 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2920 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2921 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2922 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2923 (aarch64-ipa.o: aarch64.c): Remove.
2924 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2925 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2926 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2927 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2928 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2929 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2930 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2931 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2932 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2933 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2934 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2935 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2936 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2937 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2938 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2939 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2940 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2941 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2942 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2943 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2944 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2945 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2946 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2947 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2948 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2949 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2950 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2951 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2952 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2953 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2954 (tdesc-ipa.o: tdesc.c): Remove.
2955 (x32-linux-ipa.o: x32-linux.c): Remove.
2956 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2957 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2958
50cfacb7
SM
29592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2960
2961 * Makefile.in (%.o: ../arch/%.c): New rule.
2962 (arm.o: ../arch/arm.c): Remove.
2963 (arm-linux.o: ../arch/arm-linux.c): Remove.
2964 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2965 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2966
c5a22423
SM
29672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2968
2969 * Makefile.in (%.o: ../nat/%.c): New rule.
2970 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2971 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2972 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2973 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2974 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2975 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2976 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2977 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2978 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2979 (linux-personality.o: ../nat/linux-personality.c): Remove.
2980 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2981 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2982 (x86-linux.o: ../nat/x86-linux.c): Remove.
2983 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2984 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2985
6bda016b
SM
29862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2987
2988 * Makefile.in (%.o: ../common/%.c): New rule.
2989 (signals.o: ../common/signals.c): Remove.
2990 (print-utils.o: ../common/print-utils.c): Remove.
2991 (rsp-low.o: ../common/rsp-low.c): Remove.
2992 (common-utils.o: ../common/common-utils.c): Remove.
2993 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2994 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2995 (vec.o: ../common/vec.c): Remove.
2996 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2997 (xml-utils.o: ../common/xml-utils.c): Remove.
2998 (ptid.o: ../common/ptid.c): Remove.
2999 (buffer.o: ../common/buffer.c): Remove.
3000 (format.o: ../common/format.c): Remove.
3001 (filestuff.o: ../common/filestuff.c): Remove.
3002 (agent.o: ../common/agent.c): Remove.
3003 (errors.o: ../common/errors.c): Remove.
3004 (environ.o: ../common/environ.c): Remove.
3005 (common-debug.o: ../common/common-debug.c): Remove.
3006 (cleanups.o: ../common/cleanups.c): Remove.
3007 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3008 (fileio.o: ../common/fileio.c): Remove.
3009 (common-regcache.o: ../common/common-regcache.c): Remove.
3010 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3011 (new-op.o: ../common/new-op.c): Remove.
3012 (btrace-common.o: ../common/btrace-common.c): Remove.
3013
21122961
SM
30142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3015
3016 * Makefile.in (%.o: ../target/%.c): New rule.
3017 (waitstatus.o: ../target/waitstatus.c): Remove.
3018
c362e621
SM
30192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3020
3021 * Makefile.in
3022 (%.c: ../regformats/%.dat,
3023 (%.c: ../regformats/arm/%.dat,
3024 (%.c: ../regformats/i386/%.dat,
3025 (%.c: ../regformats/rs6000/%.dat): New rules.
3026 (aarch64.c): Remove.
3027 (reg-arm.c): Remove.
3028 (arm-with-iwmmxt.c): Remove.
3029 (arm-with-vfpv2.c): Remove.
3030 (arm-with-vfpv3.c): Remove.
3031 (arm-with-neon.c): Remove.
3032 (reg-bfin.c): Remove.
3033 (reg-cris.c): Remove.
3034 (reg-crisv32.c): Remove.
3035 (i386.c): Remove.
3036 (i386-linux.c): Remove.
3037 (i386-avx.c): Remove.
3038 (i386-avx-linux.c): Remove.
3039 (i386-avx-avx512.c): Remove.
3040 (i386-avx-avx512-linux.c): Remove.
3041 (i386-mpx.c): Remove.
3042 (i386-mpx-linux.c): Remove.
3043 (i386-avx-mpx-avx512-pku.c): Remove.
3044 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3045 (i386-avx-mpx.c): Remove.
3046 (i386-avx-mpx-linux.c): Remove.
3047 (i386-mmx.c): Remove.
3048 (i386-mmx-linux.c): Remove.
3049 (reg-ia64.c): Remove.
3050 (reg-m32r.c): Remove.
3051 (reg-m68k.c): Remove.
3052 (reg-cf.c): Remove.
3053 (mips-linux.c): Remove.
3054 (mips-dsp-linux.c): Remove.
3055 (mips64-linux.c): Remove.
3056 (mips64-dsp-linux.c): Remove.
3057 (nios2-linux.c): Remove.
3058 (powerpc-32.c): Remove.
3059 (powerpc-32l.c): Remove.
3060 (powerpc-altivec32l.c): Remove.
3061 (powerpc-cell32l.c): Remove.
3062 (powerpc-vsx32l.c): Remove.
3063 (powerpc-isa205-32l.c): Remove.
3064 (powerpc-isa205-altivec32l.c): Remove.
3065 (powerpc-isa205-vsx32l.c): Remove.
3066 (powerpc-e500l.c): Remove.
3067 (powerpc-64l.c): Remove.
3068 (powerpc-altivec64l.c): Remove.
3069 (powerpc-cell64l.c): Remove.
3070 (powerpc-vsx64l.c): Remove.
3071 (powerpc-isa205-64l.c): Remove.
3072 (powerpc-isa205-altivec64l.c): Remove.
3073 (powerpc-isa205-vsx64l.c): Remove.
3074 (s390-linux32.c): Remove.
3075 (s390-linux32v1.c): Remove.
3076 (s390-linux32v2.c): Remove.
3077 (s390-linux64.c): Remove.
3078 (s390-linux64v1.c): Remove.
3079 (s390-linux64v2.c): Remove.
3080 (s390-te-linux64.c): Remove.
3081 (s390-vx-linux64.c): Remove.
3082 (s390-tevx-linux64.c): Remove.
3083 (s390x-linux64.c): Remove.
3084 (s390x-linux64v1.c): Remove.
3085 (s390x-linux64v2.c): Remove.
3086 (s390x-te-linux64.c): Remove.
3087 (s390x-vx-linux64.c): Remove.
3088 (s390x-tevx-linux64.c): Remove.
3089 (tic6x-c64xp-linux.c): Remove.
3090 (tic6x-c64x-linux.c): Remove.
3091 (tic6x-c62x-linux.c): Remove.
3092 (reg-sh.c): Remove.
3093 (reg-sparc64.c): Remove.
3094 (reg-spu.c): Remove.
3095 (amd64.c): Remove.
3096 (amd64-linux.c): Remove.
3097 (amd64-avx.c): Remove.
3098 (amd64-avx-linux.c): Remove.
3099 (amd64-avx-avx512.c): Remove.
3100 (amd64-avx-avx512-linux.c): Remove.
3101 (amd64-mpx.c): Remove.
3102 (amd64-mpx-linux.c): Remove.
3103 (amd64-avx-mpx-avx512-pku.c): Remove.
3104 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3105 (amd64-avx-mpx.c): Remove.
3106 (amd64-avx-mpx-linux.c): Remove.
3107 (x32.c): Remove.
3108 (x32-linux.c): Remove.
3109 (x32-avx.c): Remove.
3110 (x32-avx-linux.c): Remove.
3111 (x32-avx-avx512.c): Remove.
3112 (x32-avx-avx512-linux.c): Remove.
3113 (reg-xtensa.c): Remove.
3114 (reg-tilegx.c): Remove.
3115 (reg-tilegx32.c): Remove.
3116
1672e0d9
SDJ
31172017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3118
3119 * Makefile.in (SFILES): Add "common/environ.c".
3120 (OBJS): Add "common/environ.h".
3121
239b6d10
WT
31222017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3123
3124 * configure.ac: Check if the fs_base and gs_base members of
3125 `struct user_regs_struct' exist.
3126 * config.in: Regenerated.
3127 * configure: Likewise.
3128
694b382c
AT
31292017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3130
3131 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3132 target_read_memory.
3133 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3134 (get_next_pcs_syscall_next_pc): Likewise.
3135
7dc53023
LM
31362016-12-23 Luis Machado <lgustavo@codesourcery.com>
3137
3138 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3139 * nto-x86-low.c: Likewise.
3140
ad02e4fe
SM
31412016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3142
3143 * Makefile.in: Include disable-implicit-rules.mk.
3144
dcb07cfa
PA
31452016-11-23 Pedro Alves <palves@redhat.com>
3146
3147 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3148 (debug_vprintf): Use std::chrono::steady_clock instead of
3149 gettimeofday. Use '.' instead of ':'.
3150 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3151 (get_timestamp): Use std::chrono::steady_clock instead of
3152 gettimeofday.
3153
8629c02c
SM
31542016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3155
3156 * Makefile.in: Fix whitespace formatting.
3157
b593ecca
SM
31582016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3159
3160 * Makefile.in (SFILES, OBS): Flatten list and order
3161 alphabetically.
3162
9986ba08
PA
31632016-11-23 Pedro Alves <palves@redhat.com>
3164
3165 * event-loop.c (handle_file_event): Use warning.
3166 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3167 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3168 Use warning.
3169
4eefa7bc
PA
31702016-11-23 Pedro Alves <palves@redhat.com>
3171
3172 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3173 output.
3174 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3175 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3176 debug_printf and debug_flush for debug output.
3177 * server.c (handle_general_set): Likewise.
3178 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3179 output.
3180
5443506e
SM
31812016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3182
3183 * Makefile.in (.c.o): Replace rule with ...
3184 (%.o: %.c): ... this one.
3185
3b165252
SM
31862016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3187
3188 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3189 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3190 make.
3191 * configure.ac: Remove checks for the make program.
3192 * configure: Re-generate.
3193
0bcda685
PA
31942016-10-28 Pedro Alves <palves@redhat.com>
3195
3196 * Makefile.in (CXX_DIALECT): Get from configure.
3197 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3198 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3199 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3200 * config.in: Regenerate.
3201 * configure: Regenerate.
3202
c3805894
YQ
32032016-10-27 Yao Qi <yao.qi@linaro.org>
3204
3205 * linux-low.c (linux_supports_range_stepping): Return true if
3206 can_software_single_step return true.
3207
89342618
YQ
32082016-10-27 Yao Qi <yao.qi@linaro.org>
3209
3210 * inferiors.c (find_inferior_in_random): New function.
3211 * inferiors.h (find_inferior_in_random): Declare.
3212 * linux-low.c (linux_wait_for_event_filtered): Call
3213 find_inferior_in_random instead of find_inferior.
3214
e3652c84
YQ
32152016-10-27 Yao Qi <yao.qi@linaro.org>
3216
3217 * linux-low.c (linux_wait_1): If single-step breakpoints are
3218 inserted, remove them.
3219
5a04c4cf
PA
32202016-10-26 Pedro Alves <palves@redhat.com>
3221
3222 * linux-low.c (handle_extended_wait): Link parent/child fork
3223 threads.
3224 (linux_wait_1): Unlink them.
3225 (linux_set_resume_request): Ignore resume requests for
3226 already-resumed and unhandled fork child threads.
3227 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3228 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3229 New functions.
3230 (handle_v_requests) <vCont>: Don't call require_running.
3231 * server.h (in_queued_stop_replies): New declaration.
3232
cb93dc7f
YQ
32332016-10-24 Yao Qi <yao.qi@linaro.org>
3234
3235 PR server/20733
3236 * linux-aarch64-low.c (append_insns): Cast the return value to
3237 'uint32_t *'.
3238
a1078bea
YQ
32392016-10-10 Yao Qi <yao.qi@linaro.org>
3240
3241 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3242
1fb77080
SDJ
32432016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3244
3245 * target.c (target_supports_multi_process): New function, moved
3246 from...
3247 * target.h (target_supports_multi_process): ... here. Remove
3248 macro.
3249
39b5a3b9
TT
32502016-10-05 Tom Tromey <tom@tromey.com>
3251
3252 PR remote/20655:
3253 * tracepoint.c (handle_tracepoint_bkpts): Check
3254 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3255
c1d0b70a
YQ
32562016-10-05 Yao Qi <yao.qi@linaro.org>
3257
3258 * configure.srv: Update the path of arm-*.xml files.
3259
0a69eedb
YQ
32602016-10-05 Terry Guo <terry.guo@arm.com>
3261 Yao Qi <yao.qi@linaro.org>
3262
3263 * Makefile.in: Adjust the path of rules.
3264 * configure.srv: Update the path of xml files.
3265 * regformats/arm-with-iwmmxt.dat: Regenerated.
3266 * regformats/arm-with-neon.dat: Likewise.
3267 * regformats/arm-with-vfpv2.dat: Likewise.
3268 * regformats/arm-with-vfpv3.dat Likewise.
3269
17e16485
YQ
32702016-09-30 Yao Qi <yao.qi@linaro.org>
3271
3272 PR gdbserver/20627
3273 * target.c (target_stop_and_wait): Don't call
3274 target_continue_no_signal, use resume_stop instead.
3275
edeeb602
YQ
32762016-09-26 Yao Qi <yao.qi@linaro.org>
3277
3278 * linux-low.c (linux_wait_1): Call debug_exit.
3279
503b1c39
PA
32802016-09-23 Pedro Alves <palves@redhat.com>
3281
3282 * Makefile.in (SFILES): Add common/new-op.c.
3283 (OBS): Add common/new-op.o.
3284 (new-op.o): New rule.
3285
74172ecf
SM
32862016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3287
3288 * .gitinore: Ignore more files.
3289
fc6cda2e
YQ
32902016-09-21 Yao Qi <yao.qi@linaro.org>
3291
3292 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3293 23.
3294
bc1e6c81
SDJ
32952016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3296
3297 * server.c (start_inferior): Call target_mourn_inferior instead of
3298 mourn_inferior; pass ptid_t argument to it.
3299 (resume): Likewise.
3300 (handle_target_event): Likewise.
3301 * target.c (target_mourn_inferior): New function.
3302 * target.h (mourn_inferior): Delete macro.
3303
0e00e962
AA
33042016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3305
3306 * linux-low.c (lwp_is_stepping): New function.
3307
1d8cb77d
CL
33082016-09-06 Carl Love <cel@us.ibm.com>
3309
3310 * server.c (start_inferior): Fixed comment, requested comment change
3311 didn't get updated correctly. Removed reference to ptrace () call as
3312 it is only true on Linux systems.
3313
7313bced
CL
33142016-09-06 Carl Love <cel@us.ibm.com>
3315
3316 * server.c (start_inferior): Do not call
3317 function target_post_create_inferior () if the
3318 inferior process has already exited.
3319
cf6de44d
PA
33202016-09-05 Pedro Alves <palves@redhat.com>
3321
3322 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3323 (COMPILE.pre, CC_LD): Use CXX directly.
3324 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3325 * acinclude.m4: Don't include build-with-cxx.m4.
3326 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3327 * configure: Regenerate.
3328
c1da6748
AT
33292016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3330
3331 PR gdb/19495
3332 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3333 call writing data to own_buf.
3334
f2b9e3df
SDJ
33352016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3336
3337 * target.c (mywait): Call target_wait instead of
3338 the_target->wait.
3339 (target_wait): New function.
3340
049a8570
SDJ
33412016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3342
3343 * server.c (start_inferior): New variable 'ptid'. Replace calls
3344 to the_target->resume by target_continue{,_no_signal}, depending
3345 on the case.
3346 * target.c (target_stop_and_wait): Call target_continue_no_signal
3347 instead of the_target->resume.
3348 (target_continue): New function.
3349
3aa5cfa0
AT
33502016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3351
3352 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3353
754653a7
AZ
33542016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3355
3356 PR server/20491
3357 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3358 ps_prochandle.
3359 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3360 * linux-arm-low.c (ps_get_thread_area): Likewise.
3361 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3362 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3363 * linux-mips-low.c (ps_get_thread_area): Likewise.
3364 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3365 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3366 * linux-x86-low.c (ps_get_thread_area): Likewise.
3367 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3368
ed036b40
PA
33692016-08-19 Pedro Alves <palves@redhat.com>
3370
3371 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3372
c8ef42ee
PA
33732016-08-19 Pedro Alves <palves@redhat.com>
3374
3375 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3376 comment. Use memcpy instead of casting through unsigned long.
3377
9c235a72
PA
33782016-08-19 Pedro Alves <palves@redhat.com>
3379
3380 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3381 allocating around 0x80000000.
3382
201506da
PA
33832016-08-19 Pedro Alves <palves@redhat.com>
3384
3385 PR gdb/20415
3386 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3387 (x32-avx512-linux-ipa.o): New rules.
3388 * configure.ac (x86_64-*-linux*): New x32 check.
3389 * configure.srv (ipa_x32_linux_regobj): New.
3390 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3391 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3392 descriptions.
3393 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3394 descriptions.
3395 * configure: Regenerate.
3396
f348d89a
PA
33972016-08-09 Pedro Alves <palves@redhat.com>
3398
3399 PR gdb/18653
3400 * Makefile.in (OBS): Add signals-state-save-restore.o.
3401 (signals-state-save-restore.o): New rule.
3402 * config.in: Regenerate.
3403 * configure: Regenerate.
3404 * linux-low.c: Include "signals-state-save-restore.h".
3405 (linux_create_inferior): Call
3406 restore_original_signals_state.
3407 * server.c: Include "dispositions-save-restore.h".
3408 (captured_main): Call save_original_signals_state.
3409
1baf5149
PA
34102016-08-05 Pedro Alves <palves@redhat.com>
3411
3412 * configure: Regenerate.
3413
fcd4a73d
YQ
34142016-08-04 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-low.c (regsets_fetch_inferior_registers): Check
3417 errno is ESRCH or not.
3418
979659d0
YQ
34192016-08-02 Yao Qi <yao.qi@linaro.org>
3420
3421 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3422 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3423 (thread_db_load_search): Update.
3424 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3425 td_ta_set_event and td_ta_event_getmsg.
3426
6598661d
PA
34272016-07-26 Pedro Alves <palves@redhat.com>
3428
3429 PR server/20414
3430 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3431 of unsigned long for 64-bit registers and use uint32_t instead of
3432 unsigned int for 32-bit registers.
3433
9cf12d57
PA
34342016-07-26 Pedro Alves <palves@redhat.com>
3435
3436 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3437 to 'ptrace'.
3438
305450ed
TT
34392016-07-21 Tom Tromey <tom@tromey.com>
3440
3441 * configure: Rebuild.
3442
2583da7c
YQ
34432016-07-21 Yao Qi <yao.qi@linaro.org>
3444
3445 * mem-break.c (find_gdb_breakpoint): Cast bp to
3446 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3447
21536b36
YQ
34482016-07-21 Yao Qi <yao.qi@linaro.org>
3449
3450 * server.c (handle_v_requests): Support s and S actions
3451 if target_supports_software_single_step return true.
3452
8901d193
YQ
34532016-07-21 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3456 is resume_step, call maybe_hw_step.
3457 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3458 and unstop them.
3459 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3460 breakpoints or not.
3461 (proceed_one_lwp): If resume request is resume_step, install
3462 reinsert breakpoints and call maybe_hw_step.
3463
0e9a339e
YQ
34642016-07-21 Yao Qi <yao.qi@linaro.org>
3465
3466 * linux-low.c (proceed_one_lwp): Declare.
3467 (linux_resume_one_thread): Remove local variable 'step'.
3468 Lift code enqueue signal. Call proceed_one_lwp instead of
3469 linux_resume_one_lwp.
3470
4281b351
YQ
34712016-07-21 Yao Qi <yao.qi@linaro.org>
3472
3473 * linux-low.c (linux_resume_one_thread): Call
3474 enqueue_pending_signal.
3475
984a2c04
YQ
34762016-07-21 Yao Qi <yao.qi@linaro.org>
3477
3478 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3479 * inferiors.c (do_restore_current_thread_cleanup): New function.
3480 (make_cleanup_restore_current_thread): Likewise.
3481 * linux-low.c (install_software_single_step_breakpoints): Call
3482 make_cleanup_restore_current_thread. Switch current_thread to
3483 thread.
3484
bec903c9
YQ
34852016-07-21 Yao Qi <yao.qi@linaro.org>
3486
3487 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3488 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3489 (clone_one_breakpoint): Likewise.
3490 (delete_reinsert_breakpoints): Change parameter to thread.
3491 Callers updated.
3492 (has_reinsert_breakpoints): Likewise.
3493 (uninsert_reinsert_breakpoints): Likewise.
3494 (reinsert_reinsert_breakpoints): Likewise.
3495 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3496 (delete_reinsert_breakpoints): Likewise.
3497 (reinsert_reinsert_breakpoints): Likewise.
3498 (uninsert_reinsert_breakpoints): Likewise.
3499 (has_reinsert_breakpoints): Likewise.
3500
63c40ec7
YQ
35012016-07-21 Yao Qi <yao.qi@linaro.org>
3502
3503 * inferiors.c (get_thread_process): Make parameter const.
3504 * inferiors.h (get_thread_process): Update declaration.
3505 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3506 Add new parameters child_thread and parent_thread. Callers
3507 updated.
3508 * mem-break.h (clone_all_breakpoints): Update declaration.
3509
9aa76cd0
YQ
35102016-07-21 Yao Qi <yao.qi@linaro.org>
3511
3512 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3513 <command_list, handler>: Remove.
3514 (struct gdb_breakpoint): New.
3515 (struct other_breakpoint): New.
3516 (struct reinsert_breakpoint): New.
3517 (is_gdb_breakpoint): New function.
3518 (any_persistent_commands): Update command_list if
3519 is_gdb_breakpoint returns true.
3520 (set_breakpoint): Create breakpoints according to their types.
3521 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3522 (set_gdb_breakpoint_1): Likewise.
3523 (set_gdb_breakpoint): Likewise.
3524 (clear_breakpoint_conditions): Change parameter type to
3525 'struct gdb_breakpoint *'.
3526 (clear_breakpoint_commands): Likewise.
3527 (clear_breakpoint_conditions_and_commands): Likewise.
3528 (add_condition_to_breakpoint): Likewise.
3529 (add_breakpoint_condition): Likewise.
3530 (add_commands_to_breakpoint): Likewise.
3531 (check_breakpoints): Check other_breakpoint.
3532 (clone_one_breakpoint): Clone breakpopint according to its type.
3533 * mem-break.h (struct gdb_breakpoint): Declare.
3534 (set_gdb_breakpoint): Update declaration.
3535 (clear_breakpoint_conditions_and_commands): Likewise.
3536 (add_breakpoint_condition): Likewise.
3537 (add_breakpoint_commands): Likewise.
3538 * server.c (process_point_options): Change parameter type to
3539 'struct gdb_breakpoint *'.
3540
811f8301
YQ
35412016-07-21 Yao Qi <yao.qi@linaro.org>
3542
3543 * mem-break.c (set_breakpoint_at): Rename it to ...
3544 (set_breakpoint_type_at): ... it.
3545 (set_breakpoint_at): Call set_breakpoint_type_at.
3546 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3547 * mem-break.h (set_breakpoint_at): Update comments.
3548
b1c51e36
CLT
35492016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3550
3551 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3552 to buf parameter.
3553 (nios2_store_gregset): Likewise.
3554
ced2dffb
PA
35552016-07-01 Pedro Alves <palves@redhat.com>
3556 Antoine Tremblay <antoine.tremblay@ericsson.com>
3557
3558 * linux-low.c: Change interface to take the target lwp_info
3559 pointer directly and return void. Handle detaching from a zombie
3560 thread.
3561 (linux_detach_lwp_callback): New function.
3562 (linux_detach): Detach from the leader thread after detaching from
3563 the clone threads.
3564
2ac09a5b
YQ
35652016-06-28 Yao Qi <yao.qi@linaro.org>
3566
3567 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3568 for variable new_offset.
3569 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3570 (aarch64_ftrace_insn_reloc_cb): Likewise.
3571 (aarch64_ftrace_insn_reloc_tb): Likewise.
3572 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3573 PRIx64 instead of PRIx32.
3574
79e7fd4f
YQ
35752016-06-28 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3578 (the_low_target): Install arm_get_syscall_trapinfo.
3579
061fc021
YQ
35802016-06-28 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3583 function.
3584 (the_low_target): Install aarch64_get_syscall_trapinfo.
3585
4cc32bec
YQ
35862016-06-28 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3589 Callers updated.
3590 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3591 Remove parameter sysno.
3592 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3593 sysret.
3594
782c1122
AA
35952016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3596
3597 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3598 (s390_emit_ne_goto): Likewise.
3599 (s390_emit_lt_goto): Likewise.
3600 (s390_emit_le_goto): Likewise.
3601 (s390_emit_gt_goto): Likewise.
3602 (s390_emit_ge_goto): Likewise.
3603 (s390x_emit_eq_goto): Likewise.
3604 (s390x_emit_ne_goto): Likewise.
3605 (s390x_emit_lt_goto): Likewise.
3606 (s390x_emit_le_goto): Likewise.
3607 (s390x_emit_gt_goto): Likewise.
3608 (s390x_emit_ge_goto): Likewise.
3609 (s390_emit_ops_impl): Mark variable static.
3610 (s390x_emit_ops): Likewise.
3611
2e7b624b
YQ
36122016-06-17 Yao Qi <yao.qi@linaro.org>
3613
3614 * linux-low.c (handle_extended_wait): Call
3615 uninsert_reinsert_breakpoints for the parent process. Remove
3616 reinsert breakpoints from the child process. Reinsert them to
3617 the parent process when vfork is done.
3618 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3619 (reinsert_reinsert_breakpoints): New function.
3620 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3621 (reinsert_reinsert_breakpoints): Declare.
3622
8a81c5d7
YQ
36232016-06-17 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-low.c (handle_extended_wait): If the parent is doing
3626 step-over, remove the reinsert breakpoints from the forked child.
3627
f50bf8e5
YQ
36282016-06-17 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-low.c (unsuspend_all_lwps): Declare.
3631 (linux_low_filter_event): If thread exited, call finish_step_over.
3632 If step-over is finished, unsuspend other threads.
3633
8376a3cb
YQ
36342016-06-17 Yao Qi <yao.qi@linaro.org>
3635
3636 * linux-low.c (linux_resume_one_lwp_throw): Assert
3637 has_reinsert_breakpoints returns false.
3638 * mem-break.c (delete_disabled_breakpoints): Assert
3639 bp type isn't reinsert_breakpoint.
3640
f79b145d
YQ
36412016-06-17 Yao Qi <yao.qi@linaro.org>
3642
3643 * linux-low.c (maybe_hw_step): New function.
3644 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3645 (finish_step_over): Switch current_thread to lwp temporarily,
3646 and assert has_reinsert_breakpoints returns true.
3647 (proceed_one_lwp): Call maybe_hw_step.
3648 * mem-break.c (has_reinsert_breakpoints): New function.
3649 * mem-break.h (has_reinsert_breakpoints): Declare.
3650
0ae534d2
JT
36512016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3652
3653 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3654
fcdad592
YQ
36552016-05-17 Yao Qi <yao.qi@linaro.org>
3656
3657 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3658 instead of find_inferior.
3659
9e784964
YQ
36602016-05-05 Yao Qi <yao.qi@linaro.org>
3661
3662 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3663 Initialize res to zero.
3664
cf2ebb6e
YQ
36652016-05-05 Yao Qi <yao.qi@linaro.org>
3666
3667 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3668 to uint32_t.
3669
c1aebf87
UW
36702016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3671
3672 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3673 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3674 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3675
35fd2deb 36762016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3677 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3678
3679 * tracepoint.c (write_inferior_int8): New function.
3680 (cmd_qtenable_disable): Write enable flag using
3681 write_inferior_int8.
3682
484b3c32
YQ
36832016-04-25 Yao Qi <yao.qi@linaro.org>
3684
3685 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3686 (need_step_over_p): Return zero if the LWP has pending signals
3687 can be delivered on software single step target.
3688
85ba7d86
YQ
36892016-04-25 Yao Qi <yao.qi@linaro.org>
3690
3691 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3692 return instead of error.
3693
3539aa13
YQ
36942016-04-22 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3697 to 23.
3698
5b061e98
YQ
36992016-04-22 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3702 signal when stepping over breakpoint with software single
3703 step.
3704
3451269c
PA
37052016-04-21 Pedro Alves <palves@redhat.com>
3706
3707 * linux-s390-low.c (s390_collect_ptrace_register)
3708 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3709 add casts.
3710 (s390_check_regset): Use void * instead of gdb_byte *.
3711
a2358508
PA
37122016-04-20 Pedro Alves <palves@redhat.com>
3713
3714 * configure: Renegerate.
3715
6885166d
YQ
37162016-04-20 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3719 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3720 number 16.
3721 (arm_store_gregset): Likewise.
3722
2b863f51
WT
37232016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3724
3725 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3726 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3727 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3728 (amd64-avx-mpx-linux.c): New rules.
3729 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3730 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3731 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3732 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3733 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3734 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3735 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3736 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3737 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3738 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3739 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3740 * linux-x86-low.c (x86_linux_read_description): Add case for
3741 X86_XSTATE_AVX_MPX_MASK.
3742 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3743 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3744 init_registers_i386_avx_mpx_linux.
3745 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3746 (initialize_low_tracepoint): Call
3747 init_registers_i386_avx_mpx_linux.
3748 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3749 (initialize_low_tracepoint): Call
3750 init_registers_amd64_avx_mpx_linux.
3751 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3752 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3753 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3754 declarations.
3755
9b30624b
PA
37562016-04-18 Pedro Alves <palves@redhat.com>
3757
3758 * configure: Regenerate.
3759
45e3745e
AT
37602016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3761
3762 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3763 (aarch64_emit_sub): Likewise.
3764
2afc13ff
PA
37652016-04-12 Pedro Alves <palves@redhat.com>
3766
3767 * utils.c (prepare_to_throw_exception): Delete.
3768
6e774b13
SM
37692016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3770
3771 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3772
4dca19f8
MK
37732016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3774
3775 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3776
d0a9981f
MK
37772016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3778
3779 * linux-aarch64-ipa.c: Add <elf.h> include.
3780 * linux-ppc-ipa.c: Add <elf.h> include.
3781 * linux-s390-ipa.c: Add <elf.h> include.
3782
252db07e
MK
37832016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3784
3785 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3786 (get_raw_reg_ptr): Likewise.
3787 (get_trace_state_variable_value_ptr): Likewise.
3788 (set_trace_state_variable_value_ptr): Likewise.
3789 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3790 char *.
3791
14e2b6d9
MK
37922016-03-31 Wei-cheng Wang <cole945@gmail.com>
3793 Marcin Kościelnicki <koriakin@0x04.net>
3794
3795 PR/17221
3796 * linux-ppc-low.c (emit_insns): New function.
3797 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3798 (ppc_emit_prologue): New function.
3799 (ppc_emit_epilogue): New function.
3800 (ppc_emit_add): New function.
3801 (ppc_emit_sub): New function.
3802 (ppc_emit_mul): New function.
3803 (ppc_emit_lsh): New function.
3804 (ppc_emit_rsh_signed): New function.
3805 (ppc_emit_rsh_unsigned): New function.
3806 (ppc_emit_ext): New function.
3807 (ppc_emit_zero_ext): New function.
3808 (ppc_emit_log_not): New function.
3809 (ppc_emit_bit_and): New function.
3810 (ppc_emit_bit_or): New function.
3811 (ppc_emit_bit_xor): New function.
3812 (ppc_emit_bit_not): New function.
3813 (ppc_emit_equal): New function.
3814 (ppc_emit_less_signed): New function.
3815 (ppc_emit_less_unsigned): New function.
3816 (ppc_emit_ref): New function.
3817 (ppc_emit_const): New function.
3818 (ppc_emit_reg): New function.
3819 (ppc_emit_pop): New function.
3820 (ppc_emit_stack_flush): New function.
3821 (ppc_emit_swap): New function.
3822 (ppc_emit_stack_adjust): New function.
3823 (ppc_emit_call): New function.
3824 (ppc_emit_int_call_1): New function.
3825 (ppc_emit_void_call_2): New function.
3826 (ppc_emit_if_goto): New function.
3827 (ppc_emit_goto): New function.
3828 (ppc_emit_eq_goto): New function.
3829 (ppc_emit_ne_goto): New function.
3830 (ppc_emit_lt_goto): New function.
3831 (ppc_emit_le_goto): New function.
3832 (ppc_emit_gt_goto): New function.
3833 (ppc_emit_ge_goto): New function.
3834 (ppc_write_goto_address): New function.
3835 (ppc_emit_ops_impl): New static variable.
3836 (ppc64v1_emit_prologue): New function.
3837 (ppc64v2_emit_prologue): New function.
3838 (ppc64_emit_epilogue): New function.
3839 (ppc64_emit_add): New function.
3840 (ppc64_emit_sub): New function.
3841 (ppc64_emit_mul): New function.
3842 (ppc64_emit_lsh): New function.
3843 (ppc64_emit_rsh_signed): New function.
3844 (ppc64_emit_rsh_unsigned): New function.
3845 (ppc64_emit_ext): New function.
3846 (ppc64_emit_zero_ext): New function.
3847 (ppc64_emit_log_not): New function.
3848 (ppc64_emit_bit_and): New function.
3849 (ppc64_emit_bit_or): New function.
3850 (ppc64_emit_bit_xor): New function.
3851 (ppc64_emit_bit_not): New function.
3852 (ppc64_emit_equal): New function.
3853 (ppc64_emit_less_signed): New function.
3854 (ppc64_emit_less_unsigned): New function.
3855 (ppc64_emit_ref): New function.
3856 (ppc64_emit_const): New function.
3857 (ppc64v1_emit_reg): New function.
3858 (ppc64v2_emit_reg): New function.
3859 (ppc64_emit_pop): New function.
3860 (ppc64_emit_stack_flush): New function.
3861 (ppc64_emit_swap): New function.
3862 (ppc64v1_emit_call): New function.
3863 (ppc64v2_emit_call): New function.
3864 (ppc64v1_emit_int_call_1): New function.
3865 (ppc64v2_emit_int_call_1): New function.
3866 (ppc64v1_emit_void_call_2): New function.
3867 (ppc64v2_emit_void_call_2): New function.
3868 (ppc64_emit_if_goto): New function.
3869 (ppc64_emit_eq_goto): New function.
3870 (ppc64_emit_ne_goto): New function.
3871 (ppc64_emit_lt_goto): New function.
3872 (ppc64_emit_le_goto): New function.
3873 (ppc64_emit_gt_goto): New function.
3874 (ppc64_emit_ge_goto): New function.
3875 (ppc64v1_emit_ops_impl): New static variable.
3876 (ppc64v2_emit_ops_impl): New static variable.
3877 (ppc_emit_ops): New function.
3878 (linux_low_target): Wire in ppc_emit_ops.
3879
a2174ba4
MK
38802016-03-31 Wei-cheng Wang <cole945@gmail.com>
3881 Marcin Kościelnicki <koriakin@0x04.net>
3882
3883 PR/17221
3884 * Makefile.in: Add powerpc-*-ipa.o
3885 * configure.srv: Add ipa_obj for powerpc*-linux.
3886 * linux-ppc-ipa.c: New file.
3887 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3888 includes.
3889 (PPC_FIELD): New macro.
3890 (PPC_SEXT): New macro.
3891 (PPC_OP6): New macro.
3892 (PPC_BO): New macro.
3893 (PPC_LI): New macro.
3894 (PPC_BD): New macro.
3895 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3896 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3897 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3898 (ppc_get_thread_area): New function.
3899 (is_elfv2_inferior): New function.
3900 (gen_ds_form): New function.
3901 (GEN_STD): New macro.
3902 (GEN_STDU): New macro.
3903 (GEN_LD): New macro.
3904 (GEN_LDU): New macro.
3905 (gen_d_form): New function.
3906 (GEN_ADDI): New macro.
3907 (GEN_ADDIS): New macro.
3908 (GEN_LI): New macro.
3909 (GEN_LIS): New macro.
3910 (GEN_ORI): New macro.
3911 (GEN_ORIS): New macro.
3912 (GEN_LWZ): New macro.
3913 (GEN_STW): New macro.
3914 (GEN_STWU): New macro.
3915 (gen_xfx_form): New function.
3916 (GEN_MFSPR): New macro.
3917 (GEN_MTSPR): New macro.
3918 (GEN_MFCR): New macro.
3919 (GEN_MTCR): New macro.
3920 (GEN_SYNC): New macro.
3921 (GEN_LWSYNC): New macro.
3922 (gen_x_form): New function.
3923 (GEN_OR): New macro.
3924 (GEN_MR): New macro.
3925 (GEN_LWARX): New macro.
3926 (GEN_STWCX): New macro.
3927 (GEN_CMPW): New macro.
3928 (gen_md_form): New function.
3929 (GEN_RLDICL): New macro.
3930 (GEN_RLDICR): New macro.
3931 (gen_i_form): New function.
3932 (GEN_B): New macro.
3933 (GEN_BL): New macro.
3934 (gen_b_form): New function.
3935 (GEN_BNE): New macro.
3936 (GEN_LOAD): New macro.
3937 (GEN_STORE): New macro.
3938 (gen_limm): New function.
3939 (gen_atomic_xchg): New function.
3940 (gen_call): New function.
3941 (ppc_relocate_instruction): New function.
3942 (ppc_install_fast_tracepoint_jump_pad): New function.
3943 (ppc_get_min_fast_tracepoint_insn_len): New function.
3944 (ppc_get_ipa_tdesc_idx): New function.
3945 (the_low_target): Wire in the new functions.
3946 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3947 tdescs.
3948 * linux-ppc-tdesc.h: New file.
3949
a13c4696
MK
39502016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3951
3952 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3953 (alloc_jump_pad_buffer): New function.
3954 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3955 (alloc_jump_pad_buffer): New function.
3956 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3957 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3958 (alloc_jump_pad_buffer): New function.
3959 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3960 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3961 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3962 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3963
1cda1512
MK
39642016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3965
3966 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3967 * linux-amd64-ipa.c: Likewise.
3968 * linux-i386-ipa.c: Likewise.
3969 * linux-s390-ipa.c: Likewise.
3970 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3971 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3972 set_trace_state_variable_value_ptr.
3973 (struct ipa_sym_addresses): Likewise.
3974 (symbol_list): Likewise.
3975 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3976 accessing gdb_collect directly.
3977 (gdb_collect_ptr_type): New typedef.
3978 (get_raw_reg_ptr_type): New typedef.
3979 (get_trace_state_variable_value_ptr_type): New typedef.
3980 (set_trace_state_variable_value_ptr_type): New typedef.
3981 (gdb_collect_ptr): New global.
3982 (get_raw_reg_ptr): New global.
3983 (get_trace_state_variable_value_ptr): New global.
3984 (set_trace_state_variable_value_ptr): New global.
3985 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3986 accessing get_raw_reg directly.
3987 (get_get_tsv_func_addr): Likewise for
3988 get_trace_state_variable_value_ptr.
3989 (get_set_tsv_func_addr): Likewise for
3990 set_trace_state_variable_value_ptr.
3991 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3992
72fb5488
SM
39932016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3994
3995 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3996
28170b88
MK
39972016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3998
3999 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4000 packets.
4001 (relocate_instruction): Remove own_buf.
4002 * server.c (own_buf): Make global.
4003 (handle_v_requests): Make global.
4004 * server.h (own_buf): New declaration.
4005 (handle_v_requests): New prototype.
4006
f39e8743
MK
40072016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4008
4009 PR 18377
4010 * linux-s390-low.c (add_insns): New function.
4011 (s390_emit_prologue): New function.
4012 (s390_emit_epilogue): New function.
4013 (s390_emit_add): New function.
4014 (s390_emit_sub): New function.
4015 (s390_emit_mul): New function.
4016 (s390_emit_lsh): New function.
4017 (s390_emit_rsh_signed): New function.
4018 (s390_emit_rsh_unsigned): New function.
4019 (s390_emit_ext): New function.
4020 (s390_emit_log_not): New function.
4021 (s390_emit_bit_and): New function.
4022 (s390_emit_bit_or): New function.
4023 (s390_emit_bit_xor): New function.
4024 (s390_emit_bit_not): New function.
4025 (s390_emit_equal): New function.
4026 (s390_emit_less_signed): New function.
4027 (s390_emit_less_unsigned): New function.
4028 (s390_emit_ref): New function.
4029 (s390_emit_if_goto): New function.
4030 (s390_emit_goto): New function.
4031 (s390_write_goto_address): New function.
4032 (s390_emit_litpool): New function.
4033 (s390_emit_const): New function.
4034 (s390_emit_call): New function.
4035 (s390_emit_reg): New function.
4036 (s390_emit_pop): New function.
4037 (s390_emit_stack_flush): New function.
4038 (s390_emit_zero_ext): New function.
4039 (s390_emit_swap): New function.
4040 (s390_emit_stack_adjust): New function.
4041 (s390_emit_set_r2): New function.
4042 (s390_emit_int_call_1): New function.
4043 (s390_emit_void_call_2): New function.
4044 (s390_emit_eq_goto): New function.
4045 (s390_emit_ne_goto): New function.
4046 (s390_emit_lt_goto): New function.
4047 (s390_emit_le_goto): New function.
4048 (s390_emit_gt_goto): New function.
4049 (s390_emit_ge_goto): New function.
4050 (s390x_emit_prologue): New function.
4051 (s390x_emit_epilogue): New function.
4052 (s390x_emit_add): New function.
4053 (s390x_emit_sub): New function.
4054 (s390x_emit_mul): New function.
4055 (s390x_emit_lsh): New function.
4056 (s390x_emit_rsh_signed): New function.
4057 (s390x_emit_rsh_unsigned): New function.
4058 (s390x_emit_ext): New function.
4059 (s390x_emit_log_not): New function.
4060 (s390x_emit_bit_and): New function.
4061 (s390x_emit_bit_or): New function.
4062 (s390x_emit_bit_xor): New function.
4063 (s390x_emit_bit_not): New function.
4064 (s390x_emit_equal): New function.
4065 (s390x_emit_less_signed): New function.
4066 (s390x_emit_less_unsigned): New function.
4067 (s390x_emit_ref): New function.
4068 (s390x_emit_if_goto): New function.
4069 (s390x_emit_const): New function.
4070 (s390x_emit_call): New function.
4071 (s390x_emit_reg): New function.
4072 (s390x_emit_pop): New function.
4073 (s390x_emit_stack_flush): New function.
4074 (s390x_emit_zero_ext): New function.
4075 (s390x_emit_swap): New function.
4076 (s390x_emit_stack_adjust): New function.
4077 (s390x_emit_int_call_1): New function.
4078 (s390x_emit_void_call_2): New function.
4079 (s390x_emit_eq_goto): New function.
4080 (s390x_emit_ne_goto): New function.
4081 (s390x_emit_lt_goto): New function.
4082 (s390x_emit_le_goto): New function.
4083 (s390x_emit_gt_goto): New function.
4084 (s390x_emit_ge_goto): New function.
4085 (s390_emit_ops): New function.
4086 (struct linux_target_ops): Fill in emit_ops hook.
4087
abd9baf9
MK
40882016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4089
4090 PR 18377
4091 * Makefile.in: Add s390 IPA files.
4092 * configure.srv: Build IPA for s390.
4093 * linux-s390-ipa.c: New file.
4094 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4095 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4096 (tdesc_s390_linux32): Likewise.
4097 (init_registers_s390_linux32v1): Likewise.
4098 (tdesc_s390_linux32v1): Likewise.
4099 (init_registers_s390_linux32v2): Likewise.
4100 (tdesc_s390_linux32v2): Likewise.
4101 (init_registers_s390_linux64): Likewise.
4102 (tdesc_s390_linux64): Likewise.
4103 (init_registers_s390_linux64v1): Likewise.
4104 (tdesc_s390_linux64v1): Likewise.
4105 (init_registers_s390_linux64v2): Likewise.
4106 (tdesc_s390_linux64v2): Likewise.
4107 (init_registers_s390_te_linux64): Likewise.
4108 (tdesc_s390_te_linux64): Likewise.
4109 (init_registers_s390_vx_linux64): Likewise.
4110 (tdesc_s390_vx_linux64): Likewise.
4111 (init_registers_s390_tevx_linux64): Likewise.
4112 (tdesc_s390_tevx_linux64): Likewise.
4113 (init_registers_s390x_linux64): Likewise.
4114 (tdesc_s390x_linux64): Likewise.
4115 (init_registers_s390x_linux64v1): Likewise.
4116 (tdesc_s390x_linux64v1): Likewise.
4117 (init_registers_s390x_linux64v2): Likewise.
4118 (tdesc_s390x_linux64v2): Likewise.
4119 (init_registers_s390x_te_linux64): Likewise.
4120 (tdesc_s390x_te_linux64): Likewise.
4121 (init_registers_s390x_vx_linux64): Likewise.
4122 (tdesc_s390x_vx_linux64): Likewise.
4123 (init_registers_s390x_tevx_linux64): Likewise.
4124 (tdesc_s390x_tevx_linux64): Likewise.
4125 (have_hwcap_s390_vx): New static variable.
4126 (s390_arch_setup): Fill have_hwcap_s390_vx.
4127 (s390_get_thread_area): New function.
4128 (s390_ft_entry_gpr_esa): New const.
4129 (s390_ft_entry_gpr_zarch): New const.
4130 (s390_ft_entry_misc): New const.
4131 (s390_ft_entry_fr): New const.
4132 (s390_ft_entry_vr): New const.
4133 (s390_ft_main_31): New const.
4134 (s390_ft_main_64): New const.
4135 (s390_ft_exit_fr): New const.
4136 (s390_ft_exit_vr): New const.
4137 (s390_ft_exit_misc): New const.
4138 (s390_ft_exit_gpr_esa): New const.
4139 (s390_ft_exit_gpr_zarch): New const.
4140 (append_insns): New function.
4141 (s390_relocate_instruction): New function.
4142 (s390_install_fast_tracepoint_jump_pad): New function.
4143 (s390_get_min_fast_tracepoint_insn_len): New function.
4144 (s390_get_ipa_tdesc_idx): New function.
4145 (struct linux_target_ops): Wire in the above functions.
4146 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4147 * linux-s390-tdesc.h: New file.
4148
a4105d04
MK
41492016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4150
4151 * linux-s390-low.c (s390_supports_tracepoints): New function.
4152 (struct linux_target_ops): Fill supports_tracepoints hook.
4153
35ac8b3e
YQ
41542016-03-18 Yao Qi <yao.qi@linaro.org>
4155
4156 * linux-low.c (lwp_signal_can_be_delivered): New function.
4157 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4158
94610ec4
YQ
41592016-03-18 Yao Qi <yao.qi@linaro.org>
4160
4161 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4162 0 if signal is enqueued. Remove 'signal' from one debugging
4163 message. Move one debugging message to some lines below.
4164 Remove code setting 'signal' to 0.
4165
80aea927
YQ
41662016-03-18 Yao Qi <yao.qi@linaro.org>
4167
4168 * linux-low.c (linux_low_filter_event): Remove redundant
4169 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4170
b04fd3be
MK
41712016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4172
4173 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4174 (struct linux_target_ops): Wire in the above.
4175
c40c8d4b
YQ
41762016-03-03 Yao Qi <yao.qi@linaro.org>
4177
4178 * linux-low.c: Update comments to start_step_over.
4179
0f8288ae
YQ
41802016-03-03 Yao Qi <yao.qi@linaro.org>
4181
4182 PR server/19736
4183 * linux-low.c (handle_extended_wait): Set child suspended
4184 if event_lwp->bp_reinsert isn't zero.
4185
fdbd04a8
YQ
41862016-03-02 Yao Qi <yao.qi@linaro.org>
4187
4188 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4189 enqueue_pending_signal.
4190
6896a8fa
MK
41912016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4192
4193 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4194 is actually loaded.
4195
ab503087
MK
41962016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4197
4198 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4199 (s390_regmap_3264) [!__s390x__]: New global.
4200 (s390_collect_ptrace_register): Skip map entries containing -1.
4201 (s390_supply_ptrace_register): Ditto.
4202 (s390_fill_gprs_high): New function.
4203 (s390_store_gprs_high): New function.
4204 (s390_regsets): Add NT_S390_HIGH_GPRS.
4205 (s390_get_hwcap): Enable on 31-bit.
4206 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4207 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4208 Detect NT_S390_HIGH_GPRS.
4209 (s390_usrregs_info_3264): Enable on 31-bit.
4210 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4211 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4212
ae91f625
MK
42132016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4214
4215 PR gdb/13808
4216 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4217 * configure.srv: Ditto.
4218 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4219 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4220 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4221 (init_registers_amd64_linux): Remove prototype.
4222 (tdesc_amd64_linux): Remove declaration.
4223 (get_ipa_tdesc): New function.
4224 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4225 initialize remaining tdescs.
4226 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4227 (init_registers_i386_linux): Remove prototype.
4228 (tdesc_i386_linux): Remove declaration.
4229 (get_ipa_tdesc): New function.
4230 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4231 initialize remaining tdescs.
4232 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4233 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4234 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4235 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4236 (x86_get_ipa_tdesc_idx): New function.
4237 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4238 * linux-x86-tdesc.h: New file.
4239 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4240 (target_get_ipa_tdesc_idx): New macro.
4241 * tracepoint.c (ipa_tdesc_idx): New macro.
4242 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4243 (symbol_list): Add ipa_tdesc_idx.
4244 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4245 (ipa_tdesc): Remove.
4246 (ipa_tdesc_idx): New variable.
4247 (get_context_regcache): Use get_ipa_tdesc.
4248 (gdb_collect): Ditto.
4249 (gdb_probe): Ditto.
4250 * tracepoint.h (get_ipa_tdesc): New prototype.
4251 (ipa_tdesc): Remove.
4252
e7ad2f14
PA
42532016-02-24 Pedro Alves <palves@redhat.com>
4254
4255 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4256 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4257 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4258 Factor out common code between the USE_SIGTRAP_SIGINFO and
4259 !USE_SIGTRAP_SIGINFO blocks.
4260 (linux_low_filter_event): Call save_stop_reason instead of
4261 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4262 Update comments.
4263 (linux_wait_1): Update comments.
4264
657f9cde
WW
42652016-02-24 Wei-cheng Wang <cole945@gmail.com>
4266
4267 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4268 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4269 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4270 ppc_insert_point, ppc_remove_point.
4271
b00b61e1
MK
42722016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4273
4274 * linux-s390-low.c (s390_supports_z_point_type): New function.
4275 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4276
553cb527
YQ
42772016-02-16 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4280 PC. Get pc from regcache_read_pc.
4281
a5652c21
YQ
42822016-02-12 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4285 or linux_get_pc_32bit.
4286 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4287
ed443b61
YQ
42882016-02-12 Yao Qi <yao.qi@linaro.org>
4289
4290 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4291 arm_linux_get_next_pcs_fixup.
4292
020ecd38
MK
42932016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4294
4295 * tracepoint.c (x_tracepoint_action_download): Change
4296 write_inferior_data_ptr to write_inferior_data_pointer.
4297 (cmd_qtstart): Likewise.
4298 (write_inferior_data_ptr): Remove.
4299 (download_agent_expr): Change write_inferior_data_ptr to
4300 write_inferior_data_pointer.
4301 (download_tracepoint_1): Likewise.
4302 (download_tracepoint): Likewise.
4303 (download_trace_state_variables): Likewise.
4304
7cae9051
WW
43052016-02-11 Wei-cheng Wang <cole945@gmail.com>
4306 Marcin Kościelnicki <koriakin@0x04.net>
4307
4308 * tracepoint.c (struct tracepoint_action_ops): Remove.
4309 (struct tracepoint_action): Remove ops.
4310 (m_tracepoint_action_download, r_tracepoint_action_download)
4311 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4312 size and offset accordingly.
4313 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4314 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4315 (tracepoint_action_send, tracepoint_action_download): New functions.
4316 Helpers for trace action handlers.
4317 (add_tracepoint_action): Remove setup actions ops.
4318 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4319
9f6a71b4
YQ
43202016-02-10 Yao Qi <yao.qi@linaro.org>
4321
4322 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4323
1e94266c
SM
43242016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4325
4326 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4327 to AC_OUTPUT.
4328 * configure: Regenerate.
4329
8adce034
SM
43302016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4331
4332 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4333 void * to gdb_byte *.
4334 * linux-low.c (siginfo_fixup): Likewise.
4335 (linux_xfer_siginfo): Likewise.
4336 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4337 Likewise.
4338 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4339
93813b37
WT
43402016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4341
4342 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4343 to srv_tgtobj.
4344 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4345 to srv_tgtobj.
4346 * linux-x86-low.c [__x86_64__]: Include
4347 "nat/amd64-linux-siginfo.h".
4348 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4349 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4350 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4351 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4352 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4353 (cpt_si_fd, si_timerid, si_overrun): Move from
4354 nat/amd64-linux-siginfo.c.
4355 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4356
8424cc97
SM
43572016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4358
4359 * server.c (skip_to_semicolon): Remove.
4360 (process_point_options): Use strchrnul instead of
4361 skip_to_semicolon.
4362
4d18591b
YQ
43632016-01-26 Yao Qi <yao.qi@linaro.org>
4364
4365 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4366 * linux-low.c (install_software_single_step_breakpoints): Don't
4367 call regcache_read_pc.
4368 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4369 argument pc.
4370
d8020970
YQ
43712016-01-26 Yao Qi <yao.qi@linaro.org>
4372
4373 * linux-low.c (install_software_single_step_breakpoints): Call
4374 regcache_read_pc instead of get_pc.
4375
8b207339
YQ
43762016-01-26 Yao Qi <yao.qi@linaro.org>
4377
4378 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4379 (unblock_async_io): Rename to ...
4380 (block_unblock_async_io): ... it. New function.
4381 (enable_async_io): Don't install SIGIO handler. Unblock it
4382 instead.
4383 (disable_async_io): Don't ignore SIGIO. Block it instead.
4384 (initialize_async_io): Install SIGIO handler. Don't call
4385 unblock_async_io.
4386
18879fef
YQ
43872016-01-26 Yao Qi <yao.qi@linaro.org>
4388
4389 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4390 first character is '\003', call *the_target->request_interrupt.
4391
a0f8e08a
YQ
43922016-01-25 Yao Qi <yao.qi@linaro.org>
4393
4394 * remote-utils.c (new_thread_notify): Remove.
4395 (dead_thread_notify): Likewise.
4396 * remote-utils.h (new_thread_notify): Remove declaration.
4397 (dead_thread_notify): Likewise.
4398
cc5fd9ab
MK
43992016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4400
4401 * gdb.trace/pending.exp: Fix expected message on continue.
4402
99e8eb11
MK
44032016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4404
4405 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4406 it works properly on big-endian machines where sizeof (CORE_ADDR)
4407 != sizeof (void *).
4408
a994041d
PA
44092016-01-21 Pedro Alves <palves@redhat.com>
4410
4411 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4412 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4413 * configure: Regenerate.
4414
f7a6a40d
YQ
44152016-01-21 Yao Qi <yao.qi@linaro.org>
4416
4417 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4418 is_thumb and set it according to CPSR saved on the stack.
4419 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4420 arm_sigreturn_next_pc.
4421
6f69e520
YQ
44222016-01-18 Yao Qi <yao.qi@linaro.org>
4423
4424 * linux-low.c (linux_set_pc_64bit): New function.
4425 (linux_get_pc_64bit): New function.
4426 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4427 Declare.
4428 * linux-sparc-low.c (debug_threads): Remove declaration.
4429 (sparc_get_pc): Remove.
4430 (the_low_target): Use linux_get_pc_64bit instead of
4431 sparc_get_pc.
4432 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4433 (the_low_target): Use linux_get_pc_64bit and
4434 linux_set_pc_64bit.
4435
276d4552
YQ
44362016-01-18 Yao Qi <yao.qi@linaro.org>
4437
4438 * linux-arm-low.c (debug_threads): Remove declaration.
4439 (arm_get_pc, arm_set_pc): Remove.
4440 (the_low_target): Use linux_get_pc_32bit and
4441 linux_set_pc_32bit.
4442 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4443 (the_low_target): Use linux_get_pc_32bit and
4444 linux_set_pc_32bit.
4445 * linux-cris-low.c (debug_threads): Remove declaration.
4446 (cris_get_pc, cris_set_pc,): Remove.
4447 (the_low_target): Use linux_get_pc_32bit and
4448 linux_set_pc_32bit.
4449 * linux-crisv32-low.c (debug_threads): Remove declaration.
4450 (cris_get_pc, cris_set_pc): Remove.
4451 (the_low_target): Use linux_get_pc_32bit and
4452 linux_set_pc_32bit.
4453 * linux-low.c: Include inttypes.h.
4454 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4455 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4456 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4457 (the_low_target): Use linux_get_pc_32bit and
4458 linux_set_pc_32bit.
4459 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4460 (the_low_target): Use linux_get_pc_32bit and
4461 linux_set_pc_32bit.
4462 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4463 (the_low_target): Use linux_get_pc_32bit and
4464 linux_set_pc_32bit.
4465 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4466 (the_low_target): Use linux_get_pc_32bit and
4467 linux_set_pc_32bit.
4468 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4469 (the_low_target): Use linux_get_pc_32bit and
4470 linux_set_pc_32bit.
4471
eb0edac8
GB
44722016-01-18 Gary Benson <gbenson@redhat.com>
4473
4474 * configure.ac (AC_FUNC_FORK): New check.
4475 * config.in: Regenerate.
4476 * configure: Likewise.
4477
1b451dda
YQ
44782016-01-14 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4481 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4482 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4483 arm_get_next_pcs_ctor.
4484
82075af2
JS
44852016-01-12 Josh Stone <jistone@redhat.com>
4486 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4487
4488 * inferiors.h: Include "gdb_vecs.h".
4489 (struct process_info): Add syscalls_to_catch.
4490 * inferiors.c (remove_process): Free syscalls_to_catch.
4491 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4492 syscall_return stops.
4493 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4494 * server.c (handle_general_set): Handle QCatchSyscalls.
4495 (handle_query): Report support for QCatchSyscalls.
4496 * target.h (struct target_ops): Add supports_catch_syscall.
4497 (target_supports_catch_syscall): New macro.
4498 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4499 (struct lwp_info): Add syscall_state.
4500 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4501 Maintain syscall_state and syscalls_to_catch across exec.
4502 (get_syscall_trapinfo): New function, proxy to the_low_target.
4503 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4504 (linux_low_filter_event): Toggle syscall_state entry/return for
4505 syscall traps, and set it ignored for all others.
4506 (gdb_catching_syscalls_p): New function.
4507 (gdb_catch_this_syscall_p): New function.
4508 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4509 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4510 (linux_supports_catch_syscall): New function.
4511 (linux_target_ops): Install it.
4512 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4513 (the_low_target): Install it.
4514
8f13a3ce
MF
45152016-01-12 Mike Frysinger <vapier@gentoo.org>
4516
4517 * acinclude.m4: Include new ../warning.m4 file.
4518 * configure: Regenerated.
4519 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4520
5b3da067
MF
45212016-01-12 Mike Frysinger <vapier@gentoo.org>
4522
4523 * ax.c (is_goto_target): Mark static.
4524 * linux-low.c (register_addr): Likewise.
4525 (linux_fetch_registers, linux_store_registers): Likewise.
4526 * mem-break.c (any_persistent_commands): Fix old prototype.
4527 (add_commands_to_breakpoint): Mark static.
4528 * regcache.c (find_register_by_name): Delete unused func.
4529 * remote-utils.c (hex_or_minus_one): Mark static.
4530 * server.c (monitor_show_help): Mark static.
4531 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4532 handle_v_requests): Likewise.
4533
bc504a31
PA
45342016-01-12 Pedro Alves <palves@redhat.com>
4535
4536 Remove use of the registered trademark symbol throughout.
4537
5a0dd67a
YQ
45382016-01-08 Yao Qi <yao.qi@linaro.org>
4539
4540 * remote-utils.c (getpkt): If c is '\003', call target hook
4541 request_interrupt.
4542
b2ca446f
YQ
45432016-01-06 Yao Qi <yao.qi@linaro.org>
4544
4545 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4546 linux-aarch32-low.c.
4547 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4548 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4549 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4550 (thumb2_breakpoint): Declare.
4551 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4552 linux-aarch32-low.h.
4553 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4554 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4555 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4556
edd88788
JB
45572016-01-01 Joel Brobecker <brobecker@adacore.com>
4558
4559 * gdbreplay.c (gdbreplay_version): Change copyright year in
4560 version message.
4561 * server.c (gdbserver_version): Likewise.
4562
65da7f14
PP
45632015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4564
4565 * server.c (crc32_table): Delete.
4566 (crc32): Use libiberty's xcrc32 function.
4567
4abd5ed2
JB
45682015-12-22 Joel Brobecker <brobecker@adacore.com>
4569
4570 * lynx-low.c (lynx_delete_thread_callback): New function.
4571 (lynx_mourn): Properly delete our process and all of its
4572 threads. Remove call to clear_inferiors.
4573
0e50fe5c
JB
45742015-12-22 Joel Brobecker <brobecker@adacore.com>
4575
4576 * target.c (thread_search_callback): Add check that
4577 the thread_stopped target callback is not NULL before
4578 calling it.
4579
35adc03f
YQ
45802015-12-21 Yao Qi <yao.qi@linaro.org>
4581
4582 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4583 arm breakpoint.
4584
bd2b2909
AT
45852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4586
4587 * server.c (handle_query): Call target_supports_software_single_step.
4588
7fe5e27e
AT
45892015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4590
4591 * linux-low.c (single_step): New function.
4592 (linux_resume_one_lwp_throw): Call single_step.
4593 (start_step_over): Likewise.
4594
d9311bfa
AT
45952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4596
4597 * Makefile.in (SFILES): Append arch/arm-linux.c,
4598 arch/arm-get-next-pcs.c.
4599 (arm-linux.o): New rule.
4600 (arm-get-next-pcs.o): New rule.
4601 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4602 arm-linux.o.
4603 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4604 to linux-aarch32-low.c.
4605 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4606 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4607 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4608 (thumb2_breakpoint_len): Likewise.
4609 (arm_is_thumb_mode): Make non-static.
4610 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4611 from linux-aarch32-low.c.
4612 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4613 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4614 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4615 (thumb2_breakpoint_len): Likewise.
4616 (arm_is_thumb_mode): New declaration.
4617 * linux-arm-low.c: Include arch/arm-linux.h
4618 aarch/arm-get-next-pcs.h, sys/syscall.h.
4619 (get_next_pcs_ops): New struct.
4620 (get_next_pcs_addr_bits_remove): New function.
4621 (get_next_pcs_is_thumb): New function.
4622 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4623 (arm_sigreturn_next_pc): Likewise.
4624 (get_next_pcs_syscall_next_pc): Likewise.
4625 (arm_gdbserver_get_next_pcs): Likewise.
4626 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4627 Initialize.
4628 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4629 * server.h: Include gdb_vecs.h.
4630
68ce2059
AT
46312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4632
4633 * Makefile.in (SFILES): Append common/common-regcache.c.
4634 (OBS): Append common-regcache.o.
4635 (common-regcache.o): New rule.
4636 * regcache.c (init_register_cache): Initialize cache to
4637 REG_UNAVAILABLE.
4638 (regcache_raw_read_unsigned): New function.
4639 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4640 register_status enum.
4641
fa5308bd
AT
46422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4643
4644 * linux-aarch64-low.c (the_low_targets): Rename
4645 breakpoint_reinsert_addr to get_next_pcs.
4646 * linux-arm-low.c (the_low_targets): Likewise.
4647 * linux-bfin-low.c (the_low_targets): Likewise.
4648 * linux-cris-low.c (the_low_targets): Likewise.
4649 * linux-crisv32-low.c (the_low_targets): Likewise.
4650 * linux-low.c (can_software_single_step): Likewise.
4651 (install_software_single_step_breakpoints): New function.
4652 (start_step_over): Use install_software_single_step_breakpoints.
4653 * linux-low.h: New CORE_ADDR vector.
4654 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4655 get_next_pcs.
4656 * linux-mips-low.c (the_low_targets): Likewise.
4657 * linux-nios2-low.c (the_low_targets): Likewise.
4658 * linux-sparc-low.c (the_low_targets): Likewise.
4659
4a6ed09b
PA
46602015-12-17 Pedro Alves <palves@redhat.com>
4661
4662 * linux-low.c (linux_kill_one_lwp): Remove references to
4663 LinuxThreads.
4664 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4665 to 'kill'.
4666 (linux_init_signals): Delete.
4667 (initialize_low): Adjust.
4668 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4669
7544db95
PA
46702015-12-16 Pedro Alves <palves@redhat.com>
4671
4672 * configure.ac (compiler warning flags): When testing a
4673 -Wno-foo option, check whether -Wfoo works instead.
4674 * configure: Regenerate.
4675
8020350c
DB
46762015-12-11 Don Breazeal <donb@codesourcery.com>
4677
4678 * server.c (process_serial_event): Don't exit from gdbserver
4679 in remote mode if there are still active inferiors.
4680
db91f502
YQ
46812015-12-11 Yao Qi <yao.qi@linaro.org>
4682
4683 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4684 arm_breakpoint_at if the process is 32-bit.
4685
b37a6290
YQ
46862015-12-11 Yao Qi <yao.qi@linaro.org>
4687
4688 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4689 arm breakpoint.
4690
17b1509a
YQ
46912015-12-07 Yao Qi <yao.qi@linaro.org>
4692
4693 * configure.srv: Append arm.o to srv_tgtobj for
4694 aarch64*-*-linux* target.
4695 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4696 from linux-arm-low.c.
4697 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4698 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4699 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4700 (thumb2_breakpoint_len): Likewise.
4701 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4702 (arm_breakpoint_kinds): Likewise.
4703 (arm_breakpoint_kind_from_pc): Likewise.
4704 (arm_sw_breakpoint_from_kind): Likewise.
4705 (arm_breakpoint_kind_from_current_state): Likewise.
4706 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4707 (arm_sw_breakpoint_from_kind): Declare.
4708 (arm_breakpoint_kind_from_current_state): Declare.
4709 (arm_breakpoint_at): Declare.
4710 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4711 arm_sw_breakpoint_from_kind if process is 32-bit.
4712 (aarch64_breakpoint_kind_from_pc): New function.
4713 (aarch64_breakpoint_kind_from_current_state): New function.
4714 (the_low_target): Initialize fields breakpoint_kind_from_pc
4715 and breakpoint_kind_from_current_state.
4716 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4717 linux-aarch32-low.c.
4718 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4719 (arm_breakpoint, arm_breakpoint_len): Likewise.
4720 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4721 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4722 (arm_is_thumb_mode): Likewise.
4723 (arm_breakpoint_at): Likewise.
4724 (arm_breakpoint_kind_from_pc): Likewise.
4725 (arm_sw_breakpoint_from_kind): Likewise.
4726 (arm_breakpoint_kind_from_current_state): Likewise.
4727
4728 Revert:
4729 2015-08-04 Yao Qi <yao.qi@linaro.org>
4730
4731 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4732 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4733 * server.c (extended_protocol): Remove "static".
4734 * server.h (extended_protocol): Declare it.
4735
ece66d65
JS
47362015-12-04 Josh Stone <jistone@redhat.com>
4737
4738 * target.h (struct target_ops) <arch_setup>: Rename to ...
4739 (struct target_ops) <post_create_inferior>: ... this.
4740 (target_arch_setup): Rename to ...
4741 (target_post_create_inferior): ... this, calling post_create_inferior.
4742 * server.c (start_inferior): Update target_arch_setup calls to
4743 target_post_create_inferior.
4744 * linux-low.c (linux_low_ptrace_options): Forward declare.
4745 (linux_arch_setup): Update its comment for general use.
4746 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4747 (struct linux_target_ops): Use linux_post_create_inferior.
4748 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4749 to post_create_inferior.
4750 * nto-low.c (struct nto_target_ops): Likewise.
4751 * spu-low.c (struct spu_target_ops): Likewise.
4752 * win32-low.c (struct win32_target_ops): Likewise.
4753
e58c48b4
AT
47542015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4755
4756 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4757
fbec8956
AT
47582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4759
4760 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4761 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4762 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4763 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4764 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4765 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4766 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4767 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4768 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4769 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4770 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4771 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4772
9b4c5f87
AT
47732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4774
4775 * linux-low.c (linux_look_up_symbols): Don't call
4776 linux_supports_traceclone.
4777 * linux-low.h (thread_db_init): Remove use_events argument.
4778 * thread-db.c (thread_db_use_event): Remove global variable.
4779 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4780 (struct thread_db) <td_create_bp>: Remove field.
4781 (thread_db_create_event): Remove function.
4782 (thread_db_enable_reporting): Likewise.
4783 (find_one_thread): Don't check for thread_db_use_events.
4784 (attach_thread): Likewise.
4785 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4786 (try_thread_db_load_1): Don't check for thread_db_use_events.
4787 (thread_db_init): Remove use_events argument and thread events
4788 handling.
4789 (remove_thread_event_breakpoints): Remove function.
4790 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4791
7d00775e
AT
47922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4793
4794 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4795 New function.
4796 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4797 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4798 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4799 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4800 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4801 Initialize.
4802 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4803 New function.
4804 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4805 * linux-low.c (can_hardware_single_step): Use
4806 supports_hardware_single_step.
4807 (can_software_single_step): New function.
4808 (start_step_over): Call can_software_single_step.
4809 (linux_supports_hardware_single_step): New function.
4810 (struct target_ops) <supports_software_single_step>: Initialize.
4811 * linux-low.h (struct linux_target_ops)
4812 <supports_hardware_single_step>: Initialize.
4813 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4814 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4815 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4816 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4817 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4818 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4819 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4820 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4821 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4822 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4823 Initialize.
4824 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4825 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4826 Initialize.
4827 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4829 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4830 New function.
4831 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4832 * target.h (struct target_ops): <supports_software_single_step>:
4833 New field.
4834 (target_supports_software_single_step): New macro.
4835
2d97cd35
AT
48362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4837
4838 * linux-low.c (linux_wait_1): Fix pc advance condition.
4839 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4840 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4841
769ef81f
AT
48422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4843
4844 * linux-arm-low.c (arm_is_thumb_mode): New function.
4845 (arm_breakpoint_at): Use arm_is_thumb_mode.
4846 (arm_breakpoint_kind_from_current_state): New function.
4847 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4848 Initialize.
4849 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4850 (linux_breakpoint_kind_from_current_state): New function.
4851 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4852 * linux-low.h (struct linux_target_ops)
4853 <breakpoint_kind_from_current_state>: New field.
4854 * target.h (struct target_ops): Likewise.
4855 (target_breakpoint_kind_from_current_state): New macro.
4856
1bebeeca
PA
48572015-11-30 Pedro Alves <palves@redhat.com>
4858
4859 * linux-low.c (linux_resume): Wake up the event loop before
4860 returning.
4861
a67a9fae
PA
48622015-11-30 Pedro Alves <palves@redhat.com>
4863
4864 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4865 check.
4866 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4867 to -1.
4868 * target.c (struct thread_search): New structure.
4869 (thread_search_callback): New function.
4870 (prev_general_thread): New global.
4871 (prepare_to_access_memory, done_accessing_memory): New functions.
4872 * target.h (prepare_to_access_memory, done_accessing_memory):
4873 Replace macros with function declarations.
4874
f2faf941
PA
48752015-11-30 Pedro Alves <palves@redhat.com>
4876
4877 PR 14618
4878 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4879 report TARGET_WAITKIND_NO_RESUMED.
4880 * remote-utils.c (prepare_resume_reply): Handle
4881 TARGET_WAITKIND_NO_RESUMED.
4882 * server.c (report_no_resumed): New global.
4883 (handle_query) <qSupported>: Handle "no-resumed+". Report
4884 "no-resumed+" support.
4885 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4886 return error if the client doesn't support no-resumed events.
4887 (push_stop_notification): New function.
4888 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4889 events if the client supports them.
4890
a681f9c9
PA
48912015-11-30 Pedro Alves <palves@redhat.com>
4892
4893 * linux-low.c (thread_still_has_status_pending_p): Don't check
4894 vCont;t here.
4895 (lwp_resumed): New function.
4896 (status_pending_p_callback): Return early if the LWP is not
4897 supposed to be resumed.
4898
65706a29
PA
48992015-11-30 Pedro Alves <palves@redhat.com>
4900
4901 * linux-low.c (handle_extended_wait): Assert that the LWP's
4902 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4903 thread create events, leave the new child's status pending.
4904 (linux_low_filter_event): If GDB wants to hear about thread exit
4905 events, leave the LWP marked dead and don't delete it.
4906 (linux_wait_for_event_filtered): Don't check for thread exit.
4907 (filter_exit_event): New function.
4908 (linux_wait_1): Use it, when returning an exit event.
4909 (linux_resume_one_lwp_throw): Assert that the LWP's
4910 waitstatus is TARGET_WAITKIND_IGNORE.
4911 * remote-utils.c (prepare_resume_reply): Handle
4912 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4913 * server.c (report_thread_events): New global.
4914 (handle_general_set): Handle QThreadEvents.
4915 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4916 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4917 TARGET_WAITKIND_THREAD_EXITED.
4918 * server.h (report_thread_events): Declare.
4919
56cf4bed
PA
49202015-11-30 Pedro Alves <palves@redhat.com>
4921
4922 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4923 the thread's last_resume_kind was resume_stop.
4924
500c1d85
PA
49252015-11-30 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4928 before returning.
4929
de979965
PA
49302015-11-30 Pedro Alves <palves@redhat.com>
4931
4932 * server.c (handle_v_requests): Handle vCtrlC.
4933
34c65914
PA
49342015-11-30 Pedro Alves <palves@redhat.com>
4935
4936 * gdbthread.h (find_any_thread_of_pid): Declare.
4937 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4938 functions.
4939 * server.c (handle_query): If current_thread is NULL, look for
4940 another thread of the selected process.
4941
79efa585 49422015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4943 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4944
4945 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4946 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4947 name in reply.
4948 * target.h (struct target_ops) <thread_name>: New field.
4949 (target_thread_name): New macro.
4950
80d82c19
JB
49512015-11-23 Joel Brobecker <brobecker@adacore.com>
4952
4953 * regcache.h (regcache_invalidate_pid): Add declaration.
4954 * regcache.c (regcache_invalidate_pid): New function, extracted
4955 from regcache_invalidate.
4956 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4957 Add trivial documentation comment.
4958 * lynx-low.c: Use regcache_invalidate_pid instead of
4959 regcache_invalidate.
4960
64da5dd5
JB
49612015-11-23 Joel Brobecker <brobecker@adacore.com>
4962
4963 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4964 and Elf64_auxv_t if the target is Android.
4965
37ce4055
DE
49662015-11-22 Doug Evans <xdje42@gmail.com>
4967
4968 * target.h: #include <sys/types.h>.
4969
06e03fff
PA
49702015-11-19 Pedro Alves <palves@redhat.com>
4971
4972 * linux-low.c (linux_process_qsupported): Change prototype.
4973 Adjust.
4974 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4975 Change prototype.
4976 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4977 and adjust to loop over all features.
4978 * server.c (handle_query) <qSupported>: Adjust to call
4979 target_process_qsupported once, passing it a vector of unprocessed
4980 features.
4981 * target.h (struct target_ops) <process_qsupported>: Change
4982 prototype.
4983 (target_process_qsupported): Adjust.
4984
9a084706
PA
49852015-11-19 Pedro Alves <palves@redhat.com>
4986
4987 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4988 mode.
4989 * configure: Regenerate.
4990
dad44a1f
PA
49912015-11-19 Pedro Alves <palves@redhat.com>
4992
4993 * configure: Regenerate.
4994
231c0592
YQ
49952015-11-19 Yao Qi <yao.qi@linaro.org>
4996
4997 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4998 type to uint32_t.
4999
6c1c9a8b
YQ
50002015-11-19 Yao Qi <yao.qi@linaro.org>
5001
5002 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5003 (struct aarch64_operand): Move enum out.
5004
9caa3311
YQ
50052015-11-19 Yao Qi <yao.qi@linaro.org>
5006
5007 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5008 struct user_fpsimd_state *.
5009 (aarch64_store_fpregset): Likewise.
5010
6a69a054
YQ
50112015-11-19 Yao Qi <yao.qi@linaro.org>
5012
5013 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5014 struct user_pt_regs *.
5015 (aarch64_store_gregset): Likewise.
5016
1798301e
PA
50172015-11-18 Pedro Alves <palves@redhat.com>
5018
5019 * Makefile.in (all_object_files): Add $IPA_OBJS.
5020
ce7715e2
PA
50212015-11-17 Pedro Alves <palves@redhat.com>
5022
5023 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5024 GDB_SIGNAL_0 and gdb_signal_to_string.
5025
c0879059
PA
50262015-11-17 Pedro Alves <palves@redhat.com>
5027
5028 * win32-low.c (handle_output_debug_string): Remove parameter.
5029 (win32_kill): Remove our_status local and adjust call to
5030 handle_output_debug_string.
5031 (get_child_debug_event): Adjust call to
5032 handle_output_debug_string.
5033
1996e237
SM
50342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5035
5036 * linux-mips-low.c (mips_fill_gregset): Add cast.
5037 (mips_store_gregset): Likewise.
5038 (mips_fill_fpregset): Likewise.
5039 (mips_store_fpregset): Likewise.
5040
cbec665b
SM
50412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5042
5043 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5044 priv.
5045
eb3e3c67
SM
50462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5047
5048 * linux-mips-low.c (mips_linux_new_thread): Change type of
5049 watch_type to enum target_hw_bp_type.
5050
171de4b8
SM
50512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5052
5053 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5054 Change return type to arm_hwbp_type.
5055
04248ead
SM
50562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5057
5058 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5059 (arm_store_gregset): Likewise.
5060 * linux-arm-low.c (arm_get_hwcap): Likewise.
5061 (arm_read_description): Likewise.
5062
04b3479c
SM
50632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5064
5065 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5066
2bc84e8a
SM
50672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5068
5069 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5070 (ppc_fill_vsxregset): Likewise.
5071 (ppc_store_vsxregset): Likewise.
5072 (ppc_fill_vrregset): Likewise.
5073 (ppc_store_vrregset): Likewise.
5074 (ppc_fill_evrregset): Likewise.
5075 (ppc_store_evrregset): Likewise.
5076
e6c5bb05
SM
50772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5078
5079 * linux-ppc-low.c (ppc_usrregs_info): Remove
5080 forward-declaration.
5081 (ppc_arch_setup): Move lower in file.
5082
7ea45d72
SM
50832015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5084
5085 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5086 (ps_pdwrite): Likewise.
5087
69291610
HW
50882015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5089
5090 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5091 to after assert checks.
5092
b42945fd
SM
50932015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5094
5095 * proc-service.c (ps_pdread): Add/adjust casts.
5096 (ps_pdwrite): Add/adjust casts.
5097
d6f85c84
SM
50982015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5099
5100 * server.c (handle_search_memory_1): Cast return value of
5101 memmem.
5102
f98cd059
SM
51032015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5104
5105 * server.c (write_qxfer_response): Change type of data to
5106 gdb_byte *.
5107
d2412fa5
PA
51082015-10-29 Pedro Alves <palves@redhat.com>
5109
5110 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5111
c17414a2
PA
51122015-10-29 Pedro Alves <palves@redhat.com>
5113
5114 * tracepoint.c (clear_installed_tracepoints): Add casts.
5115
e053fbc4
PA
51162015-10-29 Pedro Alves <palves@redhat.com>
5117
5118 * server.c (handle_v_cont, process_serial_event): Add enum
5119 gdb_signal casts to signal parsing code.
5120
add67df8
PA
51212015-10-29 Pedro Alves <palves@redhat.com>
5122
5123 * linux-low.h (NULL_REGSET): Define.
5124 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5125 * linux-arm-low.c (arm_regsets): Likewise.
5126 * linux-crisv32-low.c (cris_regsets): Likewise.
5127 * linux-m68k-low.c (m68k_regsets): Likewise.
5128 * linux-mips-low.c (mips_regsets): Likewise.
5129 * linux-nios2-low.c (nios2_regsets): Likewise.
5130 * linux-ppc-low.c (ppc_regsets): Likewise.
5131 * linux-s390-low.c (s390_regsets): Likewise.
5132 * linux-sh-low.c (sh_regsets): Likewise.
5133 * linux-sparc-low.c (sparc_regsets): Likewise.
5134 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5135 * linux-tile-low.c (tile_regsets): Likewise.
5136 * linux-x86-low.c (x86_regsets): Likewise.
5137 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5138
50bc912a
PA
51392015-10-29 Pedro Alves <palves@redhat.com>
5140
5141 * linux-low.h (NULL_REGSET): Define.
5142 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5143 * linux-arm-low.c (arm_regsets): Likewise.
5144 * linux-crisv32-low.c (cris_regsets): Likewise.
5145 * linux-m68k-low.c (m68k_regsets): Likewise.
5146 * linux-mips-low.c (mips_regsets): Likewise.
5147 * linux-nios2-low.c (nios2_regsets): Likewise.
5148 * linux-ppc-low.c (ppc_regsets): Likewise.
5149 * linux-s390-low.c (s390_regsets): Likewise.
5150 * linux-sh-low.c (sh_regsets): Likewise.
5151 * linux-sparc-low.c (sparc_regsets): Likewise.
5152 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5153 * linux-tile-low.c (tile_regsets): Likewise.
5154 * linux-x86-low.c (x86_regsets): Likewise.
5155 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5156
682b2546
DE
51572015-10-26 Doug Evans <dje@google.com>
5158
5159 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5160
963843d4
DE
51612015-10-26 Doug Evans <dje@google.com>
5162
5163 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5164
d41401ac
DE
51652015-10-26 Doug Evans <dje@google.com>
5166
5167 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5168 for debug_printf.
5169 (attach_thread, find_new_threads_callback): Ditto.
5170
3db28855
AT
51712015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5172
5173 * mem-break.h (set_breakpoint_data): Remove.
5174
fb78e89c
AT
51752015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5176
5177 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5178 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5179 (initialize_low): Remove set_breakpoint_data call.
5180 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5181 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5182 (initialize_low): Remove set_breakpoint_data call.
5183 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5184 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5185 (initialize_low): Remove set_breakpoint_data call.
5186
2e6ee069
AT
51872015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5188
5189 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5190 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5191 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5192 * target.h (target_breakpoint_kind_from_pc): New macro.
5193
1652a986
AT
51942015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5195
5196 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5197 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5198 the default breakpoint kind.
5199
abeead09
AT
52002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5201
5202 * linux-arm-low.c (arm_supports_z_point_type): Add software
5203 breakpoint support.
5204
b0b4b501
AT
52052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5206
5207 * linux-arm-low.c: Refactor breakpoint definitions.
5208 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5209 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5210
8689682c
AT
52112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5212
5213 * Makefile.in: Add arm.c/o.
5214 * configure.srv: Likewise.
5215 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5216 (arm_breakpoint_kind_from_pc): New function.
5217 (arm_sw_breakpoint_from_kind): Return proper kind.
5218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5219
27165294
AT
52202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5221
5222 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5223 removal.
5224 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5225 (struct raw_breakpoint) <size>: Remove.
5226 (struct raw_breakpoint) <kind>: Add.
5227 (bp_size): New function.
5228 (bp_opcode): Likewise.
5229 (find_raw_breakpoint_at): Adjust for kind.
5230 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5231 (remove_memory_breakpoint): Adjust for kind call bp_size.
5232 (set_raw_breakpoint_at): Adjust for kind.
5233 (set_breakpoint): Likewise.
5234 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5235 (delete_raw_breakpoint): Adjust for kind.
5236 (delete_breakpoint): Likewise.
5237 (find_gdb_breakpoint): Likewise.
5238 (set_gdb_breakpoint_1): Likewise.
5239 (set_gdb_breakpoint): Likewise.
5240 (delete_gdb_breakpoint_1): Likewise.
5241 (delete_gdb_breakpoint): Likewise.
5242 (uninsert_raw_breakpoint): Likewise.
5243 (reinsert_raw_breakpoint): Likewise.
5244 (set_breakpoint_data): Remove.
5245 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5246 (check_mem_read): Adjust for kind call bp_size.
5247 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5248 (clone_one_breakpoint): Adjust for kind.
5249 * mem-break.h (set_gdb_breakpoint): Likewise.
5250 (delete_gdb_breakpoint): Likewise.
5251 * server.c (process_serial_event): Likewise.
5252
dd373349
AT
52532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5254
5255 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5256 (struct linux_target_ops) <breakpoint>: Remove.
5257 (struct linux_target_ops) <breakpoint_len>: Remove.
5258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5260 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5261 (arm_sw_breakpoint_from_kind): New function.
5262 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5263 (struct linux_target_ops) <breakpoint>: Remove.
5264 (struct linux_target_ops) <breakpoint_len>: Remove.
5265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5267 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5268 (struct linux_target_ops) <breakpoint>: Remove.
5269 (struct linux_target_ops) <breakpoint_len>: Remove.
5270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5272 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5273 (struct linux_target_ops) <breakpoint>: Remove.
5274 (struct linux_target_ops) <breakpoint_len>: Remove.
5275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5277 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5278 and sw_breakpoint_from_kind to increment the pc.
5279 (linux_breakpoint_kind_from_pc): New function.
5280 (linux_sw_breakpoint_from_kind): New function.
5281 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5282 (initialize_low): Call breakpoint_kind_from_pc and
5283 sw_breakpoint_from_kind to replace breakpoint_data/len.
5284 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5285 New field.
5286 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5287 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5288 (struct linux_target_ops) <breakpoint>: Remove.
5289 (struct linux_target_ops) <breakpoint_len>: Remove.
5290 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5291 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5292 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5293 (struct linux_target_ops) <breakpoint>: Remove.
5294 (struct linux_target_ops) <breakpoint_len>: Remove.
5295 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5297 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5298 (struct linux_target_ops) <breakpoint>: Remove.
5299 (struct linux_target_ops) <breakpoint_len>: Remove.
5300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5302 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5303 (struct linux_target_ops) <breakpoint>: Remove.
5304 (struct linux_target_ops) <breakpoint_len>: Remove.
5305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5307 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5308 (struct linux_target_ops) <breakpoint>: Remove.
5309 (struct linux_target_ops) <breakpoint_len>: Remove.
5310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5312 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5313 (struct linux_target_ops) <breakpoint>: Remove.
5314 (struct linux_target_ops) <breakpoint_len>: Remove.
5315 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5316 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5317 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5318 (struct linux_target_ops) <breakpoint>: Remove.
5319 (struct linux_target_ops) <breakpoint_len>: Remove.
5320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5321 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5322 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5323 (struct linux_target_ops) <breakpoint>: Remove.
5324 (struct linux_target_ops) <breakpoint_len>: Remove.
5325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5327 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5328 (struct linux_target_ops) <breakpoint>: Remove.
5329 (struct linux_target_ops) <breakpoint_len>: Remove.
5330 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5331 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5332 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5333 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5334 (struct linux_target_ops) <breakpoint>: Remove.
5335 (struct linux_target_ops) <breakpoint_len>: Remove.
5336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5338 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5339 (struct linux_target_ops) <breakpoint>: Remove.
5340 (struct linux_target_ops) <breakpoint_len>: Remove.
5341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5343
4cd98a19
AT
53442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5345
5346 * linux-cris-low.c (cris_get_pc): Remove void arg.
5347
774ee6d2
AR
53482015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5349
5350 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5351 variable name.
5352
833dcd29
AR
53532015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5354
5355 * inferiors.c (thread_pid_matches_callback): New function.
5356 (find_thread_process): New function.
5357 (remove_thread): Reset current_thread.
5358 (remove_process): Assert threads have been removed first.
5359
8d689ee5
YQ
53602015-10-15 Yao Qi <yao.qi@linaro.org>
5361
5362 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5363 if it is 3.
5364 (aarch64_remove_point): Likewise.
5365 * regcache.c (regcache_register_size): New function.
5366
1c2e1515
YQ
53672015-10-12 Yao Qi <yao.qi@linaro.org>
5368
5369 * linux-aarch64-low.c: Update all callers as emit_load_store
5370 is renamed to aarch64_emit_load_store.
5371
e1c587c3
YQ
53722015-10-12 Yao Qi <yao.qi@linaro.org>
5373
5374 * linux-aarch64-low.c: Update all callers of function renaming
5375 from emit_insn to aarch64_emit_insn.
5376
b6542f81
YQ
53772015-10-12 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5380 arch/aarch64-insn.h.
5381 (struct aarch64_memory_operand): Likewise.
5382 (ENCODE): Likewise.
5383 (emit_insn): Move to arch/aarch64-insn.c.
5384 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5385 (emit_load_store): Move to arch/aarch64-insn.c.
5386 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5387 (can_encode_int32): Remove.
5388
246994ce
YQ
53892015-10-12 Yao Qi <yao.qi@linaro.org>
5390
5391 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5392 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5393 (aarch64_relocate_instruction): Likewise.
5394 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5395 (struct aarch64_insn_visitor): Likewise.
5396
0badd99f
YQ
53972015-10-12 Yao Qi <yao.qi@linaro.org>
5398
5399 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5400 (struct aarch64_insn_visitor): New.
5401 (struct aarch64_insn_relocation_data): New.
5402 (aarch64_ftrace_insn_reloc_b): New function.
5403 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5404 (aarch64_ftrace_insn_reloc_cb): Likewise.
5405 (aarch64_ftrace_insn_reloc_tb): Likewise.
5406 (aarch64_ftrace_insn_reloc_adr): Likewise.
5407 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5408 (aarch64_ftrace_insn_reloc_others): Likewise.
5409 (visitor): New.
5410 (aarch64_relocate_instruction): Use visitor.
5411
dfaffe9d
YQ
54122015-10-12 Yao Qi <yao.qi@linaro.org>
5413
5414 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5415 int. Add argument buf.
5416 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5417 aarch64_relocate_instruction.
5418
70b439f0
YQ
54192015-10-12 Yao Qi <yao.qi@linaro.org>
5420
5421 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5422 argument insn. Remove local variable insn. Don't call
5423 target_read_uint32.
5424 (aarch64_install_fast_tracepoint_jump_pad): Call
5425 target_read_uint32.
5426
7781c06f
YQ
54272015-09-30 Yao Qi <yao.qi@linaro.org>
5428
5429 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5430 (emit_load_store_pair): Likewise.
5431
9a3c8263
SM
54322015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5433
5434 * dll.c (match_dll): Add cast(s).
5435 (unloaded_dll): Likewise.
5436 * linux-low.c (second_thread_of_pid_p): Likewise.
5437 (delete_lwp_callback): Likewise.
5438 (count_events_callback): Likewise.
5439 (select_event_lwp_callback): Likewise.
5440 (linux_set_resume_request): Likewise.
5441 * server.c (accumulate_file_name_length): Likewise.
5442 (emit_dll_description): Likewise.
5443 (handle_qxfer_threads_worker): Likewise.
5444 (visit_actioned_threads): Likewise.
5445 * thread-db.c (any_thread_of): Likewise.
5446 * tracepoint.c (same_process_p): Likewise.
5447 (match_blocktype): Likewise.
5448 (build_traceframe_info_xml): Likewise.
5449
224c3ddb
SM
54502015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5451
5452 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5453 assignment.
5454 (gdb_unparse_agent_expr): Likewise.
5455 * hostio.c (require_data): Likewise.
5456 (handle_pread): Likewise.
5457 * linux-low.c (disable_regset): Likewise.
5458 (fetch_register): Likewise.
5459 (store_register): Likewise.
5460 (get_dynamic): Likewise.
5461 (linux_qxfer_libraries_svr4): Likewise.
5462 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5463 (set_fast_tracepoint_jump): Likewise.
5464 (uninsert_fast_tracepoint_jumps_at): Likewise.
5465 (reinsert_fast_tracepoint_jumps_at): Likewise.
5466 (validate_inserted_breakpoint): Likewise.
5467 (clone_agent_expr): Likewise.
5468 * regcache.c (init_register_cache): Likewise.
5469 * remote-utils.c (putpkt_binary_1): Likewise.
5470 (decode_M_packet): Likewise.
5471 (decode_X_packet): Likewise.
5472 (look_up_one_symbol): Likewise.
5473 (relocate_instruction): Likewise.
5474 (monitor_output): Likewise.
5475 * server.c (handle_search_memory): Likewise.
5476 (handle_qxfer_exec_file): Likewise.
5477 (handle_qxfer_libraries): Likewise.
5478 (handle_qxfer): Likewise.
5479 (handle_query): Likewise.
5480 (handle_v_cont): Likewise.
5481 (handle_v_run): Likewise.
5482 (captured_main): Likewise.
5483 * target.c (write_inferior_memory): Likewise.
5484 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5485 * tracepoint.c (init_trace_buffer): Likewise.
5486 (add_tracepoint_action): Likewise.
5487 (add_traceframe): Likewise.
5488 (add_traceframe_block): Likewise.
5489 (cmd_qtdpsrc): Likewise.
5490 (cmd_qtdv): Likewise.
5491 (cmd_qtstatus): Likewise.
5492 (response_source): Likewise.
5493 (response_tsv): Likewise.
5494 (cmd_qtnotes): Likewise.
5495 (gdb_collect): Likewise.
5496 (initialize_tracepoint): Likewise.
5497
afbe19f8
PL
54982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5499
5500 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5501 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5502 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5503 <NOP>: New.
5504 (enum aarch64_condition_codes): New enum.
5505 (w0): New static global.
5506 (fp): Likewise.
5507 (lr): Likewise.
5508 (struct aarch64_memory_operand) <type>: New
5509 MEMORY_OPERAND_POSTINDEX type.
5510 (postindex_memory_operand): New helper function.
5511 (emit_ret): New function.
5512 (emit_load_store_pair): New function, factored out of emit_stp
5513 with support for MEMORY_OPERAND_POSTINDEX.
5514 (emit_stp): Rewrite using emit_load_store_pair.
5515 (emit_ldp): New function.
5516 (emit_load_store): Likewise.
5517 (emit_ldr): Mention post-index instruction in comment.
5518 (emit_ldrh): New function.
5519 (emit_ldrb): New function.
5520 (emit_ldrsw): Mention post-index instruction in comment.
5521 (emit_str): Likewise.
5522 (emit_subs): New function.
5523 (emit_cmp): Likewise.
5524 (emit_and): Likewise.
5525 (emit_orr): Likewise.
5526 (emit_orn): Likewise.
5527 (emit_eor): Likewise.
5528 (emit_mvn): Likewise.
5529 (emit_lslv): Likewise.
5530 (emit_lsrv): Likewise.
5531 (emit_asrv): Likewise.
5532 (emit_mul): Likewise.
5533 (emit_sbfm): Likewise.
5534 (emit_sbfx): Likewise.
5535 (emit_ubfm): Likewise.
5536 (emit_ubfx): Likewise.
5537 (emit_csinc): Likewise.
5538 (emit_cset): Likewise.
5539 (emit_nop): Likewise.
5540 (emit_ops_insns): New helper function.
5541 (emit_pop): Likewise.
5542 (emit_push): Likewise.
5543 (aarch64_emit_prologue): New function.
5544 (aarch64_emit_epilogue): Likewise.
5545 (aarch64_emit_add): Likewise.
5546 (aarch64_emit_sub): Likewise.
5547 (aarch64_emit_mul): Likewise.
5548 (aarch64_emit_lsh): Likewise.
5549 (aarch64_emit_rsh_signed): Likewise.
5550 (aarch64_emit_rsh_unsigned): Likewise.
5551 (aarch64_emit_ext): Likewise.
5552 (aarch64_emit_log_not): Likewise.
5553 (aarch64_emit_bit_and): Likewise.
5554 (aarch64_emit_bit_or): Likewise.
5555 (aarch64_emit_bit_xor): Likewise.
5556 (aarch64_emit_bit_not): Likewise.
5557 (aarch64_emit_equal): Likewise.
5558 (aarch64_emit_less_signed): Likewise.
5559 (aarch64_emit_less_unsigned): Likewise.
5560 (aarch64_emit_ref): Likewise.
5561 (aarch64_emit_if_goto): Likewise.
5562 (aarch64_emit_goto): Likewise.
5563 (aarch64_write_goto_address): Likewise.
5564 (aarch64_emit_const): Likewise.
5565 (aarch64_emit_call): Likewise.
5566 (aarch64_emit_reg): Likewise.
5567 (aarch64_emit_pop): Likewise.
5568 (aarch64_emit_stack_flush): Likewise.
5569 (aarch64_emit_zero_ext): Likewise.
5570 (aarch64_emit_swap): Likewise.
5571 (aarch64_emit_stack_adjust): Likewise.
5572 (aarch64_emit_int_call_1): Likewise.
5573 (aarch64_emit_void_call_2): Likewise.
5574 (aarch64_emit_eq_goto): Likewise.
5575 (aarch64_emit_ne_goto): Likewise.
5576 (aarch64_emit_lt_goto): Likewise.
5577 (aarch64_emit_le_goto): Likewise.
5578 (aarch64_emit_gt_goto): Likewise.
5579 (aarch64_emit_ge_got): Likewise.
5580 (aarch64_emit_ops_impl): New static global variable.
5581 (aarch64_emit_ops): New target function, return
5582 &aarch64_emit_ops_impl.
5583 (struct linux_target_ops): Install it.
5584
bb903df0
PL
55852015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5586
5587 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5588 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5589 aarch64-ipa.o.
5590 * linux-aarch64-ipa.c: New file.
5591 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5592 and endian.h.
5593 (aarch64_get_thread_area): New target method.
5594 (extract_signed_bitfield): New helper function.
5595 (aarch64_decode_ldr_literal): New function.
5596 (enum aarch64_opcodes): New enum.
5597 (struct aarch64_register): New struct.
5598 (struct aarch64_operand): New struct.
5599 (x0): New static global.
5600 (x1): Likewise.
5601 (x2): Likewise.
5602 (x3): Likewise.
5603 (x4): Likewise.
5604 (w2): Likewise.
5605 (ip0): Likewise.
5606 (sp): Likewise.
5607 (xzr): Likewise.
5608 (aarch64_register): New helper function.
5609 (register_operand): Likewise.
5610 (immediate_operand): Likewise.
5611 (struct aarch64_memory_operand): New struct.
5612 (offset_memory_operand): New helper function.
5613 (preindex_memory_operand): Likewise.
5614 (enum aarch64_system_control_registers): New enum.
5615 (ENCODE): New macro.
5616 (emit_insn): New helper function.
5617 (emit_b): New function.
5618 (emit_bcond): Likewise.
5619 (emit_cb): Likewise.
5620 (emit_tb): Likewise.
5621 (emit_blr): Likewise.
5622 (emit_stp): Likewise.
5623 (emit_ldp_q_offset): Likewise.
5624 (emit_stp_q_offset): Likewise.
5625 (emit_load_store): Likewise.
5626 (emit_ldr): Likewise.
5627 (emit_ldrsw): Likewise.
5628 (emit_str): Likewise.
5629 (emit_ldaxr): Likewise.
5630 (emit_stxr): Likewise.
5631 (emit_stlr): Likewise.
5632 (emit_data_processing_reg): Likewise.
5633 (emit_data_processing): Likewise.
5634 (emit_add): Likewise.
5635 (emit_sub): Likewise.
5636 (emit_mov): Likewise.
5637 (emit_movk): Likewise.
5638 (emit_mov_addr): Likewise.
5639 (emit_mrs): Likewise.
5640 (emit_msr): Likewise.
5641 (emit_sevl): Likewise.
5642 (emit_wfe): Likewise.
5643 (append_insns): Likewise.
5644 (can_encode_int32_in): New helper function.
5645 (aarch64_relocate_instruction): New function.
5646 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5647 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5648 (struct linux_target_ops): Install aarch64_get_thread_area,
5649 aarch64_install_fast_tracepoint_jump_pad and
5650 aarch64_get_min_fast_tracepoint_insn_len.
5651
787749ea
PL
56522015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5653
5654 * Makefile.in (aarch64-insn.o): New rule.
5655 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5656
9812b2e6
YQ
56572015-09-21 Yao Qi <yao.qi@linaro.org>
5658
5659 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5660
18fe412b
YQ
56612015-09-21 Yao Qi <yao.qi@linaro.org>
5662
5663 * tracepoint.c (max_jump_pad_size): Remove.
5664
a0cc84cd
YQ
56652015-09-18 Yao Qi <yao.qi@linaro.org>
5666
5667 * linux-aarch64-low.c: Don't include sys/uio.h.
5668 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5669
d78908cf
WW
56702015-09-16 Wei-cheng Wang <cole945@gmail.com>
5671
5672 * tracepoint.c (eval_result_type): Change prototype.
5673 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5674
d57e0d50
PA
56752015-09-15 Pedro Alves <palves@redhat.com>
5676
5677 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5678 Check whether to report exec events instead of checking whether
5679 multiprocess is enabled.
5680
5a676acc
PA
56812015-09-15 Pedro Alves <palves@redhat.com>
5682
5683 PR remote/18965
5684 * remote-utils.c (prepare_resume_reply): Merge
5685 TARGET_WAITKIND_VFORK_DONE switch case with the
5686 TARGET_WAITKIND_FORKED case.
5687
7c5d0fad
YQ
56882015-09-15 Yao Qi <yao.qi@linaro.org>
5689
5690 * server.c (handle_query): Check string comparison using
5691 "else if" instead of "if".
5692
750ce8d1
YQ
56932015-09-15 Yao Qi <yao.qi@linaro.org>
5694
5695 * server.c (vCont_supported): New global variable.
5696 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5697 matches. Append ";vContSupported+" to own_buf.
5698 (handle_v_requests): Append ";s;S" to own_buf if target supports
5699 hardware single step or vCont_supported is false.
5700 (capture_main): Set vCont_supported to zero.
5701
70b90b91
YQ
57022015-09-15 Yao Qi <yao.qi@linaro.org>
5703
5704 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5705 it to ...
5706 (linux_supports_hardware_single_step): ... New function.
5707 (linux_target_ops): Update.
5708 * lynx-low.c (lynx_target_ops): Set field
5709 supports_hardware_single_step to target_can_do_hardware_single_step.
5710 * nto-low.c (nto_target_ops): Likewise.
5711 * spu-low.c (spu_target_ops): Likewise.
5712 * win32-low.c (win32_target_ops): Likewise.
5713 * target.c (target_can_do_hardware_single_step): New function.
5714 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5715 Remove. <supports_hardware_single_step>: New field.
5716 (target_supports_conditional_breakpoints): Remove.
5717 (target_supports_hardware_single_step): New macro.
5718 (target_can_do_hardware_single_step): Declare.
5719 * server.c (handle_query): Use target_supports_hardware_single_step
5720 instead of target_supports_conditional_breakpoints.
5721
ade90bde
YQ
57222015-09-15 Yao Qi <yao.qi@linaro.org>
5723
5724 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5725 function.
5726 (struct linux_target_ops the_low_target): Install
5727 aarch64_linux_siginfo_fixup.
5728
94585166
DB
57292015-09-11 Don Breazeal <donb@codesourcery.com>
5730 Luis Machado <lgustavo@codesourcery.com>
5731
5732 * linux-low.c (linux_mourn): Static declaration.
5733 (linux_arch_setup): Move in front of
5734 handle_extended_wait.
5735 (linux_arch_setup_thread): New function.
5736 (handle_extended_wait): Handle exec events. Call
5737 linux_arch_setup_thread. Make event_lwp argument a
5738 pointer-to-a-pointer.
5739 (check_zombie_leaders): Do not check stopped threads.
5740 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5741 (linux_low_filter_event): Add lwp and thread for exec'ing
5742 non-leader thread if leader thread has been deleted.
5743 Refactor code into linux_arch_setup_thread and call it.
5744 Pass child lwp pointer by reference to handle_extended_wait.
5745 (linux_wait_for_event_filtered): Update comment.
5746 (linux_wait_1): Prevent clobbering exec event status.
5747 (linux_supports_exec_events): New function.
5748 (linux_target_ops) <supports_exec_events>: Initialize new member.
5749 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5750 new member.
5751 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5752 * server.c (report_exec_events): New global variable.
5753 (handle_query): Handle qSupported query for exec-events feature.
5754 (captured_main): Initialize report_exec_events.
5755 * server.h (report_exec_events): Declare new global variable.
5756 * target.h (struct target_ops) <supports_exec_events>: New
5757 member.
5758 (target_supports_exec_events): New macro.
5759 * win32-low.c (win32_target_ops) <supports_exec_events>:
5760 Initialize new member.
5761
0568462b
MM
57622015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5763
5764 * linux-low.c (linux_low_enable_btrace): Remove.
5765 (linux_target_ops): Replace linux_low_enable_btrace with
5766 linux_enable_btrace.
5767
39edd165
YQ
57682015-09-03 Yao Qi <yao.qi@linaro.org>
5769
5770 * linux-aarch64-low.c (aarch64_insert_point): Call
5771 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5772 returns true.
5773
1db33b5a
UW
57742015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5775
5776 * linux-low.c (check_stopped_by_breakpoint): Use
5777 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5778
ab290430
PA
57792015-08-27 Pedro Alves <palves@redhat.com>
5780
5781 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5782
8d749320
SM
57832015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5784
6711b7f8
SM
5785 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5786 the XNEW-family equivalent.
8d749320
SM
5787 (compile_bytecodes): Likewise.
5788 * dll.c (loaded_dll): Likewise.
5789 * event-loop.c (append_callback_event): Likewise.
5790 (create_file_handler): Likewise.
5791 (create_file_event): Likewise.
5792 * hostio.c (handle_open): Likewise.
5793 * inferiors.c (add_thread): Likewise.
5794 (add_process): Likewise.
5795 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5796 * linux-arm-low.c (arm_new_process): Likewise.
5797 (arm_new_thread): Likewise.
5798 * linux-low.c (add_to_pid_list): Likewise.
5799 (linux_add_process): Likewise.
5800 (handle_extended_wait): Likewise.
5801 (add_lwp): Likewise.
5802 (enqueue_one_deferred_signal): Likewise.
5803 (enqueue_pending_signal): Likewise.
5804 (linux_resume_one_lwp_throw): Likewise.
5805 (linux_resume_one_thread): Likewise.
5806 (linux_read_memory): Likewise.
5807 (linux_write_memory): Likewise.
5808 * linux-mips-low.c (mips_linux_new_process): Likewise.
5809 (mips_linux_new_thread): Likewise.
5810 (mips_add_watchpoint): Likewise.
5811 * linux-x86-low.c (initialize_low_arch): Likewise.
5812 * lynx-low.c (lynx_add_process): Likewise.
5813 * mem-break.c (set_raw_breakpoint_at): Likewise.
5814 (set_breakpoint): Likewise.
5815 (add_condition_to_breakpoint): Likewise.
5816 (add_commands_to_breakpoint): Likewise.
5817 (clone_agent_expr): Likewise.
5818 (clone_one_breakpoint): Likewise.
5819 * regcache.c (new_register_cache): Likewise.
5820 * remote-utils.c (look_up_one_symbol): Likewise.
5821 * server.c (queue_stop_reply): Likewise.
5822 (start_inferior): Likewise.
5823 (queue_stop_reply_callback): Likewise.
5824 (handle_target_event): Likewise.
5825 * spu-low.c (fetch_ppc_memory): Likewise.
5826 (store_ppc_memory): Likewise.
5827 * target.c (set_target_ops): Likewise.
5828 * thread-db.c (thread_db_load_search): Likewise.
5829 (try_thread_db_load_1): Likewise.
5830 * tracepoint.c (add_tracepoint): Likewise.
5831 (add_tracepoint_action): Likewise.
5832 (create_trace_state_variable): Likewise.
5833 (cmd_qtdpsrc): Likewise.
5834 (cmd_qtro): Likewise.
5835 (add_while_stepping_state): Likewise.
5836 * win32-low.c (child_add_thread): Likewise.
5837 (get_image_name): Likewise.
5838
ed8b7b42
YQ
58392015-08-25 Yao Qi <yao.qi@linaro.org>
5840
5841 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5842
db3cb7cb
YQ
58432015-08-25 Yao Qi <yao.qi@linaro.org>
5844
5845 * Makefile.in (aarch64-linux.o): New rule.
5846 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5847 srv_tgtobj.
5848 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5849 (aarch64_init_debug_reg_state): Make it extern.
5850 (aarch64_linux_prepare_to_resume): Remove.
5851
f6011a1c
YQ
58522015-08-25 Yao Qi <yao.qi@linaro.org>
5853
5854 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5855 lwp_arch_private_info and ptid_of_lwp.
5856
88e2cf7e
YQ
58572015-08-25 Yao Qi <yao.qi@linaro.org>
5858
5859 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5860 Find proc_info by find_process_pid. All callers updated.
5861
5e35436e
YQ
58622015-08-25 Yao Qi <yao.qi@linaro.org>
5863
5864 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5865 Remove.
5866 (debug_reg_change_callback): Remove.
5867 (aarch64_notify_debug_reg_change): Remove.
5868
4a8a7965
YQ
58692015-08-25 Yao Qi <yao.qi@linaro.org>
5870
5871 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5872 Call current_lwp_ptid.
5873
32a271ee
YQ
58742015-08-25 Yao Qi <yao.qi@linaro.org>
5875
5876 * linux-aarch64-low.c (debug_reg_change_callback): Use
5877 debug_printf.
5878
0d51c8d7
YQ
58792015-08-25 Yao Qi <yao.qi@linaro.org>
5880
5881 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5882
31a43dd5
YQ
58832015-08-25 Yao Qi <yao.qi@linaro.org>
5884
5885 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5886
8ee52567
YQ
58872015-08-25 Yao Qi <yao.qi@linaro.org>
5888
5889 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5890 the code.
5891
ff3f0f45
YQ
58922015-08-25 Yao Qi <yao.qi@linaro.org>
5893
5894 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5895 Remove.
5896 (debug_reg_change_callback): Remove argument entry and add argument
5897 lwp. Remove local variable thread. Don't print thread id in the
5898 debugging output. Don't check whether pid of thread equals to pid.
5899 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5900 iterate_over_lwps instead find_inferior.
5901
3d40fbb5
PA
59022015-08-24 Pedro Alves <palves@redhat.com>
5903
5904 * inferiors.c (get_first_process): New function.
5905 * inferiors.h (get_first_process): New declaration.
5906 * remote-utils.c (read_ptid): Default to the first process in the
5907 list, instead of to the current thread's process.
5908
438e1e42
PA
59092015-08-24 Pedro Alves <palves@redhat.com>
5910
5911 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5912 * event-loop.c: Likewise.
5913 * remote-utils.c: Likewise.
5914 * tracepoint.c: Likewise.
5915
a8c6d4fc
PA
59162015-08-24 Pedro Alves <palves@redhat.com>
5917
5918 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5919 ptid_get_lwp.
5920
99b0bb12
PA
59212015-08-21 Pedro Alves <palves@redhat.com>
5922
5923 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5924 instead of literal 1.
5925
f8904751
PA
59262015-08-21 Pedro Alves <palves@redhat.com>
5927
5928 * tdesc.c (default_description): Explicitly zero-initialize.
5929
465a859e
PA
59302015-08-21 Pedro Alves <palves@redhat.com>
5931
5932 PR gdb/18749
5933 * inferiors.c (remove_thread): Discard any pending stop reply for
5934 this thread.
5935 * server.c (remove_all_on_match_pid): Rename to ...
5936 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5937 instead of a pid.
5938 (discard_queued_stop_replies): Change parameter to a ptid. Now
5939 extern.
5940 (handle_v_kill, kill_inferior_callback, captured_main)
5941 (process_serial_event): Adjust.
5942 * server.h (discard_queued_stop_replies): Declare.
5943
f0db101d
PA
59442015-08-21 Pedro Alves <palves@redhat.com>
5945
5946 * linux-low.c (wait_for_sigstop): Always switch to no thread
5947 selected if the previously current thread dies.
5948 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5949 process instead of the current thread's.
5950 * remote-utils.c (input_interrupt): Don't check if there's no
5951 current thread.
5952 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5953 current thread to the general thread fails, error out.
5954 (handle_qxfer_auxv, handle_qxfer_libraries)
5955 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5956 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5957 (handle_query): Check if there's a thread selected instead of
5958 checking whether there's any thread in the thread list.
5959 (handle_qxfer_threads, handle_qxfer_btrace)
5960 (handle_qxfer_btrace_conf): Don't error out early if there's no
5961 thread in the thread list.
5962 (handle_v_cont, myresume): Don't set the current thread to the
5963 continue thread.
5964 (process_serial_event) <Hg handling>: Also set thread_id if the
5965 previous general thread is still alive.
5966 (process_serial_event) <g/G handling>: If setting the current
5967 thread to the general thread fails, error out.
5968 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5969 thread's lwp instead of the current thread's.
5970 * target.c (set_desired_thread): If the desired thread was not
5971 found, leave the current thread pointing to NULL. Return an int
5972 (boolean) indicating success.
5973 * target.h (set_desired_thread): Change return type to int.
5974
40045d91
MF
59752015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5976
5977 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5978 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5979 #includes.
5980 (ps_get_thread_area): New function.
5981
45face3b
GB
59822015-08-19 Gary Benson <gbenson@redhat.com>
5983
5984 * hostio.c (handle_pread): Do not attempt to read more data
5985 than hostio_reply_with_data can fit in a packet.
5986
16d5f642
JB
59872015-08-18 Joel Brobecker <brobecker@adacore.com>
5988
5989 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5990
a738da3a
MF
59912015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5992
5993 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5994
33ebda9d
PA
59952015-08-06 Pedro Alves <palves@redhat.com>
5996
5997 * tracepoint.c (expr_eval_result): Now an int.
5998
a44892be
PA
59992015-08-06 Pedro Alves <palves@redhat.com>
6000
6001 * gdbthread.h (struct regcache): Forward declare.
6002 (struct thread_info) <regcache_data>: Now a struct regcache
6003 pointer.
6004 * inferiors.c (inferior_regcache_data)
6005 (set_inferior_regcache_data): Now work with struct regcache
6006 pointers.
6007 * inferiors.h (struct regcache): Forward declare.
6008 (inferior_regcache_data, set_inferior_regcache_data): Now work
6009 with struct regcache pointers.
6010 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6011 (free_register_cache_thread): Remove struct regcache pointer
6012 casts.
6013
608a1e46
PA
60142015-08-06 Pedro Alves <palves@redhat.com>
6015
6016 * server.c (captured_main): On error, print the exception message
6017 to stderr, and if run_once is set, throw a quit.
6018
f0ce0d3a
PA
60192015-08-06 Pedro Alves <palves@redhat.com>
6020
6021 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6022 the current thread.
6023
bf47e248
PA
60242015-08-06 Pedro Alves <palves@redhat.com>
6025
6026 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6027 reading beyond the passed in buffer length.
6028
b6b9ffcc
PL
60292015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6030
6031 * tracepoint.c (symbol_list) <required>: Remove.
6032
863d01bd
PA
60332015-08-06 Pedro Alves <palves@redhat.com>
6034
6035 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6036 count if stopping and suspending threads.
6037 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6038 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6039 (linux_detach): Complete an ongoing step-over.
6040 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6041 throughout.
6042 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6043 (linux_wait_1): If passing a signal to the inferior after
6044 finishing a step-over, unsuspend and re-resume all lwps. If we
6045 see a single-step event but the thread should be continuing, don't
6046 pass the trap to gdb.
6047 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6048 internal_error instead of gdb_assert.
6049 (enqueue_pending_signal): New function.
6050 (check_ptrace_stopped_lwp_gone): Add debug output.
6051 (start_step_over): Use internal_error instead of gdb_assert.
6052 (complete_ongoing_step_over): New function.
6053 (linux_resume_one_thread): Don't resume a suspended thread.
6054 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6055 it stepping.
6056
00db26fa
PA
60572015-08-06 Pedro Alves <palves@redhat.com>
6058
6059 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6060 (linux_thread_alive): Use lwp_is_marked_dead.
6061 (extended_event_reported): Delete.
6062 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6063 instead of extended_event_reported.
6064 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6065 as well.
6066 (lwp_is_marked_dead): New function.
6067 (lwp_running): Use lwp_is_marked_dead.
6068 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6069 comment.
6070
ad071a30
PA
60712015-08-06 Pedro Alves <palves@redhat.com>
6072
6073 * linux-low.c (linux_wait_1): Move fork event output out of the
6074 !report_to_gdb check. Pass event_child->waitstatus to
6075 target_waitstatus_to_string instead of ourstatus.
6076
524b57e6
YQ
60772015-08-04 Yao Qi <yao.qi@linaro.org>
6078
6079 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6080 if current_thread is 32 bit.
6081
6085d6f6
YQ
60822015-08-04 Yao Qi <yao.qi@linaro.org>
6083
6084 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6085 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6086 * server.c (extended_protocol): Remove "static".
6087 * server.h (extended_protocol): Declare it.
6088
8a7e4587
YQ
60892015-08-04 Yao Qi <yao.qi@linaro.org>
6090
6091 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6092 both aarch64 and aarch32.
6093 (aarch64_set_pc): Likewise.
6094
3b53ae99
YQ
60952015-08-04 Yao Qi <yao.qi@linaro.org>
6096
6097 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6098 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6099 arm-with-neon.xml to srv_xmlfiles.
6100 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6101 (is_64bit_tdesc): New function.
6102 (aarch64_linux_read_description): New function.
6103 (aarch64_arch_setup): Call aarch64_linux_read_description.
6104 (regs_info): Rename to regs_info_aarch64.
6105 (aarch64_regs_info): Return right regs_info.
6106 (initialize_low_arch): Call initialize_low_arch_aarch32.
6107
bd9e6534
YQ
61082015-08-04 Yao Qi <yao.qi@linaro.org>
6109
6110 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6111 * linux-aarch32-low.c: New file.
6112 * linux-aarch32-low.h: New file.
6113 * linux-arm-low.c (arm_fill_gregset): Move it to
6114 linux-aarch32-low.c.
6115 (arm_store_gregset): Likewise.
6116 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6117 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6118 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6119 (regs_info): Rename to regs_info_arm.
6120 (arm_regs_info): Return regs_info_aarch32 if
6121 have_ptrace_getregset is 1 and target description is
6122 arm_with_neon or arm_with_vfpv3.
6123 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6124 Call initialize_low_arch_aarch32 instead.
6125
ded48a5e
YQ
61262015-08-04 Yao Qi <yao.qi@linaro.org>
6127
6128 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6129 * linux-low.c: ... here.
6130 * linux-low.h (have_ptrace_getregset): Declare it.
6131
96e9210f
PA
61322015-08-04 Pedro Alves <palves@redhat.com>
6133
6134 * thread-db.c (struct thread_db): Use new typedefs.
6135 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6136 CHK calls.
6137 (disable_thread_event_reporting): Cast result of dlsym to
6138 destination function pointer type.
6139 (thread_db_mourn): Use td_ta_delete_ftype.
6140
af60a1ef
SL
61412015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6142
6143 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6144 arch variant.
6145 (CDX_BREAKPOINT): Define for R2.
6146 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6147 (the_low_target): Add comments.
6148
e8b41681
YQ
61492015-07-30 Yao Qi <yao.qi@linaro.org>
6150
6151 * linux-arm-low.c (arm_hwcap): Remove it.
6152 (arm_read_description): New local variable arm_hwcap. Don't
6153 set arm_hwcap to zero.
6154
89abb039
YQ
61552015-07-30 Yao Qi <yao.qi@linaro.org>
6156
6157 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6158 Use regcache->tdesc instead.
6159 (arm_store_wmmxregset): Likewise.
6160 (arm_fill_vfpregset): Likewise.
6161 (arm_store_vfpregset): Likewise.
6162
deca266c
YQ
61632015-07-30 Yao Qi <yao.qi@linaro.org>
6164
6165 * linux-arm-low.c: Include arch/arm.h.
6166 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6167 (arm_store_gregset): Likewise.
6168
aa58a496
SM
61692015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6170
6171 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6172 ptrace's 4th parameter.
6173
50904b25
YQ
61742015-07-27 Yao Qi <yao.qi@linaro.org>
6175
6176 * configure.srv (case aarch64*-*-linux*): Don't set
6177 srv_linux_usrregs.
6178
5826e159
PA
61792015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6180
6181 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6182 sys/ptrace.h.
6183 * linux-arm-low.c: Likewise.
6184 * linux-cris-low.c: Likewise.
6185 * linux-crisv32-low.c: Likewise.
6186 * linux-low.c: Likewise.
6187 * linux-m68k-low.c: Likewise.
6188 * linux-mips-low.c: Likewise.
6189 * linux-nios2-low.c: Likewise.
6190 * linux-s390-low.c: Likewise.
6191 * linux-sparc-low.c: Likewise.
6192 * linux-tic6x-low.c: Likewise.
6193 * linux-tile-low.c: Likewise.
6194 * linux-x86-low.c: Likewise.
6195
54019719
PA
61962015-07-24 Pedro Alves <palves@redhat.com>
6197
6198 * config.in: Regenerate.
6199 * configure: Regenerate.
6200
eb7aa561
PA
62012015-07-24 Pedro Alves <palves@redhat.com>
6202
6203 * acinclude.m4: Include ../ptrace.m4.
6204 * configure.ac: Call GDB_AC_PTRACE.
6205 * config.in, configure: Regenerate.
6206
55d7b841
YQ
62072015-07-24 Yao Qi <yao.qi@linaro.org>
6208
6209 * linux-low.c (linux_create_inferior): Remove setting to
6210 proc->priv->new_inferior.
6211 (linux_attach): Likewise.
6212 (linux_low_filter_event): Likewise.
6213 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6214
c06cbd92
YQ
62152015-07-24 Yao Qi <yao.qi@linaro.org>
6216
6217 * linux-low.c (linux_arch_setup): New function.
6218 (linux_low_filter_event): If proc->tdesc is NULL and
6219 proc->attached is true, call the_low_target.arch_setup.
6220 Otherwise, keep status pending, and return.
6221 (linux_resume_one_lwp_throw): Don't call get_pc if
6222 thread->while_stepping isn't NULL. Don't call
6223 get_thread_regcache if proc->tdesc is NULL.
6224 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6225 (linux_target_ops): Install arch_setup.
6226 * server.c (start_inferior): Call the_target->arch_setup.
6227 * target.h (struct target_ops) <arch_setup>: New field.
6228 (target_arch_setup): New marco.
6229 * lynx-low.c (lynx_target_ops): Update.
6230 * nto-low.c (nto_target_ops): Update.
6231 * spu-low.c (spu_target_ops): Update.
6232 * win32-low.c (win32_target_ops): Update.
6233
5ae3ebba
YQ
62342015-07-24 Yao Qi <yao.qi@linaro.org>
6235
6236 * linux-low.c (linux_add_process): Don't set
6237 proc->priv->new_inferior.
6238 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6239 (linux_attach): Likewise.
6240
eb97750b
YQ
62412015-07-24 Yao Qi <yao.qi@linaro.org>
6242
6243 * server.c (start_inferior): Code refactor.
6244
51aee833
YQ
62452015-07-24 Yao Qi <yao.qi@linaro.org>
6246
6247 * server.c (process_serial_event): Set general_thread.
6248
af1b22f3
YQ
62492015-07-21 Yao Qi <yao.qi@linaro.org>
6250
6251 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6252 aarch64_linux_get_debug_reg_capacity.
6253
554717a3
YQ
62542015-07-17 Yao Qi <yao.qi@linaro.org>
6255
6256 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6257 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6258 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6259 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6260 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6261 (AARCH64_HWP_ALIGNMENT): Likewise.
6262 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6263 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6264 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6265 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6266 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6267 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6268 (struct aarch64_debug_reg_state): Likewise.
6269 (struct arch_lwp_info): Likewise.
6270 (aarch64_align_watchpoint): Likewise.
6271 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6272 (aarch64_watchpoint_length): Likewise.
6273 (aarch64_point_encode_ctrl_reg): Likewise
6274 (aarch64_point_is_aligned): Likewise.
6275 (aarch64_align_watchpoint): Likewise.
6276 (aarch64_linux_set_debug_regs):
6277 (aarch64_dr_state_insert_one_point): Likewise.
6278 (aarch64_dr_state_remove_one_point): Likewise.
6279 (aarch64_handle_breakpoint): Likewise.
6280 (aarch64_handle_aligned_watchpoint): Likewise.
6281 (aarch64_handle_unaligned_watchpoint): Likewise.
6282 (aarch64_handle_watchpoint): Likewise.
6283
c67ca4de
YQ
62842015-07-17 Yao Qi <yao.qi@linaro.org>
6285
6286 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6287 and don't aarch64_get_debug_reg_state. All callers update.
6288 (aarch64_handle_aligned_watchpoint): Likewise.
6289 (aarch64_handle_unaligned_watchpoint): Likewise.
6290 (aarch64_handle_watchpoint): Likewise.
6291 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6292 (aarch64_remove_point): Likewise.
6293
25abf979
YQ
62942015-07-17 Yao Qi <yao.qi@linaro.org>
6295
6296 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6297 debug_printf.
6298 (aarch64_handle_unaligned_watchpoint): Likewise.
6299
db1ff28b
JK
63002015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6301
6302 Revert the previous 3 commits:
6303 Move gdb_regex* to common/
6304 Move linux_find_memory_regions_full & co.
6305 gdbserver build-id attribute generator
6306
700ca40f
JK
63072015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6308 Jan Kratochvil <jan.kratochvil@redhat.com>
6309
6310 gdbserver build-id attribute generator.
6311 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6312 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6313 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6314 (find_phdr): New.
6315 (get_dynamic): Use find_pdhr to traverse program headers.
6316 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6317 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6318 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6319 (get_hex_build_id): New.
6320 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6321 to reply XML document.
6322
9904185c
JK
63232015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6324 Jan Kratochvil <jan.kratochvil@redhat.com>
6325
6326 * target.c: Include target/target-utils.h and fcntl.h.
6327 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6328 (target_fileio_read_stralloc): New functions.
6329
6e5b4429
JK
63302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6331
6332 * Makefile.in (OBS): Add gdb_regex.o.
6333 (gdb_regex.o): New.
6334 * config.in: Rebuilt.
6335 * configure: Rebuilt.
6336
ddc98fbf
JK
63372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6338 Jan Kratochvil <jan.kratochvil@redhat.com>
6339
6340 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6341 * Makefile.in (OBS): Add target-utils.o.
6342 (linux-maps.o, target-utils.o): New.
6343 * configure.srv (srv_linux_obj): Add linux-maps.o.
6344
e57bb7a0
PL
63452015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6346
6347 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6348 function, return 1.
6349 (the_low_target): Install it.
6350
586b02a9
PA
63512015-07-14 Pedro Alves <palves@redhat.com>
6352
6353 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6354 Instead, ignore ECHILD, and throw an error for other errnos.
6355
58c1b36c
PA
63562015-07-10 Pedro Alves <palves@redhat.com>
6357
6358 * event-loop.c (struct callback_event) <data>: Change type to
6359 gdb_client_data instance instead of gdb_client_data pointer.
6360 (append_callback_event): Adjust.
6361
421530db
PL
63622015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6363
6364 * linux-aarch64-low.c: Add comments for each linux_target_ops
6365 method. Remove comments already covered in target_ops and
6366 linux_target_ops definitions.
6367 (the_low_target): Add comments for each unimplemented method.
6368
c2d65f38
YQ
63692015-07-09 Yao Qi <yao.qi@linaro.org>
6370
6371 * linux-aarch64-low.c (aarch64_regmap): Remove.
6372 (aarch64_usrregs_info): Remove.
6373 (regs_info): Set field usrregs to NULL.
6374
b20a6524
MM
63752015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6376
6377 * linux-low.c: Include "rsp-low.h"
6378 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6379 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6380 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6381 (handle_btrace_enable_pt): New.
6382 (handle_btrace_general_set): Support "pt".
6383 (handle_btrace_conf_general_set): Support "pt:size".
6384
96c97461
PL
63852015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6386
6387 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6388 Z_PACKET_SW_BP.
6389
37d66942
PL
63902015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6391
6392 * linux-aarch64-low.c: Remove comment about endianness.
6393 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6394 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6395 memcmp.
6396
dc06243f
GB
63972015-06-24 Gary Benson <gbenson@redhat.com>
6398
6399 * linux-i386-ipa.c (stdint.h): Do not include.
6400 * lynx-i386-low.c (stdint.h): Likewise.
6401 * lynx-ppc-low.c (stdint.h): Likewise.
6402 * mem-break.c (stdint.h): Likewise.
6403 * thread-db.c (stdint.h): Likewise.
6404 * tracepoint.c (stdint.h): Likewise.
6405 * win32-low.c (stdint.h): Likewise.
6406
124e13d9
SM
64072015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6408
6409 * server.c (write_qxfer_response): Update call to
6410 remote_escape_output.
6411
909c2cda
JK
64122015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6413 Jan Kratochvil <jan.kratochvil@redhat.com>
6414
6415 Merge multiple hex conversions.
6416 * gdbreplay.c (tohex): Rename to 'fromhex'.
6417 (logchar): Use fromhex.
6418
24c05f46
JK
64192015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6420
6421 * server.c (handle_qxfer_libraries): Set `version' attribute for
6422 <library-list>.
6423
14d2069a
GB
64242015-06-10 Gary Benson <gbenson@redhat.com>
6425
6426 * target.h (struct target_ops) <multifs_open>: New field.
6427 <multifs_unlink>: Likewise.
6428 <multifs_readlink>: Likewise.
6429 * linux-low.c (nat/linux-namespaces.h): New include.
6430 (linux_target_ops): Initialize the_target->multifs_open,
6431 the_target->multifs_unlink and the_target->multifs_readlink.
6432 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6433 * hostio.c (hostio_fs_pid): New static variable.
6434 (hostio_handle_new_gdb_connection): New function.
6435 (handle_setfs): Likewise.
6436 (handle_open): Use the_target->multifs_open as appropriate.
6437 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6438 (handle_readlink): Use the_target->multifs_readlink as
6439 appropriate.
6440 (handle_vFile): Handle vFile:setfs packets.
6441 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6442 after target_handle_new_gdb_connection.
6443
4b8b5e72
GB
64442015-06-10 Gary Benson <gbenson@redhat.com>
6445
6446 * configure.ac (AC_CHECK_FUNCS): Add setns.
6447 * config.in: Regenerate.
6448 * configure: Likewise.
6449 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6450 (linux-namespaces.o): New rule.
6451 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6452
3ac2e371
GB
64532015-06-09 Gary Benson <gbenson@redhat.com>
6454
6455 * hostio.c (handle_open): Process mode argument with
6456 fileio_to_host_mode.
6457
ca9b78ce
YQ
64582015-06-01 Yao Qi <yao.qi@linaro.org>
6459
6460 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6461 * linux-x86-low.c: Likewise.
6462
bfacd19d
DB
64632015-05-28 Don Breazeal <donb@codesourcery.com>
6464
6465 * linux-low.c (handle_extended_wait): Initialize
6466 thread_info.last_resume_kind for new fork children.
6467
452003ef
PA
64682015-05-15 Pedro Alves <palves@redhat.com>
6469
6470 * target.h (target_handle_new_gdb_connection): Rewrite using if
6471 wrapped in do/while.
6472
1041a03c
JB
64732015-05-14 Joel Brobecker <brobecker@adacore.com>
6474
6475 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6476 * configure, config.in: Regenerate.
6477 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6478 Declare typedef.
6479
c269dbdb
DB
64802015-05-12 Don Breazeal <donb@codesourcery.com>
6481
6482 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6483 PTRACE_EVENT_VFORK_DONE.
6484 (linux_low_ptrace_options, extended_event_reported): Add vfork
6485 events.
6486 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6487 and "vforkdone" for RSP 'T' Stop Reply Packet.
6488 * server.h (report_vfork_events): Declare
6489 global variable.
6490
3a8a0396
DB
64912015-05-12 Don Breazeal <donb@codesourcery.com>
6492
6493 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6494 (the_low_target) <new_fork>: Initialize new member.
6495 * linux-arm-low.c (arm_new_fork): New function.
6496 (the_low_target) <new_fork>: Initialize new member.
6497 * linux-low.c (handle_extended_wait): Call new target function
6498 new_fork.
6499 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6500 * linux-mips-low.c (mips_add_watchpoint): New function
6501 extracted from mips_insert_point.
6502 (the_low_target) <new_fork>: Initialize new member.
6503 (mips_linux_new_fork): New function.
6504 (mips_insert_point): Call mips_add_watchpoint.
6505 * linux-x86-low.c (x86_linux_new_fork): New function.
6506 (the_low_target) <new_fork>: Initialize new member.
6507
de0d863e
DB
65082015-05-12 Don Breazeal <donb@codesourcery.com>
6509
6510 * linux-low.c (handle_extended_wait): Implement return value,
6511 rename argument 'event_child' to 'event_lwp', handle
6512 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6513 (linux_low_ptrace_options): New function.
6514 (linux_low_filter_event): Call linux_low_ptrace_options,
6515 use different argument fo linux_enable_event_reporting,
6516 use return value from handle_extended_wait.
6517 (extended_event_reported): New function.
6518 (linux_wait_1): Call extended_event_reported and set
6519 status to report fork events.
6520 (linux_write_memory): Add pid to debug message.
6521 (reset_lwp_ptrace_options_callback): New function.
6522 (linux_handle_new_gdb_connection): New function.
6523 (linux_target_ops): Initialize new structure member.
6524 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6525 * lynx-low.c: Initialize new structure member.
6526 * remote-utils.c (prepare_resume_reply): Implement stop reason
6527 "fork" for "T" stop message.
6528 * server.c (handle_query): Call handle_new_gdb_connection.
6529 * server.h (report_fork_events): Declare global flag.
6530 * target.h (struct target_ops) <handle_new_gdb_connection>:
6531 New member.
6532 (target_handle_new_gdb_connection): New macro.
6533 * win32-low.c: Initialize new structure member.
6534
ddcbc397
DB
65352015-05-12 Don Breazeal <donb@codesourcery.com>
6536
6537 * mem-break.c (APPEND_TO_LIST): Define macro.
6538 (clone_agent_expr): New function.
6539 (clone_one_breakpoint): New function.
6540 (clone_all_breakpoints): New function.
6541 * mem-break.h: Declare new functions.
6542
89245bc0
DB
65432015-05-12 Don Breazeal <donb@codesourcery.com>
6544
6545 * linux-low.c (linux_supports_fork_events): New function.
6546 (linux_supports_vfork_events): New function.
6547 (linux_target_ops): Initialize new structure members.
6548 (initialize_low): Call linux_check_ptrace_features.
6549 * lynx-low.c (lynx_target_ops): Initialize new structure
6550 members.
6551 * server.c (report_fork_events, report_vfork_events):
6552 New global flags.
6553 (handle_query): Add new features to qSupported packet and
6554 response.
6555 (captured_main): Initialize new global variables.
6556 * target.h (struct target_ops) <supports_fork_events>:
6557 New member.
6558 <supports_vfork_events>: New member.
6559 (target_supports_fork_events): New macro.
6560 (target_supports_vfork_events): New macro.
6561 * win32-low.c (win32_target_ops): Initialize new structure
6562 members.
6563
835205d0
GB
65642015-05-12 Gary Benson <gbenson@redhat.com>
6565
6566 * server.c (handle_qxfer_exec_file): Use current process
6567 if annex is empty.
6568
21e94bd9
SL
65692015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6570
6571 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6572 Remove HAVE_PTRACE_GETREGS conditionals.
6573 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6574 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6575
45614f15
YQ
65762015-05-08 Yao Qi <yao.qi@linaro.org>
6577
6578 * linux-low.c (linux_supports_conditional_breakpoints): New
6579 function.
6580 (linux_target_ops): Install new target method.
6581 * lynx-low.c (lynx_target_ops): Install NULL hook for
6582 supports_conditional_breakpoints.
6583 * nto-low.c (nto_target_ops): Likewise.
6584 * spu-low.c (spu_target_ops): Likewise.
6585 * win32-low.c (win32_target_ops): Likewise.
6586 * server.c (handle_query): Check
6587 target_supports_conditional_breakpoints.
6588 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6589 New field.
6590 (target_supports_conditional_breakpoints): New macro.
6591
80ad801e
PA
65922015-05-06 Pedro Alves <palves@redhat.com>
6593
6594 PR server/18081
6595 * server.c (start_inferior): If the process exits, mourn it.
6596
819843c7
GB
65972015-04-21 Gary Benson <gbenson@redhat.com>
6598
6599 * hostio.c (fileio_open_flags_to_host): Factored out to
6600 fileio_to_host_openflags in common/fileio.c. Single use
6601 updated.
6602
a2d5a9d7
MF
66032015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6604
6605 * linux-xtensa-low.c (xtensa_fill_gregset)
6606 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6607 XCHAL_HAVE_LOOP.
6608
deb44829
MF
66092015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6610
6611 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6612 (regs_info): Replace usrregs pointer with NULL.
6613
e57f1de3
GB
66142015-04-17 Gary Benson <gbenson@redhat.com>
6615
6616 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6617 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6618 * server.c (handle_qxfer_exec_file): New function.
6619 (qxfer_packets): Add exec-file entry.
6620 (handle_query): Report qXfer:exec-file:read as supported packet.
6621
62828379
RN
66222015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6623
6624 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6625
b88bb450
GB
66262015-04-09 Gary Benson <gbenson@redhat.com>
6627
6628 * hostio-errno.c (errno_to_fileio_error): Remove function.
6629 Update caller to use remote_fileio_to_fio_error.
6630
c8f4bfdd
YQ
66312015-04-09 Yao Qi <yao.qi@linaro.org>
6632
6633 * linux-low.c (linux_insert_point): Call
6634 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6635 (linux_remove_point): Call remove_memory_breakpoint if type is
6636 raw_bkpt_type_sw.
6637 * linux-x86-low.c (x86_insert_point): Don't call
6638 insert_memory_breakpoint.
6639 (x86_remove_point): Don't call remove_memory_breakpoint.
6640
41f98f02
PA
66412015-04-01 Pedro Alves <palves@redhat.com>
6642 Cleber Rosa <crosa@redhat.com>
6643
6644 * server.c (gdbserver_usage): Reorganize and extend the usage
6645 message.
6646
2bf6fb9d
PA
66472015-03-24 Pedro Alves <palves@redhat.com>
6648
6649 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6650 output. Also dump TRAP_TRACE.
6651 (linux_low_filter_event): In debug output, distinguish a
6652 resume_stop SIGSTOP from a delayed SIGSTOP.
6653
369f6daa
GB
66542015-03-24 Gary Benson <gbenson@redhat.com>
6655
6656 * linux-x86-low.c (x86_linux_new_thread): Moved to
6657 nat/x86-linux.c.
6658 (x86_linux_prepare_to_resume): Likewise.
6659
8e5d4070
GB
66602015-03-24 Gary Benson <gbenson@redhat.com>
6661
6662 * Makefile.in (x86-linux-dregs.o): New rule.
6663 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6664 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6665 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6666 (x86_linux_dr_get): Likewise.
6667 (x86_linux_dr_set): Likewise.
6668 (update_debug_registers_callback): Likewise.
6669 (x86_linux_dr_set_addr): Likewise.
6670 (x86_linux_dr_get_addr): Likewise.
6671 (x86_linux_dr_set_control): Likewise.
6672 (x86_linux_dr_get_control): Likewise.
6673 (x86_linux_dr_get_status): Likewise.
6674 (x86_linux_update_debug_registers): Likewise.
6675
2b95d440
GB
66762015-03-24 Gary Benson <gbenson@redhat.com>
6677
6678 * linux-x86-low.c (x86_linux_update_debug_registers):
6679 New function, factored out from...
6680 (x86_linux_prepare_to_resume): ...this.
6681
14b0bc68
GB
66822015-03-24 Gary Benson <gbenson@redhat.com>
6683
6684 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6685 (x86_linux_dr_set): Likewise.
6686 (update_debug_registers_callback): Likewise.
6687 (x86_linux_dr_set_addr): Likewise.
6688 (x86_linux_dr_get_addr): Likewise.
6689 (x86_linux_dr_set_control): Likewise.
6690 (x86_linux_dr_get_control): Likewise.
6691 (x86_linux_dr_get_status): Likewise.
6692 (x86_linux_prepare_to_resume): Likewise.
6693
5dfe6ca8
GB
66942015-03-24 Gary Benson <gbenson@redhat.com>
6695
6696 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6697 Use perror_with_name. Pass string through gettext.
6698 (x86_linux_dr_set): Likewise.
6699
d33472ad
GB
67002015-03-24 Gary Benson <gbenson@redhat.com>
6701
6702 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6703 (x86_linux_dr_set_addr): ...this.
6704 (x86_dr_low_get_addr): Rename to...
6705 (x86_linux_dr_get_addr): ...this.
6706 (x86_dr_low_set_control): Rename to...
6707 (x86_linux_dr_set_control): ...this.
6708 (x86_dr_low_get_control): Rename to...
6709 (x86_linux_dr_get_control): ...this.
6710 (x86_dr_low_get_status): Rename to...
6711 (x86_linux_dr_get_status): ...this.
6712 (x86_dr_low): Update with new function names.
6713
4b134ca1
GB
67142015-03-24 Gary Benson <gbenson@redhat.com>
6715
6716 * Makefile.in (x86-linux.o): New rule.
6717 * configure.srv: Add x86-linux.o to relevant targets.
6718 * linux-low.c (lwp_set_arch_private_info): New function.
6719 (lwp_arch_private_info): Likewise.
6720 * linux-x86-low.c: Include nat/x86-linux.h.
6721 (arch_lwp_info): Removed structure.
6722 (update_debug_registers_callback):
6723 Use lwp_set_debug_registers_changed.
6724 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6725 and lwp_set_debug_registers_changed.
6726 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6727
34c703da
GB
67282015-03-24 Gary Benson <gbenson@redhat.com>
6729
6730 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6731 * linux-arm-low.c (arm_new_thread): Likewise.
6732 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6733 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6734 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6735 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6736
cff068da
GB
67372015-03-24 Gary Benson <gbenson@redhat.com>
6738
6739 * linux-low.c (ptid_of_lwp): New function.
6740 (lwp_is_stopped): Likewise.
6741 (lwp_stop_reason): Likewise.
6742 * linux-x86-low.c (update_debug_registers_callback):
6743 Use lwp_is_stopped.
6744 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6745 lwp_stop_reason.
6746
b2f7c7e8
GB
67472015-03-24 Gary Benson <gbenson@redhat.com>
6748
6749 * linux-low.h (linux_stop_lwp): Remove declaration.
6750
6d4ee8c6
GB
67512015-03-24 Gary Benson <gbenson@redhat.com>
6752
6753 * linux-low.h: Include nat/linux-nat.h.
6754 * linux-low.c (iterate_over_lwps_args): New structure.
6755 (iterate_over_lwps_filter): New function.
6756 (iterate_over_lwps): Likewise.
6757 * linux-x86-low.c (update_debug_registers_callback):
6758 Update signature to what iterate_over_lwps expects.
6759 Remove PID check that iterate_over_lwps now performs.
6760 (x86_dr_low_set_addr): Use iterate_over_lwps.
6761 (x86_dr_low_set_control): Likewise.
6762
70a0bb6b
GB
67632015-03-24 Gary Benson <gbenson@redhat.com>
6764
6765 * linux-x86-low.c (x86_debug_reg_state): New function.
6766 (x86_linux_prepare_to_resume): Use the above.
6767
7b669087
GB
67682015-03-24 Gary Benson <gbenson@redhat.com>
6769
6770 * linux-low.c (current_lwp_ptid): New function.
6771 * linux-x86-low.c: Include nat/linux-nat.h.
6772 (x86_dr_low_get_addr): Use current_lwp_ptid.
6773 (x86_dr_low_get_control): Likewise.
6774 (x86_dr_low_get_status): Likewise.
6775
eef49a3d
PA
67762015-03-20 Pedro Alves <palves@redhat.com>
6777
6778 * tracepoint.c (cmd_qtstatus): Make "str" const.
6779
b2333d22
PA
67802015-03-20 Pedro Alves <palves@redhat.com>
6781
6782 * server.c (handle_general_set): Make "req_str" const.
6783
23f238d3
PA
67842015-03-19 Pedro Alves <palves@redhat.com>
6785
6786 * linux-low.c (linux_resume_one_lwp): Rename to ...
6787 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6788 instead call perror_with_name.
6789 (check_ptrace_stopped_lwp_gone): New function.
6790 (linux_resume_one_lwp): Reimplement as wrapper around
6791 linux_resume_one_lwp_throw that swallows errors if the LWP is
6792 gone.
6793
91baf43f
PA
67942015-03-19 Pedro Alves <palves@redhat.com>
6795
6796 * linux-low.c (count_events_callback, select_event_lwp_callback):
6797 No longer check whether the thread has resume_stop as last resume
6798 kind.
6799
8bf3b159
PA
68002015-03-19 Pedro Alves <palves@redhat.com>
6801
6802 * linux-low.c (count_events_callback, select_event_lwp_callback):
6803 Use the lwp's status_pending_p field, not the thread's.
6804
b90fc188
PA
68052015-03-19 Pedro Alves <palves@redhat.com>
6806
6807 * linux-low.c (select_event_lwp_callback): Update comments to
6808 no longer mention SIGTRAP.
6809
464b0089
GB
68102015-03-18 Gary Benson <gbenson@redhat.com>
6811
6812 * server.c (handle_query): Do not report vFile:fstat as supported.
6813
aa9e327f
GB
68142015-03-11 Gary Benson <gbenson@redhat.com>
6815
6816 * hostio.c (sys/types.h): New include.
6817 (sys/stat.h): Likewise.
6818 (common-remote-fileio.h): Likewise.
6819 (handle_fstat): New function.
6820 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6821
791c0056
GB
68222015-03-11 Gary Benson <gbenson@redhat.com>
6823
6824 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6825 struct stat.st_blocks and struct stat.st_blksize.
6826 * configure: Regenerate.
6827 * config.in: Likewise.
6828 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6829 (OBS): Add common-remote-fileio.o.
6830 (common-remote-fileio.o): New rule.
6831
9a9df970
PA
68322015-03-09 Pedro Alves <palves@redhat.com>
6833
6834 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6835 'struct sockaddr' pointer in 'accept' call.
6836
9eb1356e
PA
68372015-03-09 Pedro Alves <palves@redhat.com>
6838
6839 Revert:
6840 2015-03-07 Pedro Alves <palves@redhat.com>
6841 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6842 or <winsock2.h> here. Instead include "gdb_socket.h".
6843 (remote_open): Use union gdb_sockaddr_u.
6844 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6845 or <winsock2.h> here. Instead include "gdb_socket.h".
6846 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6847 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6848 or <sys/un.h>.
6849 (init_named_socket, gdb_agent_helper_thread): Use union
6850 gdb_sockaddr_u.
6851
aac331e4
PA
68522015-03-07 Pedro Alves <palves@redhat.com>
6853
6854 * configure.ac (build_warnings): Move
6855 -Wdeclaration-after-statement to the C-specific set.
6856 * configure: Regenerate.
6857
366c75fc
PA
68582015-03-07 Pedro Alves <palves@redhat.com>
6859
6860 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6861 or <winsock2.h> here. Instead include "gdb_socket.h".
6862 (remote_open): Use union gdb_sockaddr_u.
6863 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6864 or <winsock2.h> here. Instead include "gdb_socket.h".
6865 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6866 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6867 or <sys/un.h>.
6868 (init_named_socket, gdb_agent_helper_thread): Use union
6869 gdb_sockaddr_u.
6870
492d29ea
PA
68712015-03-07 Pedro Alves <palves@redhat.com>
6872
6873 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6874 instead.
6875
60a191ed
YQ
68762015-03-06 Yao Qi <yao.qi@linaro.org>
6877
6878 * linux-aarch64-low.c (aarch64_insert_point): Use
6879 show_debug_regs as a boolean.
6880 (aarch64_remove_point): Likewise.
6881
f5771b1d
PA
68822015-03-05 Pedro Alves <palves@redhat.com>
6883
6884 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6885 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6886 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6887 * nto-low.c (nto_target_ops): Likewise.
6888 * spu-low.c (spu_target_ops): Likewise.
6889 * win32-low.c (win32_target_ops): Likewise.
6890
3e572f71
PA
68912015-03-04 Pedro Alves <palves@redhat.com>
6892
72f4393d 6893 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6894 Decide whether a breakpoint triggered based on the SIGTRAP's
6895 siginfo.si_code.
72f4393d
L
6896 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6897 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6898 (linux_low_filter_event): Check for breakpoints before checking
6899 watchpoints.
6900 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6901 siginfo.si_code.
72f4393d
L
6902 (linux_stopped_by_sw_breakpoint)
6903 (linux_supports_stopped_by_sw_breakpoint)
6904 (linux_stopped_by_hw_breakpoint)
6905 (linux_supports_stopped_by_hw_breakpoint): New functions.
6906 (linux_target_ops): Install new target methods.
3e572f71 6907
1ec68e26
PA
69082015-03-04 Pedro Alves <palves@redhat.com>
6909
6910 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6911 * server.c (swbreak_feature, hwbreak_feature): New globals.
6912 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6913 (captured_main): Clear swbreak_feature and hwbreak_feature.
6914 * server.h (swbreak_feature, hwbreak_feature): Declare.
6915 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6916 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6917 supports_stopped_by_hw_breakpoint>: New fields.
6918 (target_supports_stopped_by_sw_breakpoint)
6919 (target_stopped_by_sw_breakpoint)
6920 (target_supports_stopped_by_hw_breakpoint)
6921 (target_stopped_by_hw_breakpoint): Declare.
6922
15c66dd6
PA
69232015-03-04 Pedro Alves <palves@redhat.com>
6924
6925 enum lwp_stop_reason -> enum target_stop_reason
6926 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6927 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6928 (linux_wait_1, stuck_in_jump_pad_callback)
6929 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6930 (linux_stopped_by_watchpoint):
6931 * linux-low.h (enum lwp_stop_reason): Delete.
6932 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6933 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6934
98fc70d6
YQ
69352015-03-04 Yao Qi <yao.qi@linaro.org>
6936
6937 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6938
dd2ac174
GB
69392015-03-03 Gary Benson <gbenson@redhat.com>
6940
6941 * hostio.c (handle_vFile): Fix prefix lengths.
6942
d68e53f4
MM
69432015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6944
6945 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6946 ptr_bits.
6947
bf2d68ab
AA
69482015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6949
6950 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6951 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6952 (clean): Add "rm -f" for above C files.
6953 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6954 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6955 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6956 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6957 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6958 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6959 (init_registers_s390x_vx_linux64)
6960 (init_registers_s390x_tevx_linux64)
6961 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6962 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6963 declarations.
6964 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6965 (s390_store_vxrs_high): New functions.
6966 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6967 NT_S390_VXRS_HIGH.
6968 (s390_arch_setup): Add logic for selecting one of the new target
6969 descriptions. Activate the new vector regsets if applicable.
6970 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6971 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6972 and init_registers_s390x_tevx_linux64.
6973
c966a859
PA
69742015-03-01 Pedro Alves <palves@redhat.com>
6975
6976 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6977 parameter.
6978
4180215b
PA
69792015-02-27 Pedro Alves <palves@redhat.com>
6980
6981 * linux-x86-low.c (u_debugreg_offset): New function.
6982 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6983
749bab01
PA
69842015-02-27 Pedro Alves <palves@redhat.com>
6985
6986 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6987 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6988 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6989 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6990 (ps_lsetfpregs, ps_getpid)
6991 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6992 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6993 (ps_lsetxregs, ps_plog): Declare.
6994
3c14e5a3
PA
69952015-02-27 Pedro Alves <palves@redhat.com>
6996
6997 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6998 IP_AGENT_EXPORT_FUNC.
6999 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7000 IP_AGENT_EXPORT_FUNC.
7001 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7002 (IP_AGENT_EXPORT): Delete.
7003 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7004 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7005 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7006 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7007 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7008 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7009 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7010 (traceframe_read_count, traceframe_write_count)
7011 (traceframes_created, trace_state_variables, get_raw_reg)
7012 (get_trace_state_variable_value, set_trace_state_variable_value)
7013 (ust_loaded, helper_thread_id, cmd_buf): Use
7014 IPA_SYM_EXPORTED_NAME.
7015 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7016 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7017 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7018 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7019 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7020 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7021 EXTERN_C_PUSH/EXTERN_C_POP.
7022 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7023 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7024 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7025 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7026 (traceframe_write_count, traceframe_read_count)
7027 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7028 (about_to_request_buffer_space, get_trace_state_variable_value)
7029 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7030 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7031 EXTERN_C_PUSH/EXTERN_C_POP.
7032 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7033 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7034 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7035 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7036 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7037 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7038 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7039 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7040 Define.
7041 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7042 (IP_AGENT_EXPORT_VAR_DECL): Define.
7043 (tracing): Declare.
7044 (gdb_agent_get_raw_reg): Declare.
7045
fe978cb0
PA
70462015-02-27 Tom Tromey <tromey@redhat.com>
7047 Pedro Alves <palves@redhat.com>
7048
7049 Rename symbols whose names are reserved C++ keywords throughout.
7050
3bc3d82a
PA
70512015-02-27 Pedro Alves <palves@redhat.com>
7052
7053 * Makefile.in (COMPILER): New, get it from autoconf.
7054 (CXX): Get from autoconf instead.
7055 (COMPILE.pre): Use COMPILER.
7056 (CC-LD): Rename to ...
7057 (CC_LD): ... this. Use COMPILER.
7058 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7059 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7060 * acinclude.m4: Include build-with-cxx.m4.
7061 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7062 Disable -Werror by default if building in C++ mode.
7063 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7064 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7065 the C++ compiler. Save/restore CXXFLAGS too.
7066 * configure: Regenerate.
7067
07697489
PA
70682015-02-27 Pedro Alves <palves@redhat.com>
7069
7070 * acinclude.m4: Include libiberty.m4.
7071 * configure.ac: Call libiberty_INIT.
7072 * config.in, configure: Regenerate.
7073
9beb7c4e
PA
70742015-02-26 Pedro Alves <palves@redhat.com>
7075
7076 * linux-low.c (linux_wait_1): When incrementing the PC past a
7077 program breakpoint always use the_low_target.breakpoint_len as
7078 increment, rather than the maximum between that and
7079 the_low_target.decr_pc_after_break.
7080
8090aef2
PA
70812015-02-23 Pedro Alves <palves@redhat.com>
7082
7083 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7084 thread was doing a step-over; always adjust the PC if
7085 we stepped over a permanent breakpoint.
7086 (linux_wait_1): If we stepped over breakpoint that was on top of a
7087 permanent breakpoint, manually advance the PC past it.
7088
bc9540e8
PA
70892015-02-23 Pedro Alves <palves@redhat.com>
7090
7091 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7092 modes.
7093 (x86_fill_gregset, x86_store_gregset): Use it when handling
7094 $orig_eax.
7095
2db9a427
PA
70962015-02-20 Pedro Alves <palves@redhat.com>
7097
7098 * thread-db.c: Include "nat/linux-procfs.h".
7099 (thread_db_init): Skip listing new threads if the kernel supports
7100 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7101
afa8d396
PA
71022015-02-20 Pedro Alves <palves@redhat.com>
7103
7104 * linux-low.c (status_pending_p_callback): Use ptid_match.
7105
c9587f88
AT
71062015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7107
7108 PR breakpoints/16812
7109 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7110 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7111 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7112
b05ec7a5
AT
71132015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7114
7115 PR breakpoints/15956
7116 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7117
d33501a5
MM
71182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7119
7120 * linux-low.c (linux_low_btrace_conf): Print size.
7121 * server.c (handle_btrace_conf_general_set): New.
7122 (hanle_general_set): Call handle_btrace_conf_general_set.
7123 (handle_query): Report Qbtrace-conf:bts:size as supported.
7124
f4abbc16
MM
71252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7126
7127 * linux-low.c (linux_low_enable_btrace): Update parameters.
7128 (linux_low_btrace_conf): New.
7129 (linux_target_ops)<to_btrace_conf>: Initialize.
7130 * server.c (current_btrace_conf): New.
7131 (handle_btrace_enable): Rename to ...
7132 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7133 to target_enable_btrace. Update comment. Update users.
7134 (handle_qxfer_btrace_conf): New.
7135 (qxfer_packets): Add btrace-conf entry.
7136 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7137 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7138 (target_ops)<read_btrace_conf>: New.
7139 (target_enable_btrace): Update parameters.
7140 (target_read_btrace_conf): New.
7141
043c3577
MM
71422015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7143
7144 * server.c (handle_btrace_general_set): Remove call to
7145 target_supports_btrace.
7146 (supported_btrace_packets): New.
7147 (handle_query): Call supported_btrace_packets.
7148 * target.h: include btrace-common.h.
7149 (btrace_target_info): Removed.
7150 (supports_btrace, target_supports_btrace): Update parameters.
7151
734b0e4b
MM
71522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7153
7154 * Makefile.in (SFILES): Add common/btrace-common.c.
7155 (OBS): Add common/btrace-common.o.
7156 (btrace-common.o): Add build rules.
7157 * linux-low: Include btrace-common.h.
7158 (linux_low_read_btrace): Use struct btrace_data. Call
7159 btrace_data_init and btrace_data_fini.
7160
d6c146e9
PA
71612015-02-06 Pedro Alves <palves@redhat.com>
7162
7163 * thread-db.c (find_new_threads_callback): Add debug output.
7164
20ba1ce6
PA
71652015-02-04 Pedro Alves <palves@redhat.com>
7166
7167 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7168 (resume_stopped_resumed_lwps): New function.
7169 (linux_wait_for_event_filtered): Use it.
7170
8cc73a39
SDJ
71712015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7172
7173 * Makefile.in (SFILES): Add linux-personality.c.
7174 (linux-personality.o): New rule.
7175 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7176 list of objects to be built.
7177 * linux-low.c: Include nat/linux-personality.h.
7178 (linux_create_inferior): Remove code to disable address space
7179 randomization (moved to ../nat/linux-personality.c). Create
7180 cleanup to disable address space randomization.
7181
fb23d554
SDJ
71822015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7183
7184 * Makefile.in (posix-strerror.o): New rule.
7185 (mingw-strerror.o): Likewise.
7186 * configure: Regenerated.
7187 * configure.ac: Source file ../common/common.host. Initialize new
7188 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7189
cdf43629
YQ
71902015-01-14 Yao Qi <yao@codesourcery.com>
7191
7192 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7193 (ppc-linux.o): New rule.
7194 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7195 * configure.ac: AC_CHECK_FUNCS(getauxval).
7196 * config.in: Re-generated.
7197 * configure: Re-generated.
7198 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7199 ppc64_64bit_inferior_p
7200
514c5338
YQ
72012015-01-14 Yao Qi <yao@codesourcery.com>
7202
7203 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7204 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7205 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7206 (PT_ORIG_R3, PT_TRAP): Likewise.
7207 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7208 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7209 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7210
3368c1e5
JB
72112015-01-10 Joel Brobecker <brobecker@adacore.com>
7212
7213 * i387-fp.c (i387_cache_to_xsave): In look over
7214 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7215 zmmh_low_space field by use of zmmh_high_space.
7216
582511be
PA
72172015-01-09 Pedro Alves <palves@redhat.com>
7218
7219 * linux-low.c (step_over_bkpt): Move higher up in the file.
7220 (handle_extended_wait): Don't store the stop_pc here.
7221 (get_stop_pc): Adjust comments and rename to ...
7222 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7223 stopped for a software breakpoint or hardware breakpoint.
7224 (thread_still_has_status_pending_p): New function.
7225 (status_pending_p_callback): Use
7226 thread_still_has_status_pending_p. If the event is no longer
7227 interesting, resume the LWP.
7228 (handle_tracepoints): Add assert.
7229 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7230 (wstatus_maybe_breakpoint): New function.
7231 (cancel_breakpoint): Delete function.
7232 (check_stopped_by_watchpoint): New function, factored out from
7233 linux_low_filter_event.
7234 (lp_status_maybe_breakpoint): Delete function.
7235 (linux_low_filter_event): Remove filter_ptid argument.
7236 Leave thread group exits pending here. Store the LWP's stop PC.
7237 Always leave events pending.
7238 (linux_wait_for_event_filtered): Pull all events out of the
7239 kernel, and leave them all pending.
7240 (count_events_callback, select_event_lwp_callback): Consider all
7241 events.
7242 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7243 (select_event_lwp): Only give preference to the stepping LWP in
7244 all-stop mode. Adjust comments.
7245 (ignore_event): New function.
7246 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7247 references to cancel_breakpoints. Adjust to renames. Also give
7248 equal priority to all LWPs that have had events in non-stop mode.
7249 If reporting a software breakpoint event, unadjust the LWP's PC.
7250 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7251 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7252 Adjust.
7253 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7254 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7255 (linux_stopped_by_watchpoint): Adjust.
7256 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7257 * linux-low.h (enum lwp_stop_reason): New.
7258 (struct lwp_info) <stop_pc>: Adjust comment.
7259 <stopped_by_watchpoint>: Delete field.
7260 <stop_reason>: New field.
7261 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7262 * mem-break.c (software_breakpoint_inserted_here)
7263 (hardware_breakpoint_inserted_here): New function.
7264 * mem-break.h (software_breakpoint_inserted_here)
7265 (hardware_breakpoint_inserted_here): Declare.
7266 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7267 (cancel_breakpoints): Delete.
7268 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7269 (upload_fast_traceframes): Remove references to
7270 cancel_breakpoints.
7271
a33e3959
PA
72722015-01-09 Pedro Alves <palves@redhat.com>
7273
7274 * thread-db.c (find_new_threads_callback): Ignore thread if the
7275 kernel thread ID is -1.
7276
8784d563
PA
72772015-01-09 Pedro Alves <palves@redhat.com>
7278
7279 * linux-low.c (linux_attach_fail_reason_string): Move to
7280 nat/linux-ptrace.c, and rename.
7281 (linux_attach_lwp): Update comment.
7282 (attach_proc_task_lwp_callback): New function.
7283 (linux_attach): Adjust to rename and use
7284 linux_proc_attach_tgid_threads.
7285 (linux_attach_fail_reason_string): Delete declaration.
7286
76f2b779
JB
72872015-01-01 Joel Brobecker <brobecker@adacore.com>
7288
7289 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7290 * server.c (gdbserver_version): Likewise.
7291
fafcc06a
SDJ
72922014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7293
7294 * remote-utils.c: Include ctype.h.
7295 (input_interrupt): Explicitly handle the case when the char
7296 received is the NUL byte. Improve the printing of non-ASCII
7297 characters.
7298
beed38b8
JB
72992014-12-16 Joel Brobecker <brobecker@adacore.com>
7300
7301 * linux-low.c (linux_low_filter_event): Update call to
7302 linux_enable_event_reporting following the addition of
7303 a new parameter to that function.
7304
bf330350
CU
73052014-12-16 Catalin Udma <catalin.udma@freescale.com>
7306
7307 PR server/17457
7308 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7309 (AARCH64_FPCR_REGNO): Likewise.
7310 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7311 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7312 (aarch64_store_fpregset): Likewise.
7313
5227d625
JB
73142014-12-15 Joel Brobecker <brobecker@adacore.com>
7315
7316 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7317 Remove FIXME comment about assumption about N.
7318
f93b65a0
JB
73192014-12-13 Joel Brobecker <brobecker@adacore.com>
7320
7321 * configure.ac: If large-file support is disabled in GDBserver,
7322 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7323 * configure: Regenerate.
7324
e5a9158d
AA
73252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7326
7327 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7328 warning upon ENODATA from ptrace.
7329 * linux-s390-low.c (s390_store_tdb): New.
7330 (s390_regsets): Add regset for NT_S390_TDB.
7331
feea5f36
AA
73322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7333
7334 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7335 without a fill_function.
7336 * linux-s390-low.c (s390_fill_last_break): Remove.
7337 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7338 (s390_arch_setup): Use regset's size instead of fill_function for
7339 loop end condition.
7340
098dbe61
AA
73412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7342
7343 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7344 the regset's store function when ptrace returned an error.
7345 * regcache.c (get_thread_regcache): Invalidate register cache
7346 before fetching inferior's registers.
7347
28eef672
AA
73482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7349
7350 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7351 while-loop as for-loop.
7352 (regsets_store_inferior_registers): Likewise.
7353
bdca27a2
YQ
73542014-11-28 Yao Qi <yao@codesourcery.com>
7355
7356 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7357 * config.in, configure: Re-generate.
7358 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7359 is defined.
7360
9c232dda
YQ
73612014-11-21 Yao Qi <yao@codesourcery.com>
7362
7363 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7364 (AC_CHECK_HEADERS): Remove malloc.h.
7365 * configure: Re-generated.
7366 * config.in: Re-generated.
7367 * server.h: Don't include alloca.h and malloc.h.
7368 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7369 Don't include malloc.h.
7370
43968415
JB
73712014-11-17 Joel Brobecker <brobecker@adacore.com>
7372
7373 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7374 corresponding ERRNO check in same block.
7375
40e91bc7
PA
73762014-11-12 Pedro Alves <palves@redhat.com>
7377
7378 * server.c (cont_thread): Update comment.
7379 (start_inferior, attach_inferior): No longer clear cont_thread.
7380 (handle_v_cont): No longer set cont_thread.
7381 (captured_main): Clear cont_thread each time a GDB connects.
7382
c2c118cf
PA
73832014-11-12 Pedro Alves <palves@redhat.com>
7384
7385 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7386 thread, and don't resume all threads if the Hc thread has exited.
7387
78708b7c
PA
73882014-11-12 Pedro Alves <palves@redhat.com>
7389
7390 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7391 the process group instead of to a specific LWP.
7392
a2abc7de
PA
73932014-10-15 Pedro Alves <palves@redhat.com>
7394
7395 PR server/17487
7396 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7397 parameter.
7398 (arm_set_thread_context): Delete.
7399 (the_low_target): Adjust.
7400 * win32-i386-low.c (debug_registers_changed)
7401 (debug_registers_used): Delete.
7402 (update_debug_registers_callback): New function.
7403 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7404 needing to update their debug registers.
7405 (win32_get_current_dr): New function.
7406 (x86_dr_low_get_addr, x86_dr_low_get_control)
7407 (x86_dr_low_get_status): Fetch the debug register from the thread
7408 record's context.
7409 (i386_initial_stuff): Adjust.
7410 (i386_get_thread_context): Remove current_event parameter. Don't
7411 clear debug_registers_changed nor copy DR values to
7412 debug_reg_state.
7413 (i386_set_thread_context): Delete.
7414 (i386_prepare_to_resume): New function.
7415 (i386_thread_added): Mark the thread as needing to update irs
7416 debug registers.
7417 (the_low_target): Remove i386_set_thread_context and install
7418 i386_prepare_to_resume.
7419 * win32-low.c (win32_get_thread_context): Adjust.
7420 (win32_set_thread_context): Use SetThreadContext
7421 directly.
7422 (win32_prepare_to_resume): New function.
7423 (win32_require_context): New function, factored out from ...
7424 (thread_rec): ... this.
7425 (continue_one_thread): Call win32_prepare_to_resume on each thread
7426 we're about to continue.
7427 (win32_resume): Call win32_prepare_to_resume on the event thread.
7428 * win32-low.h (struct win32_thread_info)
7429 <debug_registers_changed>: New field.
7430 (struct win32_target_ops): Change prototype of set_thread_context,
7431 delete set_thread_context and add prepare_to_resume.
7432 (win32_require_context): New declaration.
7433
a442d071
GB
74342014-10-08 Gary Benson <gbenson@redhat.com>
7435
7436 * server.h: Do not include common-exceptions.h.
7437
6f1947e8
GB
74382014-10-08 Gary Benson <gbenson@redhat.com>
7439
7440 * server.h: Do not include cleanups.h.
7441
63b434a4
JH
74422014-09-30 James Hogan <james.hogan@imgtec.com>
7443
7444 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7445 mips64-dsp-linux.c.
7446
c4d9ceb6
YQ
74472014-09-23 Yao Qi <yao@codesourcery.com>
7448
7449 * linux-low.c (lp_status_maybe_breakpoint): New function.
7450 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7451 (count_events_callback): Likewise.
7452 (select_event_lwp_callback): Likewise.
7453 (cancel_breakpoints_callback): Likewise.
7454
89a5711c
DB
74552014-09-19 Don Breazeal <donb@codesourcery.com>
7456
7457 * linux-low.c (handle_extended_wait): Call
7458 linux_ptrace_get_extended_event.
7459 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7460 linux_is_extended_waitstatus.
7461
bffc0964
JB
74622014-09-16 Joel Brobecker <brobecker@adacore.com>
7463
7464 * Makefile.in (CPPFLAGS): Define.
7465 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7466 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7467
0bfdf32f
GB
74682014-09-16 Gary Benson <gbenson@redhat.com>
7469
7470 * inferiors.h (current_inferior): Renamed as...
7471 (current_thread): New variable. All uses updated.
7472 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7473 (maybe_move_out_of_jump_pad): Likewise.
7474 (cancel_breakpoint): Likewise.
7475 (linux_low_filter_event): Likewise.
7476 (wait_for_sigstop): Likewise.
7477 (linux_resume_one_lwp): Likewise.
7478 (need_step_over_p): Likewise.
7479 (start_step_over): Likewise.
7480 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7481 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7482 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7483 and save_inferior as saved_thread.
7484 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7485 saved_thread.
7486 (regcache_invalidate_thread): Likewise.
7487 * remote-utils.c (prepare_resume_reply): Likewise.
7488 * thread-db.c (thread_db_get_tls_address): Likewise.
7489 (disable_thread_event_reporting): Likewise.
7490 (remove_thread_event_breakpoints): Likewise.
7491 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7492 as saved_thread.
7493 * target.h (set_desired_inferior): Renamed as...
7494 (set_desired_thread): New declaration. All uses updated.
7495 * server.c (myresume): Updated comment to reference thread instead
7496 of inferior.
7497 (handle_serial_event): Likewise.
7498 (handle_target_event): Likewise.
7499
361c8ade
GB
75002014-09-12 Tom Tromey <tromey@redhat.com>
7501 Gary Benson <gbenson@redhat.com>
7502
7503 * regcache.h: Include common-regcache.h.
7504 (regcache_read_pc): Don't declare.
7505 * regcache.c (get_thread_regcache_for_ptid): New function.
7506
bd9269f7
GB
75072014-09-11 Tom Tromey <tromey@redhat.com>
7508 Gary Benson <gbenson@redhat.com>
7509
7510 * symbol.c: New file.
7511 * Makefile.in (SFILES): Add symbol.c.
7512 (OBS): Add symbol.o.
7513
f8c1d06b
GB
75142014-09-11 Gary Benson <gbenson@redhat.com>
7515
7516 * target.c (target_stop_ptid, target_continue_ptid): New
7517 functions.
7518
721ec300
GB
75192014-09-11 Tom Tromey <tromey@redhat.com>
7520 Gary Benson <gbenson@redhat.com>
7521
7522 * target.h: Include target/target.h.
7523 * target.c (target_read_memory, target_read_uint32)
7524 (target_write_memory): New functions.
7525
c5e92cca
GB
75262014-09-11 Gary Benson <gbenson@redhat.com>
7527
7528 * server.h (debug_hw_points): Don't declare.
7529 * server.c (debug_hw_points): Don't define. Replace all uses
7530 with show_debug_regs.
7531 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7532 all uses with show_debug_regs.
7533
2e4bb98a
EBM
75342014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7535
7536 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7537 endianness into account.
7538 (ppc_supply_ptrace_register): Likewise.
7539
ac740bc7
JH
75402014-09-03 James Hogan <james.hogan@imgtec.com>
7541
7542 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7543 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7544
97ea6506
GB
75452014-09-03 Gary Benson <gbenson@redhat.com>
7546
7547 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7548 ALL_DEBUG_ADDRESS_REGISTERS.
7549
df7e5265
GB
75502014-09-02 Gary Benson <gbenson@redhat.com>
7551
7552 * i386-low.h: Renamed as...
7553 * x86-low.h: New file. All type, function and variable name
7554 prefixes changed from "i386_" to "x86_". All references updated.
7555 * i386-low.c: Renamed as...
7556 * x86-low.c: New file. All type, function and variable name
7557 prefixes changed from "i386_" to "x86_". All references updated.
7558
ed859da7
GB
75592014-09-02 Gary Benson <gbenson@redhat.com>
7560
7561 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7562 (x86_linux_new_thread): Likewise.
7563
860789c7
GB
75642014-08-29 Gary Benson <gbenson@redhat.com>
7565
7566 * server.h (setjmp.h): Do not include.
7567 (toplevel): Do not declare.
7568 (common-exceptions.h): Include.
7569 (cleanups.h): Likewise.
7570 * server.c (toplevel): Do not define.
7571 (exit_code): New static global.
7572 (detach_or_kill_for_exit_cleanup): New function.
7573 (main): New function. Original main renamed to...
7574 (captured_main): New function.
7575 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7576
ff55e1b5
GB
75772014-08-29 Gary Benson <gbenson@redhat.com>
7578
7579 * Makefile.in (SFILES): Add common/common-exceptions.c.
7580 (OBS): Add common-exceptions.o.
7581 (common-exceptions.o): New rule.
7582 * utils.c (prepare_to_throw_exception): New function.
7583
e9bcb658
GB
75842014-08-29 Gary Benson <gbenson@redhat.com>
7585
7586 * config.in: Regenerate.
7587 * configure: Likewise.
7588
e3180625
GB
75892014-08-29 Gary Benson <gbenson@redhat.com>
7590
7591 * Makefile.in (SFILES): Add common/cleanups.c.
7592 (OBS): cleanups.o.
7593 (cleanups.o): New rule.
7594
e3d6ba5d
GB
75952014-08-29 Gary Benson <gbenson@redhat.com>
7596
7597 * utils.c (internal_vwarning): New function.
7598
7096e886
GB
75992014-08-28 Gary Benson <gbenson@redhat.com>
7600
7601 * utils.h (fatal): Remove declaration.
7602 * utils.c (fatal): Remove function.
7603
14ce3192
GB
76042014-08-28 Gary Benson <gbenson@redhat.com>
7605
7606 * tracepoint.c (gdb_agent_init): Replace fatal with
7607 perror_with_name.
7608 (initialize_tracepoint): Likewise.
7609
50278d59
GB
76102014-08-28 Gary Benson <gbenson@redhat.com>
7611
7612 * remote-utils.c (remote_prepare): Replace fatal with error.
7613
aa96c426
GB
76142014-08-28 Gary Benson <gbenson@redhat.com>
7615
7616 * linux-low.c (linux_async): Replace fatal with warning.
7617 Tidy up and return.
7618 (linux_start_non_stop): Return -1 if linux_async failed.
7619
f7160e97
GB
76202014-08-28 Gary Benson <gbenson@redhat.com>
7621
7622 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7623 gdb_assert.
7624 (i386_dr_low_get_addr): Remove vague comment.
7625 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7626 gdb_assert.
7627
38e08fca
GB
76282014-08-28 Gary Benson <gbenson@redhat.com>
7629
7630 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7631 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7632 internal_error.
7633 (linux_resume_one_lwp): Likewise.
7634 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7635 gdb_assert.
7636 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7637 with internal_error.
7638 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7639 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7640 (find_register_by_name): Replace fatal with internal_error.
7641 (find_regno): Likewise.
7642 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7643 * thread-db.c (thread_db_create_event): Likewise.
7644 (thread_db_load_search): Likewise.
7645 (try_thread_db_load_1): Likewise.
7646 * tracepoint.c (get_jump_space_head): Replace fatal with
7647 internal_error.
7648 (claim_trampoline_space): Likewise.
7649 (have_fast_tracepoint_trampoline_buffer): Likewise.
7650 (cmd_qtstart): Likewise.
7651 (stop_tracing): Likewise.
7652 (fast_tracepoint_collecting): Likewise.
7653 (target_malloc): Likewise.
7654 (download_tracepoint): Likewise.
7655 (download_trace_state_variables): Replace check with gdb_assert.
7656 (upload_fast_traceframes): Replace fatal with internal_error.
7657
34abf635
GB
76582014-08-19 Tom Tromey <tromey@redhat.com>
7659 Gary Benson <gbenson@redhat.com>
7660
7661 * Makefile.in (SFILES): Add common/common-debug.c.
7662 (OBS): Add common-debug.o.
7663 (common-debug.o): New rule.
7664 * debug.h (debug_printf): Don't declare.
7665 * debug.c (debug_printf): Renamed and rewritten as...
7666 (debug_vprintf): New function.
7667
f6e94d78
GB
76682014-08-19 Gary Benson <gbenson@redhat.com>
7669
7670 * utils.h: Do not include print-utils.h.
7671
9239eeab
GB
76722014-08-19 Tom Tromey <tromey@redhat.com>
7673 Gary Benson <gbenson@redhat.com>
7674
7675 * server.h: Add static assertion.
7676 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7677
ef87c8bb
GB
76782014-08-19 Tom Tromey <tromey@redhat.com>
7679 Gary Benson <gbenson@redhat.com>
7680
7681 * Makefile.in (SFILES): Add common/errors.c.
7682 (OBS): Add errors.o.
7683 (IPA_OBS): Add errors-ipa.o.
7684 (errors.o): New rule.
7685 (errors-ipa.o): Likewise.
7686 * utils.h (perror_with_name, error, warning): Don't declare.
7687 * utils.c (warning): Renamed and rewritten as...
7688 (vwarning): New function.
7689 (error): Renamed and rewritten as...
7690 (verror): New function.
7691 (internal_error): Renamed and rewritten as...
7692 (internal_verror): New function.
7693
bb974a24
GB
76942014-08-07 Gary Benson <gbenson@redhat.com>
7695
7696 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7697 * configure: Regenerate.
7698 * config.in: Likewise.
7699 * server.h: Do not include errno.h.
7700 * event-loop.c: Likewise.
7701 * hostio-errno.c: Likewise.
7702 * linux-low.c: Likewise.
7703 * remote-utils.c: Likewise.
7704 * spu-low.c: Likewise.
7705 * utils.c: Likewise.
7706 * gdbreplay.c: Unconditionally include errno.h.
7707
6d3d12eb
GB
77082014-08-07 Gary Benson <gbenson@redhat.com>
7709
7710 * server.h: Do not include string.h.
7711 * event-loop.c: Likewise.
7712 * linux-low.c: Likewise.
7713 * regcache.c: Likewise.
7714 * remote-utils.c: Likewise.
7715 * spu-low.c: Likewise.
7716 * utils.c: Likewise.
7717
dccbb609
GB
77182014-08-07 Gary Benson <gbenson@redhat.com>
7719
7720 * server.h: Do not include gdb_assert.h.
7721
e76df0d0
GB
77222014-08-07 Gary Benson <gbenson@redhat.com>
7723
7724 * server.h: Do not include common-utils.h.
7725
4cb9c816
GB
77262014-08-07 Gary Benson <gbenson@redhat.com>
7727
7728 * server.h: Do not include ptid.h.
7729 * notif.h: Likewise.
7730
3995eeee
GB
77312014-08-07 Gary Benson <gbenson@redhat.com>
7732
7733 * server.h: Do not include gdb_locale.h.
7734
cb9f1a9b
GB
77352014-08-07 Gary Benson <gbenson@redhat.com>
7736
7737 * server.h: Do not include gdb/signals.h.
7738 * win32-low.c: Likewise.
7739
a5fceff8
GB
77402014-08-07 Gary Benson <gbenson@redhat.com>
7741
7742 * server.h: Do not include pathmax.h.
7743
b9391142
GB
77442014-08-07 Gary Benson <gbenson@redhat.com>
7745
7746 * server.h: Do not include libiberty.h.
7747 * linux-bfin-low.c: Likewise.
7748
0e443c87
GB
77492014-08-07 Gary Benson <gbenson@redhat.com>
7750
7751 * server.h: Do not include ansidecl.h.
7752
8ebb3f56
GB
77532014-08-07 Gary Benson <gbenson@redhat.com>
7754
7755 * linux-x86-low.c: Do not include stddef.h.
7756 * lynx-ppc-low.c: Likewise.
7757 * tracepoint.c: Likewise.
7758
8980bdf6
GB
77592014-08-07 Gary Benson <gbenson@redhat.com>
7760
7761 * server.h: Do not include stdarg.h.
7762 * nto-low.c: Likewise.
7763
d7096f71
GB
77642014-08-07 Gary Benson <gbenson@redhat.com>
7765
7766 * server.h: Do not include stdlib.h.
7767 * inferiors.c: Likewise.
7768 * linux-low.c: Likewise.
7769 * regcache.c: Likewise.
7770 * spu-low.c: Likewise.
7771 * tracepoint.c: Likewise.
7772 * utils.c: Likewise.
7773
d02f550d
GB
77742014-08-07 Gary Benson <gbenson@redhat.com>
7775
7776 * server.h: Do not include stdio.h.
7777 * linux-low.c: Likewise.
7778 * remote-utils.c: Likewise.
7779 * spu-low.c: Likewise.
7780 * utils.c: Likewise.
7781 * wincecompat.c: Likewise.
7782
87f6c4e3
GB
77832014-08-06 Gary Benson <gbenson@redhat.com>
7784
7785 * regcache.c (init_register_cache): Move conditionals inside if.
7786
7089dca4
GB
77872014-08-06 Gary Benson <gbenson@redhat.com>
7788
7789 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7790
462f517e
GB
77912014-07-31 Gary Benson <gbenson@redhat.com>
7792
7793 * ax.h: Do not include server.h.
7794 * gdbthread.h: Likewise.
7795 * lynx-low.h: Likewise.
7796 * notif.h: Likewise.
7797
976411d6
GB
77982014-07-30 Gary Benson <gbenson@redhat.com>
7799
7800 * server.h: Include common-defs.h.
7801 Do not include config.h or build-gnulib-gdbserver/config.h.
7802
d41f6d8e
GB
78032014-07-30 Gary Benson <gbenson@redhat.com>
7804
7805 * hostio-errno.c: Move server.h to top of includes list.
7806 * inferiors.c: Likewise.
7807 * linux-x86-low.c: Likewise.
7808 * notif.c: Include server.h.
7809
314c6a35
TT
78102014-07-24 Tom Tromey <tromey@redhat.com>
7811 Gary Benson <gbenson@redhat.com>
7812
7813 * server.h (CORE_ADDR): Now unsigned.
7814
69ff6be5
PA
78152014-07-16 Pedro Alves <palves@redhat.com>
7816
7817 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7818
ce9e3fe7
PA
78192014-07-15 Pedro Alves <palves@redhat.com>
7820
7821 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7822 copy.
7823
e76126e8
PA
78242014-07-11 Pedro Alves <palves@redhat.com>
7825
7826 * linux-low.c (kill_wait_lwp): New function, based on
7827 kill_one_lwp_callback, but use my_waitpid directly.
7828 (kill_one_lwp_callback, linux_kill): Use it.
7829
8e9db26e
PA
78302014-06-23 Pedro Alves <palves@redhat.com>
7831
7832 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7833 before setting DR0..DR3.
7834
698b3e08
GB
78352014-06-20 Gary Benson <gbenson@redhat.com>
7836
7837 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7838 * configure: Regenerated.
7839 * config.in: Likewise.
7840
125f8a3d
GB
78412014-06-20 Gary Benson <gbenson@redhat.com>
7842
7843 * Makefile.in (SFILES): Update locations for files moved
7844 from common to nat.
7845 (object file files): Reordered.
7846
42995dbd
GB
78472014-06-20 Gary Benson <gbenson@redhat.com>
7848
7849 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7850 (i386_dr_low_set_addr): Likewise.
7851 (i386_dr_low_get_addr): Likewise.
7852 (i386_dr_low_can_set_control): Likewise.
7853 (i386_dr_low_set_control): Likewise.
7854 (i386_dr_low_get_control): Likewise.
7855 (i386_dr_low_get_status): Likewise.
7856 (i386_get_debug_register_length): Likewise.
7857 * linux-x86-low.c (i386_dr_low_set_addr):
7858 Changed signature. Made static.
7859 (i386_dr_low_get_addr): Likewise.
7860 (i386_dr_low_set_control): Likewise.
7861 (i386_dr_low_get_control): Likewise.
7862 (i386_dr_low_get_status): Likewise.
7863 (i386_dr_low): New global variable.
7864 * win32-i386-low.c (i386_dr_low_set_addr):
7865 Changed signature. Made static.
7866 (i386_dr_low_get_addr): Likewise.
7867 (i386_dr_low_set_control): Likewise.
7868 (i386_dr_low_get_control): Likewise.
7869 (i386_dr_low_get_status): Likewise.
7870 (i386_dr_low): New global variable.
7871
e1d2394b
MS
78722014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7873
7874 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7875 * Makefile.in (AR, AR_FLAGS): Define.
7876 * configure: Regenerate.
7877
3a8ee006
GB
78782014-06-19 Gary Benson <gbenson@redhat.com>
7879
7880 * Makefile.in (i386-dregs.o): New rule.
7881 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7882 * i386-low.c (target.h): Remove include.
7883 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7884 (DR_CONTROL_SHIFT): Likewise.
7885 (DR_CONTROL_SIZE): Likewise.
7886 (DR_RW_EXECUTE): Likewise.
7887 (DR_RW_WRITE): Likewise.
7888 (DR_RW_READ): Likewise.
7889 (DR_RW_IORW): Likewise.
7890 (DR_LEN_1): Likewise.
7891 (DR_LEN_2): Likewise.
7892 (DR_LEN_4): Likewise.
7893 (DR_LEN_8): Likewise.
7894 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7895 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7896 (DR_ENABLE_SIZE): Likewise.
7897 (DR_LOCAL_SLOWDOWN): Likewise.
7898 (DR_GLOBAL_SLOWDOWN): Likewise.
7899 (DR_CONTROL_RESERVED): Likewise.
7900 (I386_DR_CONTROL_MASK): Likewise.
7901 (I386_DR_VACANT): Likewise.
7902 (I386_DR_LOCAL_ENABLE): Likewise.
7903 (I386_DR_GLOBAL_ENABLE): Likewise.
7904 (I386_DR_DISABLE): Likewise.
7905 (I386_DR_SET_RW_LEN): Likewise.
7906 (I386_DR_GET_RW_LEN): Likewise.
7907 (I386_DR_WATCH_HIT): Likewise.
7908 (i386_wp_op_t): Likewise.
7909 (i386_show_dr): Likewise.
7910 (i386_length_and_rw_bits): Likewise.
7911 (i386_insert_aligned_watchpoint): Likewise.
7912 (i386_remove_aligned_watchpoint): Likewise.
7913 (i386_handle_nonaligned_watchpoint): Likewise.
7914 i386_update_inferior_debug_regs(): Likewise.
7915 (i386_dr_insert_watchpoint): Likewise.
7916 (i386_dr_remove_watchpoint): Likewise.
7917 (i386_dr_region_ok_for_watchpoint): Likewise.
7918 (i386_dr_stopped_data_address): Likewise.
7919 (i386_dr_stopped_by_watchpoint): Likewise.
7920
8f26655c
GB
79212014-06-19 Gary Benson <gbenson@redhat.com>
7922
7923 * i386-low.c (i386_dr_show): Renamed to
7924 i386_show_dr and made static. All uses updated.
7925 (i386_dr_length_and_rw_bits): Renamed to
7926 i386_length_and_rw_bits and made static.
7927 All uses updated.
7928 (i386_dr_insert_aligned_watchpoint): Renamed to
7929 i386_insert_aligned_watchpoint and made static.
7930 All uses updated.
7931 (i386_dr_remove_aligned_watchpoint): Renamed to
7932 i386_remove_aligned_watchpoint and made static.
7933 All uses updated.
7934 (i386_dr_update_inferior_debug_regs): Renamed to
7935 i386_update_inferior_debug_regs and made static.
7936 All uses updated.
7937
b9228891
GB
79382014-06-18 Gary Benson <gbenson@redhat.com>
7939
5171def3
GB
7940 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7941 (i386_dr_low_can_set_control): Likewise.
7942 (i386_get_debug_register_length): Likewise.
7943 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7944 (i386_dr_low_can_set_control): Likewise.
7945 (i386_get_debug_register_length): Likewise.
7946
79472014-06-17 Gary Benson <gbenson@redhat.com>
7948
b9228891
GB
7949 * i386-low.h (i386-dregs.h): New include.
7950 (DR_FIRSTADDR): Now in i386-dregs.h.
7951 (DR_LASTADDR): Likewise.
7952 (DR_NADDR): Likewise.
7953 (DR_STATUS): Likewise.
7954 (DR_CONTROL): Likewise.
7955 (i386_debug_reg_state): Likewise.
7956 (i386_dr_insert_watchpoint): Likewise.
7957 (i386_dr_remove_watchpoint): Likewise.
7958 (i386_dr_region_ok_for_watchpoint): Likewise.
7959 (i386_dr_stopped_data_address): Likewise.
7960 (i386_dr_stopped_by_watchpoint): Likewise.
7961 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7962
4be83cc2
GB
79632014-06-18 Gary Benson <gbenson@redhat.com>
7964
7965 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7966 i386_dr_insert_watchpoint.
7967 (i386_low_remove_watchpoint): Renamed to
7968 i386_dr_remove_watchpoint.
7969 (i386_low_region_ok_for_watchpoint): Renamed to
7970 i386_dr_region_ok_for_watchpoint.
7971 (i386_low_stopped_data_address): Renamed to
7972 i386_dr_stopped_data_address.
7973 (i386_low_stopped_by_watchpoint): Renamed to
7974 i386_dr_stopped_by_watchpoint.
7975 * i386-low.c (i386_show_dr): Renamed to
7976 i386_dr_show and made nonstatic. All uses updated.
7977 (i386_length_and_rw_bits): Renamed to
7978 i386_dr_length_and_rw_bits and made nonstatic.
7979 All uses updated.
7980 (i386_insert_aligned_watchpoint): Renamed to
7981 i386_dr_insert_aligned_watchpoint and made nonstatic.
7982 All uses updated.
7983 (i386_remove_aligned_watchpoint): Renamed to
7984 i386_dr_remove_aligned_watchpoint and made nonstatic.
7985 All uses updated.
7986 (i386_update_inferior_debug_regs): Renamed to
7987 i386_dr_update_inferior_debug_regs and made nonstatic.
7988 All uses updated.
7989 (i386_low_insert_watchpoint): Renamed to
7990 i386_dr_insert_watchpoint. All uses updated.
7991 (i386_low_remove_watchpoint): Renamed to
7992 i386_dr_remove_watchpoint. All uses updated.
7993 (i386_low_region_ok_for_watchpoint): Renamed to
7994 i386_dr_region_ok_for_watchpoint. All uses updated.
7995 (i386_low_stopped_data_address): Renamed to
7996 i386_dr_stopped_data_address. All uses updated.
7997 (i386_low_stopped_by_watchpoint): Renamed to
7998 i386_dr_stopped_by_watchpoint. All uses updated.
7999
131aa0d4
GB
80002014-06-18 Gary Benson <gbenson@redhat.com>
8001
8002 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8003 (i386_dr_low_can_set_control): Likewise.
8004 (i386_insert_aligned_watchpoint): New check.
8005
d9305f7f
GB
80062014-06-18 Gary Benson <gbenson@redhat.com>
8007
8008 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8009 Renamed to state.
8010
e927c9fc
GB
80112014-06-18 Gary Benson <gbenson@redhat.com>
8012
8013 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8014 instead of fatal and error.
8015 (i386_handle_nonaligned_watchpoint): Likewise.
8016
1b6d4134
GB
80172014-06-18 Gary Benson <gbenson@redhat.com>
8018
8019 * i386-low.c (i386_get_debug_register_length): New macro.
8020 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8021 (i386_show_dr): Use debug_printf instead of fprintf. Use
8022 phex to format values.
8023
6e62758f
GB
80242014-06-18 Gary Benson <gbenson@redhat.com>
8025
8026 * i386-low.h: Comment changes.
8027 * i386-low.c: Likewise.
8028
fc6e2f03
GB
80292014-06-18 Gary Benson <gbenson@redhat.com>
8030
8031 * i386-low.c: Whitespace changes.
8032
f9d1eeed
TT
80332014-06-12 Tom Tromey <tromey@redhat.com>
8034
8035 * utils.c (freeargv): Remove.
8036
0b04e523
TT
80372014-06-12 Tom Tromey <tromey@redhat.com>
8038
8039 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8040 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8041 (parse_debug_format_options): Likewise.
8042 (gdbserver_usage): Likewise.
8043 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8044 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8045 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8046 against libiberty.
8047 ($(LIBGNU)): Depend on libiberty.
8048 (all-lib): Recurse into all subdirs.
8049 (install-only): Invoke "install" target in subdirs.
8050 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8051 targets.
8052 * configure: Rebuild.
8053 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8054 for vasprintf, vsnprintf, or gettimeofday.
8055 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8056 srv_tgtobj.
8057
270c9937
JB
80582014-06-05 Joel Brobecker <brobecker@adacore.com>
8059
8060 * development.sh: Delete.
8061 * Makefile.in (config.status): Adjust dependency on development.sh.
8062 * configure.ac: Adjust development.sh source call.
8063 * configure: Regenerate.
8064
0a261ed8
PA
80652014-06-02 Pedro Alves <palves@redhat.com>
8066
8067 * ax.c (gdb_free_agent_expr): New function.
8068 * ax.h (gdb_free_agent_expr): New declaration.
8069 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8070 list.
8071 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8072 static.
8073 (clear_breakpoint_conditions_and_commands): New function.
8074 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8075 (clear_breakpoint_conditions_and_commands): New declaration.
8076
e9dae05e
RR
80772014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8078
8079 * linux-aarch64-low.c (asm/ptrace.h): Include.
8080
5876f503
JK
80812014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8082
8083 Fix TLS access for -static -pthread.
8084 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8085 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8086 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8087
802e8e6d
PA
80882014-05-20 Pedro Alves <palves@redhat.com>
8089
8090 * linux-aarch64-low.c (aarch64_insert_point)
8091 (aarch64_remove_point): No longer check whether the type is
8092 supported here. Adjust to new interface.
8093 (the_low_target): Install aarch64_supports_z_point_type as
8094 supports_z_point_type method.
8095 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8096 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8097 instead of a Z packet char. Adjust.
8098 (arm_supports_z_point_type): New function.
8099 (arm_insert_point, arm_remove_point): Adjust to new interface.
8100 (the_low_target): Install arm_supports_z_point_type.
8101 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8102 (cris_insert_point, cris_remove_point): Adjust to new interface.
8103 Don't check whether the type is supported here.
8104 (the_low_target): Install cris_supports_z_point_type.
8105 * linux-low.c (linux_supports_z_point_type): New function.
8106 (linux_insert_point, linux_remove_point): Adjust to new interface.
8107 * linux-low.h (struct linux_target_ops) <insert_point,
8108 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8109 raw_breakpoint pointer parameter.
8110 <supports_z_point_type>: New method.
8111 * linux-mips-low.c (mips_supports_z_point_type): New function.
8112 (mips_insert_point, mips_remove_point): Adjust to new interface.
8113 Use mips_supports_z_point_type.
8114 (the_low_target): Install mips_supports_z_point_type.
8115 * linux-ppc-low.c (the_low_target): Install NULL as
8116 supports_z_point_type method.
8117 * linux-s390-low.c (the_low_target): Install NULL as
8118 supports_z_point_type method.
8119 * linux-sparc-low.c (the_low_target): Install NULL as
8120 supports_z_point_type method.
8121 * linux-x86-low.c (x86_supports_z_point_type): New function.
8122 (x86_insert_point): Adjust to new insert_point interface. Use
8123 insert_memory_breakpoint. Adjust to new
8124 i386_low_insert_watchpoint interface.
8125 (x86_remove_point): Adjust to remove_point interface. Use
8126 remove_memory_breakpoint. Adjust to new
8127 i386_low_remove_watchpoint interface.
8128 (the_low_target): Install x86_supports_z_point_type.
8129 * lynx-low.c (lynx_target_ops): Install NULL as
8130 supports_z_point_type callback.
8131 * nto-low.c (nto_supports_z_point_type): New.
8132 (nto_insert_point, nto_remove_point): Adjust to new interface.
8133 (nto_target_ops): Install nto_supports_z_point_type.
8134 * mem-break.c: Adjust intro comment.
8135 (struct raw_breakpoint) <raw_type, size>: New fields.
8136 <inserted>: Update comment.
8137 <shlib_disabled>: Delete field.
8138 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8139 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8140 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8141 (raw_bkpt_type_to_target_hw_bp_type): New function.
8142 (find_enabled_raw_code_breakpoint_at): New function.
8143 (find_raw_breakpoint_at): New type and size parameters. Use them.
8144 (insert_memory_breakpoint): New function, based off
8145 set_raw_breakpoint_at.
8146 (remove_memory_breakpoint): New function.
8147 (set_raw_breakpoint_at): Reimplement.
8148 (set_breakpoint): New, based on set_breakpoint_at.
8149 (set_breakpoint_at): Reimplement.
8150 (delete_raw_breakpoint): Go through the_target->remove_point
8151 instead of assuming memory breakpoints.
8152 (find_gdb_breakpoint_at): Delete.
8153 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8154 (find_gdb_breakpoint): New function.
8155 (set_gdb_breakpoint_at): Delete.
8156 (z_type_supported): New function.
8157 (set_gdb_breakpoint_1): New function, loosely based off
8158 set_gdb_breakpoint_at.
8159 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8160 (delete_gdb_breakpoint_at): Delete.
8161 (delete_gdb_breakpoint_1): New function, loosely based off
8162 delete_gdb_breakpoint_at.
8163 (delete_gdb_breakpoint): New function.
8164 (clear_gdb_breakpoint_conditions): Rename to ...
8165 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8166 breakpoint.
8167 (add_condition_to_breakpoint): Make static.
8168 (add_breakpoint_condition): Take a struct breakpoint pointer
8169 instead of an address. Adjust.
8170 (gdb_condition_true_at_breakpoint): Rename to ...
8171 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8172 z_type parameter.
8173 (gdb_condition_true_at_breakpoint): Reimplement.
8174 (add_breakpoint_commands): Take a struct breakpoint pointer
8175 instead of an address. Adjust.
8176 (gdb_no_commands_at_breakpoint): Rename to ...
8177 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8178 parameter. Return true if no breakpoint was found. Change debug
8179 output.
8180 (gdb_no_commands_at_breakpoint): Reimplement.
8181 (run_breakpoint_commands): Rename to ...
8182 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8183 and change return type to boolean.
8184 (run_breakpoint_commands): New function.
8185 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8186 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8187 breakpoint. Go through the_target->remove_point instead of
8188 assuming memory breakpoint.
8189 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8190 software and hardware breakpoints.
8191 (reinsert_raw_breakpoint): Go through the_target->insert_point
8192 instead of assuming memory breakpoint.
8193 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8194 software and hardware breakpoints.
8195 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8196 Check both software and hardware breakpoints.
8197 (validate_inserted_breakpoint): Assert the breakpoint is a
8198 software breakpoint. Set the inserted flag to -1 instead of
8199 setting shlib_disabled.
8200 (delete_disabled_breakpoints): Adjust.
8201 (validate_breakpoints): Only validate software breakpoints.
8202 Adjust to inserted flag change.
8203 (check_mem_read, check_mem_write): Skip breakpoint types other
8204 than software breakpoints. Adjust to inserted flag change.
8205 * mem-break.h (enum raw_bkpt_type): New enum.
8206 (raw_breakpoint, struct process_info): Forward declare.
8207 (Z_packet_to_target_hw_bp_type): Delete declaration.
8208 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8209 (set_gdb_breakpoint, delete_gdb_breakpoint)
8210 (clear_breakpoint_conditions): New declarations.
8211 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8212 (breakpoint_inserted_here): Update comment.
8213 (add_breakpoint_condition, add_breakpoint_commands): Replace
8214 address parameter with a breakpoint pointer parameter.
8215 (gdb_breakpoint_here): Update comment.
8216 (delete_gdb_breakpoint_at): Delete.
8217 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8218 * server.c (process_point_options): Take a struct breakpoint
8219 pointer instead of an address. Adjust.
8220 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8221 delete_gdb_breakpoint.
8222 * spu-low.c (spu_target_ops): Install NULL as
8223 supports_z_point_type method.
8224 * target.h: Include mem-break.h.
8225 (struct target_ops) <prepare_to_access_memory>: Update comment.
8226 <supports_z_point_type>: New field.
8227 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8228 instead of a char. Also take a raw breakpoint pointer.
8229 * win32-arm-low.c (the_low_target): Install NULL as
8230 supports_z_point_type.
8231 * win32-i386-low.c (i386_supports_z_point_type): New function.
8232 (i386_insert_point, i386_remove_point): Adjust to new interface.
8233 (the_low_target): Install i386_supports_z_point_type.
8234 * win32-low.c (win32_supports_z_point_type): New function.
8235 (win32_insert_point, win32_remove_point): Adjust to new interface.
8236 (win32_target_ops): Install win32_supports_z_point_type.
8237 * win32-low.h (struct win32_target_ops):
8238 <supports_z_point_type>: New method.
8239 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8240 instead of a char. Also take a raw breakpoint pointer.
8241
932539e3
PA
82422014-05-20 Pedro Alves <palves@redhat.com>
8243
8244 * mem-break.h: Include break-common.h.
8245 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8246 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8247 (Z_packet_to_target_hw_bp_type): New declaration.
8248 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8249 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8250 (Z_PACKET_ACCESS_WP): Delete macros.
8251 (Z_packet_to_hw_type): Delete function.
8252 * i386-low.h: Don't include break-common.h here.
8253 (Z_packet_to_hw_type): Delete declaration.
8254 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8255 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8256 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8257 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8258 * linux-aarch64-low.c: Don't include break-common.h here.
8259 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8260 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8261 (Z_packet_to_target_hw_bp_type): Delete function.
8262 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8263 function.
8264 (mips_insert_point, mips_remove_point): Use
8265 Z_packet_to_target_hw_bp_type.
8266
4ff0d3d8
PA
82672014-05-20 Pedro Alves <palves@redhat.com>
8268
8269 * linux-aarch64-low.c: Include break-common.h.
8270 (enum target_point_type): Delete.
8271 (Z_packet_to_point_type): Rename to ...
8272 (Z_packet_to_target_hw_bp_type): ... this, and return a
8273 target_hw_bp_type instead.
8274 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8275 instead of an enum target_point_type.
8276 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8277 breakpoint type.
8278 (aarch64_dr_state_insert_one_point)
8279 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8280 (aarch64_handle_aligned_watchpoint)
8281 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8282 Take an enum target_hw_bp_type instead of an enum
8283 target_point_type.
8284 (aarch64_supports_z_point_type): New function.
8285 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8286 use Z_packet_to_target_hw_bp_type.
8287
786dc519
JB
82882014-05-20 Joel Brobecker <brobecker@adacore.com>
8289
8290 * configure.ac: Only use -Werror by default when DEVELOPMENT
8291 is true.
8292 * configure: Regenerate.
8293
9e0aa64f
JK
82942014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8295
8296 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8297 * linux-x86-low.c (X86_64_USER_REGS): New.
8298 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8299
2b577b92
YQ
83002014-04-28 Yao Qi <yao@codesourcery.com>
8301
8302 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8303 name.
8304
94611da2
PA
83052014-04-25 Pedro Alves <palves@redhat.com>
8306
8307 PR server/16255
8308 * linux-low.c (linux_attach_fail_reason_string): New function.
8309 (linux_attach_lwp): Delete.
8310 (linux_attach_lwp_1): Rename to ...
8311 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8312 argument. Remove "initial" parameter. Return int instead of
8313 void. Don't error or warn here.
8314 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8315 failure to attach to the tgid. Call warning when failing to
8316 attach to an lwp.
8317 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8318 argument. Remove "initial" parameter. Return int instead of
8319 void. Don't error or warn here.
8320 (linux_attach_fail_reason_string): New declaration.
8321 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8322 interface change. Use linux_attach_fail_reason_string.
8323
01f9f808
MS
83242014-04-24 Michael Sturm <michael.sturm@mintel.com>
8325 Walfred Tedeschi <walfred.tedeschi@intel.com>
8326
8327 * Makefile.in: Added rules to handle new files
8328 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8329 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8330 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8331 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8332 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8333 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8334 x32-avx512-linux.o.
8335 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8336 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8337 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8338 i386/x32-avx512.xml.
8339 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8340 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8341 i386/x32-avx512-linux.xml.
8342 * i387-fp.c (num_avx512_k_registers): New constant for number
8343 of K registers.
8344 (num_avx512_zmmh_low_registers): New constant for number of
8345 lower ZMM registers (0-15).
8346 (num_avx512_zmmh_high_registers): New constant for number of
8347 higher ZMM registers (16-31).
8348 (num_avx512_ymmh_registers): New contant for number of higher
8349 YMM registers (ymm16-31 added by avx521 on x86_64).
8350 (num_avx512_xmm_registers): New constant for number of higher
8351 XMM registers (xmm16-31 added by AVX512 on x86_64).
8352 (struct i387_xsave): Add space for AVX512 registers.
8353 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8354 Add code to handle AVX512 registers.
8355 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8356 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8357 prototypei from generated file.
8358 (tdesc_amd64_avx512_linux): Likewise.
8359 (init_registers_x32_avx512_linux): Likewise.
8360 (tdesc_x32_avx512_linux): Likewise.
8361 (init_registers_i386_avx512_linux): Likewise.
8362 (tdesc_i386_avx512_linux): Likewise.
8363 (x86_64_regmap): Add AVX512 registers.
8364 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8365 mask.
8366 (initialize_low_arch): Add code to initialize AVX512 registers.
8367
51aa91f9
PA
83682014-04-23 Pedro Alves <palves@redhat.com>
8369
8370 * mem-break.c (find_gdb_breakpoint_at): Make static.
8371 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8372
a4165e94
PA
83732014-04-23 Pedro Alves <palves@redhat.com>
8374
8375 * i386-low.c: Don't include break-common.h here.
8376 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8377 prototype to take target_hw_bp_type as argument instead of a Z
8378 packet char.
8379 * i386-low.h: Include break-common.h here.
8380 (Z_packet_to_hw_type): Declare.
8381 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8382 prototypes.
8383 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8384 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8385 (x86_remove_point): Convert the packet number to a
8386 target_hw_bp_type before calling i386_low_remove_watchpoint.
8387 * win32-i386-low.c (i386_insert_point): Convert the packet number
8388 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8389 (i386_remove_point): Convert the packet number to a
8390 target_hw_bp_type before calling i386_low_remove_watchpoint.
8391
b8acf843
PA
83922014-04-23 Pedro Alves <palves@redhat.com>
8393
8394 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8395
d708bcd1
PA
83962014-04-10 Pedro Alves <palves@redhat.com>
8397
8398 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8399 Check if the condition or command is NULL before checking if the
8400 breakpoint is known. On success, return true.
8401 * mem-break.h (add_breakpoint_condition): Document return.
8402 (add_breakpoint_commands): Add describing comment.
8403 * server.c (skip_to_semicolon): New function.
8404 (process_point_options): Use it.
8405
2eec7d5b
PA
84062014-04-09 Pedro Alves <palves@redhat.com>
8407
8408 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8409 to lwpid_of.
8410
fa96cb38
PA
84112014-02-27 Pedro Alves <palves@redhat.com>
8412
8413 PR 12702
8414 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8415 macros.
8416 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8417 output.
8418 (last_thread_of_process_p): Take a PID argument instead of a
8419 thread pointer.
8420 (linux_wait_for_lwp): Delete.
8421 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8422 functions.
8423 (linux_low_filter_event): New function, party factored out from
8424 linux_wait_for_event.
8425 (linux_wait_for_event): Rename to ...
8426 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8427 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8428 sigsuspend. Check for zombie leaders.
8429 (linux_wait_for_event): Reimplement as wrapper around
8430 linux_wait_for_event_filtered.
8431 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8432 a normal or signal exit is seen, it's the whole process exiting.
8433 (wait_for_sigstop): No longer a for_each_inferior callback.
8434 Rewrite on top of linux_wait_for_event_filtered.
8435 (stop_all_lwps): Call wait_for_sigstop directly.
8436 * server.c (resume, handle_target_event): Handle
8437 TARGET_WAITKIND_NO_RESUMED.
8438
d763de10
JB
84392014-02-26 Joel Brobecker <brobecker@adacore.com>
8440
8441 * win32-low.c (psapi_get_dll_name,
8442 * win32_CreateToolhelp32Snapshot): Delete.
8443 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8444 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8445 Delete.
8446 (handle_load_dll): Add function description.
8447 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8448
850a0f76
JB
84492014-02-26 Joel Brobecker <brobecker@adacore.com>
8450
8451 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8452 Add comment.
8453 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8454 base address when calling win32_add_one_solib.
8455 (handle_load_dll): Delete local variable load_addr.
8456 Remove 0x1000 offset applied to DLL base address when calling
8457 win32_add_one_solib.
8458 (handle_unload_dll): Add comment.
8459
f25b3fc3
JB
84602014-02-26 Joel Brobecker <brobecker@adacore.com>
8461
8462 * win32-low.c (win32_add_all_dlls): Renames
8463 win32_ensure_ntdll_loaded. Rewrite function documentation.
8464 Adjust implementation to always load all DLLs.
8465 Add 0x1000 offset to DLL base address when calling
8466 win32_add_one_solib.
8467 (child_initialization_done): New static global.
8468 (do_initial_child_stuff): Set child_initialization_done to
8469 zero during child initialization, and 1 after. Replace call
8470 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8471 Add comment.
8472 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8473 (handle_unload_dll): Add function documentation.
8474 (get_child_debug_event): Ignore load and unload DLL events
8475 during child initialization.
8476
d86d4aaf
DE
84772014-02-20 Doug Evans <dje@google.com>
8478
3bc32da3 8479 Remove global all_lwps.
d86d4aaf
DE
8480 * inferiors.h (ptid_of): Move here from linux-low.h.
8481 (pid_of, lwpid_of): Ditto.
8482 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8483 parameter is a struct thread_info * now.
8484 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8485 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8486 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8487 directly.
8488 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8489 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8490 * linux-arm-low.c (update_registers_callback): Update, "entry"
8491 parameter is a struct thread_info * now.
8492 Fetch lwpid from current_inferior directly.
8493 (arm_insert_point): Pass &all_threads to find_inferior instead of
8494 &all_lwps.
8495 (arm_remove_point): Ditto.
8496 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8497 (arm_prepare_to_resume): Fetch pid from thread.
8498 (arm_read_description): Fetch lwpid from current_inferior directly.
8499 * linux-low.c (all_lwps): Delete.
8500 (delete_lwp): Delete call to remove_inferior.
8501 (handle_extended_wait): Fetch lwpid from thread.
8502 (add_lwp): Don't set lwp->entry.id. Remove call to
8503 add_inferior_to_list.
8504 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8505 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8506 (kill_one_lwp_callback): Ditto.
8507 (linux_kill): Don't dereference NULL pointer.
8508 Fetch ptid,lwpid from thread.
8509 (get_detach_signal): Fetch ptid from thread.
8510 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8511 Simplify call to regcache_invalidate_thread.
8512 (delete_lwp_callback): Update, "entry" parameter is a
8513 struct thread_info * now. Fetch pid from thread.
8514 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8515 (status_pending_p_callback): Update, "entry" parameter is a
8516 struct thread_info * now. Fetch ptid from thread.
8517 (find_lwp_pid): Update, "entry" parameter is a
8518 struct thread_info * now.
8519 (linux_wait_for_lwp): Fetch pid from thread.
8520 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8521 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8522 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8523 (dequeue_one_deferred_signal): Ditto.
8524 (cancel_breakpoint): Fetch ptid from current_inferior.
8525 (linux_wait_for_event): Pass &all_threads to find_inferior,
8526 not &all_lwps. Fetch ptid, lwpid from thread.
8527 (count_events_callback): Update, "entry" parameter is a
8528 struct thread_info * now.
8529 (select_singlestep_lwp_callback): Ditto.
8530 (select_event_lwp_callback): Ditto.
8531 (cancel_breakpoints_callback): Ditto.
8532 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8533 not &all_lwps.
8534 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8535 (unsuspend_one_lwp): Update, "entry" parameter is a
8536 struct thread_info * now.
8537 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8538 not &all_lwps.
8539 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8540 Fetch lwpid from thread, not lwp.
8541 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8542 Pass &all_threads to find_inferior, not &all_lwps.
8543 (send_sigstop): Fetch lwpid from thread, not lwp.
8544 (send_sigstop_callback): Update, "entry" parameter is a
8545 struct thread_info * now.
8546 (suspend_and_send_sigstop_callback): Ditto.
8547 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8548 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8549 struct thread_info * now.
8550 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8551 from thread, lwp.
8552 (lwp_running): Update, "entry" parameter is a
8553 struct thread_info * now.
8554 (stop_all_lwps): Fetch ptid from thread.
8555 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8556 (linux_resume_one_lwp): Fetch lwpid from thread.
8557 (linux_set_resume_request): Update, "entry" parameter is a
8558 struct thread_info * now. Fetch pid, lwpid from thread.
8559 (resume_status_pending_p): Update, "entry" parameter is a
8560 struct thread_info * now.
8561 (need_step_over_p): Ditto. Fetch lwpid from thread.
8562 (start_step_over): Fetch lwpid from thread.
8563 (linux_resume_one_thread): Update, "entry" parameter is a
8564 struct thread_info * now. Fetch lwpid from thread.
8565 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8566 (proceed_one_lwp): Update, "entry" parameter is a
8567 struct thread_info * now. Fetch lwpid from thread.
8568 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8569 struct thread_info * now.
8570 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8571 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8572 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8573 directly.
8574 (regsets_store_inferior_registers): Ditto.
8575 (fetch_register, store_register): Ditto.
8576 (linux_read_memory, linux_write_memory): Ditto.
8577 (linux_request_interrupt): Ditto.
8578 (linux_read_auxv): Ditto.
8579 (linux_xfer_siginfo): Ditto.
8580 (linux_qxfer_spu): Ditto.
8581 (linux_qxfer_libraries_svr4): Ditto.
8582 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8583 moved to inferiors.h.
8584 (get_lwp): Delete.
8585 (get_thread_lwp): Update.
8586 (struct lwp_info): Delete member "entry". Simplify comment for
8587 member "thread".
8588 (all_lwps): Delete.
8589 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8590 current_inferior directly.
8591 (update_watch_registers_callback): Update, "entry" parameter is a
8592 struct thread_info * now. Fetch pid from thread.
8593 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8594 (mips_insert_point): Fetch lwpid from current_inferior.
8595 Pass &all_threads to find_inferior, not &all_lwps.
8596 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8597 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8598 directly.
8599 (mips_stopped_data_address): Ditto.
8600 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8601 directly.
8602 * linux-tile-low.c (tile_arch_setup): Ditto.
8603 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8604 (update_debug_registers_callback): Update, "entry" parameter is a
8605 struct thread_info * now. Fetch pid from thread.
8606 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8607 Pass &all_threads to find_inferior, not &all_lwps.
8608 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8609 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8610 Pass &all_threads to find_inferior, not &all_lwps.
8611 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8612 (i386_dr_low_get_status): Ditto.
8613 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8614 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8615 (x86_linux_read_description): Ditto.
8616 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8617
3b8361aa
DE
86182014-02-20 Doug Evans <dje@google.com>
8619
8620 * inferiors.c (get_first_inferior): Fix buglet.
8621
f7667f0d
DE
86222014-02-19 Doug Evans <dje@google.com>
8623
8624 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8625 * inferiors.c (add_thread): Change result type to struct thread_info *.
8626 All callers updated.
8627 (add_lwp): Call add_thread here instead of in callers.
8628 All callers updated.
8629 * linux-low.h (get_lwp_thread): Rewrite.
8630 (struct lwp_info): New member "thread".
8631
b3312d80
DE
86322014-02-19 Doug Evans <dje@google.com>
8633
8634 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8635 All callers updated.
8636
ecc6f45c
DE
86372014-02-19 Doug Evans <dje@google.com>
8638
8639 * inferiors.c (add_thread): Fix whitespace.
8640
649ebbca
DE
86412014-02-19 Doug Evans <dje@google.com>
8642
8643 * dll.c (clear_dlls): Replace accessing list implemention details
8644 with API function.
8645 * gdbthread.h (get_first_thread): Declare.
8646 * inferiors.c (for_each_inferior_with_data): New function.
8647 (get_first_thread): New function.
8648 (find_thread_ptid): Simplify.
8649 (get_first_inferior): New function.
8650 (clear_list): Delete.
8651 (one_inferior_p): New function.
8652 (clear_inferior_list): New function.
8653 (clear_inferiors): Update.
8654 * inferiors.h (for_each_inferior_with_data): Declare.
8655 (clear_inferior_list): Declare.
8656 (one_inferior_p): Declare.
8657 (get_first_inferior): Declare.
8658 * linux-low.c (linux_wait_for_event): Replace accessing list
8659 implemention details with API function.
8660 * server.c (target_running): Ditto.
8661 (accumulate_file_name_length): New function.
8662 (emit_dll_description): New function.
8663 (handle_qxfer_libraries): Replace accessing list implemention
8664 details with API function.
8665 (handle_qxfer_threads_worker): New function.
8666 (handle_qxfer_threads_proper): Replace accessing list implemention
8667 details with API function.
8668 (handle_query): Ditto.
8669 (visit_actioned_threads_callback_ftype): New typedef.
8670 (visit_actioned_threads_data): New struct.
8671 (visit_actioned_threads): Rewrite to be find_inferior callback.
8672 (resume): Call find_inferior.
8673 (handle_status): Replace accessing list implemention
8674 details with API function.
8675 (process_serial_event): Replace accessing list implemention details
8676 with API function.
8677 * target.c (set_desired_inferior): Replace accessing list implemention
8678 details with API function.
8679 * tracepoint.c (same_process_p): New function.
8680 (gdb_agent_about_to_close): Replace accessing list implemention
8681 details with API function.
8682 * win32-low.c (child_delete_thread): Replace accessing list
8683 implemention details with API function.
8684 (match_dll_by_basename): New function.
8685 (dll_is_loaded_by_basename): New function.
8686 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8687 details call to dll_is_loaded_by_basename.
8688
80894984
DE
86892014-02-19 Doug Evans <dje@google.com>
8690
8691 * dll.h (struct dll_info): Add comment.
8692 * gdbthread.h (struct thread_info): Add comment.
8693 (current_ptid): Simplify.
8694 * inferiors.c (add_process): Update.
8695 (remove_process): Update.
8696 * inferiors.h (struct process_info): Rename member "head" to "entry".
8697 * linux-low.c (delete_lwp): Update.
8698 (add_lwp): Update.
8699 (last_thread_of_process_p): Update.
8700 (kill_one_lwp_callback, linux_kill): Update.
8701 (status_pending_p_callback): Update.
8702 (wait_for_sigstop): Update. Simplify read of ptid.
8703 (start_step_over): Update.
8704 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8705 (get_lwp_thread): Update.
8706 (struct lwp_info): Rename member "head" to "entry".
8707 * regcache.h (inferior_list_entry): Delete.
8708 * server.c (kill_inferior_callback): Update.
8709 (detach_or_kill_inferior_callback): Update.
8710 (print_started_pid): Update.
8711 (print_attached_pid): Update.
8712 (process_serial_event): Simplify read of ptid.
8713 * thread-db.c (thread_db_create_event): Update.
8714 (thread_db_get_tls_address): Update.
8715 * win32-low.c (current_inferior_ptid): Simplify.
8716
46917d26
TT
87172014-02-19 Tom Tromey <tromey@redhat.com>
8718
8719 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8720 argument.
8721 (target_supports_btrace): Update.
8722
0759a81e
YQ
87232014-02-14 Yao Qi <yao@codesourcery.com>
8724
8725 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8726 (rsp-low-ipa.o): New target.
8727
a7191e8b
TT
87282014-02-12 Tom Tromey <tromey@redhat.com>
8729
8730 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8731 convert_ascii_to_int.
8732 * regcache.c (registers_to_string): Likewise.
8733 * remote-utils.c (decode_M_packet): Likewise.
8734 * server.c (process_serial_event): Likewise.
8735
ff0e980e
TT
87362014-02-12 Tom Tromey <tromey@redhat.com>
8737
8738 * server.c (handle_query, handle_v_run): Use hex2bin, not
8739 unhexify.
8740 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8741
e9371aff
TT
87422014-02-12 Tom Tromey <tromey@redhat.com>
8743
8744 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8745 convert_int_to_ascii.
8746 * regcache.c (registers_to_string, collect_register_as_string):
8747 Likewise.
8748 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8749 Likewise.
8750 * server.c (process_serial_event): Likewise.
8751 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8752 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8753
971dc0b8
TT
87542014-02-12 Tom Tromey <tromey@redhat.com>
8755
8756 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8757 bin2hex, not hexify.
8758 * tracepoint.c (cmd_qtstatus): Likewise.
8759
0a822afb
TT
87602014-02-12 Tom Tromey <tromey@redhat.com>
8761
8762 * remote-utils.c (monitor_output): Pass explicit length to
8763 hexify.
8764
9c3d6531
TT
87652014-02-12 Tom Tromey <tromey@redhat.com>
8766
8767 * tracepoint.c: Include rsp-low.h.
8768 * server.c: Include rsp-low.h.
8769 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8770 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8771 declare.
8772 * remote-utils.c: Include rsp-low.h.
8773 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8774 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8775 (convert_int_to_ascii, convert_ascii_to_int): Move to
8776 common/rsp-low.c.
8777 * regcache.c: Include rsp-low.h.
8778 * ax.c: Include rsp-low.h.
8779 * Makefile.in (SFILES): Add common/rsp-low.c.
8780 (OBS): Add rsp-low.o.
8781 (rsp-low.o): New target.
8782
01fd3ea5
TT
87832014-02-12 Tom Tromey <tromey@redhat.com>
8784
8785 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8786 Include print-utils.h.
8787 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8788 (plongest, thirty_two, phex_nz): Remove.
8789 * Makefile.in (SFILES): Add common/print-utils.c.
8790 (OBS): Add print-utils.o.
8791 (print-utils-ipa.o): New target.
8792 (print-utils.o): New target.
8793 (IPA_OBJS): Add print-utils-ipa.o.
8794
e99dc820
TT
87952014-02-06 Tom Tromey <tromey@redhat.com>
8796
8797 * Makefile.in (SFILES): Fix indentation.
8798
ee1e2d4f
DE
87992014-02-05 Doug Evans <dje@google.com>
8800
8801 * linux-low.c (linux_wait_for_event): Improve comment.
8802 (linux_wait_1): Keep current_inferior in sync with event_child.
8803
f5a02773
DE
88042014-01-22 Doug Evans <dje@google.com>
8805
8806 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8807
87ce2a04
DE
88082014-01-22 Doug Evans <dje@google.com>
8809
8810 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8811 * configure: Regenerate.
8812 * config.in: Regenerate.
8813 * Makefile.in (SFILES): Add debug.c.
8814 (OBS): Add debug.o.
8815 * debug.c: New file.
8816 * debug.h: New file.
8817 * linux-aarch64-low.c (*): Update all debugging printfs to use
8818 debug_printf instead of fprintf.
8819 * linux-arm-low.c (*): Ditto.
8820 * linux-cris-low.c (*): Ditto.
8821 * linux-crisv32-low.c (*): Ditto.
8822 * linux-m32r-low.c (*): Ditto.
8823 * linux-sparc-low.c (*): Ditto.
8824 * linux-x86.c (*): Ditto.
8825 * linux-low.c (*): Ditto.
8826 (linux_wait_1): Add calls to debug_enter, debug_exit.
8827 (linux_wait): Remove redundant debugging printf.
8828 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8829 (linux_resume, unstop_all_lwps): Ditto.
8830 * mem-break.c (*): Update all debugging printfs to use
8831 debug_printf instead of fprintf.
8832 * remote-utils.c (*): Ditto.
8833 * thread-db.c (*): Ditto.
8834 * server.c #include <ctype.h>, "gdb_vecs.h".
8835 (debug_threads): Moved to debug.c.
8836 (*): Update all debugging printfs to use debug_printf instead of
8837 fprintf.
8838 (start_inferior): Replace call to fflush with call to debug_flush.
8839 (monitor_show_help): Mention set debug-format.
8840 (parse_debug_format_options): New function.
8841 (handle_monitor_command): Handle "monitor set debug-format".
8842 (gdbserver_usage): Mention --debug-format.
8843 (main): Parse --debug-format.
8844 * server.h (debug_threads): Declaration moved to debug.h.
8845 #include "debug.h".
8846 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8847 trace_debug_1 that uses debug_printf.
8848 (tracepoint_look_up_symbols): Update all debugging printfs to use
8849 debug_printf instead of fprintf.
8850
e671835b
BS
88512014-01-20 Baruch Siach <baruch@tkos.co.il>
8852
8853 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8854 sys/ptrace.h.
8855
b5737fa9
PA
88562014-01-17 Pedro Alves <palves@redhat.com>
8857
ea38d2a9 8858 PR build/16445
c7faa97a
PA
8859 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8860 defined after including gdb_proc_service.h.
b5737fa9 8861
40ed484e
DE
88622014-01-16 Doug Evans <dje@google.com>
8863
8864 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8865 (match_dll): Use it.
8866
969c39fb
MM
88672014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8868
8869 * target.h (target_ops) <read_btrace>: Change parameters and
8870 return type to allow error reporting.
8871 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8872 trace reading errors on.
8873 * linux-low.c (linux_low_read_btrace): Pass trace reading
8874 errors on.
8875 (linux_low_disable_btrace): New.
8876
ab7f45ba
DE
88772014-01-15 Doug Evans <dje@google.com>
8878
8879 * inferiors.c (thread_id_to_gdb_id): Delete.
8880 * inferiors.h (thread_id_to_gdb_id): Delete.
8881
66af0f44
EZ
88822014-01-13 Eli Zaretskii <eliz@gnu.org>
8883
8884 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8885 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8886 versions.
8887
9939e131
PA
88882014-01-08 Pedro Alves <palves@redhat.com>
8889
8890 * server.c (handle_status): Don't discard previous queued stop
8891 replies or thread's pending status here.
8892 (main) <disconnection>: Do it here instead.
8893
b7ea362b
PA
88942014-01-08 Pedro Alves <palves@redhat.com>
8895
8896 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8897 * server.c (visit_actioned_threads, handle_pending_status): New
8898 function.
8899 (handle_v_cont): Factor out parts to ...
8900 (resume): ... this new function. If in all-stop, and a thread
8901 being resumed has a pending status, report it without actually
8902 resuming.
8903 (myresume): Adjust to use the new 'resume' function.
8904 (clear_pending_status_callback, set_pending_status_callback)
8905 (find_status_pending_thread_callback): New functions.
8906 (handle_status): Handle the case of multiple threads having
8907 interesting statuses to report. Report threads' real last signal
8908 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8909 with an interesting thread to report the status for, instead of
8910 always reporting the status of the first thread.
8911
28498c42
JB
89122014-01-01 Joel Brobecker <brobecker@adacore.com>
8913
8914 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8915 * gdbreplay.c (gdbreplay_version): Likewise.
8916
f45c82da
YZ
89172013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8918
8919 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8920 iov.iov_len with the real length in use.
8921
379a5e2d
JB
89222013-12-13 Joel Brobecker <brobecker@adacore.com>
8923
8924 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8925 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8926 for all targets that use win32-low.c.
8927 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8928 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8929
4210d83e
PA
89302013-12-13 Pedro Alves <palves@redhat.com>
8931
8932 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8933 if equal to TARGET_WAITKIND_LOADED.
8934 * win32-low.c (cached_status): New static global.
8935 (win32_wait): Add declaration.
8936 (do_initial_child_stuff): Flush all initial pending debug events
8937 up to the initial breakpoint.
8938 (win32_wait): If CACHED_STATUS was set, return that instead
8939 of doing a real wait. Remove the code resuming the execution
8940 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8941 during the initial phase. Also remove the code changing
8942 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8943 TARGET_WAITKIND_STOPPED.
8944
e7f0d979
YQ
89452013-12-11 Yao Qi <yao@codesourcery.com>
8946
8947 * notif.c (handle_notif_ack): Return 0 if no notification
8948 matches.
8949
ebcf782c
DE
89502013-11-20 Doug Evans <dje@google.com>
8951
8952 * linux-low.c (linux_set_resume_request): Fix comment.
8953
20ad9378
DE
89542013-11-20 Doug Evans <dje@google.com>
8955
8956 * linux-low.c (resume_status_pending_p): Tweak comment.
8957
a196ebeb
WT
89582013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8959
8960 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8961 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8962 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8963 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8964 (srv_amd64_regobj): Add amd64-mpx.o.
8965 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8966 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8967 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8968 * i387-fp.c (num_pl_bnd_register) Added constant.
8969 (num_pl_bnd_cfg_registers) Added constant.
8970 (struct i387_xsave) Added reserved area and MPX fields.
8971 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8972 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8973 function.
8974 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8975 (init_registers_amd64_mpx_linux): Declare new function.
8976 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8977 (x86_64_regmap): Add MPX registers.
8978 (x86_linux_read_description): Add MPX case.
8979 (initialize_low_arch): Initialize MPX targets.
8980
0080a2f6
TT
89812013-11-18 Tom Tromey <tromey@redhat.com>
8982
8983 * configure: Rebuild.
8984 * configure.ac: Don't check for stdlib.h.
8985 * gdbreplay.c: Unconditionally include stdlib.h.
8986
2978b111
TT
89872013-11-18 Tom Tromey <tromey@redhat.com>
8988
8989 * config.in: Rebuild.
8990 * configure: Rebuild.
8991 * configure.ac: Don't use AC_HEADER_DIRENT.
8992
a3d08894
TT
89932013-11-18 Tom Tromey <tromey@redhat.com>
8994
8995 * server.h: Don't check HAVE_STRING_H.
8996 * gdbreplay.c: Don't check HAVE_STRING_H.
8997 * configure: Rebuild.
8998
0a5dd17d
TT
89992013-11-18 Tom Tromey <tromey@redhat.com>
9000
9001 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9002 LIBGNU.
9003
1bd2f0ba
TT
90042013-11-08 Tom Tromey <tromey@redhat.com>
9005
9006 * configure, config.in: Rebuild.
9007 * configure.ac: Remove unused configury.
9008
3266f10b
TT
90092013-11-08 Tom Tromey <tromey@redhat.com>
9010
9011 * acinclude.m4: Include common.m4, codeset.m4.
9012 * configure, config.in: Rebuild.
9013 * configure.ac: Use GDB_AC_COMMON.
9014
6682d959
AA
90152013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9016
9017 * linux-s390-low.c (HWCAP_S390_TE): New define.
9018 (s390_arch_setup): Consider the TE field in the HWCAP for
9019 determining 'have_regset_tdb'.
9020
fd0a4d76
SDJ
90212013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9022
9023 PR gdb/16014
9024 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9025 call to sizeof.
9026
1a3d890b
PA
90272013-10-02 Pedro Alves <palves@redhat.com>
9028
9029 * server.c (process_serial_event): Don't output "GDBserver
9030 exiting" if GDB is connected through stdio.
9031 * target.c (mywait): Likewise, be silent if GDB is connected
9032 through stdio.
9033
97ad4581
JB
90342013-10-01 Joel Brobecker <brobecker@adacore.com>
9035
9036 * lynx-low.c (lynx_add_threads_after_attach): New function.
9037 (lynx_attach): Remove call to add_thread. Add call to
9038 lynx_add_threads_after_attach instead.
9039
5b4e221c
MF
90402013-09-28 Mike Frysinger <vapier@gentoo.org>
9041
9042 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9043 * config.in, configure: Regenerated.
9044
ee47b2f8
YQ
90452013-09-18 Yao Qi <yao@codesourcery.com>
9046
9047 PR server/15959
9048 * server.c (start_inferior): Clear 'resume_info'.
9049
d6707650 90502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9051
d6707650
JW
9052 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9053 for each register.
9054
9243dd0e 90552013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9056
9243dd0e
JW
9057 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9058 linux-tile-low.o to srv_tgtobj.
9059
c623a6ef
WN
90602013-09-16 Will Newton <will.newton@linaro.org>
9061
9062 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9063 out regs.
9064
fb71d39e
PA
90652013-09-06 Pedro Alves <palves@redhat.com>
9066
9067 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9068 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9069 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9070 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9071 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9072 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9073
8e7e9910
PA
90742013-09-06 Pedro Alves <palves@redhat.com>
9075
9076 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9077 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9078
7c3a12ca
PA
90792013-09-06 Pedro Alves <palves@redhat.com>
9080
9081 * linux-amd64-ipa.c: Include tracepoint.h.
9082 * linux-i386-ipa.c: Include tracepoint.h.
9083
8eb3d7b6
RW
90842013-09-06 Ricard Wanderlof <ricardw@axis.com>
9085
9086 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9087 (ps_get_thread_area): New function.
9088
eddddb9d
RW
90892013-09-06 Ricard Wanderlof <ricardw@axis.com>
9090
9091 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9092 (initialize_low_arch): Call init_registers_crisv32 rather than
9093 init_register_crisv32.
9094
533b0600
PA
90952013-09-05 Pedro Alves <palves@redhat.com>
9096
9097 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9098 to ...
9099 * hostio.h: ... this new file.
9100 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9101 win32-low.c: Include hostio.h.
9102
0ce3d3b5
PA
91032013-09-05 Pedro Alves <palves@redhat.com>
9104
9105 * server.h (gdb_client_data, handler_func, callback_handler_func)
9106 (delete_file_handler, add_file_handler, append_callback_event)
9107 (delete_callback_event, start_event_loop, initialize_event_loop):
9108 Move to event-loop.h and include it.
9109 * event-loop.h: New file.
9110
799cdc37
PA
91112013-09-05 Pedro Alves <palves@redhat.com>
9112
9113 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9114 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9115 (loaded_dll, unloaded_dll): Move to ...
9116 * dll.h: ... this new file.
9117 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9118
6a6bbd9d
PA
91192013-09-05 Pedro Alves <palves@redhat.com>
9120
9121 * server.h (current_process, get_thread_process, all_processes)
9122 (add_inferior_to_list, for_each_inferior, current_inferior)
9123 (remove_inferior, add_process, remove_process, find_process_pid)
9124 (have_started_inferiors_p, have_attached_inferiors_p)
9125 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9126 (clear_inferiors, find_inferior, find_inferior_id)
9127 (inferior_target_data, set_inferior_target_data)
9128 (inferior_regcache_data, set_inferior_regcache_data): Move to
9129 inferiors.h, and include it.
9130 * inferiors.h: New file.
9131
f699aaba
PA
91322013-09-05 Pedro Alves <palves@redhat.com>
9133
9134 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9135 Move ...
72f4393d 9136 * ax.h: ... here.
f699aaba 9137
c144c7a0
PA
91382013-09-05 Pedro Alves <palves@redhat.com>
9139
9140 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9141 tracepoint.h.
9142 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9143 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9144 (handle_tracepoint_general_set, handle_tracepoint_query)
9145 (tracepoint_finished_step, tracepoint_was_hit)
9146 (release_while_stepping_state_list, current_traceframe)
9147 (in_readonly_region, traceframe_read_mem)
9148 (fetch_traceframe_registers, traceframe_read_sdata)
9149 (traceframe_read_info, struct fast_tpoint_collect_status)
9150 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9151 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9152 (supply_fast_tracepoint_registers)
9153 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9154 (ipa_tdesc, claim_trampoline_space)
9155 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9156 (agent_mem_read, agent_get_trace_state_variable_value)
9157 (agent_set_trace_state_variable_value, agent_tsv_read)
9158 (agent_mem_read_string, get_raw_reg_func_addr)
9159 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9160 * tracepoint.h: ... this new file.
9161
ff42e6ab
PA
91622013-09-05 Pedro Alves <palves@redhat.com>
9163
9164 * server.h (perror_with_name, error, fatal, warning, paddress)
9165 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9166 include it.
9167 * utils.h: New file.
9168
541af0f4
PA
91692013-09-05 Pedro Alves <palves@redhat.com>
9170
9171 * server.h (remote_debug, noack_mode, transport_is_reliable)
9172 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9173 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9174 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9175 (write_enn, initialize_async_io, enable_async_io)
9176 (disable_async_io, check_remote_input_interrupt_request)
9177 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9178 (dead_thread_notify, prepare_resume_reply)
9179 (decode_address_to_semicolon, decode_address, decode_m_packet)
9180 (decode_M_packet, decode_X_packet, decode_xfer_write)
9181 (decode_search_memory_packet, unhexify, hexify)
9182 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9183 (look_up_one_symbol, relocate_instruction)
9184 (monitor_output): Move to remote-utils.h, and include it.
9185 * remote-utils.h: New file.
9186
eebdf26b
PA
91872013-09-05 Pedro Alves <palves@redhat.com>
9188
9189 * server.h (_): Delete.
9190
3aafd2ff
PA
91912013-09-02 Pedro Alves <palves@redhat.com>
9192
9193 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9194 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9195 allocated.
9196 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9197
cee83bcb
PM
91982013-09-02 Pierre Muller <muller@sourceware.org>
9199
9200 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9201 or WriteProcessMemory complete successfully and handle
9202 ERROR_PARTIAL_COPY error.
9203
9a13b2fa
PA
92042013-09-02 Pedro Alves <palves@redhat.com>
9205
9206 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9207 error instead of EIO.
9208
602e3198
JK
92092013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9210
9211 PR server/15604
9212 * linux-low.c: Include filestuff.h.
9213 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9214 * lynx-low.c: Include filestuff.h.
9215 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9216 * server.c: Include filestuff.h.
9217 (main): Call notice_open_fds.
9218 * spu-low.c: Include filestuff.h.
9219 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9220
96d7229d
LM
92212013-08-22 Luis Machado <lgustavo@codesourcery.com>
9222
9223 * Makefile.in: Explain why ../target and ../nat are not
9224 listed as include file search paths.
9225 (linux-waitpid.o): New object file rule.
9226 * configure.srv (srv_native_linux_obj): New variable.
9227 Replace all occurrences of linux native object files with
9228 $srv_native_linux_obj.
9229 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9230 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9231 (linux_enable_event_reporting): Remove declaration.
9232 (my_waitpid): Moved to common/linux-waitpid.c.
9233 (linux_wait_for_event): Pass ptid when calling
9234 linux_enable_event_reporting.
9235 (linux_supports_tracefork_flag): Remove.
9236 (linux_enable_event_reporting): Likewise.
9237 (linux_tracefork_grandchild): Remove.
9238 (STACK_SIZE): Moved to common/linux-ptrace.c.
9239 (linux_tracefork_child): Remove.
9240 (linux_test_for_tracefork): Remove.
9241 (linux_look_up_symbols): Call linux_supports_traceclone.
9242 (initialize_low): Remove call to linux_test_for_tracefork.
9243 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9244 common/linux-ptrace.h.
9245 (PTRACE_TYPE_ARG4): Likewise.
9246 Include linux-ptrace.h.
9247
32940073
PA
92482013-08-21 Pedro Alves <palves@redhat.com>
9249
9250 * config.in: Renegerate.
9251
33b60d58 92522013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9253
33b60d58
LM
9254 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9255 (SFILES): Remove $(srcdir)/common/target-common.c and
9256 add $(srcdir)/target/waitstatus.c.
9257 (OBS): Remove target-common.o and add waitstatus.o.
9258 (server_h): Remove $(srcdir)/../common/target-common.h and
9259 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9260 and $(srcdir)/../target/waitstatus.h.
9261 (target-common.o): Remove.
9262 (waitstatus.o): New target object file.
9263 * target.h: Do not include target-common.h and
9264 include target/resume.h, target/wait.h and
9265 target/waitstatus.h.
9266
b8e1b30e
LM
92672013-08-13 Luis Machado <lgustavo@codesourcery.com>
9268
9269 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9270 to PTRACE_TYPE_ARG3.
9271 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9272 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9273 PTRACE_TYPE_ARG4.
9274 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9275 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9276
7a60ad40
YQ
92772013-07-27 Jie Zhang <jie@codesourcery.com>
9278 Daniel Jacobowitz <dan@codesourcery.com>
9279 Yao Qi <yao@codesourcery.com>
9280
9281 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9282 (mips-linux-watch.o): New rule.
9283 (mips_linux_watch_h): New variable.
9284 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9285 srv_tgtobj.
9286 * linux-mips-low.c: Include mips-linux-watch.h.
9287 (struct arch_process_info, struct arch_lwp_info): New.
9288 (update_watch_registers_callback): New function.
9289 (mips_linux_new_process, mips_linux_new_thread) New functions.
9290 (mips_linux_prepare_to_resume, mips_insert_point): New
9291 functions.
9292 (mips_remove_point, mips_stopped_by_watchpoint): New
9293 functions.
9294 (rsp_bp_type_to_target_hw_bp_type): New function.
9295 (mips_stopped_data_address): New function.
9296 (the_low_target): Add watchpoint support functions.
9297
de6f69ad
YQ
92982013-07-27 Yao Qi <yao@codesourcery.com>
9299
9300 * i386-low.c: Include break-common.h.
9301 (enum target_hw_bp_type): Remove.
9302
3360c0bf
LM
93032013-07-24 Luis Machado <lgustavo@codesourcery.com>
9304
9305 * Makefile.in (SFILES): /common/target-common.c.
9306 (OBS): Add target-common.o.
9307 (server_h): Add $(srcdir)/../common/target-common.h.
9308 (target-common.o): New target.
9309 * server.c (queue_stop_reply_callback): Free
9310 status string after use.
9311 * target.c (target_waitstatus_to_string): Remove.
9312 * target.h: Include target-common.h.
9313 (resume_kind): Likewise.
9314 (target_waitkind): Likewise.
9315 (target_waitstatus): Likewise.
9316 (TARGET_WNOHANG): Likewise.
9317
bd885420
YQ
93182013-07-04 Yao Qi <yao@codesourcery.com>
9319
9320 * Makefile.in (host_alias): Use @host_noncanonical@.
9321 (target_alias): Use @target_noncanonical@.
9322 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9323 ACX_NONCANONICAL_HOST.
9324 * configure: Regenerated.
9325
9326 Revert:
9327 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9328
9329 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9330 * configure: Rebuild.
9331 * Makefile.in (version_host, version_target): Get from configure.
9332 (version.c): Use $(version_host) and $(version_target).
9333
17ef446e
PA
93342013-07-03 Pedro Alves <palves@redhat.com>
9335
9336 * Makefile.in (config.status): Depend on development.sh.
9337 * acinclude.m4: Include libmcheck.m4.
9338 * configure: Regenerate.
9339
7a9a7487
MG
93402013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9341
9342 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9343 attribute inside the parentheses.
9344 (winapi_DebugSetProcessKillOnExit): Ditto.
9345 (winapi_DebugBreakProcess): Ditto.
9346 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9347
49b64de6
MG
93482013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9349
9350 * notif.h (notif_event): Add a dummy member to avoid compiler
9351 errors.
9352
d5749ee7
PA
93532013-07-01 Pedro Alves <palves@redhat.com>
9354
9355 * hostio.c (HOSTIO_PATH_MAX): Define.
9356 (require_filename, handle_open, handle_unlink, handle_readlink):
9357 Use it.
9358
d8d2a3ee
PA
93592013-07-01 Pedro Alves <palves@redhat.com>
9360
9361 * server.h: Include "pathmax.h".
9362 * linux-low.c: Don't include sys/param.h.
9363 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9364 MAXPATHLEN.
9365 * win32-low.c: Don't include sys/param.h.
9366 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9367
bc7dea8d
PA
93682013-07-01 Pedro Alves <palves@redhat.com>
9369
9370 * event-loop.c: Don't check HAVE_UNISTD_H before including
9371 <unistd.h>.
9372 * gdbreplay.c: Likewise.
9373 * remote-utils.c: Likewise.
9374 * server.c: Likewise.
9375 * configure.ac: Don't check for unistd.h.
9376 * configure: Regenerate.
9377
d6c2da54
TT
93782013-06-28 Tom Tromey <tromey@redhat.com>
9379
9380 * Makefile.in (version.c): Use version.in, not
9381 common/version.in.
9382
257b6bec
MG
93832013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9384
9385 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9386 * configure: Rebuild.
9387 * Makefile.in (version_host, version_target): Get from configure.
9388 (version.c): Use $(version_host) and $(version_target).
9389
86ebe149
DK
93902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9391
9392 Fix trace-status to output user name without trailing colon.
9393 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9394
f30aa5af
DK
93952013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9396
9397 Fix trace-status to output proper start-time and stop-time.
9398 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9399 output start time and stop time in hex as gdb expects.
9400
28a93511
YQ
94012013-06-26 Pedro Alves <pedro@codesourcery.com>
9402
9403 * tracepoint.c (build_traceframe_info_xml): Output trace state
9404 variables present in the trace buffer.
9405
01208463
TT
94062013-06-24 Tom Tromey <tromey@redhat.com>
9407
9408 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9409 create-version.sh.
9410 (version.o): Remove.
9411 * gdbreplay.c: Include version.h.
9412 (version, host_name): Don't declare.
9413 * server.h: Include version.h.
9414 (version, host_name): Don't declare.
9415
760256f9
PA
94162013-06-12 Pedro Alves <palves@redhat.com>
9417
9418 * linux-x86-low.c (linux_is_elf64): Delete global.
9419 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9420 with local linux_pid_exe_is_elf_64_file use.
9421
030031ee
PA
94222013-06-11 Pedro Alves <palves@redhat.com>
9423
9424 * linux-low.c (regset_disabled, disable_regset): New functions.
9425 (regsets_fetch_inferior_registers)
9426 (regsets_store_inferior_registers): Use them.
9427 (initialize_regsets_info); Don't allocate the disabled_regsets
9428 array here.
9429 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9430 comment.
9431
5da6eb0a
PA
94322013-06-11 Pedro Alves <palves@redhat.com>
9433
9434 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9435 xmalloc.
9436
7e5aaa09
PA
94372013-06-11 Pedro Alves <palves@redhat.com>
9438
9439 * linux-x86-low.c (initialize_low_arch): Call
9440 init_registers_x32_avx_linux.
9441
d878444c
JK
94422013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9443
9444 Fix compatibility with Android Bionic.
9445 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9446 it is not empty.
9447
3aee8918
PA
94482013-06-07 Pedro Alves <palves@redhat.com>
9449
5f2b57b5 9450 PR server/14823
3aee8918
PA
9451 * Makefile.in (OBS): Add tdesc.o.
9452 (IPA_OBJS): Add tdesc-ipa.o.
9453 (tdesc-ipa.o): New rule.
9454 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9455 interface.
9456 * linux-low.c (new_inferior): Delete.
9457 (disabled_regsets, num_regsets): Delete.
9458 (linux_add_process): Adjust to set the new per-process
9459 new_inferior flag.
9460 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9461 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9462 was a stop. When calling arch_setup, switch the current inferior
9463 to the thread that got an event.
9464 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9465 (regsets_fetch_inferior_registers)
9466 (regsets_store_inferior_registers): New regsets_info parameter.
9467 Adjust to use it.
9468 (linux_register_in_regsets): New regs_info parameter. Adjust to
9469 use it.
9470 (register_addr, fetch_register, store_register): New usrregs_info
9471 parameter. Adjust to use it.
9472 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9473 parameter regs_info. Adjust to use it.
9474 (linux_fetch_registers): Get the current inferior's regs_info, and
9475 adjust to use it.
9476 (linux_store_registers): Ditto.
9477 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9478 (initialize_low): Don't initialize the target_regsets here. Call
9479 initialize_low_arch.
9480 * linux-low.h (target_regsets): Delete declaration.
9481 (struct regsets_info): New.
9482 (struct usrregs_info): New.
9483 (struct regs_info): New.
9484 (struct process_info_private) <new_inferior>: New field.
9485 (struct linux_target_ops): Delete the num_regs, regmap, and
9486 regset_bitmap fields. New field regs_info.
9487 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9488 * i387-fp.c (num_xmm_registers): Delete.
9489 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9490 calls to new interface.
9491 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9492 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9493 Infer the number of xmm registers from the regcache's target
9494 description.
9495 * i387-fp.h (num_xmm_registers): Delete.
9496 * inferiors.c (add_thread): Don't install the thread's regcache
9497 here.
9498 * proc-service.c (gregset_info): Fetch the current inferior's
9499 regs_info. Adjust to use it.
9500 * regcache.c: Include tdesc.h.
9501 (register_bytes, reg_defs, num_registers)
9502 (gdbserver_expedite_regs): Delete.
9503 (get_thread_regcache): If the thread doesn't have a regcache yet,
9504 create one, instead of aborting gdbserver.
9505 (regcache_invalidate_one): Rename to ...
9506 (regcache_invalidate_thread): ... this.
9507 (regcache_invalidate_one): New.
9508 (regcache_invalidate): Only invalidate registers of the current
9509 process.
9510 (init_register_cache): Add target_desc parameter, and use it.
9511 (new_register_cache): Ditto. Assert the target description has a
9512 non zero registers_size.
9513 (regcache_cpy): Add assertions. Adjust.
9514 (realloc_register_cache, set_register_cache): Delete.
9515 (registers_to_string, registers_from_string): Adjust.
9516 (find_register_by_name, find_regno, find_register_by_number)
9517 (register_cache_size): Add target_desc parameter, and use it.
9518 (free_register_cache_thread, free_register_cache_thread_one)
9519 (regcache_release, register_cache_size): New.
9520 (register_size): Add target_desc parameter, and use it.
9521 (register_data, supply_register, supply_register_zeroed)
9522 (supply_regblock, supply_register_by_name, collect_register)
9523 (collect_register_as_string, collect_register_by_name): Adjust.
9524 * regcache.h (struct target_desc): Forward declare.
9525 (struct regcache) <tdesc>: New field.
9526 (init_register_cache, new_register_cache): Add target_desc
9527 parameter.
9528 (regcache_invalidate_thread): Declare.
9529 (regcache_invalidate_one): Delete declaration.
9530 (regcache_release): Declare.
9531 (find_register_by_number, register_cache_size, register_size)
9532 (find_regno): Add target_desc parameter.
9533 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9534 declarations.
9535 * remote-utils.c: Include tdesc.h.
9536 (outreg, prepare_resume_reply): Adjust.
9537 * server.c: Include tdesc.h.
9538 (gdbserver_xmltarget): Delete declaration.
9539 (get_features_xml, process_serial_event): Adjust.
9540 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9541 declare.
9542 (struct process_info) <tdesc>: New field.
9543 (ipa_tdesc): Declare.
9544 * tdesc.c: New file.
9545 * tdesc.h: New file.
9546 * tracepoint.c: Include tdesc.h.
9547 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9548 (get_context_regcache): Adjust to pass ipa_tdesc down.
9549 (do_action_at_tracepoint): Adjust to get the register cache size
9550 from the context regcache's description.
9551 (traceframe_walk_blocks): Adjust to get the register cache size
9552 from the current trace frame's description.
9553 (traceframe_get_pc): Adjust to get current trace frame's
9554 description and pass it down.
9555 (gdb_collect): Adjust to get the register cache size from the
9556 IPA's description.
9557 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9558 (gdbserver_xmltarget): Delete.
9559 (initialize_low_tracepoint): Set the ipa's target description.
9560 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9561 (initialize_low_tracepoint): Set the ipa's target description.
9562 * linux-x86-low.c: Include tdesc.h.
9563 [__x86_64__] (is_64bit_tdesc): New.
9564 (ps_get_thread_area, x86_get_thread_area): Use it.
9565 (i386_cannot_store_register): Rename to ...
9566 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9567 (i386_cannot_fetch_register): Rename to ...
9568 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9569 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9570 to new interface.
9571 (target_regsets): Rename to ...
9572 (x86_regsets): ... this.
9573 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9574 interface.
9575 (x86_siginfo_fixup): Use is_64bit_tdesc.
9576 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9577 (tdesc_x32_avx_linux, tdesc_x32_linux)
9578 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9579 Declare.
9580 (x86_linux_update_xmltarget): Delete.
9581 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9582 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9583 (AMD64_LINUX_USER64_CS): New.
9584 (x86_linux_read_description): New, based on
9585 x86_linux_update_xmltarget.
9586 (same_process_callback): New.
9587 (x86_arch_setup_process_callback): New.
9588 (x86_linux_update_xmltarget): New.
9589 (x86_regsets_info): New.
9590 (amd64_linux_regs_info): New.
9591 (i386_linux_usrregs_info): New.
9592 (i386_linux_regs_info): New.
9593 (x86_linux_regs_info): New.
9594 (x86_arch_setup): Reimplement.
9595 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9596 (x86_emit_ops): Ditto.
9597 (the_low_target): Adjust. Install x86_linux_regs_info,
9598 x86_cannot_fetch_register, and x86_cannot_store_register.
9599 (initialize_low_arch): New.
9600 * linux-ia64-low.c (tdesc_ia64): Declare.
9601 (ia64_fetch_register): Adjust.
9602 (ia64_usrregs_info, regs_info): New globals.
9603 (ia64_regs_info): New function.
9604 (the_low_target): Adjust.
9605 (initialize_low_arch): New function.
9606 * linux-sparc-low.c (tdesc_sparc64): Declare.
9607 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9608 Adjust.
9609 (sparc_arch_setup): New function.
9610 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9611 (the_low_target): Adjust.
9612 (initialize_low_arch): New function.
9613 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9614 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9615 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9616 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9617 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9618 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9619 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9620 (tdesc_powerpc_isa205_vsx64l): Declare.
9621 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9622 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9623 (ppc_set_pc, ppc_get_hwcap): Adjust.
9624 (ppc_usrregs_info): Forward declare.
9625 (!__powerpc64__) ppc_regmap_adjusted: New global.
9626 (ppc_arch_setup): Adjust to the current process'es target
9627 description.
9628 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9629 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9630 (ppc_store_evrregset): Adjust.
9631 (target_regsets): Rename to ...
9632 (ppc_regsets): ... this, and make static.
9633 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9634 (ppc_regs_info): New function.
9635 (the_low_target): Adjust.
9636 (initialize_low_arch): New function.
9637 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9638 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9639 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9640 (tdesc_s390x_linux64v2): Declare.
9641 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9642 (s390_fill_gregset, s390_store_last_break): Adjust.
9643 (target_regsets): Rename to ...
9644 (s390_regsets): ... this, and make static.
9645 (s390_get_pc, s390_set_pc): Adjust.
9646 (s390_get_hwcap): New target_desc parameter, and use it.
9647 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9648 (s390_arch_setup): Adjust to set the current process'es target
9649 description. Don't adjust the regmap.
9650 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9651 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9652 (regs_info_3264): New globals.
9653 (s390_regs_info): New function.
9654 (the_low_target): Adjust.
9655 (initialize_low_arch): New function.
9656 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9657 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9658 [__mips64] (init_registers_mips_linux)
9659 (init_registers_mips_dsp_linux): Delete defines.
9660 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9661 (have_dsp): New global.
9662 (mips_read_description): New, based on mips_arch_setup.
9663 (mips_arch_setup): Reimplement.
9664 (get_usrregs_info): New function.
9665 (mips_cannot_fetch_register, mips_cannot_store_register)
9666 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9667 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9668 (target_regsets): Rename to ...
9669 (mips_regsets): ... this, and make static.
9670 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9671 (dsp_regs_info, regs_info): New globals.
9672 (mips_regs_info): New function.
9673 (the_low_target): Adjust.
9674 (initialize_low_arch): New function.
9675 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9676 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9677 Declare.
9678 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9679 (arm_read_description): New, with bits factored from
9680 arm_arch_setup.
9681 (arm_arch_setup): Reimplement.
9682 (target_regsets): Rename to ...
9683 (arm_regsets): ... this, and make static.
9684 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9685 (arm_regs_info): New function.
9686 (the_low_target): Adjust.
9687 (initialize_low_arch): New function.
9688 * linux-m68k-low.c (tdesc_m68k): Declare.
9689 (target_regsets): Rename to ...
9690 (m68k_regsets): ... this, and make static.
9691 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9692 (m68k_regs_info): New function.
9693 (m68k_arch_setup): New function.
9694 (the_low_target): Adjust.
9695 (initialize_low_arch): New function.
9696 * linux-sh-low.c (tdesc_sharch): Declare.
9697 (target_regsets): Rename to ...
9698 (sh_regsets): ... this, and make static.
9699 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9700 (sh_regs_info, sh_arch_setup): New functions.
9701 (the_low_target): Adjust.
9702 (initialize_low_arch): New function.
9703 * linux-bfin-low.c (tdesc_bfin): Declare.
9704 (bfin_arch_setup): New function.
9705 (bfin_usrregs_info, regs_info): New globals.
9706 (bfin_regs_info): New function.
9707 (the_low_target): Adjust.
9708 (initialize_low_arch): New function.
9709 * linux-cris-low.c (tdesc_cris): Declare.
9710 (cris_arch_setup): New function.
9711 (cris_usrregs_info, regs_info): New globals.
9712 (cris_regs_info): New function.
9713 (the_low_target): Adjust.
9714 (initialize_low_arch): New function.
9715 * linux-cris-low.c (tdesc_crisv32): Declare.
9716 (cris_arch_setup): New function.
9717 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9718 (cris_regs_info): New function.
9719 (the_low_target): Adjust.
9720 (initialize_low_arch): New function.
9721 * linux-m32r-low.c (tdesc_m32r): Declare.
9722 (m32r_arch_setup): New function.
9723 (m32r_usrregs_info, regs_info): New globals.
9724 (m32r_regs_info): Adjust.
9725 (initialize_low_arch): New function.
9726 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9727 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9728 (tic6x_usrregs_info): Forward declare.
9729 (tic6x_read_description): New function, based on ...
9730 (tic6x_arch_setup): ... this. Reimplement.
9731 (target_regsets): Rename to ...
9732 (tic6x_regsets): ... this, and make static.
9733 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9734 (tic6x_regs_info): New function.
9735 (the_low_target): Adjust.
9736 (initialize_low_arch): New function.
9737 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9738 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9739 (target_regsets): Rename to ...
9740 (xtensa_regsets): ... this, and make static.
9741 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9742 globals.
9743 (xtensa_arch_setup, xtensa_regs_info): New functions.
9744 (the_low_target): Adjust.
9745 (initialize_low_arch): New function.
9746 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9747 (nios2_arch_setup): Set the current process'es tdesc.
9748 (target_regsets): Rename to ...
9749 (nios2_regsets): ... this.
9750 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9751 (nios2_regs_info): New function.
9752 (the_low_target): Adjust.
9753 (initialize_low_arch): New function.
a261b8f5
PA
9754 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9755 (aarch64_arch_setup): Set the current process'es tdesc.
9756 (target_regsets): Rename to ...
9757 (aarch64_regsets): ... this.
9758 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9759 (aarch64_regs_info): New function.
9760 (the_low_target): Adjust.
9761 (initialize_low_arch): New function.
3aee8918
PA
9762 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9763 globals.
9764 (target_regsets): Rename to ...
9765 (tile_regsets): ... this.
9766 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9767 (tile_regs_info): New function.
9768 (tile_arch_setup): Set the current process'es tdesc.
9769 (the_low_target): Adjust.
9770 (initialize_low_arch): New function.
9771 * spu-low.c (tdesc_spu): Declare.
9772 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9773 * win32-arm-low.c (tdesc_arm): Declare.
9774 (arm_arch_setup): New function.
9775 (the_low_target): Install arm_arch_setup instead of
9776 init_registers_arm.
9777 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9778 (init_windows_x86): Rename to ...
9779 (i386_arch_setup): ... this. Set `win32_tdesc'.
9780 (the_low_target): Adjust.
9781 * win32-low.c (win32_tdesc): New global.
9782 (child_add_thread): Don't create the thread cache here.
9783 (do_initial_child_stuff): Set the new process'es tdesc.
9784 * win32-low.h (struct target_desc): Forward declare.
9785 (win32_tdesc): Declare.
9786 * lynx-i386-low.c (tdesc_i386): Declare global.
9787 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9788 * lynx-low.c (lynx_tdesc): New global.
9789 (lynx_add_process): Set the new process'es tdesc.
9790 * lynx-low.h (struct target_desc): Forward declare.
9791 (lynx_tdesc): Declare global.
9792 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9793 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9794 * nto-low.c (nto_tdesc): New global.
9795 (do_attach): Set the new process'es tdesc.
9796 * nto-low.h (struct target_desc): Forward declare.
9797 (nto_tdesc): Declare.
9798 * nto-x86-low.c (tdesc_i386): Declare.
9799 (nto_x86_arch_setup): Set `nto_tdesc'.
9800
b1fbec62
GB
98012013-06-04 Gary Benson <gbenson@redhat.com>
9802
9803 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9804 to qSupported response when appropriate.
9805 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9806 with nonzero-length annex.
9807 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9808 arguments supplied in annex.
9809
d1ec4ce7
DE
98102013-05-31 Doug Evans <dje@google.com>
9811
ac44adcb 9812 PR server/15594
d1ec4ce7
DE
9813 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9814 64 bits in 64-cross-32 environment.
9815
9b25f2d3
PA
98162013-05-28 Pedro Alves <palves@redhat.com>
9817
9818 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9819 (aarch64-without-fpu.c): Delete rule.
9820 * configure.srv (aarch64*-*-linux*): Remove references to
9821 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9822 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9823 declaration.
9824
6740dc9c
PA
98252013-05-24 Pedro Alves <palves@redhat.com>
9826
9827 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9828 instead of strchr/decode_address. Error if the range isn't split
9829 with a ','. Don't assume there's be a ':' in the action.
9830
c2d6af84
PA
98312013-05-23 Yao Qi <yao@codesourcery.com>
9832 Pedro Alves <palves@redhat.com>
9833
9834 * linux-low.c (lwp_in_step_range): New function.
9835 (linux_wait_1): If the thread was range stepping and stopped
9836 outside the stepping range, report the stop to GDB. Otherwise,
9837 continue stepping. Add range stepping debug output.
9838 (linux_set_resume_request): Copy the step range from the resume
9839 request to the lwp.
9840 (linux_supports_range_stepping): New.
9841 (linux_target_ops) <supports_range_stepping>: Set to
9842 linux_supports_range_stepping.
9843 * linux-low.h (struct linux_target_ops)
9844 <supports_range_stepping>: New field.
9845 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9846 * linux-x86-low.c (x86_supports_range_stepping): New.
9847 (the_low_target) <supports_range_stepping>: Set to
9848 x86_supports_range_stepping.
9849 * server.c (handle_v_cont): Handle 'r' action.
9850 (handle_v_requests): Append ";r" if the target supports range
9851 stepping.
9852 * target.h (struct thread_resume) <step_range_start,
9853 step_range_end>: New fields.
9854 (struct target_ops) <supports_range_stepping>:
9855 New field.
9856 (target_supports_range_stepping): New macro.
9857
58794e1a
JB
98582013-05-17 Joel Brobecker <brobecker@adacore.com>
9859
9860 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9861 confusion in comment.
9862
d631c5a7
JB
98632013-05-17 Joel Brobecker <brobecker@adacore.com>
9864
9865 * lynx-low.c (struct process_info_private): New type.
9866 (lynx_add_process): New function.
9867 (lynx_create_inferior, lynx_attach): Replace calls to
9868 add_process by calls to lynx_add_process.
9869 (lynx_resume): If PTID is null, then try using
9870 current_process()->private->last_wait_event_ptid.
9871 Add comments.
9872 (lynx_clear_inferiors): Delete. The contents of that function
9873 has been inlined in lynx_mourn;
9874 (lynx_wait_1): Save the ptid in the process's private data.
9875 (lynx_mourn): Free the process' private data. Replace call
9876 to lynx_clear_inferiors by call to clear_inferiors.
9877
96f7a20f
YQ
98782013-05-17 Yao Qi <yao@codesourcery.com>
9879
9880 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9881 the right place.
9882
db0dfaa0
LM
98832013-05-16 Luis Machado <lgustavo@codesourcery.com>
9884
9885 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9886 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9887 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9888 PT_TEXT_END_ADDR guards. Update comments.
9889 (linux_target_op) <read_offsets>: Conditionally define to
9890 linux_read_offsets if the target is UCLIBC and if it defines
9891 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9892
68f5f838
SL
98932013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9894 Andrew Jenner <andrew@codesourcery.com>
9895
9896 * Makefile.in (SFILES): Add linux-nios2-low.c.
9897 (clean): Add action to delete nios2-linux.c.
9898 (nios2-linux.c): New rule.
9899 * configure.srv: Add nios2*-*-linux*.
9900 * linux-nios2-low.c: New.
9901
1ebff1fd
HAQ
99022013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9903
9904 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9905
f6150862
HZ
99062013-04-25 Hui Zhu <hui@codesourcery.com>
9907
9908 PR gdb/15186
f6150862
HZ
9909 * ax.c (ax_printf): Add fflush.
9910
614c279d
TT
99112013-04-22 Tom Tromey <tromey@redhat.com>
9912
9913 * Makefile.in (SFILES): Add filestuff.c.
9914 (OBS): Add filestuff.o.
9915 (filestuff.o): New target.
9916 * config.in, configure: Rebuild.
9917 * configure.ac: Check for fdwalk, pipe2.
9918
7d4e5717
PA
99192013-04-17 Pedro Alves <palves@redhat.com>
9920
9921 * configure.ac (USE_THREAD_DB): Delete variable.
9922 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9923 Don't AC_SUBST USE_THREAD_DB.
9924 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9925 * config.in, configure: Regenerate.
9926
d5c93e41
PA
99272013-04-16 Pedro Alves <palves@redhat.com>
9928
9929 * linux-low.h (struct lwp_info) <thread_known>: Move under
9930 the USE_THREAD_DB #ifdef.
9931
04f5fe89
PA
99322013-04-16 Pedro Alves <palves@redhat.com>
9933
9934 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9935 (linux-low.o): Delete rule.
9936 * linux-low.h: Always include "gdb_thread_db.h" instead of
9937 conditionally including thread_db.h.
9938 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9939 HAVE_THREAD_DB_H.
9940
480b27bf
JK
99412013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9942
9943 * Makefile.in (install-only): Fix make install regression.
9944
43662968
JK
99452013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9946
9947 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9948 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9949 installation.
9950 * gdbserver.1: Remove.
9951
3e74e146
PA
99522013-03-22 Pedro Alves <palves@redhat.com>
9953
9954 * linux-low.c (handle_extended_wait): Don't call
9955 linux_enable_event_reporting.
9956
a8347a2a
TT
99572013-03-15 Tony Theodore <tonyt@logyst.com>
9958
9959 PR build/9098:
9960 * Makefile.in (SHELL): Use @SHELL@.
9961
eeb56fa7
SDJ
99622013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9963
9964 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9965 compiler warning.
9966
4fa7e2ff
JB
99672013-03-13 Joel Brobecker <brobecker@adacore.com>
9968
9969 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9970 Remove extraneous NULL element.
9971
8ddb1965
YQ
99722013-03-13 Yao Qi <yao@codesourcery.com>
9973
9974 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9975 'V' block in trace frame.
9976
9accd112
MM
99772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9978
9979 * target.h (struct target_ops): Add btrace ops.
9980 (target_supports_btrace): New macro.
9981 (target_enable_btrace): New macro.
9982 (target_disable_btrace): New macro.
9983 (target_read_btrace): New macro.
9984 * gdbthread.h (struct thread_info): Add btrace field.
9985 * server.c: Include btrace-common.h.
9986 (handle_btrace_general_set): New function.
9987 (handle_btrace_enable): New function.
9988 (handle_btrace_disable): New function.
9989 (handle_general_set): Call handle_btrace_general_set.
9990 (handle_qxfer_btrace): New function.
9991 (struct qxfer qxfer_packets[]): Add btrace entry.
9992 * inferiors.c (remove_thread): Disable btrace.
9993 * linux-low: Include linux-btrace.h.
9994 (linux_low_enable_btrace): New function.
9995 (linux_low_read_btrace): New function.
9996 (linux_target_ops): Add btrace ops.
9997 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9998 Add srv_linux_btrace=yes.
9999 (x86_64-*-linux*): Add linux-btrace.o.
10000 Add srv_linux_btrace=yes.
10001 * configure.ac: Define HAVE_LINUX_BTRACE.
10002 * config.in: Regenerated.
10003 * configure: Regenerated.
10004
5cc22e4c
MM
100052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10006
10007 * server.c (handle_qxfer): Preserve error message if -3 is
10008 returned.
10009 (qxfer): Document the -3 return value.
10010
7c97f91e
MM
100112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10012
10013 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10014 (linux_btrace_h): New variable.
10015 (linux-btrace.o): New rule.
10016
be9a119c 100172013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10018 Hafiz Abid Qadeer <abidh@codesourcery.com>
10019
10020 * tracepoint.c (trace_buffer_size): New global.
10021 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10022 (init_trace_buffer): Change to one-argument function. Allocate
10023 trace buffer memory.
10024 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10025 handle QTBuffer:size packet.
10026 (cmd_bigqtbuffer_size): New function.
10027 (initialize_tracepoint): Call init_trace_buffer with
10028 DEFAULT_TRACE_BUFFER_SIZE.
10029 * server.c (handle_query): Add QTBuffer:size in the
10030 supported packets.
10031
e64f7499
YQ
100322013-03-07 Yao Qi <yao@codesourcery.com>
10033
10034 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10035 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10036 of -1.
10037 (cmd_qtsp): Adjust condition. Do post increment.
10038 Set cur_action and cur_step_action back to 0.
10039
f0ae6fc3
PA
100402013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10041
10042 PR server/15236
10043 * linux-low.c (linux_write_memory): Return early success if LEN is
10044 zero.
10045
b5b0b0af
CV
100462013-03-05 Corinna Vinschen <vinschen@redhat.de>
10047
334ad4a8 10048 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10049
589bc927
TT
100502013-02-28 Tom Tromey <tromey@redhat.com>
10051
10052 * configure.ac: Invoke AC_SYS_LARGEFILE.
10053 * configure, config.in: Rebuild.
10054
dfe07582
CV
100552013-02-28 Corinna Vinschen <vinschen@redhat.com>
10056
10057 * win32-low.c: Throughout, fix format strings and casts of
10058 printf-like functions to avoid type related warnings on all
10059 platforms.
10060 (get_child_debug_event): Print dwDebugEventCode as hex since
10061 that's how it's usually documented.
10062
736cd585
YQ
100632013-02-28 Yao Qi <yao@codesourcery.com>
10064
10065 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10066 pulongest.
10067
e1f58301
JW
100682013-02-27 Jiong Wang <jiwang@tilera.com>
10069
10070 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10071 (reg-tilegx32.c): New rule.
10072 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10073 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10074 different register info initializer according to elf class.
10075 (init_registers_tilgx32): New function. The tilegx32 register info
10076 initializer.
10077 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10078 (tile_store_gregset): Likewise.
10079
d171ca78
YQ
100802013-02-27 Yao Qi <yao@codesourcery.com>
10081
10082 * server.c (process_point_options): Print debug message when
10083 debug_threads is true.
10084
282bbdf3
YQ
100852013-02-26 Yao Qi <yao@codesourcery.com>
10086
10087 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10088
aca22551
PA
100892013-02-19 Pedro Alves <palves@redhat.com>
10090 Kai Tietz <ktietz@redhat.com>
10091
10092 PR gdb/15161
10093
10094 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10095 instead of strtoul to extract address from packet.
10096 (process_serial_event) <'z'>: Likewise.
10097
4f3cee1c
YQ
100982013-02-18 Yao Qi <yao@codesourcery.com>
10099
10100 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10101
8e1d55a3
PA
101022013-02-14 Pedro Alves <palves@redhat.com>
10103
10104 Plug memory leak.
10105
10106 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10107 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10108
458820da
PA
101092013-02-14 Pedro Alves <palves@redhat.com>
10110
10111 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10112
baea0dae
PA
101132013-02-14 Pedro Alves <palves@redhat.com>
10114
10115 * tracepoint.c (save_string): Delete.
10116 (add_tracepoint_action): Use savestring instead of save_string.
10117
0b1afbb3
PA
101182013-02-12 Pedro Alves <palves@redhat.com>
10119
10120 * linux-xtensa-low.c: Ditto.
10121 * xtensa-xtregs.c: Ditto.
10122
8a4ac37e
PA
101232013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10124
10125 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10126 thread_db.
10127
148de6bb
MS
101282013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10129
10130 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10131 aarch64_num_wp_regs and aarch64_num_bp_regs to
10132 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10133
55fac6e0
MS
101342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10135
10136 * linux-aarch64-low.c (ps_get_thread_area): Replace
10137 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10138
176eb98c
MS
101392013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10140 Marcus Shawcroft <marcus.shawcroft@arm.com>
10141 Nigel Stephens <nigel.stephens@arm.com>
10142 Yufeng Zhang <yufeng.zhang@arm.com>
10143
10144 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10145 (aarch64.c, aarch64-without-fpu.c): New targets.
10146 * configure.srv (aarch64*-*-linux*): New.
10147 * linux-aarch64-low.c: New file.
10148
56f7af9c
MS
101492013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10150
43aaf8b6 10151 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10152 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10153 (dequeue_one_deferred_signal, linux_resume_one_thread)
10154 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10155 (linux_tracefork_grandchild, linux_test_for_tracefork)
10156 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10157 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10158 where the argument is 0.
10159
60f662b0
YQ
101602013-01-25 Yao Qi <yao@codesourcery.com>
10161
10162 * event-loop.c: Include "queue.h".
10163 (gdb_event_p): New typedef.
10164 (struct gdb_event) <next_event>: Remove.
10165 (event_queue): Change to QUEUE(gdb_event_p).
10166 (async_queue_event): Remove.
10167 (gdb_event_xfree): New.
10168 (initialize_event_loop): New.
10169 (process_event): Use API from QUEUE.
10170 (wait_for_event): Likewise.
10171 * server.c (main): Call initialize_event_loop.
10172 * server.h (initialize_event_loop): Declare.
10173
5ae4861a
YQ
101742013-01-18 Yao Qi <yao@codesourcery.com>
10175
10176 * ax.h (struct eval_agent_expr_context): New.
10177 (gdb_eval_agent_expr): Update declaration.
10178 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10179 TFRAME. Add new argument CTX.
10180 * server.h (struct eval_agent_expr_context): Declare.
10181 (agent_mem_read, agent_tsv_read): Update declaration.
10182 (agent_mem_read_string): Likewise.
10183 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10184 (add_traceframe_block): Add new argument TPOINT.
10185 Increase TPOINT->traceframe_usage.
10186 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10187 eval_tracepoint_agent_expr.
10188 (condition_true_at_tracepoint): Likewise.
10189 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10190 (agent_mem_read_string, agent_tsv_read): Likewise.
10191
85e00e85
YQ
101922013-01-16 Yao Qi <yao@codesourcery.com>
10193
10194 * linux-low.c (linux_resume_one_lwp): Don't check
10195 'lwp->bp_reinsert != 0'.
10196
4039cf45
JB
101972013-01-07 Joel Brobecker <brobecker@adacore.com>
10198 Pedro Alves <palves@redhat.com>
10199
10200 * lynx-low.c (ptrace_request_to_str): Define a temporary
10201 macro and use it to simplify this function's implementation.
10202
9044dee2
JB
102032013-01-07 Joel Brobecker <brobecker@adacore.com>
10204
10205 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10206 sets errno.
10207
e6352c8f
JB
102082013-01-07 Joel Brobecker <brobecker@adacore.com>
10209
10210 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10211
50681a27
JB
102122013-01-07 Joel Brobecker <brobecker@adacore.com>
10213
10214 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10215
3f6e77ef
JB
102162013-01-07 Joel Brobecker <brobecker@adacore.com>
10217
10218 * lynx-low.c (lynx_resume): Use the resume_info parameter
10219 to determine the ptid for the lynx_ptrace call, unless
10220 it is equal to minus_one_ptid, in which case we use the
10221 ptid of the current_inferior.
10222 (lynx_wait_1): After having received a thread create/exit
10223 event, resume the inferior's execution using the signaling
10224 thread's ptid, rather than the old ptid.
10225
7fda33ae
JB
102262013-01-07 Joel Brobecker <brobecker@adacore.com>
10227
10228 * lynx-low.c (lynx_resume): Delete variable ret.
10229
b9786c74
JB
102302013-01-01 Joel Brobecker <brobecker@adacore.com>
10231
10232 * gdbreplay.c (gdbreplay_version): Update copyright year.
10233 * server.c (gdbserver_version): Likewise.
10234
8b93d60f
JB
102352012-12-17 Joel Brobecker <brobecker@adacore.com>
10236
10237 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10238 new thread.
10239
037335a7
JB
102402012-12-17 Joel Brobecker <brobecker@adacore.com>
10241
10242 * lynx-low.c (ptrace_request_to_str): Add handling for
10243 PTRACE_GETTRACESIG.
10244
52d4cbd8
JB
102452012-12-17 Joel Brobecker <brobecker@adacore.com>
10246
10247 * lynx-low.c (lynx_attach): Delete variable new_process.
10248
ab8f6ca9
JB
102492012-12-17 Joel Brobecker <brobecker@adacore.com>
10250
10251 * lynx-low.c (lynx_create_inferior): Delete variable
10252 new_process.
10253
78cbc024
JB
102542012-12-17 Joel Brobecker <brobecker@adacore.com>
10255
10256 * lynx-low.c (ptrace_request_to_str): Do not handle
10257 PTRACE_GETTHREADLIST if this macro does not exist.
10258
14a00470
YQ
102592012-12-15 Yao Qi <yao@codesourcery.com>
10260
10261 * Makefile.in (OBS): Add notif.o.
10262 * notif.c, notif.h: New.
10263 * server.c: Include "notif.h".
10264 (struct vstop_notif) <next>: Remove.
10265 <base>: New field.
10266 (queue_stop_reply): Update.
10267 (push_event, send_next_stop_reply): Remove.
10268 (discard_queued_stop_replies): Update.
10269 (notif_stop): New variable.
10270 (handle_v_stopped): Remove.
10271 (handle_v_requests): Don't call handle_v_stopped. Call
10272 handle_ack_notif instead.
10273 (queue_stop_reply_callback): Call notif_event_enque instead
10274 of queue_stop_reply.
10275 (handle_status): Don't call send_next_stop_reply, call
10276 notif_write_event instead.
10277 (kill_inferior_callback): Likewise.
10278 (detach_or_kill_inferior_callback): Likewise.
10279 (main): Call initialize_notif.
10280 (process_serial_event): Call QUEUE_is_empty.
10281 (handle_target_event): Call notif_push instead of push event.
10282 * server.h (push_event): Remove declaration.
10283
61c125b9
TT
102842012-12-10 Tom Tromey <tromey@redhat.com>
10285
10286 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10287 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10288 macros.
10289 (.c.o): Rewrite.
10290 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10291 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10292 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10293 (amd64-linux-ipa.o, ax.o): Rewrite.
10294 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10295 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10296 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10297 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10298 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10299 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10300 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10301 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10302 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10303 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10304 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10305 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10306 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10307 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10308 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10309 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10310 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10311 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10312 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10313 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10314 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10315 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10316 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10317 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10318 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10319 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10320 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10321 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10322 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10323 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10324 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10325 (reg-tilegx.o): Remove.
10326 (all_object_files): New macro.
10327 Include .deps files.
10328 * aclocal.m4, configure: Rebuild.
10329 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10330 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10331 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10332
e90e9ad9
TT
103332012-12-05 Tom Tromey <tromey@redhat.com>
10334
10335 PR gdb/14917:
10336 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10337
02d403bf 103382012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10339
10340 * configure.ac: Check for linux/perf_event.h.
10341 * config.in: Regenerated.
10342 * configure: Regenerated.
10343
0270a750
PA
103442012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10345
10346 * hostio.c (handle_readlink): Decrease buffer size
10347 parameter passed to readlink by one byte.
10348
8c29b58e
YQ
103492012-11-26 Yao Qi <yao@codesourcery.com>
10350
10351 * configure.ac (build_warnings): Append '-Wempty-body'.
10352 * configure: Regenerated.
10353 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10354 body.
10355
8bdce1ff
PM
103562012-11-15 Pierre Muller <muller@sourceware.org>
10357
10358 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10359 * config.in: Regenerate.
10360 * configure: Regenerate.
10361 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10362 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10363 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10364 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10365 header.
10366 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10367 instead of <sys/wait.h> header.
10368 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10369
02d403bf 103702012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10371
10372 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10373 (various make rules): Remove -DGDBSERVER
10374
fbd5db48
YQ
103752012-11-09 Yao Qi <yao@codesourcery.com>
10376
10377 * spu-low.c (current_ptid): Move it to ..
10378 * gdbthread.h: ... here. New.
10379 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10380 * server.c (myresume, process_serial_event): Likewise.
10381 * thread-db.c (thread_db_find_new_threads): Likewise.
10382 * tracepoint.c (run_inferior_command): Likewise.
10383
b3dc46ff
AB
103842012-10-01 Andrew Burgess <aburgess@broadcom.com>
10385
10386 * server.c (handle_search_memory_1): Include access length in
10387 warning message.
10388
07c04788
HPN
103892012-09-05 Michael Brandt <michael.brandt@axis.com>
10390
10391 * linux-crisv32-low.c: Fix compile errors.
10392
918d227b
YQ
103932012-09-04 Yao Qi <yao@codesourcery.com>
10394
10395 * tracepoint.c (cmd_qtsv): Adjust debug message.
10396 Don't check CUR_TPOINT.
10397
18c1b81a
YQ
103982012-08-28 Yao Qi <yao@codesourcery.com>
10399
10400 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10401 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10402 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10403 Remove declarations of xmalloc, xreallloc, xstrdup and
10404 freeargv.
10405 * Makefile.in (libiberty_h): New.
10406 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10407 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10408
dc82f37b
YQ
104092012-08-23 Yao Qi <yao@codesourcery.com>
10410
10411 * server.h: Remove declaration of 'xsnprintf'.
10412
406b1477
KS
104132012-08-22 Keith Seitz <keiths@redhat.com>
10414
10415 * server.h: Include build-gnulib-gbserver/config.h.
10416 * gdbreplay.c: Likewise.
10417
e6712ff1
DE
104182012-08-08 Doug Evans <dje@google.com>
10419
10420 * Makefile.in (SFILES): Add gdb_vecs.c.
10421 (OBS): Add gdb_vecs.o.
10422 (gdb_vecs_h, host_defs_h): New variables.
10423 (thread-db.o): Add $(gdb_vecs_h) dependency.
10424 (gdb_vecs.o): New rule.
10425 * thread-db.c: #include "gdb_vecs.h".
10426 (thread_db_load_search): Use a vector to iterate over path elements.
10427 Handle text appearing after "$pdir".
10428
10429 * configure.ac: Add check for strstr.
10430 * config.in: Regenerate.
10431 * configure: Regenerate.
10432
7c3270ae
UW
104332012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10434
10435 * hostio.c (handle_pread): If pread fails, fall back to attempting
10436 lseek/read.
10437 (handle_pwrite): Likewise for pwrite.
10438
b62e2b27
UW
104392012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10440
10441 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10442 between unsupported TYPE and unimplementable ADDR/LEN combination.
10443 (arm_insert_point): Act on new return value.
10444
78a99e91
PA
104452012-07-31 Pedro Alves <palves@redhat.com>
10446
10447 * server.c (process_point_options): Only skip tokens if we find
10448 one that is unrecognized. Don't treat 'X' specially while
10449 skipping unrecognized tokens.
10450
fcf303ab
UW
104512012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10452
10453 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10454 to 4-byte-align HW breakpoint addresses for Thumb.
10455
7255706c
YQ
104562012-07-27 Yao Qi <yao@codesourcery.com>
10457
10458 PR remote/14161.
10459
10460 * server.h: Declare gdb_agent_about_to_close.
10461 * target.c (kill_inferior): Include "agent.h".
10462 New. Send command 'kill'.
10463 * target.h (kill_inferior): Removed macro.
10464 * tracepoint.c (gdb_agent_about_to_close): New.
10465 (gdb_agent_helper_thread): Handle command 'close'.
10466 Wait endlessly until the inferior stops.
10467 Install gdb_agent_remove_socket to atexit hook.
10468 (agent_socket_name): New static variable.
10469 (gdb_agent_socket_init): Replace local variable 'name' with
10470 'agent_socket_name'.
10471 (gdb_agent_remove_socket): New.
10472
5a3f286f
YQ
104732012-07-27 Yao Qi <yao@codesourcery.com>
10474
10475 * server.c (process_point_options): Stop at 'X' when parsing.
10476
961bd387
ME
104772012-07-19 Michael Eager <eager@eagercon.com>
10478
a261b8f5 10479 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10480 to hw_execute.
10481 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10482 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10483 hardware breakpoint.
10484
aa7c7447
JK
104852012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10486
10487 * gdbserver/linux-low.c (initialize_low): Call
10488 linux_ptrace_init_warnings.
10489
7f216e7c
DE
104902012-07-02 Doug Evans <dje@google.com>
10491
10492 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10493 pointer to int.
10494
d3ce09f5
SS
104952012-07-02 Stan Shebs <stan@codesourcery.com>
10496
10497 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10498 (ax.o): Add it to build rule.
10499 (ax-ipa.o): Ditto.
10500 (OBS): Add format.o.
10501 (IPA_OBS): Add format.o.
10502 * server.c (handle_query): Claim support for breakpoint commands.
10503 (process_point_options): Add command case.
10504 (process_serial_event): Leave running if there are printfs in
10505 effect.
10506 * mem-break.h (any_persistent_commands): Declare.
10507 (add_breakpoint_commands): Declare.
10508 (gdb_no_commands_at_breakpoint): Declare.
10509 (run_breakpoint_commands): Declare.
10510 * mem-break.c (struct point_command_list): New struct.
10511 (struct breakpoint): New field command_list.
10512 (any_persistent_commands): New function.
10513 (add_commands_to_breakpoint): New function.
10514 (add_breakpoint_commands): New function.
10515 (gdb_no_commands_at_breakpoint): New function.
10516 (run_breakpoint_commands): New function.
10517 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10518 locally.
10519 * ax.c: Include format.h.
10520 (ax_printf): New function.
10521 (gdb_eval_agent_expr): Add printf opcode.
10522
2f8f6aed
YQ
105232012-06-13 Yao Qi <yao@codesourcery.com>
10524
10525 * server.c (start_inferior): Remove duplicated writes to fields
10526 'last_resume_kind' and 'last_status' of 'current_inferior'.
10527
0c9070b3
YQ
105282012-06-12 Yao Qi <yao@codesourcery.com>
10529 Pedro Alves <palves@redhat.com>
10530
10531 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10532 comment.
10533 * server.c (handle_v_cont): Extend comment.
10534
c52daf70
YQ
105352012-06-11 Yao Qi <yao@codesourcery.com>
10536
10537 * linux-low.c (linux_attach): Add 'static'.
10538
d38bbb0a
YQ
105392012-06-06 Yao Qi <yao@codesourcery.com>
10540
10541 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10542
89dc0afd
JK
105432012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10544
10545 Fix gcc -flto compilation warning.
10546 * server.c (main): Make variable multi_mode and attach volatile.
10547
75f62ce7
TJB
105482012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10549
10550 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10551 if the platform doesn't know about it.
10552
65f479b6
PA
105532012-05-30 Jeff Kenton <jkenton@tilera.com>
10554
10555 * Makefile.in (SFILES): Add linux-tile-low.c.
10556 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10557 * configure.srv: Handle tilegx-*-linux*.
10558 * linux-tile-low.c: New file.
10559
0c5bf5a9
JK
105602012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10561
10562 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10563
a493e3e2
PA
105642012-05-24 Pedro Alves <palves@redhat.com>
10565
10566 PR gdb/7205
10567
43aaf8b6 10568 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10569
2ea28649
PA
105702012-05-24 Pedro Alves <palves@redhat.com>
10571
10572 PR gdb/7205
10573
10574 Replace target_signal with gdb_signal throughout.
10575
8d409d16
MR
105762012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10577
10578 * linux-low.c (linux_store_registers): Avoid the copying sequence
10579 when no data has been retrieved by ptrace.
10580
23512c01
MGD
105812012-05-22 Will Deacon <will.deacon@arm.com>
10582
10583 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10584 Include asm/ptrace.h.
10585 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10586 already defined.
10587
4934b29e
MR
105882012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10589
10590 * linux-low.c (linux_store_registers): Don't re-retrieve data
10591 with ptrace that has already been obtained from /proc. Always
10592 copy any data retrieved with ptrace to the buffer supplied.
10593
bde24c0a
PA
105942012-05-11 Yao Qi <yao@codesourcery.com>
10595 Pedro Alves <palves@redhat.com>
10596
10597 * linux-low.c (enum stopping_threads_kind): New.
10598 (stopping_threads): Change type to `enum stopping_threads_kind'.
10599 (handle_extended_wait): If stopping and suspending threads, leave
10600 the new_lwp suspended too.
10601 (linux_wait_for_event): Adjust.
10602 (stop_all_lwps): Set `stopping_threads' to
10603 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10604 whether we're suspending threads or just stopping them. Assert no
10605 recursion happens.
10606
623b6bdf
YQ
106072012-04-29 Yao Qi <yao@codesourcery.com>
10608
10609 * server.h: Move some code to ...
10610 * gdbthread.h: ... here. New.
10611 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10612 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10613 (nto-low.o, win32-low.o): Likewise.
10614 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10615 * regcache.c, remote-utils.c, server.c: Likewise.
10616 * target.c, tracepoint.c, win32-low.c: Likewise.
10617
f15f9948
TJB
106182012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10619
10620 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10621 (PTRACE_ARG4_TYPE): Likewise.
10622 (PTRACE_XFER_TYPE): Likewise.
10623 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10624 ptrace to PTRACE_ARG3_TYPE.
10625 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10626 (PTRACE_ARG4_TYPE): Likewise.
10627 (PTRACE_XFER_TYPE): Likewise.
10628 (linux_detach_one_lwp): Cast fourth argument of
10629 ptrace to long then PTRACE_ARG4_TYPE.
10630 (regsets_fetch_inferior_registers): Cast third argument of
10631 ptrace to long then PTRACE_ARG3_TYPE.
10632 (regsets_store_inferior_registers): Likewise.
10633
38ea300a
PA
106342012-04-20 Pedro Alves <palves@redhat.com>
10635
10636 * configure: Regenerate.
10637
c971b7fa
PA
106382012-04-19 Pedro Alves <palves@redhat.com>
10639
43aaf8b6 10640 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10641 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10642 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10643 (all, install-only, uninstall, clean-info, all-lib, clean): No
10644 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10645 (maintainer-clean realclean distclean): Use subdir_do.
10646 (subdir_do): New.
10647 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10648 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10649 * acinclude.m4: Include acx_configure_dir.m4.
10650 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10651 calls. Call AC_PROG_RANLIB. Configure gnulib using
10652 ACX_CONFIGURE_DIR.
10653 (GNULIB): New.
10654 (GNULIB_STDINT_H): Adjust.
10655 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10656 * gdbreplay.c: Include build-gnulib/config.h.
10657 * server.h: Likewise.
10658 * aclocal.m4: Regenerate.
10659 * config.in: Regenerate.
10660 * configure: Regenerate.
c971b7fa 10661
809277f8
PA
106622012-04-19 Pedro Alves <palves@redhat.com>
10663
10664 * Makefile.in (LIBGNU, INCGNU): Adjust.
10665 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10666 (all, install-only, uninstall, clean-info, all-lib, clean)
10667 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10668 * configure.ac: Adjust AC_OUTPUT output.
10669 * aclocal.m4: Regenerate.
10670 * configure: Regenerate.
10671
fd9bb8b8
PA
106722012-04-19 Pedro Alves <palves@redhat.com>
10673
10674 * Makefile.in (generated_files): New.
10675 (server_h): Remove the explicit dependency on config.h, and depend
10676 on $generated_files.
10677
1c298c66
PA
106782012-04-19 Pedro Alves <palves@redhat.com>
10679
10680 * Makefile.in (INCGNU): Add -Ignulib.
10681
57c4b50b
PA
106822012-04-19 Pedro Alves <palves@redhat.com>
10683
10684 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10685 (INCGNU): ... this, and spell out -I here.
10686 (GNULIB_LIB): Rename to ...
10687 (LIBGNU): ... this.
10688 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10689
1030e047
PA
106902012-04-19 Pedro Alves <palves@redhat.com>
10691
10692 * config.in: Regenerate.
10693
447d4319
PA
106942012-04-19 Pedro Alves <palves@redhat.com>
10695
10696 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10697 * server.h (memmem): Remove declaration.
10698 * config.in: Regenerate.
10699 * configure: Regenerate.
10700
aad9eab9
YQ
107012012-04-19 Yao Qi <yao@codesourcery.com>
10702
10703 * Makefile.in (SFILES): Add common/vec.c.
10704 (OBS): Add vec.o.
10705 (vec.o): New rule.
10706
3e10640f
YQ
107072012-04-19 Yao Qi <yao@codesourcery.com>
10708
10709 * remote-utils.c (prepare_resume_reply): Replace with macro
10710 target_core_of_thread.
10711 * server.c (handle_qxfer_threads_proper): Likewise.
10712 * target.h (traget_core_of_thread): New macro.
10713
71622373
PA
107142012-04-18 Pedro Alves <palves@redhat.com>
10715
10716 * aclocal.m4: Regenerate.
10717 * configure: Regenerate.
10718
80d26939
YQ
107192012-04-16 Yao Qi <yao@codesourcery.com>
10720
10721 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10722 duplicated on address.
10723
42476b70
YQ
107242012-04-16 Yao Qi <yao@codesourcery.com>
10725
10726 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10727 (struct tracepoint_action_ops) <send>: New field.
10728 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10729 (agent_expr_send, x_tracepoint_action_send): New.
10730 (l_tracepoint_action_send): New.
10731 (cmd_qtdp): Download and install tracepoint
10732 according to `use_agent'.
10733 (run_inferior_command): Add one more parameter `len'.
10734 Update callers.
10735 (tracepoint_send_agent): New.
10736 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10737
7bc83639
YQ
107382012-04-16 Yao Qi <yao@codesourcery.com>
10739
10740 * tracepoint.c (download_tracepoints): Moved to ...
10741 (cmd_qtstart): ... here.
10742
5f18041e
YQ
107432012-04-14 Yao Qi <yao@codesourcery.com>
10744
10745 * tracepoint.c: Include inttypes.h.
10746 (struct collect_memory_action): Use sized types.
10747 (struct tracepoint): Likewise.
10748 (cmd_qtdp, stop_tracing): Update print specifiers.
10749 (cmd_qtp, response_tracepoint): Likewise.
10750 (collect_data_at_tracepoint): Likewise.
10751 (collect_data_at_step): Likewise.
10752
55a8c076
YQ
107532012-04-14 Yao Qi <yao@codesourcery.com>
10754
10755 Import gnulib module inttypes.
10756 * aclocal.m4, config.in, configure: Regenerated.
10757
dc750257
YQ
107582012-04-14 Yao Qi <yao@codesourcery.com>
10759
10760 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10761 Makefile and config.status at last.
10762
0ab5faf9
YQ
107632012-04-13 Yao Qi <yao@codesourcery.com>
10764
10765 * tracepoint.c: Include stdint.h unconditionally.
10766
18f5fd81
TJB
107672012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10768
10769 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10770 on BFD_HAVE_SYS_PROCFS_TYPE.
10771 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10772 * configure: Regenerate.
10773 * config.in: Likewise.
10774
4d47af5c
L
107752012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10776
10777 * Makefile.in (clean): Also remove x32.c x32-linux.c
10778 x32-avx.c x32-avx-linux.c.
10779 (x32.o): New target.
10780 (x32.c): Likewise.
10781 (x32-linux.o): Likewise.
10782 (x32-linux.c): Likewise.
10783 (x32-avx.o): Likewise.
10784 (x32-avx.c): Likewise.
10785 (x32-avx-linux.o): Likewise.
10786 (x32-avx-linux.c): Likewise.
10787
10788 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10789 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10790 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10791 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10792 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10793 i386/x32-avx-linux.xml.
10794
10795 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10796 (init_registers_x32_avx_linux): Likwise.
10797 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10798 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10799
ecedbe58
PA
108002012-04-13 Pedro Alves <palves@redhat.com>
10801
10802 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10803 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10804 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10805 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10806 the sub-make.
10807
c92b5177
L
108082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10809
10810 * linux-x86-low.c (compat_x32_clock_t): New.
10811 (compat_x32_siginfo_t): Likewise.
10812 (compat_x32_siginfo_from_siginfo): Likewise.
10813 (siginfo_from_compat_x32_siginfo): Likewise.
10814 (linux_is_elf64): Likewise.
10815 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10816 and siginfo_from_compat_x32_siginfo for x32.
10817 (x86_arch_setup): Set linux_is_elf64.
10818
214d508e
L
108192012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10820
10821 PR gdb/13969
10822 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10823 e_machine field.
10824 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10825 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10826 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10827 compatible with process.
10828
c9a1864a
YQ
108292012-04-12 Yao Qi <yao@codesourcery.com>
10830
10831 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10832 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10833 (install-only, install-info, clean): Handle sub dir gnulib.
10834 (all-lib, am--refresh): New targets.
10835 (memmem.o): Remove target.
10836 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10837 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10838 (AC_REPLACE_FUNCS): Remove memmem.
10839 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10840 (AC_OUTPUT): Generate Makefile in gnulib/.
10841 * aclocal.m4, config.in, configure: Regenerated.
10842
367ba2c2
MR
108432012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10844
10845 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10846
9d236627
PA
108472012-04-05 Pedro Alves <palves@redhat.com>
10848
10849 -Werror=strict-aliasing
10850
10851 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10852 pointer.
10853
111217b3
PA
108542012-04-04 Pedro Alves <palves@redhat.com>
10855
10856 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10857 (sparc_store_gregset_from_stack, sparc_store_gregset)
10858 (sparc_breakpoint_at): Fix formatting.
10859
8365dcf5
TJB
108602012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10861
10862 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10863 are available.
10864 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10865 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10866 * config.in: Regenerate.
10867 * configure: Likewise.
10868
689cc2ae
PA
108692012-03-29 Pedro Alves <palves@redhat.com>
10870
10871 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10872 Correct ptrace arguments.
10873
c14dfd32
PA
108742012-03-28 Pedro Alves <palves@redhat.com>
10875
10876 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10877 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10878 (IA64_FR1_REGNUM): New defines.
10879 (ia64_fetch_register): New.
10880 (the_low_target): Install it.
10881 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10882 field.
10883 * linux-low.c (linux_fetch_registers): Try the
10884 the_low_target.fetch_register hook first.
10885
10886 * linux-arm-low.c (the_low_target): Adjust.
10887 * linux-bfin-low.c (the_low_target): Adjust.
10888 * linux-cris-low.c (the_low_target): Adjust.
10889 * linux-crisv32-low.c (the_low_target): Adjust.
10890 * linux-m32r-low.c (the_low_target): Adjust.
10891 * linux-m68k-low.c (the_low_target): Adjust.
10892 * linux-mips-low.c (the_low_target): Adjust.
10893 * linux-ppc-low.c (the_low_target): Adjust.
10894 * linux-s390-low.c (the_low_target): Adjust.
10895 * linux-sh-low.c (the_low_target): Adjust.
10896 * linux-sparc-low.c (the_low_target): Adjust.
10897 * linux-tic6x-low.c (the_low_target): Adjust.
10898 * linux-x86-low.c (the_low_target): Adjust.
10899 * linux-xtensa-low.c (the_low_target): Adjust.
10900
63c88e13
PA
109012012-03-26 Pedro Alves <palves@redhat.com>
10902
10903 * server.c (handle_qxfer_libraries): Don't bail early if
10904 the_target->qxfer_libraries_svr4 is not NULL.
10905
fb723180
PA
109062012-03-26 Pedro Alves <palves@redhat.com>
10907
10908 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10909
0afae3cf
PA
109102012-03-23 Pedro Alves <palves@redhat.com>
10911
10912 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10913 "library-list-svr4" element's start tag when the the DSO list is
10914 empty.
10915
485f1ee4
PA
109162012-03-23 Pedro Alves <palves@redhat.com>
10917
10918 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10919 a variable whose type size is the same as the inferior's pointer
10920 size.
10921
a5362b9a
TS
109222012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10923
10924 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10925 struct siginfo.
10926 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10927 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10928 * linux-low.h: Include <signal.h>.
10929 (struct siginfo): Remove forward declaration.
10930 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10931 struct siginfo.
10932
d226c142
MF
109332012-03-21 Mike Frysinger <vapier@gentoo.org>
10934
10935 * .gitignore: Ignore more files.
10936
122f36ef
PA
109372012-03-19 Pedro Alves <palves@redhat.com>
10938 Jan Kratochvil <jan.kratochvil@redhat.com>
10939
10940 * server.c (cont_thread, general_thread): Add describing comments.
10941 (start_inferior): Clear `cont_thread'.
10942 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10943 of a process.
10944
fc3e5175
YQ
109452012-03-15 Yao Qi <yao@codesourcery.com>
10946
10947 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10948 handling to ...
10949 (cmd_qtdp): ... here.
10950
8d0d92cd
YQ
109512012-03-15 Yao Qi <yao@codesourcery.com>
10952
10953 * tracepoint.c (struct tracepoint_action_ops): New.
10954 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10955 (m_tracepoint_action_download): New.
10956 (r_tracepoint_action_download): New.
10957 (x_tracepoint_action_download): New.
10958 (l_tracepoint_action_download): New.
10959 (add_tracepoint_action): Install `action->ops' according type.
10960 (download_tracepoint_1): Move code `download' function pointer
10961 of various tracepoint_action_ops.
10962
87b0bb13
JK
109632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10964
10965 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10966 linux_ptrace_attach_warnings.
10967
5f572dec
JK
109682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 * Makefile.in (linux-ptrace.o): New.
10971 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10972 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10973 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10974 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10975 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10976 of these targets.
10977 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10978
f4647387
YQ
109792012-03-08 Yao Qi <yao@codesourcery.com>
10980 Pedro Alves <palves@redhat.com>
10981
10982 Fix PR server/13392.
10983 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10984 offset of JMP insn.
10985 * tracepoint.c (remove_tracepoint): New.
10986 (cmd_qtdp): Call remove_tracepoint when failed to install.
10987
9b224c5e
PA
109882012-03-07 Pedro Alves <palves@redhat.com>
10989
10990 * linux-low.c (get_detach_signal): New.
10991 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10992 Pass on pending signals to PTRACE_DETACH. Check the result of the
10993 ptrace call.
10994 * server.c (program_signals, program_signals_p): New.
10995 (handle_general_set): Handle QProgramSignals.
10996 * server.h (program_signals, program_signals_p): Declare.
10997
e237a7e2
JK
109982012-03-05 Pedro Alves <palves@redhat.com>
10999 Jan Kratochvil <jan.kratochvil@redhat.com>
11000
11001 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11002 New comment why.
11003
5808517f
YQ
110042012-03-03 Yao Qi <yao@codesourcery.com>
11005
11006 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11007 agent_look_up_symbols.
11008
58b4daa5
YQ
110092012-03-03 Yao Qi <yao@codesourcery.com>
11010
11011 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11012 (linux-x86-low.o): Likewise.
11013 * server.h: Remove in_process_agent_loaded.
11014 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11015 common/agent.c.
11016 Update callers.
11017
8ffcbaaf
YQ
110182012-03-03 Yao Qi <yao@codesourcery.com>
11019
11020 * tracepoint.c (gdb_agent_capability): New global.
11021 (in_process_agent_loaded_ust): Renamed to
11022 `in_process_agent_supports_ust'.
11023 Update callers.
11024 (in_process_agent_supports_ust): Call agent_capability_check.
11025 (clear_installed_tracepoints): Assert that agent supports
11026 agent.
11027
d1feda86
YQ
110282012-03-03 Yao Qi <yao@codesourcery.com>
11029
11030 * linux-low.c (linux_supports_agent): New.
11031 (linux_target_ops): Initialize field `supports_agent' with
11032 linux_supports_agent.
11033 * target.h (struct target_ops) <supports_agent>: New.
11034 (target_supports_agent): New macro.
11035 * server.c (handle_general_set): Handle packet 'QAgent'.
11036 (handle_query): Send `QAgent+'.
11037 * Makefile.in (server.o): Depends on agent.h.
11038
2fa291ac
YQ
110392012-03-03 Yao Qi <yao@codesourcery.com>
11040
11041 * Makefile.in (OBS): Add agent.o.
11042 Add new rule for agent.o.
11043 Track dependence of tracepoint.c on agent.h.
11044 * tracepoint.c (run_inferior_command_1):
11045 (run_inferior_command): Call agent_run_command.
11046 (gdb_ust_connect_sync_socket): Deleted. Move it to
11047 common/agent.c.
11048 (resume_thread, stop_thread): Likewise.
11049 (gdb_ust_socket_init): Renamed to ...
11050 (gdb_agent_socket_init): ... New.
11051 (gdb_ust_thread): Renamed to ...
11052 (gdb_agent_helper_thread): ... New.
11053 (gdb_ust_init): Move some code to ...
11054 (gdb_agent_init): ... here. New.
11055 [HAVE_UST]: Call gdb_ust_init.
11056 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11057 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11058 * config.in, configure: Regenerated.
11059
05044653
PA
110602012-03-02 Pedro Alves <palves@redhat.com>
11061
11062 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11063 * linux-low.c (struct simple_pid_list): New.
11064 (stopped_pids): New a struct simple_pid_list pointer.
11065 (add_to_pid_list, pull_pid_from_list): New.
11066 (handle_extended_wait): Don't assume the first signal new children
11067 report is SIGSTOP. Adjust call to pull_pid_from_list.
11068 (linux_wait_for_lwp): Adjust.
11069
8d00225b
YQ
110702012-03-02 Yao Qi <yao@codesourcery.com>
11071
11072 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11073 debug log.
11074
19560ba5
YQ
110752012-03-02 Yao Qi <yao@codesourcery.com>
11076
11077 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11078 `stop_pc' and `tpoint'. Update caller.
11079
1faeff08
MR
110802012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11081
11082 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11083 * linux-low.c (use_linux_regsets): New macro.
11084 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11085 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11086 (linux_register_in_regsets): New function.
11087 (usr_fetch_inferior_registers): Skip registers covered by
11088 regsets.
11089 (usr_store_inferior_registers): Likewise.
11090 (usr_fetch_inferior_registers): New macro.
11091 (usr_store_inferior_registers): Likewise.
11092 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11093 (linux_store_registers): Likewise.
11094 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11095 prototype.
11096 (init_registers_mips64_dsp_linux): Likewise.
11097 (init_registers_mips_linux): New macro.
11098 (init_registers_mips_dsp_linux): Likewise.
11099 (mips_dsp_num_regs): Likewise.
11100 (DSP_BASE, DSP_CONTROL): New fallback macros.
11101 (mips_base_regs): New macro.
11102 (mips_regmap): Use it. Fix the size.
11103 (mips_dsp_regmap): New variable.
11104 (mips_dsp_regset_bitmap): Likewise.
11105 (mips_arch_setup): New function.
11106 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11107 than mips_regmap.
11108 (mips_cannot_store_register): Likewise.
11109 (the_low_target): Update .arch_setup, .num_regs and .regmap
11110 initializers. Add .regset_bitmap initializer.
11111 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11112 initializer.
11113 * linux-bfin-low.c (the_low_target): Likewise.
11114 * linux-cris-low.c (the_low_target): Likewise.
11115 * linux-crisv32-low.c (the_low_target): Likewise.
11116 * linux-ia64-low.c (the_low_target): Likewise.
11117 * linux-m32r-low.c (the_low_target): Likewise.
11118 * linux-m68k-low.c (the_low_target): Likewise.
11119 * linux-ppc-low.c (the_low_target): Likewise.
11120 * linux-s390-low.c (the_low_target): Likewise.
11121 * linux-sh-low.c (the_low_target): Likewise.
11122 * linux-sparc-low.c (the_low_target): Likewise.
11123 * linux-tic6x-low.c (the_low_target): Likewise.
11124 * linux-x86-low.c (the_low_target): Likewise.
11125 * linux-xtensa-low.c (the_low_target): Likewise.
11126 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11127 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11128 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11129 srv_xmlfiles.
11130 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11131 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11132
c03e6ccc
YQ
111332012-02-29 Yao Qi <yao@codesourcery.com>
11134 Pedro Alves <palves@redhat.com>
11135
11136 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11137 `step_over_finished' is true.
11138
644cebc9
PA
111392012-02-27 Pedro Alves <palves@redhat.com>
11140
11141 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11142 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11143
c14d7ab2
PA
111442012-02-27 Pedro Alves <palves@redhat.com>
11145
11146 PR server/9684
11147 * linux-low.c (pid_is_stopped): New.
11148 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11149
412c89dd
LM
111502012-02-25 Luis Machado <lgustavo@codesourcery.com>
11151
11152 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11153 of conditions.
11154
b745defe
MR
111552012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11156
11157 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11158
9f3a5c85
LM
111592012-02-24 Luis Machado <lgustavo@codesourcery>
11160
11161 * server.c (handle_query): Advertise support for target-side
11162 breakpoint condition evaluation.
11163 (process_point_options): New function.
11164 (process_serial_event): When inserting a breakpoint, check for
11165 a target-side condition that should be evaluated.
11166
11167 * mem-break.c: Include regcache.h and ax.h.
11168 (point_cond_list_t): New data structure.
11169 (breakpoint) <cond_list>: New field.
11170 (find_gdb_breakpoint_at): Make non-static.
11171 (delete_gdb_breakpoint_at): Clear any target-side
11172 conditions.
11173 (clear_gdb_breakpoint_conditions): New function.
11174 (add_condition_to_breakpoint): Likewise.
11175 (add_breakpoint_condition): Likewise.
11176 (gdb_condition_true_at_breakpoint): Likewise.
11177 (gdb_breakpoint_here): Return result directly instead
11178 of going through a local variable.
11179
11180 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11181 (clear_gdb_breakpoint_conditions): Likewise.
11182 (add_breakpoint_condition): Likewise.
11183 (gdb_condition_true_at_breakpoint): Likewise.
11184
11185 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11186 (need_step_over_p): Take target-side breakpoint condition into
11187 consideration.
11188
5e1dc496
LM
111892012-02-24 Luis Machado <lgustavo@codesourcery>
11190
11191 * server.h: Include tracepoint.h.
11192 (agent_mem_read, agent_get_trace_state_variable_value,
11193 agent_set_trace_state_variable_value,
11194 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11195 get_set_tsv_func_addr): New prototypes.
11196
11197 * ax.h: New include file.
11198 * ax.c: New source file.
11199
11200 * tracepoint.c: Include ax.h.
11201 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11202 agent_expr, eval_result_type): Move to ax.h.
11203 (parse_agent_expr): Rename to ...
11204 (gdb_parse_agent_expr): ... this, make it non-static and move
11205 to ax.h.
11206 (unparse_agent_expr) Rename to ...
11207 (gdb_unparse_agent_expr): ... this, make it non-static and move
11208 to ax.h.
11209 (eval_agent_expr): Rename to ...
11210 (eval_tracepoint_agent_expr): ... this.
11211 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11212 forward declarations.
11213 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11214 (agent_get_trace_state_variable_value): New function.
11215 (agent_set_trace_state_variable_value): New function.
11216 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11217 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11218 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11219 (condition_true_at_tracepoint): Likewise.
11220 (parse_agent_expr): Rename to ...
11221 (gdb_parse_agent_expr): ... this and move to ax.c.
11222 (unparse_agent_expr): Rename to ...
11223 (gdb_unparse_agent_expr): ... this and move to ax.c.
11224 (gdb_agent_op_name): Move to ax.c.
11225 (eval_agent_expr): Rename to ...
11226 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11227 and move to ax.c.
11228 (eval_tracepoint_agent_expr): New function.
11229 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11230 non-static.
5e1dc496
LM
11231 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11232 ax.c.
11233 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11234 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11235 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11236 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11237 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11238 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11239 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11240 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11241 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11242 (compile_bytecodes): Remove forward declaration.
11243 (is_goto_target): Move to ax.c.
11244 (compile_bytecodes): Move to ax.c and call
11245 agent_get_trace_state_variable_value (...) and
11246 agent_set_trace_state_variable_value (...).
11247
11248 * Makefile.in: Update ax.c and IPA dependencies.
11249
277e4e52
PA
112502012-02-24 Pedro Alves <palves@redhat.com>
11251
11252 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11253 (cmd_bigqtbuffer_circular): ... this. Only handle
11254 'QTBuffer:circular:'.
11255 (handle_tracepoint_general_set): Adjust.
11256
bf4c19f7
YQ
112572012-02-16 Yao Qi <yao@codesourcery.com>
11258
11259 * inferiors.c: Move code to ...
11260 * dll.c: .... here. New.
11261 * server.h: Declare clear_dlls.
11262 * Makefile.in (SFILES): Add dll.c.
11263 (OBS): Add dll.o
11264 (dll.o): New rule.
11265
d73f2619
YQ
112662012-02-11 Yao Qi <yao@codesourcery.com>
11267
11268 * server.c: (handle_monitor_command): Add a new parameter
11269 `own_buf'.
11270 (handle_query): Update caller.
11271
f8255c2a
JB
112722012-02-09 Joel Brobecker <brobecker@adacore.com>
11273
11274 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11275 * configure, config.in: Regenerate.
11276 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11277 is not defined.
11278
da84f473
PA
112792012-02-02 Pedro Alves <palves@redhat.com>
11280
11281 Try SIGKILL first, then PTRACE_KILL.
11282 * linux-low.c (linux_kill_one_lwp): New.
11283 (linux_kill_one_lwp): Rename to ...
11284 (kill_one_lwp_callback): ... this. Use the new
11285 linux_kill_one_lwp.
11286
e886a173
PA
112872012-02-02 Pedro Alves <palves@redhat.com>
11288
11289 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11290 inferior.
11291
be07f1a2
PA
112922012-01-27 Pedro Alves <palves@redhat.com>
11293
11294 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11295 (elf_64_file_p): Make static.
11296 (linux_pid_exe_is_elf_64_file): New.
11297 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11298 Delete declarations.
11299 (linux_pid_exe_is_elf_64_file): Declare.
11300 * linux-x86-low.c (x86_arch_setup): Use
11301 linux_pid_exe_is_elf_64_file.
11302
d8301ad1
JK
113032012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11304
11305 * linux-low.c (linux_wait_for_event_1): Rename to ...
11306 (linux_wait_for_event): ... here and merge it with former
11307 linux_wait_for_event - new variable wait_ptid, use it.
11308 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11309
01b17894
PA
113102012-01-23 Pedro Alves <palves@redhat.com>
11311
11312 * server.c (main): Avoid yet another case of infinite loop while
11313 detaching/killing after a longjmp.
11314
e825046f
JK
113152012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11316
11317 Code cleanup.
11318 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11319
b9e7b9c3
UW
113202012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11321
11322 * hostio.c (handle_readlink): New function.
11323 (handle_vFile): Call it to handle "vFile:readlink" packets.
11324
901f9912
UW
113252012-01-20 Pedro Alves <palves@redhat.com>
11326 Ulrich Weigand <ulrich.weigand@linaro.org>
11327
11328 * server.c (handle_v_requests): Only support vAttach and vRun to
11329 start multiple processes when in extended protocol mode.
11330
fc1ab1a0
PA
113312012-01-17 Pedro Alves <palves@redhat.com>
11332
11333 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11334 memalign plus mprotect to allocate the scratch buffer.
11335
7d5d4e98
PA
113362012-01-13 Pedro Alves <palves@redhat.com>
11337
11338 * server.c (attach_inferior): Clear `cont_thread'.
11339
f128d5e9
PA
113402012-01-13 Pedro Alves <palves@redhat.com>
11341
11342 * server.c (main): Avoid infinite loop while detaching/killing
11343 after a longjmp.
11344
06db92f0
DE
113452012-01-09 Doug Evans <dje@google.com>
11346
11347 * server.c (start_inferior): Set last_ptid in --wrapper case.
11348
32d92999
YQ
113492012-01-06 Yao Qi <yao@codesourcery.com>
11350
11351 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11352 defined.
11353 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11354
5e0a92a9
YQ
113552012-01-04 Yao Qi <yao@codesourcery.com>
11356
11357 * tracepoint.c (cmd_qtdp): Print debug message
11358 for static tracepoint.
11359
ae639e8c
YQ
113602012-01-04 Yao Qi <yao@codesourcery.com>
11361
11362 * tracepoint.c (trace_vdebug): Differentiate debug message
11363 between gdbserver and IPA.
11364
f72429c5
YQ
113652012-01-03 Yao Qi <yao@codesourcery.com>
11366
11367 * tracepoint.c (tracepoint_was_hit): Don't collect for
11368 static tracepoint.
11369
12c3e59c
JB
113702012-01-02 Joel Brobecker <brobecker@adacore.com>
11371
11372 * terminal.h: Reformat copyright header.
11373
67827812
JB
113742012-01-02 Joel Brobecker <brobecker@adacore.com>
11375
11376 * server.c (gdbserver_version): Update copyright year.
11377 * gdbreplay.c (gdbreplay_version): Likewise.
11378
3e52c33d
JK
113792011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11380
11381 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11382
11383 Revert:
11384 2011-12-18 Hui Zhu <teawater@gmail.com>
11385 * linux-low.c (linux_create_inferior): Save return value to ret.
11386
66f1260e
HZ
113872011-12-18 Hui Zhu <teawater@gmail.com>
11388
11389 * linux-low.c (linux_create_inferior): Save return value to ret.
11390
e77616d7
DE
113912011-12-16 Doug Evans <dje@google.com>
11392
e7b06c57
DE
11393 * linux-low.c (linux_create_inferior): If stdio connection,
11394 redirect stdin from /dev/null, stdout to stderr.
11395 * remote-utils.c (remote_is_stdio): New static global.
11396 (remote_connection_is_stdio): New function.
11397 (remote_prepare): Handle stdio connection.
11398 (remote_open): Ditto.
11399 (remote_close): Don't close stdin for stdio connections.
11400 (read_prim,write_prim): New functions. Replace all calls to
11401 read/write to these.
11402 * server.c (main): Watch for "-" argument. Move call to
11403 remote_prepare before start_inferior.
11404 * server.h (STDIO_CONNECTION_NAME): New macro.
11405 (remote_connection_is_stdio): Declare.
11406
e77616d7
DE
11407 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11408 in debugging output.
11409
82067193
YQ
114102011-12-15 Yao Qi <yao@codesourcery.com>
11411
11412 * tracepoint.c: Include sys/syscall.h.
11413 (gdb_ust_thread): Remove preprocessor conditional.
11414
82bfbe7e
PA
114152011-12-14 Pedro Alves <pedro@codesourcery.com>
11416
11417 * linux-low.c (linux_detach_one_lwp): Call
11418 the_low_target.prepare_to_resume before detaching.
11419
712c6575
YQ
114202011-12-14 Yao Qi <yao@codesourcery.com>
11421
11422 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11423 of write.
11424
d54d1edf
YQ
114252011-12-14 Yao Qi <yao@codesourcery.com>
11426
11427 * i386-low.c (i386_low_stopped_data_address): Initialize local
11428 variable `control'.
11429
6210a125
PA
114302011-12-13 Pedro Alves <pedro@codesourcery.com>
11431
11432 PR remote/13492
11433
11434 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11435 DR_CONTROL unless necessary. Extend comments.
11436 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11437 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11438
2ece8244
YQ
114392011-12-13 Yao Qi <yao@codesourcery.com>
11440
11441 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11442 macros.
11443 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11444
784867a5
JK
114452011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11446
11447 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11448 Print new debug message for such case.
11449
6bf36717
JK
114502011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11451
11452 Fix overlapping memcpy.
11453 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11454 the read_inferior_memory transfer.
11455 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11456 write_inferior_memory transfer.
11457 (set_fast_tracepoint_jump): New variable buf. Use it for the
11458 read_inferior_memory and write_inferior_memory transfers.
11459 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11460 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11461 Use it for the write_inferior_memory transfer.
11462 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11463 buffers.
11464
50275556
MR
114652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11466
11467 * linux-low.c (fetch_register, store_register): Make code
11468 consistent, fix formatting.
11469
7325beb4
MR
114702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11471
11472 * linux-low.c (usr_store_inferior_registers): Factor out code
11473 to handle individual registers into...
11474 (store_register): ... this new function.
11475
c642a434
UW
114762011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11477
11478 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11479 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11480 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11481 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11482 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11483 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11484 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11485 (srv_xmlfiles): Add new XML files.
11486
11487 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11488 and <sys/uio.h>.
11489 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11490 (init_registers_s390_linux32v1): Add prototype.
11491 (init_registers_s390_linux32v2): Likewise.
11492 (init_registers_s390_linux64v1): Likewise.
11493 (init_registers_s390_linux64v2): Likewise.
11494 (init_registers_s390x_linux64v1): Likewise.
11495 (init_registers_s390x_linux64v2): Likewise.
11496 (s390_num_regs): Increment to 52.
11497 (s390_regmap): Add orig_r2 register.
11498 (s390_num_regs_3264): Increment to 68.
11499 (s390_regmap_3264): Add orig_r2 register.
11500 (s390_collect_ptrace_register): Handle orig_r2 register.
11501 (s390_supply_ptrace_register): Likewise.
11502 (s390_fill_last_break): New function.
11503 (s390_store_last_break): Likewise.
11504 (s390_fill_system_call): New function.
11505 (s390_store_system_call): Likewise.
11506 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11507 register sets.
11508 (s390_check_regset): New function.
11509 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11510 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11511 Update target_regsets for available register sets.
11512
2268b414
JK
115132011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11514 Jan Kratochvil <jan.kratochvil@redhat.com>
11515
11516 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11517 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11518 New.
11519 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11520 * linux-low.h (struct process_info_private): New member r_debug.
11521 * server.c (handle_qxfer_libraries): Call
11522 the_target->qxfer_libraries_svr4.
11523 (handle_qxfer_libraries_svr4): New function.
11524 (qxfer_packets): New entry "libraries-svr4".
11525 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11526 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11527 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11528 PACKET_qXfer_libraries_svr4.
11529
d6db1fab
UW
115302011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11531
11532 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11533 PSW address/mask between 8-byte and 16-byte formats.
11534 (s390_supply_ptrace_register): Likewise.
11535 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11536 basic addressing mode bit.
11537
242f5f1c
SS
115382011-11-24 Stan Shebs <stan@codesourcery.com>
11539
11540 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11541
f196051f
SS
115422011-11-17 Stan Shebs <stan@codesourcery.com>
11543
11544 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11545 (tracing_start_time): New global.
11546 (tracing_stop_time): New global.
11547 (tracing_user_name): New global.
11548 (tracing_notes): New global.
11549 (tracing_stop_note): New global.
11550 (cmd_qtstart): Set traceframe_usage, start_time.
11551 (stop_tracing): Set stop_time.
11552 (cmd_qtstatus): Report additional status.
11553 (cmd_qtp): New function.
11554 (handle_tracepoint_query): Call it.
11555 (cmd_qtnotes): New function.
11556 (handle_tracepoint_general_set): Call it.
11557 (get_timestamp): Rename from tsv_get_timestamp.
11558
405f8e94
SS
115592011-11-14 Stan Shebs <stan@codesourcery.com>
11560 Kwok Cheung Yeung <kcy@codesourcery.com>
11561
11562 * linux-x86-low.c (small_jump_insn): New.
11563 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11564 trampoline and error message, build a trampoline and issue a small
11565 jump instruction to it.
11566 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11567 trampoline and error message.
11568 (x86_get_min_fast_tracepoint_insn_len): New.
11569 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11570 * linux-low.h (struct linux_target_ops): Add arguments to
11571 install_fast_tracepoint_jump_pad operation, add new operation.
11572 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11573 arguments.
11574 (linux_get_min_fast_tracepoint_insn_len): New function.
11575 (linux_target_op): Add new operation.
11576 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11577 (gdb_trampoline_buffer_end): Ditto.
11578 (gdb_trampoline_buffer_error): Ditto.
11579 (struct ipa_sym_addresses): Add fields for new IPA variables.
11580 (symbol_list): Add entries for new IPA variables.
11581 (struct tracepoint): Add fields to hold the address range of the
11582 trampoline used by the tracepoint.
11583 (trampoline_buffer_head): New static variable.
11584 (trampoline_buffer_tail): Ditto.
11585 (claim_trampoline_space): New function.
11586 (have_fast_tracepoint_trampoline_buffer): New function.
11587 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11588 structure.
11589 (install_fast_tracepoint): Ditto, also add error buffer argument.
11590 (cmd_qtminftpilen): New function.
11591 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11592 (fast_tracepoint_from_trampoline_address): New function.
11593 (fast_tracepoint_collecting): Handle trampoline as part of jump
11594 pad space.
11595 (set_trampoline_buffer_space): New function.
11596 (initialize_tracepoint): Initialize new IPA variables.
11597 * target.h (struct target_ops): Add arguments to
11598 install_fast_tracepoint_jump_pad operation, add new
11599 get_min_fast_tracepoint_insn_len operation.
11600 (target_get_min_fast_tracepoint_insn_len): New.
11601 (install_fast_tracepoint_jump_pad): Add arguments.
11602 * server.h (IPA_BUFSIZ): Define.
11603 * linux-i386-ipa.c: Include extra header files.
11604 (initialize_fast_tracepoint_trampoline_buffer): New function.
11605 (initialize_low_tracepoint): Call it.
11606 * server.h (set_trampoline_buffer_space): Declare.
11607 (claim_trampoline_space): Ditto.
11608 (have_fast_tracepoint_trampoline_buffer): Ditto.
11609
1e4d1764
YQ
116102011-11-14 Yao Qi <yao@codesourcery.com>
11611
11612 * server.c (handle_query): Handle InstallInTrace for qSupported.
11613 * tracepoint.c (add_tracepoint): Sort list.
11614 (install_tracepoint, download_tracepoint): New.
11615 (cmd_qtdp): Call them to install and download tracepoints.
11616 (sort_tracepoints): Removed.
11617 (cmd_qtstart): Update.
11618
5c73ff4e
YQ
116192011-11-14 Yao Qi <yao@codesourcery.com>
11620
11621 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11622 * mem-break.h: Declare.
11623 * tracepoint.c (cmd_qtstart): Move some code to ...
11624 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11625 New.
11626 (download_tracepoints): Move some code to ...
11627 (download_tracepoint_1): ... here. New.
11628
86a30030
YQ
116292011-11-08 Yao Qi <yao@codesourcery.com>
11630
11631 * remote-utils.c (relocate_instruction): A comment fix.
11632
8d26e50c
JB
116332011-11-07 Joel Brobecker <brobecker@adacore.com>
11634
11635 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11636 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11637 dr_status_mirror and dr_control_mirror from debug_reg_state.
11638 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11639 (i386_initial_stuff): Remove use of deleted globals.
11640 (i386_get_thread_context, i386_set_thread_context,
11641 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11642 from debug_reg_state.
11643
a59306a3
YQ
116442011-11-05 Yao Qi <yao@codesourcery.com>
11645
11646 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11647 address as TPOINT's.
11648
3065dfb6
SS
116492011-11-02 Stan Shebs <stan@codesourcery.com>
11650
11651 * tracepoint.c (agent_mem_read_string): New function.
11652 (eval_agent_expr): Call it for tracenz.
11653 * server.c (handle_query): Report support for tracenz.
11654
fd0d8c7c
YQ
116552011-11-02 Yao Qi <yao@codesourcery.com>
11656
11657 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11658
609086b1
YQ
116592011-11-02 Yao Qi <yao@codesourcery.com>
11660
11661 * target.h: Fix a typo in comment.
11662
b9fd1791
PA
116632011-10-31 Pedro Alves <pedro@codesourcery.com>
11664
11665 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11666 clobber the breakpoints' shadows with fast tracepoint jumps.
11667 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11668 * target.c (write_inferior_memory): Also pass MYADDR down to
11669 check_mem_write.
11670
03583c20
UW
116712011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11672
11673 * configure.ac: Check support for personality routine.
11674 * configure: Regenerate.
11675 * config.in: Likewise.
11676 * linux-low.c: Include <sys/personality.h>.
11677 Define ADDR_NO_RANDOMIZE if necessary.
11678 (linux_create_inferior): Disable address space randomization when
11679 forking inferior, if requested.
11680 (linux_supports_disable_randomization): New function.
11681 (linux_target_ops): Install it.
11682 * server.h (disable_randomization): Declare.
11683 * server.c (disable_randomization): New global variable.
11684 (handle_general_set): Handle QDisableRandomization.
11685 (handle_query): Likewise for qSupported.
11686 (main): Support --disable-randomization and --no-disable-randomization
11687 command line arguments.
11688 * target.h (struct target_ops): Add supports_disable_randomization.
11689 (target_supports_disable_randomization): New macro.
11690
723b724b
MF
116912011-09-29 Mike Frysinger <vapier@gentoo.org>
11692
11693 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11694 ifdef check.
11695 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11696 [!PT_GETDSBT] (target_loadmap): New definition.
11697 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11698 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11699 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11700 and PT_GETDSBT to LINUX_LOADMAP.
11701 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11702 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11703
55329a5c 117042011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11705
11706 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11707 (arm_linux_hwbp_cap): New static variable.
11708 (arm_linux_get_hwbp_cap): Replace by ...
11709 (arm_linux_init_hwbp_cap): ... this new function.
11710 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11711 (arm_linux_get_hw_watchpoint_count): Likewise.
11712 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11713 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11714 (arm_prepare_to_resume): Use perror_with_name instead of error.
11715
55329a5c 117162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11717
11718 * linux-arm-low.c: Include <signal.h>.
11719 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11720 (struct arm_linux_hwbp_cap): New data type.
11721 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11722 (struct arm_linux_hw_breakpoint): New data type.
11723 (MAX_BPTS, MAX_WPTS): Define.
11724 (struct arch_process_info, struct arch_lwp_info): New data types.
11725 (arm_linux_get_hwbp_cap): New function.
11726 (arm_linux_get_hw_breakpoint_count): Likewise.
11727 (arm_linux_get_hw_watchpoint_count): Likewise.
11728 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11729 (arm_hwbp_control_initialize): Likewise.
11730 (arm_hwbp_control_is_enabled): Likewise.
11731 (arm_hwbp_control_is_initialized): Likewise.
11732 (arm_hwbp_control_disable): Likewise.
11733 (arm_linux_hw_breakpoint_equal): Likewise.
11734 (arm_linux_hw_point_initialize): Likewise.
11735 (struct update_registers_data): New data structure.
11736 (update_registers_callback: New function.
11737 (arm_insert_point): Likewise.
11738 (arm_remove_point): Likewise.
11739 (arm_stopped_by_watchpoint): Likewise.
11740 (arm_stopped_data_address): Likewise.
11741 (arm_new_process): Likewise.
11742 (arm_new_thread): Likewise.
11743 (arm_prepare_to_resume): Likewise.
11744 (the_low_target): Register arm_insert_point, arm_remove_point,
11745 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11746 arm_new_thread, and arm_prepare_to_resume.
11747
6b9801d4
SS
117482011-09-15 Stan Shebs <stan@codesourcery.com>
11749
11750 * server.h (struct emit_ops): Add compare-goto fields.
11751 * tracepoint.c (gdb_agent_op_sizes): New table.
11752 (emit_eq_goto): New function.
11753 (emit_ne_goto): New function.
11754 (emit_lt_goto): New function.
11755 (emit_le_goto): New function.
11756 (emit_gt_goto): New function.
11757 (emit_ge_goto): New function.
11758 (is_goto_target): New function.
11759 (compile_bytecodes): Recognize special cases of compare-goto
11760 combinations and call specialized emitters for them.
11761 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11762 (amd64_emit_ne_goto): New function.
11763 (amd64_emit_lt_goto): New function.
11764 (amd64_emit_le_goto): New function.
11765 (amd64_emit_gt_goto): New function.
11766 (amd64_emit_ge_goto): New function.
11767 (amd64_emit_ops): Add the new functions.
11768 (i386_emit_eq_goto): New function.
11769 (i386_emit_ne_goto): New function.
11770 (i386_emit_lt_goto): New function.
11771 (i386_emit_le_goto): New function.
11772 (i386_emit_gt_goto): New function.
11773 (i386_emit_ge_goto): New function.
11774 (i386_emit_ops): Add the new functions.
11775
bf15cbda
SS
117762011-09-08 Stan Shebs <stan@codesourcery.com>
11777
11778 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11779 (i386_emit_epilogue): Restore %ebx.
11780
943ca1dd
JZ
117812011-08-31 Jie Zhang <jzhang918@gmail.com>
11782
11783 * server.c (step_thread): Remove definition.
11784 (process_serial_event): Don't handle Hs.
11785 * server.h (step_thread): Remove declaration.
11786 * target.c (set_desired_inferior): Remove use of step_thread.
11787
e3deef73
LM
117882011-08-24 Luis Machado <lgustavo@codesourcery.com>
11789
11790 * linux-low.c: Include linux-procfs.h.
11791 (linux_attach_lwp_1): Update comments.
11792 (linux_attach): Scan for existing threads when attaching to a
11793 process that is the tgid.
11794 * Makefile.in: Update dependencies.
11795
13da1c97
LM
117962011-08-24 Luis Machado <lgustavo@codesourcery.com>
11797
11798 * configure.srv: Add linux-procfs.o dependencies.
11799
881127c9
YQ
118002011-08-14 Yao Qi <yao@codesourcery.com>
11801
11802 * target.h (struct target_ops): Fix indent.
11803 * win32-low.c (win32_target_ops): Fix comment.
11804
58dbd541
YQ
118052011-08-14 Andrew Jenner <andrew@codesourcery.com>
11806 Yao Qi <yao@codesourcery.com>
11807
11808 * Makefile.in (clean): Remove tic6x-*.c files.
11809 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11810 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11811 (tic6x-c64xp-linux.c): Likewise.
11812 * configure.srv: Add support for tic6x-*-uclinux.
11813 * linux-tic6x-low.c: New.
11814 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11815
78d85199
YQ
118162011-08-14 Andrew Stubbs <ams@codesourcery.com>
11817 Yao Qi <yao@codesourcery.com>
11818
11819 * target.h (struct target_ops): Add read_loadmap.
11820 * linux-low.c (struct target_loadseg): New type.
11821 (struct target_loadmap): New type.
11822 (linux_read_loadmap): New function.
11823 (linux_target_ops): Add linux_read_loadmap.
11824 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11825 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11826 to NULL.
78d85199 11827
a959a88d
EZ
118282011-08-05 Eli Zaretskii <eliz@gnu.org>
11829
11830 * win32-low.c: Include <stdint.h>.
11831
1ced966e
PA
118322011-07-22 Pedro Alves <pedro@codesourcery.com>
11833
11834 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11835 to the inferior here.
11836 (i386_remove_aligned_watchpoint): Ditto.
11837 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11838 fit part of the watchpoint in the debug registers.
11839 (i386_update_inferior_debug_regs): New.
11840 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11841 registers, and only update the inferior on success.
11842 (i386_low_remove_watchpoint): Ditto.
11843
d26e3629
KY
118442011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11845
11846 * linux-low.c (compare_ints, unique, list_threads, show_process,
11847 linux_core_of_thread): Delete.
11848 (linux_target_ops): Change linux_core_of_thread to
11849 linux_common_core_of_thread.
11850 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11851 * utils.c (malloc_failure): Change type of argument.
11852 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11853 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11854 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11855 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11856 (IPA_OBJS): Add common-utils-ipa.o.
11857 (ptid_h, linux_osdata_h): New macros.
11858 (server_h): Add common/common-utils.h, common/xml-utils.h,
11859 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11860 common/ptid.h.
11861 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11862 ptid.o, buffer.o): New rules.
11863 (linux-low.o): Add common/linux-osdata.h as a dependency.
11864 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11865 * configure.ac: Add AC_HEADER_DIRENT check.
11866 * config.in: Regenerate.
11867 * configure: Regenerate.
11868 * remote-utils.c (xml_escape_text): Delete.
11869 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11870 buffer_xml_printf): Move to common/buffer.c.
11871 * server.c (main): Remove call to initialize_inferiors.
11872 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11873 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11874 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11875 internal_error, gdb_assert, gdb_assert_fail): Delete.
11876 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11877 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11878 common/buffer.h.
11879 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11880 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11881 initialize_inferiors): Delete.
11882
2275a1a7
PA
118832011-07-20 Pedro Alves <pedro@codesourcery.com>
11884
11885 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11886 symbol error.
11887
0a5b1e09
PA
118882011-05-31 Pedro Alves <pedro@codesourcery.com>
11889
11890 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11891 assertion.
11892 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11893
6938fd34
YQ
118942011-05-26 Yao Qi <yao@codesourcery.com>
11895
11896 * Makefile.in (thread-db.o): Track dependence to
11897 common/gdb_thread_db.h.
11898 * thread-db.c: include gdb_thread_db.h from right place.
11899
b481f9e0
TT
119002011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11901
11902 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11903 __FILE__ and __LINE__ to internal_error.
11904
98a5dd13
DE
119052011-05-13 Doug Evans <dje@google.com>
11906
11907 * thread-db.c (try_thread_db_load_from_sdir): New function.
11908 (try_thread_db_load_from_dir): New function.
11909 (thread_db_load_search): Handle $sdir, ignore $pdir.
11910 Remove trying of system directories if search of
11911 libthread-db-search-path fails, that is now done via $sdir.
11912
d248b706
KY
119132011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11914
11915 * server.c (handle_query): Add EnableDisableTracepoints to the list
11916 of supported features.
43aaf8b6 11917 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11918 tracepoints.
43aaf8b6
PA
11919 (cmd_qtenable_disable): New.
11920 (cmd_qtstart): Install tracepoints even if disabled.
11921 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11922 receiving a QTEnable or QTDisable packet.
11923 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11924 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11925 tracepoints.
11926 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11927
84e578fb
DE
119282011-05-10 Doug Evans <dje@google.com>
11929
11930 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11931
71f55dd8
DE
119322011-05-04 Doug Evans <dje@google.com>
11933
11934 * linux-low.c (linux_join): Skip process lookup.
11935 * spu-low.c (spu_join): Ditto.
11936 * server.c (join_inferiors_callback): Delete.
11937 (process_serial_event): For 'D' packet (detach) call join_inferior
11938 directly.
11939
4d393d60
JM
119402011-05-04 Joseph Myers <joseph@codesourcery.com>
11941
11942 * README: Don't mention xscale*-*-linux*.
11943 * configure.srv (xscale*-*-linux*): Don't handle target.
11944
b00ad6ff
NF
119452011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11946
11947 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11948 casting pointers.
11949 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11950 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11951 (i386_emit_void_call_2): Likewise.
11952
af96c192
YQ
119532011-04-26 Yao Qi <yao@codesourcery.com>
11954
43aaf8b6
PA
11955 * linux-low.c: Move common macros to linux-ptrace.h.
11956 Include linux-ptrace.h.
af96c192
YQ
11957 * Makefile.in (linux_ptrace_h): New.
11958 (linux-low.o): Depends on linux-ptrace.h.
11959
03f2bd59
JK
119602011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11961
11962 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11963 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11964 (remote_prepare): New function with most of the TCP code from ...
11965 (remote_open): ... here. Detect PORT here unconditionally. Move also
11966 setting transport_is_reliable.
11967 * server.c (run_once): New variable.
11968 (gdbserver_usage): Document it.
11969 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11970 the first run if RUN_ONCE.
11971 * server.h (run_once, remote_prepare): New declarations.
11972
7a9dd1b2
TT
119732011-04-19 Tom Tromey <tromey@redhat.com>
11974
11975 * win32-low.c (handle_load_dll): Remove duplicate "the".
11976
81239425
PM
119772011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11978
11979 Remove support for old Cygwin 1.5 versions.
11980 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11981 function to avoid warning.
11982 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11983 warning.
11984
9e0627f1
PM
119852011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11986
11987 * gdbserver/server.h (Macro _): Define it if not available.
11988
588eebee
MS
119892011-03-14 Michael Snyder <msnyder@vmware.com>
11990
348af9f7 11991 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11992
43f70d4c
JB
119932011-03-10 Joel Brobecker <brobecker@adacore.com>
11994
11995 * Makefile.in (maintainer-clean realclean distclean): Remove
11996 "make ... subdir_do" command.
11997
348af9f7
MS
119982011-03-10 Michael Snyder <msnyder@vmware.com>
11999
12000 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12001
12002 * server.c (handle_v_run): Free alloced buffer on early return.
12003
e637a4f5
YQ
120042011-03-09 Yao Qi <yao@codesourcery.com>
12005
12006 Revert:
12007 2011-03-04 Yao Qi <yao@codesourcery.com>
12008
12009 * Makefile.in: Remove GNU make feature --directory.
12010
12011 2011-03-05 Yao Qi <yao@codesourcery.com>
12012
12013 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12014 (subdir_do): New make target. Copied from gdb/Makefile.
12015 (maintainer-clean, realclean, distclean, clean): Call corresponding
12016 make targets in common/Makefile.
12017
12018 2011-02-11 Yao Qi <yao@codesourcery.com>
12019
12020 * configure.ac: Call AC_PROG_RANLIB.
12021 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12022 * configure: Regenerate.
12023
e6edda56
JK
120242011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12025
12026 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12027
e5141119
JB
120282011-03-06 Yao Qi <yao@codesourcery.com>
12029
12030 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12031
64794aa4
JB
120322011-03-05 Yao Qi <yao@codesourcery.com>
12033
12034 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12035 (subdir_do): New make target. Copied from gdb/Makefile.
12036 (maintainer-clean, realclean, distclean, clean): Call corresponding
12037 make targets in common/Makefile.
12038
7a762829
YQ
120392011-03-04 Yao Qi <yao@codesourcery.com>
12040
12041 * Makefile.in: Remove GNU make feature --directory.
12042
348af9f7
MS
120432011-03-04 Michael Snyder <msnyder@vmware.com>
12044
12045 * server.c (queue_stop_reply): Call xmalloc not malloc.
12046
120472011-03-02 Michael Snyder <msnyder@vmware.com>
12048
12049 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12050
9f72fee2
MS
120512011-02-28 Michael Snyder <msnyder@vmware.com>
12052
588eebee
MS
12053 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12054 (cmd_qtframe): Ditto.
12055 (cmd_qtbuffer): Ditto.
12056 (cmd_bigqtbuffer): Ditto.
12057
9f72fee2
MS
12058 * utils.c (decimal2str): Initialize 'width' to nine, then
12059 don't mess with it.
12060
8040bd49
UW
120612011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12062
12063 * hostio.c (require_data): Free *data, not data.
12064
7e52cbd0
JK
120652011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12066
12067 * hostio.c (require_data): Use free, not xfree.
12068
9130f83e
MS
120692011-02-27 Michael Snyder <msnyder@vmware.com>
12070
4b812f4e
MS
12071 * server.c (handle_query): Discard unused value.
12072
9130f83e
MS
12073 * hostio.c (require_data): Free malloc memory before returning
12074 error.
12075
69d37113
MS
120762011-02-26 Michael Snyder <msnyder@vmware.com>
12077
12078 * linux-low.c (list_threads): Call closedir for dirent.
12079
35f5825a
MS
120802011-02-27 Michael Snyder <msnyder@vmware.com>
12081
2a589cef
MS
12082 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12083 a case statement falls through.
12084
0adea5f7
MS
12085 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12086
35f5825a
MS
12087 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12088 in comparison.
12089
238f1c74
MS
120902011-02-26 Michael Snyder <msnyder@vmware.com>
12091
12092 * utils.c (decimal2str): Eliminate dead code and dead param.
12093 (pulongest): Drop dead param from call to decimal2str.
12094 (plongest): Ditto.
12095
633ff500
JB
120962011-02-24 Joel Brobecker <brobecker@adacore.com>
12097
12098 Revert the following patch (not approved yet):
12099 2011-02-21 Hui Zhu <teawater@gmail.com>
12100 * tracepoint.c (tp_printf): New function.
12101 (eval_agent_expr): Handle gdb_agent_op_printf.
12102
f9c6ff72
HZ
121032011-02-21 Hui Zhu <teawater@gmail.com>
12104
12105 * tracepoint.c (tp_printf): New function.
12106 (eval_agent_expr): Handle gdb_agent_op_printf.
12107
94d5e490
TT
121082011-02-18 Tom Tromey <tromey@redhat.com>
12109
12110 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12111 (tracepoint.o): Likewise.
12112 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12113 (gdb_agent_op_names): Likewise.
12114
c7f96d2b
TT
121152011-02-18 Tom Tromey <tromey@redhat.com>
12116
12117 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12118 gdb_agent_op_rot>: New constants.
12119 (gdb_agent_op_names): Add pick and roll.
12120 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12121 cases.
12122
0feedb2c
JK
121232011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12124
12125 * aclocal.m4: Regenerated with aclocal-1.11.1.
12126
b3b9301e
PA
121272011-02-14 Pedro Alves <pedro@codesourcery.com>
12128
12129 * server.c (handle_qxfer_traceframe_info): New.
12130 (qxfer_packets): Register "traceframe-info".
12131 (handle_query): Report support for qXfer:traceframe-info:read+.
12132 * tracepoint.c (match_blocktype): New.
12133 (traceframe_find_block_type): Rename to ...
12134 (traceframe_walk_blocks): ... this. Add callback filter argument,
12135 and use it.
12136 (traceframe_find_block_type): New, reimplemented on top of
12137 traceframe_walk_blocks.
12138 (build_traceframe_info_xml): New.
12139 (traceframe_read_info): New.
12140 * server.h (traceframe_read_info): Declare.
12141
4f3e6fb7
YQ
121422011-02-11 Yao Qi <yao@codesourcery.com>
12143
12144 * configure.ac: Call AC_PROG_RANLIB.
12145 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12146 * configure: Regenerate.
12147
764880b7
PA
121482011-02-07 Pedro Alves <pedro@codesourcery.com>
12149
12150 * server.c (gdb_read_memory): Change return semantics to allow
12151 partial transfers.
12152 (handle_search_memory_1): Adjust.
12153 (process_serial_event) <'m' packet>: Handle partial transfers.
12154 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12155
1c79eb8a
PA
121562011-01-28 Pedro Alves <pedro@codesourcery.com>
12157
12158 * regcache.c (init_register_cache): Initialize
12159 regcache->register_status.
12160 (free_register_cache): Release regcache->register_status.
12161 (regcache_cpy): Copy register_status.
12162 (registers_to_string): Print 'x's for unavailable registers.
12163 (supply_register): Mark the register's status valid or
12164 unavailable, depending on whether a buffer was passed in or not.
12165 (supply_register_zeroed): New.
12166 (supply_regblock): Mark the registers' status valid or
12167 unavailable, depending on whether a buffer was passed in or not.
12168 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12169 (struct regcache): New `register_status' field.
12170 (supply_register_zeroed): Declare.
12171 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12172 supply_register_zeroed, rather than passing a NULL buffer to
12173 supply_register.
12174 * tracepoint.c (fetch_traceframe_registers): Update comment.
12175
85724a0e
PA
121762011-01-28 Pedro Alves <pedro@codesourcery.com>
12177
12178 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12179 buffer explicit.
12180
d08aafef
PA
121812011-01-25 Pedro Alves <pedro@codesourcery.com>
12182
12183 * server.h (decode_xfer_write): Change prototype.
12184 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12185 and don't extract the annex here.
12186 * server.c (decode_xfer_read): Remove `annex' parameter,
12187 and don't extract the annex here.
12188 (decode_xfer): New.
12189 (struct qxfer): New.
12190 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12191 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12192 (handle_qxfer_statictrace): New functions, abstracted out from
12193 handle_query, and made to use the struct qxfer interface.
12194 (handle_threads_qxfer_proper): Rename to ...
12195 (handle_qxfer_threads_proper): ... this.
12196 (handle_threads_qxfer): Rename to ...
12197 (handle_qxfer_threads): ... this. Adjust.
12198 (qxfer_packets): New array.
12199 (handle_qxfer): New function.
12200 (handle_query): Use handle_qxfer.
12201
493e2a69
MS
122022011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12203
12204 * gdbreplay.c: Shorten lines of >= 80 columns.
12205 * linux-low.c: Ditto.
12206 * linux-ppc-low.c: Ditto.
12207 * linux-s390-low.c: Ditto.
12208 * linux-sparc-low.c: Ditto.
12209 * linux-x86-low.c: Ditto.
12210 * linux-xtensa-low.c: Ditto.
12211 * mem-break.c: Ditto.
12212 * nto-low.c: Ditto.
12213 * regcache.h: Ditto.
12214 * remote-utils.c: Ditto.
12215 * server.c: Ditto.
12216 * server.h: Ditto.
12217 * thread-db.c: Ditto.
12218 * tracepoint.c: Ditto.
12219 * utils.c: Ditto.
12220 * win32-low.h: Ditto.
12221
44944448
JB
122222011-01-05 Joel Brobecker <brobecker@adacore.com>
12223
12224 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12225 update.
12226
71ce852c
JB
122272011-01-01 Joel Brobecker <brobecker@adacore.com>
12228
12229 * server.c (gdbserver_version): Update copyright year in version
12230 output.
12231 * gdbreplay.c (gdbreplay_version): Ditto.
12232
eb826dc6
MF
122332010-12-29 Jie Zhang <jie.zhang@analog.com>
12234
12235 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12236 * linux-bfin-low.c: New file.
12237 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12238 PT_DATA_ADDR for BFIN targets.
12239 * Makefile.in (SFILES): Add linux-bfin-low.c.
12240 (clean): Remove reg-bfin.c.
12241 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12242 * README: Mention supported Blackfin targets.
12243
39ab222a
MF
122442010-12-23 Mike Frysinger <vapier@gentoo.org>
12245
12246 * .gitignore: New file.
12247
a1f2ce7d
MF
122482010-11-16 Mike Frysinger <vapier@gentoo.org>
12249
12250 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12251
f474844c
JZ
122522010-10-22 Jie Zhang <jie@codesourcery.com>
12253
12254 * Makefile.in: Add FLAGS_TO_PASS variable.
12255 (install): Remove dependency of install-only and recursively
12256 invoke make for install-only.
12257
f1048712
DE
122582010-10-04 Doug Evans <dje@google.com>
12259
12260 * Makefile.in (uninstall): Use $(DESTDIR).
12261
b53a1623
PA
122622010-09-24 Pedro Alves <pedro@codesourcery.com>
12263
e6ee044d
PA
12264 PR gdb/11842
12265
b53a1623
PA
12266 * linux-x86-low.c (compat_siginfo_from_siginfo)
12267 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12268 si_code is < 0. Check for si_code == SI_TIMER before checking for
12269 si_code < 0.
12270
fa1bd1e4
JB
122712010-09-13 Joel Brobecker <brobecker@adacore.com>
12272
12273 * lynx-i386-low.c: New file.
12274 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12275
47fac8f8
JB
122762010-09-13 Joel Brobecker <brobecker@adacore.com>
12277
12278 * lynx-low.c (ptrace_request_to_str): Remove handling for
12279 request values that have been removed in LynxOS 5.x.
12280
1adfc54d
JB
122812010-09-13 Joel Brobecker <brobecker@adacore.com>
12282
12283 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12284 <ptrace.h>
12285
c2a66c29
NS
122862010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12287
12288 * configure.ac: Add --enable-inprocess-agent option.
12289 * configure: Rebuilt.
12290
32fcada3
YQ
122912010-09-06 Yao Qi <yao@codesourcery.com>
12292
12293 * linux-low.c (linux_kill): Remove unused variable.
12294 (linux_stabilize_threads): Likewise.
12295 * server.c (start_inferior): Likewise.
12296 (queue_stop_reply_callback): Likewise.
12297 * tracepoint.c (do_action_at_tracepoint): Likewise.
12298
0cccb683
YQ
122992010-09-06 Yao Qi <yao@codesourcery.com>
12300
12301 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12302 on return.
12303
423ec54c
JK
123042010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12305
12306 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12307
12ac6819
PA
123082010-09-06 Pedro Alves <pedro@codesourcery.com>
12309
12310 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12311 "$(IPA_DEPFILES)".
12312
8ed54b31
JB
123132010-09-01 Joel Brobecker <brobecker@adacore.com>
12314
12315 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12316 gdbserver/lynx-ppc-low.c: New files.
12317 * Makefile.in (lynx_low_h): New variable.
12318 (lynx-low.o, lynx-ppc-low.o): New rules.
12319 * configure.ac: On LynxOS, link with -lnetinet.
12320 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12321 * configure: regenerate.
12322
bb0116a4
JB
123232010-09-01 Joel Brobecker <brobecker@adacore.com>
12324
12325 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12326 * configure.ac: Add check for vasprintf and vsnprintf.
12327 * configure, config.in: Regenerate.
12328 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12329
a778ab81 123302010-09-01 Joel Brobecker <brobecker@adacore.com>
12331
12332 * gdbreplay.c: Move include of alloca.h up, next to include of
12333 malloc.h.
12334 * server.h: Add include of malloc.h.
12335 * mem-break.c: Remove include of malloc.h.
12336 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12337
8b034a19 123382010-09-01 Joel Brobecker <brobecker@adacore.com>
12339
12340 * Makefile.in (memmem.o): Build with -Wno-error.
12341
123422010-09-01 Joel Brobecker <brobecker@adacore.com>
12343
12344 * utils.c (xsnprintf): Make non-static.
12345 * server.h: Add xsnprintf declaration.
12346 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12347 replace calls to snprintf by calls to xsnprintf throughout.
12348
123492010-09-01 Joel Brobecker <brobecker@adacore.com>
12350
12351 * configure.ac: Add configure check for alloca.
12352 * configure, config.in: Regenerate.
12353 * server.h: Include alloca.h if it exists.
12354 * gdbreplay.c: Include alloca.h if it exists.
12355
1a981360
PA
123562010-08-28 Pedro Alves <pedro@codesourcery.com>
12357
12358 * linux-low.c (__SIGRTMIN): Define if not already defined.
12359 (linux_create_inferior): Check for __ANDROID__ rather than
12360 __SIGRTMIN.
12361 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12362 are already deferred.
12363 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12364 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12365 stopped and already has a pending signal to report.
12366 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12367 a pending signal to report or is moving out of a jump pad.
12368 (linux_init_signals): Check for __ANDROID__ rather than
12369 __SIGRTMIN.
12370
b4d51a55
PA
123712010-08-28 Pedro Alves <pedro@codesourcery.com>
12372
12373 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12374 debug_threads check. Avoid a linear search when not doing debug
12375 output.
12376
ec48365d
PA
123772010-08-27 Pedro Alves <pedro@codesourcery.com>
12378
12379 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12380 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12381 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12382 (process_event): Change local fd's type to gdb_fildes_t.
12383 (create_file_handler): Adjust prototype.
12384 (delete_file_handler): Adjust prototype.
12385 (handle_file_event): Adjust prototype. Use pfildes.
12386 (create_file_event): Adjsut prototype.
12387 * remote-utils.c (remote_desc, listen_desc): Change type to
12388 gdb_fildes_t.
12389 * server.h: New gdb_fildes_t typedef.
12390 [USE_WIN32API]: Include winsock2.h.
12391 (delete_file_handler, add_file_handler): Adjust prototypes.
12392 (pfildes): Declare.
12393 * utils.c (pfildes): New.
12394
854d88f0
PA
123952010-08-27 Pedro Alves <pedro@codesourcery.com>
12396
12397 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12398 * configure: Regenerate.
12399
0146f85b
PA
124002010-08-27 Pedro Alves <pedro@codesourcery.com>
12401
12402 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12403 (linux_done_accessing_memory): ... this.
12404 (linux_target_ops): Adjust.
12405 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12406 * nto-low.c (nto_target_ops): Adjust comment.
12407 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12408 * spu-low.c (spu_target_ops): Adjust comment.
12409 * target.h (target_ops): Rename unprepare_to_access_memory field
12410 to done_accessing_memory.
12411 (unprepare_to_access_memory): Rename to ...
12412 (done_accessing_memory): ... this.
12413
90d74c30
PA
124142010-08-26 Pedro Alves <pedro@codesourcery.com>
12415
12416 * linux-low.c (linux_prepare_to_access_memory): New.
12417 (linux_unprepare_to_access_memory): New.
12418 (linux_target_ops): Install them.
12419 * server.c (read_memory): Rename to ...
12420 (gdb_read_memory): ... this. Use
12421 prepare_to_access_memory/prepare_to_access_memory.
12422 (write_memory): Rename to ...
12423 (gdb_write_memory): ... this. Use
12424 prepare_to_access_memory/prepare_to_access_memory.
12425 (handle_search_memory_1): Adjust.
12426 (process_serial_event): Adjust.
12427 * target.h (struct target_ops): New fields
12428 prepare_to_access_memory and unprepare_to_access_memory.
12429 (prepare_to_access_memory, unprepare_to_access_memory): New.
12430 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12431 prepare_to_access_memory/prepare_to_access_memory.
12432 * nto-low.c (nto_target_ops): Adjust.
12433 * spu-low.c (spu_target_ops): Adjust.
12434 * win32-low.c (win32_target_ops): Adjust.
12435
fd467969
PA
124362010-08-26 Pedro Alves <pedro@codesourcery.com>
12437
12438 * Makefile.in (WARN_CFLAGS): Get it from configure.
12439 (WERROR_CFLAGS): New.
12440 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12441 * configure.ac: Introduce --enable-werror, which adds -Werror to
12442 the compiler command line. Enabled by default. Disable with
12443 --disable-werror. Add -Wdeclaration-after-statement
12444 Wpointer-arith and -Wformat-nonliteral to warning flags.
12445 * configure: Regenerate.
12446
331e2f5f
PA
124472010-08-26 Pedro Alves <pedro@codesourcery.com>
12448
12449 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12450
e581f2b4
PA
124512010-08-26 Pedro Alves <pedro@codesourcery.com>
12452
12453 * gdbreplay.c (remote_error): New.
12454 (gdbchar): New.
12455 (expect): Use gdbchar. Check for error reading from GDB.
12456 Clarify sync error output.
12457 (play): Check for errors writing to GDB.
12458 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12459 * remote-utils.c (getpkt): Check for errors writing to the remote
12460 descriptor.
12461
3c11dd79
PA
124622010-08-25 Pedro Alves <pedro@codesourcery.com>
12463
12464 * linux-low.c (linux_wait_1): Move non-debugging code out of
12465 `debug_threads' control.
12466
d20a8ad9
PA
124672010-08-25 Pedro Alves <pedro@codesourcery.com>
12468
12469 * linux-low.c (linux_wait_1): Don't set last_status here.
12470 * server.c (push_event, queue_stop_reply_callback): Assert we're
12471 not pushing a TARGET_WAITKIND_IGNORE event.
12472 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12473 (myresume, handle_target_event): Set the thread's last_resume_kind
12474 and last_status from the target returned status.
12475
964e4306
PA
124762010-08-25 Pedro Alves <pedro@codesourcery.com>
12477
12478 PR threads/10729
12479
12480 * linux-x86-low.c (update_debug_registers_callback): New.
12481 (i386_dr_low_set_addr): Use it.
12482 (i386_dr_low_get_addr): New.
12483 (i386_dr_low_set_control): Use update_debug_registers_callback.
12484 (i386_dr_low_get_control): New.
12485 (i386_dr_low_get_status): Adjust.
12486 * linux-low.c (linux_stop_lwp): New.
12487 * linux-low.h (linux_stop_lwp): Declare.
12488
12489 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12490 argument instead of a i386_debug_reg_state.
12491 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12492 a i386_debug_reg_state.
12493 (i386_insert_aligned_watchpoint): Adjust.
12494 (i386_remove_aligned_watchpoint): Adjust.
12495 (i386_low_stopped_data_address): Read the debug registers from the
12496 inferior instead of from the mirrors.
12497 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12498 (i386_dr_low_get_addr): Declare.
12499 (i386_dr_low_get_control): Declare.
12500 (i386_dr_low_get_status): Change prototype.
12501
12502 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12503 (i386_dr_low_get_addr): New.
12504 (i386_dr_low_get_control): New.
12505 (i386_dr_low_get_status): Adjust prototype. Return
12506 dr_status_mirror.
12507 (i386_initial_stuff): Clear dr_status_mirror and
12508 dr_control_mirror.
12509 (i386_get_thread_context): Adjust.
12510 (i386_set_thread_context): Adjust.
12511 (i386_thread_added): Adjust.
12512
5f21a75b
PA
125132010-08-24 Pedro Alves <pedro@codesourcery.com>
12514
12515 * linux-low.h (linux_thread_area): Delete declaration.
12516
3e4c1235
TS
125172010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12518
12519 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12520 after its termination.
12521
1971b033
PA
125222010-08-09 Pedro Alves <pedro@codesourcery.com>
12523
12524 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12525 (gdb_wants_all_stopped): Delete.
12526 (linux_wait_1): Don't call them.
12527 * server.c (handle_v_cont): Tag all threads as want-stopped.
12528 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12529 stopped as "client-wants-stopped".
12530
310444ac
PA
125312010-07-31 Pedro Alves <pedro@codesourcery.com>
12532
12533 * Makefile.in (signals_h): New.
12534 (server_h): Depend on it.
12535 (server.o): Don't depend on $(signals_def).
12536 (signals.o): Depend on $(signals_def).
12537
a19cae16
JK
125382010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12539
12540 * Makefile.in (signals_def): New.
12541 (server_h): Append include/gdb/signals.h and signals_def.
12542 (server.o): Append signals_def.
12543
30d50328
JK
125442010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12545
12546 * server.c (handle_target_event): Use target_signal_to_host for
12547 resume_info.sig initialization.
12548 * target.h (struct thread_resume) <sig>: New comment.
12549
5c3216e2
OS
125502010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12551
c6f46ca0
OS
12552 * server.c (handle_query): strcpy() the returned string from paddress()
12553 instead of sprintf().
5c3216e2
OS
12554 * utils.c (paddress): Return phex_nz().
12555
6bd31874
JB
125562010-07-07 Joel Brobecker <brobecker@adacore.com>
12557
12558 * server.c (handle_v_cont): Call mourn_inferior if process
12559 just exited.
12560 (myresume): Likewise.
12561
0fb4aa4b
PA
125622010-07-01 Pedro Alves <pedro@codesourcery.com>
12563
12564 Static tracepoints, and integration with UST.
12565
12566 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12567 * mem-break.c (uninsert_all_breakpoints)
12568 (reinsert_all_breakpoints): New.
12569 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12570 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12571 (gdb_agent_ust_loaded, helper_thread_id)
12572 (gdb_agent_helper_thread_id): New macros.
12573 (struct ipa_sym_addresses): Add addr_ust_loaded,
12574 addr_helper_thread_id, addr_cmd_buf.
12575 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12576 (in_process_agent_loaded_ust): New.
12577 (write_e_ust_not_loaded): New.
12578 (maybe_write_ipa_ust_not_loaded): New.
12579 (struct collect_static_trace_data_action): New.
12580 (enum tracepoint_type) <static_tracepoint>: New.
12581 (struct tracepoint) <handle>: Mention static tracepoints.
12582 (struct static_tracepoint_ctx): New.
12583 (CMD_BUF_SIZE): New.
12584 (add_tracepoint_action): Handle static tracepoint actions.
12585 (unprobe_marker_at): New.
12586 (clear_installed_tracepoints): Handle static tracepoints.
12587 (cmd_qtdp): Handle static tracepoints.
12588 (probe_marker_at): New.
12589 (cmd_qtstart): Handle static tracepoints.
12590 (response_tracepoint): Handle static tracepoints.
12591 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12592 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12593 (get_context_regcache): Handle static tracepoints.
12594 (do_action_at_tracepoint): Handle static tracepoint actions.
12595 (traceframe_find_block_type): Handle static trace data blocks.
12596 (traceframe_read_sdata): New.
12597 (download_tracepoints): Download static tracepoint actions.
12598 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12599 (GDB_PROBE_NAME): New.
12600 (ust_ops): New.
12601 (GET_UST_SYM): New.
12602 (USTF): New.
12603 (dlsym_ust): New.
12604 (ust_marker_to_static_tracepoint): New.
12605 (gdb_probe): New.
12606 (collect_ust_data_at_tracepoint): New.
12607 (gdb_ust_probe): New.
12608 (UNIX_PATH_MAX, SOCK_DIR): New.
12609 (gdb_ust_connect_sync_socket): New.
12610 (resume_thread, stop_thread): New.
12611 (run_inferior_command): New.
12612 (init_named_socket): New.
12613 (gdb_ust_socket_init): New.
12614 (cstr_to_hexstr): New.
12615 (next_st): New.
12616 (first_marker, next_marker): New.
12617 (response_ust_marker): New.
12618 (cmd_qtfstm, cmd_qtsstm): New.
12619 (unprobe_marker_at, probe_marker_at): New.
12620 (cmd_qtstmat, gdb_ust_thread): New.
12621 (gdb_ust_init): New.
12622 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12623 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12624 (ST_REGENTRY): New.
12625 (x86_64_st_collect_regmap): New.
12626 (X86_64_NUM_ST_COLLECT_GREGS): New.
12627 (AMD64_RIP_REGNUM): New.
12628 (supply_static_tracepoint_registers): New.
12629 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12630 (ST_REGENTRY): New.
12631 (i386_st_collect_regmap): New.
12632 (i386_NUM_ST_COLLECT_GREGS): New.
12633 (supply_static_tracepoint_registers): New.
12634 * server.c (handle_query): Handle qXfer:statictrace:read.
12635 <qSupported>: Report support for StaticTracepoints, and
12636 qXfer:statictrace:read features.
12637 * server.h (traceframe_read_sdata)
12638 (supply_static_tracepoint_registers): Declare.
12639 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12640 (unpack_varlen_hex): Include in IPA build.
12641 * Makefile.in (ustlibs, ustinc): New.
12642 (IPA_OBJS): Add remote-utils-ipa.o.
12643 ($(IPA_LIB)): Link -ldl and -lpthread.
12644 (UST_CFLAGS): New.
12645 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12646 * config.in, configure: Regenerate.
12647
9e4344e5
PA
126482010-06-20 Ian Lance Taylor <iant@google.com>
12649 Pedro Alves <pedro@codesourcery.com>
12650
12651 * linux-x86-low.c (always_true): Delete.
12652 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12653 trying to fool the compiler with always_true.
12654
c6beb2cb
PA
126552010-06-20 Pedro Alves <pedro@codesourcery.com>
12656
12657 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12658 conditions in gdbserver.
12659
d2ed6730
UW
126602010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12661
12662 * spu-low.c (spu_read_memory): Wrap around local store limit.
12663 (spu_write_memory): Likewise.
12664
4e29fb54
PA
126652010-06-15 Pedro Alves <pedro@codesourcery.com>
12666
12667 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12668 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12669 LONGEST uses.
12670 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12671 uses.
12672 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12673 uses with LONGEST uses.
12674
6a271cae
PA
126752010-06-14 Stan Shebs <stan@codesourcery.com>
12676 Pedro Alves <pedro@codesourcery.com>
12677
12678 Bytecode compiler.
12679
12680 * linux-x86-low.c: Include limits.h.
12681 (add_insns): New.
12682 (always_true): New.
12683 (EMIT_ASM): New.
12684 (EMIT_ASM32): New.
12685 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12686 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12687 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12688 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12689 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12690 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12691 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12692 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12693 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12694 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12695 (amd64_emit_void_call_2): New.
12696 (amd64_emit_ops): New.
12697 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12698 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12699 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12700 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12701 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12702 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12703 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12704 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12705 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12706 (i386_emit_stack_adjust, i386_emit_int_call_1)
12707 (i386_emit_void_call_2): New.
12708 (i386_emit_ops): New.
12709 (x86_emit_ops): New.
12710 (the_low_target): Install x86_emit_ops.
12711 * server.h (struct emit_ops): New.
12712 (get_raw_reg_func_addr): Declare.
12713 (current_insn_ptr, emit_error): Declare.
12714 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12715 (set_trace_state_variable_value): New defines.
12716 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12717 addr_get_trace_state_variable_value and
12718 addr_set_trace_state_variable_value.
12719 (symbol_list): New fields for get_raw_reg,
12720 get_trace_state_variable_value and set_trace_state_variable_value.
12721 (condfn): New typedef.
12722 (struct tracepoint): New field `compiled_cond'.
12723 (do_action_at_tracepoint): Clear compiled_cond.
12724 (get_trace_state_variable_value, set_trace_state_variable_value):
12725 Export in the IPA.
12726 (condition_true_at_tracepoint): If there's a compiled condition,
12727 run that.
12728 (current_insn_ptr, emit_error): New globals.
12729 (struct bytecode_address): New.
12730 (get_raw_reg_func_addr): New.
12731 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12732 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12733 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12734 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12735 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12736 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12737 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12738 (compile_tracepoint_condition, compile_bytecodes): New.
12739 * target.h (emit_ops): Forward declare.
12740 (struct target_ops): New field emit_ops.
12741 (target_emit_ops): New.
12742 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12743 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12744 * linux-low.c (linux_emit_ops): New.
12745 (linux_target_ops): Install it.
12746 * linux-low.h (struct linux_target_ops): New field emit_ops.
12747
92b72907
UW
127482010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12749
12750 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12751 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12752
fa593d66
PA
127532010-06-01 Pedro Alves <pedro@codesourcery.com>
12754 Stan Shebs <stan@codesourcery.com>
12755
12756 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12757 (all): Depend on $(extra_libraries).
12758 (install-only): Install the IPA.
12759 (IPA_OBJS, IPA_LIB): New.
12760 (clean): Remove the IPA lib.
12761 (IPAGENT_CFLAGS): New.
12762 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12763 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12764 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12765 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12766 * configure.ac: Check for atomic builtins support in the compiler.
12767 (IPA_DEPFILES, extra_libraries): Define.
12768 * configure.srv (ipa_obj): Add description.
12769 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12770 (i[34567]86-*-linux*): Set ipa_obj.
12771 (x86_64-*-linux*): Set ipa_obj.
12772 * linux-low.c (stabilizing_threads): New.
12773 (supports_fast_tracepoints): New.
12774 (linux_detach): Stabilize threads before detaching.
12775 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12776 the lwp is either not stabilizing, or is moving out of a jump pad.
12777 (linux_fast_tracepoint_collecting): New.
12778 (maybe_move_out_of_jump_pad): New.
12779 (enqueue_one_deferred_signal): New.
12780 (dequeue_one_deferred_signal): New.
12781 (linux_wait_for_event_1): If moving out of a jump pad, defer
12782 pending signals to later.
12783 (linux_stabilize_threads): New.
12784 (linux_wait_1): Check if threads need moving out of jump pads, and
12785 do it if so.
12786 (stuck_in_jump_pad_callback): New.
12787 (move_out_of_jump_pad_callback): New.
12788 (lwp_running): New.
12789 (linux_resume_one_lwp): Handle moving out of jump pads.
12790 (linux_set_resume_request): Dequeue deferred signals.
12791 (need_step_over_p): Also step over fast tracepoint jumps.
12792 (start_step_over): Also uninsert fast tracepoint jumps.
12793 (finish_step_over): Also reinsert fast tracepoint jumps.
12794 (linux_install_fast_tracepoint_jump): New.
12795 (linux_target_ops): Install linux_stabilize_threads and
12796 linux_install_fast_tracepoint_jump_pad.
12797 * linux-low.h (linux_target_ops) <get_thread_area,
12798 install_fast_tracepoint_jump_pad>: New fields.
12799 (struct lwp_info) <collecting_fast_tracepoint,
12800 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12801 (linux_get_thread_area): Declare.
12802 * linux-x86-low.c (jump_insn): New.
12803 (x86_get_thread_area): New.
12804 (append_insns): New.
12805 (push_opcode): New.
12806 (amd64_install_fast_tracepoint_jump_pad): New.
12807 (i386_install_fast_tracepoint_jump_pad): New.
12808 (x86_install_fast_tracepoint_jump_pad): New.
12809 (the_low_target): Install x86_get_thread_area and
12810 x86_install_fast_tracepoint_jump_pad.
12811 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12812 (struct fast_tracepoint_jump): New.
12813 (fast_tracepoint_jump_insn): New.
12814 (fast_tracepoint_jump_shadow): New.
12815 (find_fast_tracepoint_jump_at): New.
12816 (fast_tracepoint_jump_here): New.
12817 (delete_fast_tracepoint_jump): New.
12818 (set_fast_tracepoint_jump): New.
12819 (uninsert_fast_tracepoint_jumps_at): New.
12820 (reinsert_fast_tracepoint_jumps_at): New.
12821 (set_breakpoint_at): Use write_inferior_memory.
12822 (uninsert_raw_breakpoint): Use write_inferior_memory.
12823 (check_mem_read): Mask out fast tracepoint jumps.
12824 (check_mem_write): Mask out fast tracepoint jumps.
12825 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12826 (set_fast_tracepoint_jump): Declare.
12827 (delete_fast_tracepoint_jump)
12828 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12829 (reinsert_fast_tracepoint_jumps_at): Declare.
12830 * regcache.c: Don't compile many functions when building the
12831 in-process agent library.
12832 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12833 the register buffer in the heap.
12834 (free_register_cache): If the register buffer isn't owned by the
12835 regcache, don't free it.
12836 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12837 pre-existing register caches.
12838 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12839 type.
12840 (convert_ascii_to_int): : Constify `from' parameter type.
12841 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12842 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12843 the needed buffer in-place.
12844 (relocate_instruction): New.
12845 * server.c (handle_query) <qSymbols>: If the target supports
12846 tracepoints, give it a chance of looking up symbols. Report
12847 support for fast tracepoints.
12848 (handle_status): Stabilize threads.
12849 (process_serial_event): Adjust.
12850 * server.h (struct fast_tracepoint_jump): Forward declare.
12851 (struct process_info) <fast_tracepoint_jumps>: New field.
12852 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12853 (decode_X_packet, decode_M_packet): Adjust.
12854 (relocate_instruction): Declare.
12855 (in_process_agent_loaded): Declare.
12856 (tracepoint_look_up_symbols): Declare.
12857 (struct fast_tpoint_collect_status): Declare.
12858 (fast_tracepoint_collecting): Declare.
12859 (force_unlock_trace_buffer): Declare.
12860 (handle_tracepoint_bkpts): Declare.
12861 (initialize_low_tracepoint)
12862 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12863 * target.h (struct target_ops) <stabilize_threads,
12864 install_fast_tracepoint_jump_pad>: New fields.
12865 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12866 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12867 [HAVE_STDINT_H]: Include stdint.h.
12868 (trace_debug_1): Rename to ...
12869 (trace_vdebug): ... this.
12870 (trace_debug): Rename to ...
12871 (trace_debug_1): ... this. Add `level' parameter.
12872 (trace_debug): New.
12873 (ATTR_USED, ATTR_NOINLINE): New.
12874 (IP_AGENT_EXPORT): New.
12875 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12876 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12877 (about_to_request_buffer_space, trace_buffer_is_full)
12878 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12879 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12880 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12881 (traceframe_write_count, traceframes_created)
12882 (trace_state_variables)
12883 New renaming defines.
12884 (struct ipa_sym_addresses): New.
12885 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12886 (symbol_list): New.
12887 (ipa_sym_addrs): New.
12888 (all_tracepoint_symbols_looked_up): New.
12889 (in_process_agent_loaded): New.
12890 (write_e_ipa_not_loaded): New.
12891 (maybe_write_ipa_not_loaded): New.
12892 (tracepoint_look_up_symbols): New.
12893 (debug_threads) [IN_PROCESS_AGENT]: New.
12894 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12895 (UNKNOWN_SIDE_EFFECTS): New.
12896 (stop_tracing): New.
12897 (flush_trace_buffer): New.
12898 (stop_tracing_bkpt): New.
12899 (flush_trace_buffer_bkpt): New.
12900 (read_inferior_integer): New.
12901 (read_inferior_uinteger): New.
12902 (read_inferior_data_pointer): New.
12903 (write_inferior_data_pointer): New.
12904 (write_inferior_integer): New.
12905 (write_inferior_uinteger): New.
12906 (struct collect_static_trace_data_action): Delete.
12907 (enum tracepoint_type): New.
12908 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12909 <actions_str, step_actions, step_actions_str>: Only include in
12910 GDBserver.
fa593d66
PA
12911 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12912 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12913 (tracepoints): Use IP_AGENT_EXPORT.
12914 (last_tracepoint): Don't include in the IPA.
12915 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12916 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12917 (alloced_trace_state_variables): New.
12918 (trace_state_variables): Use IP_AGENT_EXPORT.
12919 (traceframe_t): Delete unused variable.
12920 (circular_trace_buffer): Don't include in the IPA.
12921 (trace_buffer_start): Delete.
12922 (struct trace_buffer_control): New.
12923 (trace_buffer_free): Delete.
12924 (struct ipa_trace_buffer_control): New.
12925 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12926 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12927 New.
12928 (trace_buffer_ctrl): New.
12929 (TRACE_BUFFER_CTRL_CURR): New.
12930 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12931 Reimplement as macros.
12932 (trace_buffer_wrap): Delete.
12933 (traceframe_write_count, traceframe_read_count)
12934 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12935 (struct tracepoint_hit_ctx) <type>: New field.
12936 (struct fast_tracepoint_ctx): New.
12937 (memory_barrier): New.
12938 (cmpxchg): New.
12939 (record_tracepoint_error): Update atomically in the IPA.
12940 (clear_inferior_trace_buffer): New.
12941 (about_to_request_buffer_space): New.
12942 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12943 updating the same buffer.
12944 (add_tracepoint): Default the tracepoint's type to trap
12945 tracepoint, and orig_size to -1.
12946 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12947 internal variables.
12948 (create_trace_state_variable): New parameter `gdb'. Handle it.
12949 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12950 (cmd_qtdp): Handle fast tracepoints.
12951 (cmd_qtdv): Adjust.
12952 (max_jump_pad_size): New.
12953 (gdb_jump_pad_head): New.
12954 (get_jump_space_head): New.
12955 (claim_jump_space): New.
12956 (sort_tracepoints): New.
12957 (MAX_JUMP_SIZE): New.
12958 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12959 IPA.
12960 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12961 support. Upload fast traceframes, and delete internal IPA
12962 breakpoints.
12963 (stop_tracing_handler): New.
12964 (flush_trace_buffer_handler): New.
12965 (cmd_qtstop): Upload fast tracepoints.
12966 (response_tracepoint): Handle fast tracepoints.
12967 (tracepoint_finished_step): Upload fast traceframes. Set the
12968 tracepoint hit context's tracepoint type.
12969 (handle_tracepoint_bkpts): New.
12970 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12971 type. Add comment about fast tracepoints.
12972 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12973 non-existing action_str field.
12974 (get_context_regcache): Handle fast tracepoints.
12975 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12976 to the regcache.
12977 (fast_tracepoint_from_jump_pad_address): New.
12978 (fast_tracepoint_from_ipa_tpoint_address): New.
12979 (collecting_t): New.
12980 (force_unlock_trace_buffer): New.
12981 (fast_tracepoint_collecting): New.
12982 (collecting): New.
12983 (gdb_collect): New.
12984 (write_inferior_data_ptr): New.
12985 (target_tp_heap): New.
12986 (target_malloc): New.
12987 (download_agent_expr): New.
12988 (UALIGN): New.
12989 (download_tracepoints): New.
12990 (download_trace_state_variables): New.
12991 (upload_fast_traceframes): New.
12992 (IPA_FIRST_TRACEFRAME): New.
12993 (IPA_NEXT_TRACEFRAME_1): New.
12994 (IPA_NEXT_TRACEFRAME): New.
12995 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12996 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12997 (gdb_jump_pad_buffer_end): New.
12998 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12999 (initialize_tracepoint): Adjust.
13000 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13001 buffer. Initialize the low module.
13002 * utils.c (PREFIX, TOOLNAME): New.
13003 (malloc_failure): Use PREFIX.
13004 (error): In the IPA, an error causes an exit.
13005 (fatal, warning): Use PREFIX.
13006 (internal_error): Use TOOLNAME.
13007 (NUMCELLS): Increase to 10.
13008 * configure, config.in: Regenerate.
13009
d149dd1d
PA
130102010-06-01 Pedro Alves <pedro@codesourcery.com>
13011
13012 * server.c (handle_query) <qSupported>: Do two passes over the
13013 qSupported string to avoid nesting strtok.
13014
f6528abd
JK
130152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13016
13017 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13018 (CDEPS): New.
13019 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13020 -Wl,--dynamic-list.
13021 * configure: Regenerate.
13022 * proc-service.list: New.
13023
ca2a87a0
JK
130242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13025
13026 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13027 New comment.
13028
363a6e9f
OS
130292010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13030
13031 * gdbreplay.c (remote_open): Check error return from socket() call by
13032 its equality to -1 not by it being negative.
13033 * remote-utils.c (remote_open): Likewise.
13034
d23b6cb1
PA
130352010-05-23 Pedro Alves <pedro@codesourcery.com>
13036
13037 * config.h: Regenerate.
13038
28d3cf85
MK
130392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13040
13041 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13042 doesn't provide PTRACE_GET_THREAD_AREA.
13043
fea36a59
MK
130442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13045
13046 * linux-m68k-low.c: Include <asm/ptrace.h>
13047 (ps_get_thread_area): Implement.
13048
24b066ba
DE
130492010-05-03 Doug Evans <dje@google.com>
13050
13051 * event-loop.c (struct callback_event): New struct.
13052 (callback_list): New global.
13053 (append_callback_event, delete_callback_event): New functions.
13054 (process_callback): New function.
13055 (start_event_loop): Call it.
13056 * remote-utils.c (NOT_SCHEDULED): Define.
13057 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13058 moved out of readchar.
13059 (readchar): Rewrite. Call reschedule before returning.
13060 (reset_readchar): New function.
13061 (remote_close): Call it.
13062 (process_remaining, reschedule): New functions.
13063 * server.h (callback_handler_func): New typedef.
13064 (append_callback_event, delete_callback_event): Declare.
13065
9836d6ea
PA
130662010-05-03 Pedro Alves <pedro@codesourcery.com>
13067
13068 * proc-service.c (ps_pglobal_lookup): Use
13069 thread_db_look_up_one_symbol.
13070 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13071 parameter. Use it instead of all_symbols_looked_up.
13072 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13073 field.
13074 (all_symbols_looked_up): Don't declare.
13075 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13076 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13077 field.
13078 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13079 Set all_symbols_looked_up here.
13080 (thread_db_look_up_one_symbol): New.
13081 (thread_db_get_tls_address): Adjust.
13082 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13083 thread_db object on the heap, and tentatively set it in the
13084 process structure.
13085 (thread_db_init): Don't set all_symbols_looked_up here.
13086 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13087
7984d532
PA
130882010-05-03 Pedro Alves <pedro@codesourcery.com>
13089
13090 * linux-low.c (linux_kill, linux_detach): Adjust.
13091 (status_pending_p_callback): Remove redundant statement. Check
13092 for !TARGET_WAITIKIND_IGNORE, instead of
13093 TARGET_WAITKIND_STOPPED.
13094 (handle_tracepoints): Make sure LWP is locked. Adjust.
13095 (linux_wait_for_event_1): Adjust.
13096 (linux_cancel_breakpoints): New.
13097 (unsuspend_one_lwp): New.
13098 (unsuspend_all_lwps): New.
13099 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13100 (send_sigstop_callback): Change return type to int, add new
13101 `except' parameter and handle it.
13102 (suspend_and_send_sigstop_callback): New.
13103 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13104 pass them down. If SUSPEND, also increment the lwp's suspend
13105 count.
13106 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13107 (need_step_over_p): Don't consider suspended LWPs.
13108 (start_step_over): Adjust.
13109 (proceed_one_lwp): Change return type to int, add new `except'
13110 parameter and handle it.
13111 (unsuspend_and_proceed_one_lwp): New.
13112 (proceed_all_lwps): Use find_inferior instead of
13113 for_each_inferior.
13114 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13115 also decrement the suspend count of LWPs. Pass `except' down,
13116 instead of hacking its suspend count.
13117 (linux_pause_all): Add `freeze' parameter. Adjust.
13118 (linux_unpause_all): New.
13119 (linux_target_ops): Install linux_unpause_all.
13120 * server.c (handle_status): Adjust.
13121 * target.h (struct target_ops): New fields `unpause_all' and
13122 `cancel_breakpoints'. Add new parameter to `pause_all'.
13123 (pause_all): Add new `freeze' parameter.
13124 (unpause_all): New.
13125 (cancel_breakpoints): New.
13126 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13127 cancel breakpoints.
13128 (cmd_qtstart): Pause threads.
13129 (stop_tracing): Pause threads, and cancel breakpoints.
13130 * win32-low.c (win32_target_ops): Adjust.
13131
e471f25b
PA
131322010-05-03 Pedro Alves <pedro@codesourcery.com>
13133
13134 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13135 the inferior right away from here...
13136 (linux_wait_1): ... to here, and adjust to check the thread's
13137 last_resume_kind instead of the lwp's step or stop_expected flags.
13138
1915ef4f
PA
131392010-05-02 Pedro Alves <pedro@codesourcery.com>
13140
13141 * README: Use consistent `GDB' and `GDBserver' spellings.
13142
f9e39928
PA
131432010-05-02 Pedro Alves <pedro@codesourcery.com>
13144
13145 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13146 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13147 (linux_detach_one_lwp): Assume the lwp is stopped.
13148 (any_thread_of): Delete.
13149 (linux_detach): Stop all lwps here. Don't blindly delete all
13150 breakpoints.
13151 (delete_lwp_callback): New.
13152 (linux_mourn): Delete all lwps of the process that is gone.
13153 (linux_wait_1): Don't delete the last lwp of the process here.
13154 * mem-break.h (mark_breakpoints_out): Declare.
13155 * mem-break.c (mark_breakpoints_out): New.
13156 (free_all_breakpoints): Use it.
13157 * server.c (handle_target_event): If the process is gone, mark
13158 breakpoints out.
13159 * thread-db.c (struct thread_db) <create_bp>: New field.
13160 (thread_db_enable_reporting): Fix prototype. Store a thread event
13161 breakpoint reference in the thread_db struct.
13162 (thread_db_load_search): Clear the thread_db object.
13163 (try_thread_db_load_1): Ditto.
13164 (switch_to_process): New.
13165 (disable_thread_event_reporting): Use it.
13166 (remove_thread_event_breakpoints): New.
13167 (thread_db_detach, thread_db_mourn): Use it.
13168
1e7fc18c
PA
131692010-05-01 Pedro Alves <pedro@codesourcery.com>
13170
13171 * linux-low.c (linux_enable_event_reporting): New.
13172 (linux_wait_for_event_1, handle_extended_wait): Use it.
13173
02fc4de7
PA
131742010-04-30 Pedro Alves <pedro@codesourcery.com>
13175
13176 * linux-low.c (linux_kill_one_lwp, linux_kill)
13177 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13178 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13179 SIGSTOP even if the LWP is stopped.
13180 (send_sigstop_callback): New.
13181 (stop_all_lwps): Use send_sigstop_callback instead.
13182 (linux_resume_one_thread): Adjust.
13183 (proceed_one_lwp): Still proceed an LWP that the client has
13184 requested to stop, if we haven't reported it as stopped yet. Make
13185 sure that LWPs the client want stopped, have a pending SIGSTOP.
13186
bc3b5632
DE
131872010-04-26 Doug Evans <dje@google.com>
13188
ae1ada35
DE
13189 * server.c (handle_general_set): Make static.
13190
bc3b5632
DE
13191 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13192 Print received char after testing for error/eof instead of before.
13193 (input_interrupt): Tweak comment.
13194
65730243
DE
131952010-04-23 Doug Evans <dje@google.com>
13196
13197 * server.c (start_inferior): Print inferior argv if --debug.
13198
a8ae7dc0
AR
131992010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13200
13201 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13202 * nto-x86-low.c: Include server.h
13203
1c07cc19
PM
132042010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13205
13206 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13207 be consistent with other sources of this directory.
13208 (init_registers_amd64): Correct name of source file of this function
13209 in the comment.
13210
e0a61e09
PM
132112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13212
13213 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13214 64-bit executables.
13215
54709339
PM
132162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13217
13218 * win32-i386-low.c: Add 64-bit support.
13219 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13220 (init_registers_amd64): Declare.
13221 (mappings): Add 64-bit version of array.
13222 (init_windows_x86): New function.
13223 (the_low_target): Change init_arch field to init_windows_x86.
13224
e8f0053d
PM
132252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13226
13227 * win32-low.c: Adapt to support also 64-bit architecture.
13228 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13229 (get_image_name): Use SIZE_T type for local variable `done'.
13230 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13231 (toolhelp_get_dll_name): Idem.
13232 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13233 Use uintptr_t typecast to avoid warning.
13234 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13235 (handle_exception): Use phex_nz to avoid warning.
13236 (win32_wait): Remove unused local variable `process'.
13237
c481e77e
PM
132382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13239
13240 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13241 `amd64-avx.o'.
13242
12ea4b69
PM
132432010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13244
13245 * configure.ac: Use `ws2_32' library for srv_mingw.
13246 * configure: Regenerate.
13247 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13248 * remote-utils.c: Likewise.
13249
f6d1620c
L
132502010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13251
13252 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13253 if __x86_64__ is defined.
13254
8e642873
PM
132552010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13256
13257 * configure: Regenerate.
13258
711e434b
PM
132592010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13260
13261 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13262 * target.h (target_ops): New get_tib_address field.
13263 * win32-low.h (win32_thread_info): Add thread_local_base field.
13264 * win32-low.c (child_add_thread): Add tlb argument.
13265 Set thread_local_base field to TLB.
13266 (get_child_debug_event): Adapt to child_add_thread change.
13267 (win32_get_tib_address): New function.
13268 (win32_target_ops): Set get_tib_address field to
13269 win32_get_tib_address.
13270 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13271
505106cd
PA
132722010-04-12 Pedro Alves <pedro@codesourcery.com>
13273
505106cd
PA
13274 * linux-low.c (linux_mourn): Also remove the process.
13275 * server.c (handle_target_event): Don't remove the process here.
13276 * nto-low.c (nto_mourn): New.
13277 (nto_target_ops): Install it.
13278 * spu-low.c (spu_mourn): New.
13279 (spu_target_ops): Install it.
13280 * win32-low.c (win32_mourn): New.
13281 (win32_target_ops): Install it.
13282
e8470a06
PA
132832010-04-12 Pedro Alves <pedro@codesourcery.com>
13284
13285 * server.h (buffer_xml_printf): Remove redundant `;'.
13286
45ba0d02
PA
132872010-04-12 Pedro Alves <pedro@codesourcery.com>
13288
13289 * regcache.c (set_register_cache): Invalidate regcaches before
13290 changing the register cache layout.
13291 (regcache_invalidate_one): Allow a NULL regcache.
13292 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13293 regcaches before changing the register cache layout or the target
13294 regsets.
13295
59e04013
L
132962010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13297
13298 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13299 variable warning on Linux/x86-64.
13300
8336d594
PA
133012010-04-11 Pedro Alves <pedro@codesourcery.com>
13302
13303 GDBserver disconnected tracing support.
13304
13305 * linux-low.c (linux_remove_process): Delete.
13306 (add_lwp): Don't set last_resume_kind here.
13307 (linux_kill): Use `mourn'.
13308 (linux_detach): Use `thread_db_detach', and `mourn'.
13309 (linux_mourn): New.
13310 (linux_attach_lwp_1): Adjust comment.
13311 (linux_attach): last_resume_kind moved the thread_info; adjust.
13312 (status_pending_p_callback): Adjust.
13313 (linux_wait_for_event_1): Adjust.
13314 (count_events_callback, select_singlestep_lwp_callback)
13315 (select_event_lwp_callback, cancel_breakpoints_callback)
13316 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13317 (proceed_one_lwp): Adjust.
13318 (linux_async): Add debug output.
13319 (linux_thread_stopped): New.
13320 (linux_pause_all): New.
13321 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13322 linux_pause_all.
13323 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13324 (thread_db_free): Delete declaration.
13325 (thread_db_detach, thread_db_mourn): Declare.
13326 * thread-db.c (thread_db_init): Use thread_db_mourn.
13327 (thread_db_free): Delete, split in two.
13328 (disable_thread_event_reporting): New.
13329 (thread_db_detach): New.
13330 (thread_db_mourn): New.
13331
13332 * server.h (struct thread_info) <last_resume_kind>: New field.
13333 <attached>: Add comment.
13334 <gdb_detached>: New field.
13335 (handler_func): Change return type to int.
13336 (handle_serial_event, handle_target_event): Ditto.
13337 (gdb_connected): Declare.
13338 (tracing): Delete.
13339 (disconnected_tracing): Declare.
13340 (stop_tracing): Declare.
13341
13342 * server.c (handle_query) <qSupported>: Report support for
13343 disconnected tracing.
13344 (queue_stop_reply_callback): Account for running threads.
13345 (gdb_wants_thread_stopped): New.
13346 (gdb_wants_all_threads_stopped): New.
13347 (gdb_reattached_process): New.
13348 (handle_status): Clear the `gdb_detached' flag of all processes.
13349 In all-stop, stop all threads.
13350 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13351 (process_serial_event): If the remote connection breaks, or if an
13352 exit was forced with "monitor exit", force an event loop exit.
13353 Handle disconnected tracing on detach.
13354 (handle_serial_event): Adjust.
13355 (handle_target_event): If GDB isn't connected, forward events back
13356 to the inferior, unless the last process exited, in which case,
13357 exit gdbserver. Adjust interface.
13358
13359 * remote-utils.c (remote_open): Don't block in accept. Instead
13360 register an event loop source on the listen socket file
13361 descriptor. Refactor bits into ...
13362 (listen_desc): ... this new global.
13363 (gdb_connected): ... this new function.
13364 (enable_async_notification): ... this new function.
13365 (handle_accept_event): ... this new function.
13366 (remote_close): Clear remote_desc.
13367
13368 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13369
13370 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13371 New fields.
13372 (mourn_inferior): Define.
13373 (target_process_qsupported): Avoid the dangling else problem.
13374 (thread_stopped): Define.
13375 (pause_all): Define.
13376 (target_waitstatus_to_string): Declare.
13377 * target.c (target_waitstatus_to_string): New.
13378
13379 * tracepoint.c (tracing): Make extern.
13380 (disconnected_tracing): New.
13381 (stop_tracing): Make extern. Handle tracing stops due to GDB
13382 disconnecting.
13383 (cmd_qtdisconnected): New.
13384 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13385 (handle_tracepoint_general_set): Handle QTDisconnected.
13386
13387 * event-loop.c (event_handler_func): Change return type to int.
13388 (process_event): Bail out if the event handler wants the event
13389 loop to stop.
13390 (handle_file_event): Ditto.
13391 (start_event_loop): Bail out if the event handler wants the event
13392 loop to stop.
13393
13394 * nto-low.c (nto_target_ops): Adjust.
13395 * spu-low.c (spu_wait): Don't remove the process here.
13396 (spu_target_ops): Adjust.
13397 * win32-low.c (win32_wait): Don't remove the process here.
13398 (win32_target_ops): Adjust.
13399
5d267c4c
PA
134002010-04-11 Pedro Alves <pedro@codesourcery.com>
13401
13402 * regcache.c (realloc_register_cache): Invalidate inferior's
13403 regcache before recreating it.
13404
623ccd72
PA
134052010-04-09 Pedro Alves <pedro@codesourcery.com>
13406
13407 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13408
219f2f23
PA
134092010-04-09 Stan Shebs <stan@codesourcery.com>
13410 Pedro Alves <pedro@codesourcery.com>
13411
13412 * server.h (LONGEST): New.
13413 (struct thread_info) <while_stepping>: New field.
13414 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13415 Declare.
13416 (initialize_tracepoint, handle_tracepoint_general_set)
13417 (handle_tracepoint_query, tracepoint_finished_step)
13418 (tracepoint_was_hit, release_while_stepping_state_list):
13419 (current_traceframe): Declare.
13420 * server.c (handle_general_set): Handle tracepoint packets.
13421 (read_memory): New.
13422 (write_memory): New.
13423 (handle_search_memory_1): Use read_memory.
13424 (handle_query): Report support for conditional tracepoints, trace
13425 state variables, and tracepoint sources. Handle tracepoint
13426 queries.
13427 (main): Initialize the tracepoints module.
13428 (process_serial_event): Handle traceframe reads/writes.
13429
13430 * linux-low.c (handle_tracepoints): New.
13431 (linux_wait_1): Call it.
13432 (linux_resume_one_lwp): Handle while-stepping.
13433 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13434 (linux_target_ops): Install them.
13435 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13436 New field.
13437 * linux-x86-low.c (x86_supports_tracepoints): New.
13438 (the_low_target). Install it.
13439
13440 * mem-break.h (delete_breakpoint): Declare.
13441 * mem-break.c (delete_breakpoint): Make external.
13442
13443 * target.h (struct target_ops): Add `supports_tracepoints',
13444 `read_pc', and `write_pc' fields.
13445 (target_supports_tracepoints): Define.
13446 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13447 (phex_nz): New.
13448
13449 * regcache.h (struct regcache) <registers_owned>: New field.
13450 (init_register_cache, regcache_cpy): Declare.
13451 (regcache_read_pc, regcache_write_pc): Declare.
13452 (register_cache_size): Declare.
13453 (supply_regblock): Declare.
13454 * regcache.c (init_register_cache): New.
13455 (new_register_cache): Use it.
13456 (regcache_cpy): New.
13457 (register_cache_size): New.
13458 (supply_regblock): New.
13459 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13460
219f2f23
PA
13461 * tracepoint.c: New.
13462
13463 * Makefile.in (OBS): Add tracepoint.o.
13464 (tracepoint.o): New rule.
13465
3a13a53b
L
134662010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13467
13468 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13469 (i386-mmx.o): New.
13470 (i386-mmx.c): Likewise.
13471 (i386-mmx-linux.o): Likewise.
13472 (i386-mmx-linux.c): Likewise.
13473
13474 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13475 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13476 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13477 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13478
13479 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13480 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13481 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13482
1570b33e
L
134832010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13484
13485 * Makefile.in (clean): Updated.
13486 (i386-avx.o): New.
13487 (i386-avx.c): Likewise.
13488 (i386-avx-linux.o): Likewise.
13489 (i386-avx-linux.c): Likewise.
13490 (amd64-avx.o): Likewise.
13491 (amd64-avx.c): Likewise.
13492 (amd64-avx-linux.o): Likewise.
13493 (amd64-avx-linux.c): Likewise.
13494
13495 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13496 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13497 (srv_amd64_regobj): Add amd64-avx.o.
13498 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13499 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13500 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13501 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13502 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13503 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13504 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13505
13506 * i387-fp.c: Include "i386-xstate.h".
13507 (i387_xsave): New.
13508 (i387_cache_to_xsave): Likewise.
13509 (i387_xsave_to_cache): Likewise.
13510 (x86_xcr0): Likewise.
13511
13512 * i387-fp.h (i387_cache_to_xsave): Likewise.
13513 (i387_xsave_to_cache): Likewise.
13514 (x86_xcr0): Likewise.
13515
13516 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13517 * linux-crisv32-low.c (target_regsets): Likewise.
13518 * linux-m68k-low.c (target_regsets): Likewise.
13519 * linux-mips-low.c (target_regsets): Likewise.
13520 * linux-ppc-low.c (target_regsets): Likewise.
13521 * linux-s390-low.c (target_regsets): Likewise.
13522 * linux-sh-low.c (target_regsets): Likewise.
13523 * linux-sparc-low.c (target_regsets): Likewise.
13524 * linux-xtensa-low.c (target_regsets): Likewise.
13525
13526 * linux-low.c: Include <sys/uio.h>.
13527 (regsets_fetch_inferior_registers): Support nt_type.
13528 (regsets_store_inferior_registers): Likewise.
13529 (linux_process_qsupported): New.
13530 (linux_target_ops): Add linux_process_qsupported.
13531
13532 * linux-low.h (regset_info): Add nt_type.
13533 (linux_target_ops): Add process_qsupported.
13534
13535 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13536 and <sys/uio.h>.
13537 (init_registers_i386_avx_linux): New.
13538 (init_registers_amd64_avx_linux): Likewise.
13539 (xmltarget_i386_linux_no_xml): Likewise.
13540 (xmltarget_amd64_linux_no_xml): Likewise.
13541 (PTRACE_GETREGSET): Likewise.
13542 (PTRACE_SETREGSET): Likewise.
13543 (x86_fill_xstateregset): Likewise.
13544 (x86_store_xstateregset): Likewise.
13545 (use_xml): Likewise.
13546 (x86_linux_update_xmltarget): Likewise.
13547 (x86_linux_process_qsupported): Likewise.
13548 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13549 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13550 init_registers_i386_linux here. Call
13551 x86_linux_update_xmltarget.
13552 (the_low_target): Add x86_linux_process_qsupported.
13553
13554 * server.c (handle_query): Call target_process_qsupported.
13555
13556 * target.h (target_ops): Add process_qsupported.
13557 (target_process_qsupported): New.
13558
fc7238bb
PA
135592010-04-03 Pedro Alves <pedro@codesourcery.com>
13560
13561 * inferiors.c (add_thread): Set last_status kind to
13562 TARGET_WAITKIND_IGNORE.
13563 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13564 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13565 (linux_wait_1): Move `thread' local definition to block that uses
13566 it. Don't NULL initialize `event_child'.
13567 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13568 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13569 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13570
bdabb078
PA
135712010-04-01 Pedro Alves <pedro@codesourcery.com>
13572
13573 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13574 an extended waitstatus, or by a watchpoint.
13575 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13576 thread was stepping or has been stopped by a watchpoint.
13577
d3bbe7a0
PA
135782010-04-01 Pedro Alves <pedro@codesourcery.com>
13579
13580 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13581 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13582 of another, then delete the previous, and validate all
13583 breakpoints.
13584 (validate_inserted_breakpoint): New.
13585 (delete_disabled_breakpoints): New.
13586 (validate_breakpoints): New.
13587 (check_mem_read): Validate breakpoints before trusting their
13588 shadow. Delete disabled breakpoints.
13589 (check_mem_write): Validate breakpoints before trusting they
13590 should be inserted. Delete disabled breakpoints.
13591 * mem-break.h (validate_breakpoints):
13592 * server.c (handle_query): Validate breakpoints when we see a
13593 qSymbol query.
13594
8b07ae33
PA
135952010-04-01 Pedro Alves <pedro@codesourcery.com>
13596
13597 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13598 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13599 if we could tell there's a GDB breakpoint at stop_pc.
13600 (need_step_over_p): Don't do a step over if we find a GDB
13601 breakpoint at the resume PC.
13602
13603 * mem-break.c (struct raw_breakpoint): New.
13604 (enum bkpt_type): New type `gdb_breakpoint'.
13605 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13606 fields. New field `raw'.
13607 (find_raw_breakpoint_at): New.
13608 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13609 breakpoint instead.
13610 (set_breakpoint_at): Adjust.
13611 (delete_raw_breakpoint): New.
13612 (release_breakpoint): New.
13613 (delete_breakpoint): Rename to...
13614 (delete_breakpoint_1): ... this. Add proc parameter. Use
13615 release_breakpoint. Return ENOENT.
13616 (delete_breakpoint): Reimplement.
13617 (find_breakpoint_at): Delete.
13618 (find_gdb_breakpoint_at): New.
13619 (delete_breakpoint_at): Delete.
13620 (set_gdb_breakpoint_at): New.
13621 (delete_gdb_breakpoint_at): New.
13622 (gdb_breakpoint_here): New.
13623 (set_reinsert_breakpoint): Use release_breakpoint.
13624 (uninsert_breakpoint): Rename to ...
13625 (uninsert_raw_breakpoint): ... this.
13626 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13627 (reinsert_raw_breakpoint): Change parameter type to
13628 raw_breakpoint.
13629 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13630 instead.
13631 (check_breakpoints): Adjust. Use release_breakpoint.
13632 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13633 (breakpoint_inserted_here): Ditto.
13634 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13635 Don't trust the breakpoint's shadow if it is not inserted.
13636 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13637 (delete_all_breakpoints): Adjust.
13638 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13639 use delete_breakpoint_1.
13640
13641 * mem-break.h (breakpoints_supported): Delete declaration.
13642 (set_gdb_breakpoint_at): Declare.
13643 (gdb_breakpoint_here): Declare.
13644 (delete_breakpoint_at): Delete.
13645 (delete_gdb_breakpoint_at): Declare.
13646
13647 * server.h (struct raw_breakpoint): Forward declare.
13648 (struct process_info): New field `raw_breakpoints'.
13649
13650 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13651 breakpoints.
13652
6bf5e0ba
PA
136532010-03-24 Pedro Alves <pedro@codesourcery.com>
13654
13655 * linux-low.c (status_pending_p_callback): Fix comment.
13656 (linux_wait_for_event_1): Move most of the internal breakpoint
13657 handling from here...
13658 (linux_wait_1): ... to here.
13659 (count_events_callback): New.
13660 (select_singlestep_lwp_callback): New.
13661 (select_event_lwp_callback): New.
13662 (cancel_breakpoints_callback): New.
13663 (select_event_lwp): New.
13664 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13665 priority to all LWPs that have had events that should be reported
13666 to the client. Cancel breakpoints when about to reporting the
13667 event to the client, not while stopping lwps. No longer cancel
13668 finished single-steps here.
13669 (cancel_finished_single_step): Delete.
13670 (cancel_finished_single_steps): Delete.
13671
414a389f
PA
136722010-03-24 Pedro Alves <pedro@codesourcery.com>
13673
13674 * mem-break.c (enum bkpt_type): New.
13675 (struct breakpoint): New field `type'.
13676 (set_breakpoint_at): Change return type to struct breakpoint
13677 pointer. Set type to `other_breakpoint' by default.
13678 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13679 in the breakpoint list.
13680 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13681 (reinsert_breakpoint): Rename to ...
13682 (reinsert_raw_breakpoint): ... this.
13683 (reinsert_breakpoints_at): Adjust.
13684 * mem-break.h (struct breakpoint): Declare.
13685 (set_breakpoint_at): Change return type to struct breakpoint
13686 pointer.
13687
2280c721
PA
136882010-03-24 Pedro Alves <pedro@codesourcery.com>
13689
13690 * server.c (handle_query): Assign, not compare.
13691
d50171e4
PA
136922010-03-24 Pedro Alves <pedro@codesourcery.com>
13693
13694 Teach linux gdbserver to step-over-breakpoints.
13695
13696 * linux-low.c (can_hardware_single_step): New.
13697 (supports_breakpoints): New.
13698 (handle_extended_wait): If stopping threads, read the stop pc of
13699 the new cloned LWP.
13700 (get_pc): New.
13701 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13702 low target doesn't support retrieving the PC.
13703 (add_lwp): Set last_resume_kind to resume_continue.
13704 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13705 (linux_attach): Don't clear stop_expected. Set the lwp's
13706 last_resume_kind to resume_stop.
13707 (linux_detach_one_lwp): Don't check for removed breakpoints.
13708 (check_removed_breakpoint): Delete.
13709 (status_pending_p): Rename to ...
13710 (status_pending_p_callback): ... this. Don't check for removed
13711 breakpoints. Don't consider threads that are stopped from GDB's
13712 perspective.
13713 (linux_wait_for_lwp): Always read the stop_pc here.
13714 (cancel_breakpoint): New.
13715 (step_over_bkpt): New global.
13716 (linux_wait_for_event_1): Implement stepping over breakpoints.
13717 (gdb_wants_lwp_stopped): New.
13718 (gdb_wants_all_stopped): New.
13719 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13720 single-step traps here. Store the thread's last reported target
13721 wait status.
13722 (send_sigstop): Don't clear stop_expected. Always set it,
13723 instead.
13724 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13725 (cancel_finished_single_step): New.
13726 (cancel_finished_single_steps): New.
13727 (wait_for_sigstop): Don't cancel finished single-step traps here.
13728 (linux_resume_one_lwp): Don't check for removed breakpoints.
13729 Don't set `step' on non-hardware step archs.
13730 (linux_set_resume_request): Ignore resume_stop requests if already
13731 stopping or stopped. Set the lwp's last_resume_kind.
13732 (resume_status_pending_p): Don't check for removed breakpoints.
13733 (need_step_over_p): New.
13734 (start_step_over): New.
13735 (finish_step_over): New.
13736 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13737 requests. Clear the thread's last reported target waitstatus.
13738 Don't use the `suspended' flag. Don't consider pending breakpoints.
13739 (linux_resume): Start a step-over if necessary.
13740 (proceed_one_lwp): New.
13741 (proceed_all_lwps): New.
13742 (unstop_all_lwps): New.
13743 * linux-low.h (struct lwp_info): Rewrite comment for the
13744 `suspended' flag. Add the `stop_pc' field. Delete the
13745 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13746 Add `'last_resume_kind' and `need_step_over' fields.
13747 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13748 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13749 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13750 (set_raw_breakpoint_at): New.
13751 (set_breakpoint_at): Rewrite to use it.
13752 (reinsert_breakpoint_handler): Delete.
13753 (set_reinsert_breakpoint): New.
13754 (reinsert_breakpoint_by_bp): Delete.
13755 (delete_reinsert_breakpoints): New.
13756 (uninsert_breakpoint): Rewrite.
13757 (uninsert_breakpoints_at): New.
13758 (reinsert_breakpoint): Rewrite.
13759 (reinsert_breakpoints_at): New.
13760 (check_breakpoints): Rewrite.
13761 (breakpoint_here): New.
13762 (breakpoint_inserted_here): New.
13763 (check_mem_read): Adjust.
13764 * mem-break.h (breakpoints_supported, breakpoint_here)
13765 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13766 (reinsert_breakpoint_by_bp): Delete declaration.
13767 (delete_reinsert_breakpoints): Declare.
13768 (reinsert_breakpoint): Delete declaration.
13769 (reinsert_breakpoints_at): Declare.
13770 (uninsert_breakpoint): Delete declaration.
13771 (uninsert_breakpoints_at): Declare.
13772 (check_breakpoints): Adjust prototype.
13773 * server.h: Adjust include order.
13774 (struct thread_info): Declare here. Add a `last_status' field.
13775
30ba68cb
MS
137762010-03-23 Michael Snyder <msnyder@vmware.com>
13777
13778 * server.c (crc32): New function.
13779 (handle_query): Add handling for 'qCRC:' request.
13780
b9a881c2
PA
137812010-03-23 Pedro Alves <pedro@codesourcery.com>
13782
13783 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13784 lwp had been stopped by a watchpoint.
13785
e92d13d5
PA
137862010-03-16 Pedro Alves <pedro@codesourcery.com>
13787
13788 * server.h (internal_error): Declare.
13789 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13790 * utils.c (internal_error): New function.
13791
64daa791
AS
137922010-03-15 Andreas Schwab <schwab@redhat.com>
13793
13794 * configure.srv: Fix typo setting srv_regobj.
13795
f52cd8cd
PA
137962010-03-15 Pedro Alves <pedro@codesourcery.com>
13797
13798 * linux-low.c (fetch_register): Avoid passing a non string literal
13799 format to `error'.
13800 (usr_store_inferior_registers): Ditto.
13801
93ae6fdc
PA
138022010-03-14 Pedro Alves <pedro@codesourcery.com>
13803
13804 * linux-low.c (linux_write_memory): Bail out early if peeking
13805 memory failed.
13806
c3adc08c
PA
138072010-03-14 Pedro Alves <pedro@codesourcery.com>
13808
13809 * linux-low.h (struct lwp_info): New fields
13810 `stopped_by_watchpoint' and `stopped_data_address'.
13811 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13812 here, and cache them in the lwp object.
13813 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13814 directly.
13815 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13816 field.
13817 (linux_stopped_by_watchpoint): Rewrite.
13818 (linux_stopped_data_address): Rewrite.
13819
bce522a2
PA
138202010-03-06 Simo Melenius <simo.melenius@iki.fi>
13821
13822 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13823 switching the current inferior, not before.
13824
90884b2b
L
138252010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13826
13827 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13828 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13829 i386-linux.c and amd64-linux.c.
13830 (reg-i386.o): Removed.
13831 (reg-i386.c): Likewise.
13832 (reg-i386-linux.o): Likewise.
13833 (reg-i386-linux.c): Likewise.
13834 (reg-x86-64.o): Likewise.
13835 (reg-x86-64.c): Likewise.
13836 (reg-x86-64-linux.o): Likewise.
13837 (reg-x86-64-linux.c): Likewise.
13838 (i386.o): New.
13839 (i386.c): Likewise.
13840 (i386-linux.o): Likewise.
13841 (i386-linux.c): Likewise.
13842 (amd64.o): Likewise.
13843 (amd64.c): Likewise.
13844 (amd64-linux.o): Likewise.
13845 (amd64-linux.c): Likewise.
13846
13847 * configure.srv (srv_i386_regobj): New.
13848 (srv_i386_linux_regobj): Likewise.
13849 (srv_amd64_regobj): Likewise.
13850 (srv_amd64_linux_regobj): Likewise.
13851 (srv_i386_32bit_xmlfiles): Likewise.
13852 (srv_i386_64bit_xmlfiles): Likewise.
13853 (srv_i386_xmlfiles): Likewise.
13854 (srv_amd64_xmlfiles): Likewise.
13855 (srv_i386_linux_xmlfiles): Likewise.
13856 (srv_amd64_linux_xmlfiles): Likewise.
13857 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13858 srv_xmlfiles to $srv_i386_xmlfiles.
13859 (i[34567]86-*-mingw32ce*): Likewise.
13860 (i[34567]86-*-mingw*): Likewise.
13861 (i[34567]86-*-nto*): Likewise.
13862 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13863 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13864 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13865 (x86_64-*-linux*): Likewise.
13866
13867 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13868 (init_registers_amd64_linux): New.
13869 (x86_arch_setup): Replace init_registers_x86_64_linux with
13870 init_registers_amd64_linux.
13871
193f13e6
MK
138722010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13873
13874 * configure.ac: Check for libdl. If it is not available link against
13875 static libthread_db.
13876 * configure: Regenerate.
13877
85d721b8
PA
138782010-02-22 Pedro Alves <pedro@codesourcery.com>
13879
13880 PR9605
13881
13882 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13883 handing a read watchpoint.
13884 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13885
6076632b
DE
138862010-02-12 Doug Evans <dje@google.com>
13887
13888 * linux-low.c (linux_supports_tracefork_flag): Document.
13889 (linux_look_up_symbols): Add comment.
13890
3327ccf7
L
138912010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13892
13893 * regcache.c (supply_register): Clear regcache if buf is NULL.
13894
0718675c 138952010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13896 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13897
13898 * inferiors.c (find_inferior): Add function documentation.
13899 (unloaded_dll): Handle the case where the unloaded dll has not
13900 been previously registered in the dll list.
13901
177321bd
DJ
139022010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13903
13904 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13905 (thumb2_breakpoint): New.
13906 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13907
2b009048
DJ
139082010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13909
13910 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13911 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13912 breakpoints.
13913
3be029c7
PA
139142010-01-21 Pedro Alves <pedro@codesourcery.com>
13915
13916 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13917
18f5de3b
JK
139182010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13919
13920 * linux-s390-low.c (s390_collect_ptrace_register)
13921 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13922
3743bb4f
DE
139232010-01-21 Doug Evans <dje@google.com>
13924
14ce3065
DE
13925 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13926 (PTRACE_ARG4_TYPE): New macro.
13927 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13928 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13929 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13930 (usr_store_inferior_registers): Ditto.
13931 (linux_read_memory, linux_write_memory): Ditto.
13932 (linux_test_for_tracefork): Ditto.
13933
3743bb4f
DE
13934 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13935 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13936
8b315be5
PA
139372010-01-21 Pedro Alves <pedro@codesourcery.com>
13938
13939 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13940 target.
13941
85492558
PA
139422010-01-21 Pedro Alves <pedro@codesourcery.com>
13943
13944 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13945 prototype to take a regcache. Adjust.
13946
442ea881
PA
139472010-01-20 Pedro Alves <pedro@codesourcery.com>
13948
13949 * regcache.h (struct thread_info): Forward declare.
13950 (struct regcache): New.
13951 (new_register_cache): Adjust prototype.
13952 (get_thread_regcache): Declare.
13953 (free_register_cache): Adjust prototype.
13954 (registers_to_string, registers_from_string): Ditto.
13955 (supply_register, supply_register_by_name, collect_register)
13956 (collect_register_as_string, collect_register_by_name): Ditto.
13957 * regcache.c (struct inferior_regcache_data): Delete.
13958 (get_regcache): Rename to ...
13959 (get_thread_regcache): ... this. Adjust. Switch inferior before
13960 fetching registers.
13961 (regcache_invalidate_one): Adjust.
13962 (regcache_invalidate): Fix prototype.
13963 (new_register_cache): Return the new register cache.
13964 (free_register_cache): Change prototype.
13965 (realloc_register_cache): Adjust.
13966 (registers_to_string): Change prototype to take a regcache. Adjust.
13967 (registers_from_string): Ditto.
13968 (register_data): Ditto.
13969 (supply_register): Ditto.
13970 (supply_register_by_name): Ditto.
13971 (collect_register): Ditto.
13972 (collect_register_as_string): Ditto.
13973 (collect_register_by_name): Ditto.
13974 * server.c (process_serial_event): Adjust.
13975 * linux-low.h (regset_fill_func, regset_store_func): Change
13976 prototype.
13977 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13978 Change prototype.
13979 * linux-low.c (get_stop_pc): Adjust.
13980 (check_removed_breakpoint): Adjust.
13981 (linux_wait_for_event): Adjust.
13982 (linux_resume_one_lwp): Adjust.
13983 (fetch_register): Add regcache parameter. Adjust.
13984 (usr_store_inferior_registers): Ditto.
13985 (regsets_fetch_inferior_registers): Ditto.
13986 (regsets_store_inferior_registers): Ditto.
13987 (linux_fetch_registers, linux_store_registers): Ditto.
13988 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13989 regcache. Adjust.
43aaf8b6
PA
13990 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13991 Ditto.
442ea881
PA
13992 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13993 prototype to take a regcache.
13994 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13995 * remote-utils.c (convert_ascii_to_int, outreg)
13996 (prepare_resume_reply): Change prototype to take a regcache.
13997 Adjust.
13998 * target.h (struct target_ops) <fetch_registers, store_registers>:
13999 Change prototype to take a regcache.
14000 (fetch_inferior_registers, store_inferior_registers): Change
14001 prototype to take a regcache. Adjust.
14002 * proc-service.c (ps_lgetregs): Adjust.
14003 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14004 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14005 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14006 take a regcache. Adjust.
14007 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14008 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14009 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14010 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14011 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14012 (cris_cannot_fetch_register):
14013 (cris_breakpoint_at): Change prototype to take a regcache.
14014 Adjust.
14015 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14016 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14017 to take a regcache. Adjust.
14018 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14019 Adjust.
14020 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14021 take a regcache. Adjust.
14022 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14023 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14024 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14025 * linux-mips-low.c (mips_get_pc):
14026 (mips_set_pc): Change prototype to take a regcache. Adjust.
14027 (mips_reinsert_addr): Adjust.
14028 (mips_collect_register): Change prototype to take a regcache.
14029 Adjust.
14030 (mips_supply_register):
14031 (mips_collect_register_32bit, mips_supply_register_32bit)
14032 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14033 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14034 * linux-ppc-low.c (ppc_supply_ptrace_register)
14035 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14036 (parse_spufs_run): Adjust.
14037 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14038 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14039 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14040 take a regcache. Adjust.
14041 * linux-s390-low.c (s390_collect_ptrace_register)
14042 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14043 (s390_set_pc): Change prototype to take a regcache. Adjust.
14044 (s390_arch_setup): Adjust.
14045 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14046 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14047 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14048 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14049 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14050 regcache. Adjust.
14051 (sparc_breakpoint_at): Adjust.
14052 * linux-xtensa-low.c (xtensa_fill_gregset):
14053 (xtensa_store_gregset):
14054 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14055 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14056 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14057 prototype to take a regcache. Adjust.
14058 * win32-arm-low.c (arm_fetch_inferior_register)
14059 (arm_store_inferior_register): Change prototype to take a
14060 regcache. Adjust.
14061 * win32-i386-low.c (i386_fetch_inferior_register)
14062 (i386_store_inferior_register): Change prototype to take a
14063 regcache. Adjust.
14064 * win32-low.c (child_fetch_inferior_registers)
14065 (child_store_inferior_registers): Change prototype to take a
14066 regcache. Adjust.
14067 (win32_wait): Adjust.
14068 (win32_fetch_inferior_registers): Change prototype to take a
14069 regcache. Adjust.
14070 (win32_store_inferior_registers): Adjust.
14071 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14072 store_inferior_register>: Change prototype to take a regcache.
14073
60c3d7b0
DE
140742010-01-20 Doug Evans <dje@google.com>
14075
14076 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14077 #ifdef.
14078 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14079 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14080
dc146f7c
VP
140812010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14082
14083 * linux-low.c (linux_core_of_thread): New.
14084 (compare_ints, show_process, list_threads): New.
14085 (linux_qxfer_osdata): Report threads and cores.
14086 (linux_target_op): Register linux_core_of_thread.
14087 * remote-utils.c (prepare_resume_reply): Report the core.
14088 (buffer_xml_printf): Support %d specifier.
14089 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14090 New.
14091 (handle_query): Handle qXfer:threads. Announce availability
14092 thereof.
14093 * target.h (struct target_ops): New field core_of_thread.
14094
7803799a
UW
140952010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14096
14097 * Makefile.in (clean): Remove new generated files.
14098 (reg-s390.o, reg-s390.c): Remove rules.
14099 (reg-s390x.o, reg-s390x.c): Likewise.
14100 (s390-linux32.o, s390-linux32.c): Add rules.
14101 (s390-linux64.o, s390-linux64.c): Likewise.
14102 (s390x-linux64.o, s390x-linux64.c): Likewise.
14103 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14104 * linux-s390-low.c: Include <elf.h>.
14105 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14106 (init_registers_s390): Remove prototype.
14107 (init_registers_s390x): Likewise.
14108 (init_registers_s390_linux32): Add prototype.
14109 (init_registers_s390_linux64): Likewise.
14110 (init_registers_s390x_linux64): Likewise.
14111 (s390_num_regs_3264): New define.
14112 (s390_regmap_3264): New global variable.
14113 (s390_cannot_fetch_register): Remove obsolete check.
14114 (s390_cannot_store_register): Likewise.
14115 (s390_collect_ptrace_register): Handle upper/lower register halves.
14116 (s390_supply_ptrace_register): Likewise.
14117 (s390_fill_gregset): Update to register number changes.
14118 (s390_get_hwcap): New routine.
14119 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14120 Install appropriate regmap and register set.
14121
6e7ffa39
JB
141222010-01-01 Joel Brobecker <brobecker@adacore.com>
14123
14124 * server.c (gdbserver_version): Update copyright year to 2010.
14125 * gdbreplay.c (gdbreplay_version): Likewise.
14126
957f3f49
DE
141272009-12-28 Doug Evans <dje@google.com>
14128
14129 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14130 elf/external.h. Include <elf.h> instead but only if necessary.
14131
ca5c370d
PA
141322009-12-28 Pedro Alves <pedro@codesourcery.com>
14133
14134 * linux-low.c (linux_remove_process): Remove `detaching'
14135 parameter. Don't release/detach from thread_db here.
14136 (linux_kill): Release/detach from thread_db here, ...
14137 (linux_detach): ... and here, before actually detaching.
14138 (linux_wait_1): ... and here, when a process exits.
14139 * thread-db.c (any_thread_of): New.
14140 (thread_db_free): Switch the current inferior to a thread of the
14141 passed in process.
14142
4ee62156
DE
141432009-12-21 Doug Evans <dje@google.com>
14144
d90e6a88
DE
14145 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14146
c5f62d5f
DE
14147 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14148 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14149 warning ifndef __NR_tkill. Move setting of errno there too.
14150 Delete unnecessary resetting of errno after syscall.
14151 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14152
10e86dd7
DE
14153 * configure.ac: Check for dladdr.
14154 * config.in: Regenerate.
14155 * configure: Regenerate.
14156 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14157 (try_thread_db_load): Update.
14158
4ee62156
DE
14159 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14160
00f515da
DE
141612009-12-18 Doug Evans <dje@google.com>
14162
e9464885
DE
14163 * event-loop.c: Include unistd.h if it exists.
14164
07d4f67e
DE
14165 * linux-low.c (my_waitpid): Move definition away from being in
14166 between linux_tracefork_child/linux_test_for_tracefork.
14167
00f515da
DE
14168 * gdb_proc_service.h (psaddr_t): Fix type.
14169 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14170 signature to match glibc.
14171
1de1badb
DE
141722009-12-16 Doug Evans <dje@google.com>
14173
14174 * linux-low.c (linux_read_memory): Fix argument to read.
14175
aeeb81d1
PA
141762009-11-26 Pedro Alves <pedro@codesourcery.com>
14177
14178 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14179 events, don't leave current_inferior pointing at null.
14180
10357975
PA
141812009-11-26 Pedro Alves <pedro@codesourcery.com>
14182
14183 * win32-low.c (LOG): Delete.
14184 (OUTMSG): Output to stderr.
14185 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14186 on compile time LOG macro.
14187 (win32_wait): Fix debug output.
14188
cf6e3471
PA
141892009-11-26 Pedro Alves <pedro@codesourcery.com>
14190
14191 * win32-low.c (win32_add_one_solib): If the dll name is
14192 "ntdll.dll", prepend the system directory to the dll path.
14193
0c85e18e
MK
141942009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14195
14196 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14197
9ac544ce 141982009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14199 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14200
14201 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14202 * configure.ac: Check for __mcoldfire__ and set
14203 gdb_cv_m68k_is_coldfire.
14204 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14205 reg-cf.o and reg-m68k.o.
14206 * configure: Regenerated.
14207
fd7dd3e6
PA
142082009-11-16 Pedro Alves <pedro@codesourcery.com>
14209
14210 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14211 Pass it to thread_db_free.
14212 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14213 proper `detaching' argument to linux_remove_process.
14214 * linux-low.h (thread_db_free): Add `detaching' parameter.
14215 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14216 to thread_db_free.
14217 (thread_db_free): Add `detaching' parameter. Only
14218 call td_ta_clear_event if detaching from process.
14219
75aa492e
MK
142202009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14221
14222 * thread-db.c (thread_db_free): Fix typo.
14223
21e1bee4
PP
142242009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14225
14226 PR gdb/10838
14227 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14228
8838b45e
NS
142292009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14230
14231 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14232 with an i686 compiler.
14233 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14234 needed.
14235 * configure: Rebuilt.
14236
8a35fb51
SL
142372009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14238
14239 PR gdb/10783
14240
14241 * server.c (handle_search_memory_1): Correct read_addr initialization
14242 in loop for searching subsequent chunks.
14243
96f15937
PP
142442009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14245
14246 * configure.ac: New --with-libthread-db option.
14247 * thread-db.c: Allow direct dependence on libthread_db.
14248 (thread_db_free): Adjust.
14249 * config.in: Regenerate.
14250 * configure: Likewise.
889bf7c5 14251
5f7d1694
PP
142522009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14253
14254 PR gdb/10757
14255 * thread-db.c (attach_thread): New function.
14256 (maybe_attach_thread): Return success/failure.
14257 (find_new_threads_callback): Adjust.
889bf7c5
PA
14258 (thread_db_find_new_threads): Loop until no new threads.
14259
88e3b899
PA
142602009-10-13 Pedro Alves <pedro@codesourcery.com>
14261
14262 * proc-service.c (ps_lgetregs): Formatting.
14263
cdbfd419
PP
142642009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14265
14266 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14267 * configure.ac: Adjust.
14268 * linux-low.h (struct process_info_private): Move members to struct
14269 thread_db.
14270 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14271 * linux-low.c (linux_remove_process): Adjust.
14272 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14273 * server.c (handle_query): Move code ...
14274 (handle_monitor_command): ... here. New function.
14275 * target.h (struct target_ops): New member.
14276 * thread-db.c (struct thread_db): New.
14277 (libthread_db_search_path): New variable.
14278 (thread_db_create_event, thread_db_enable_reporting)
14279 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14280 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14281 (try_thread_db_load_1, dladdr_to_soname): New functions.
14282 (try_thread_db_load, thread_db_load_search): New functions.
14283 (thread_db_init): Search for libthread_db.
14284 (thread_db_free): New function.
14285 (thread_db_handle_monitor_command): Likewise.
14286 * config.in: Regenerate.
14287 * configure: Regenerate.
889bf7c5 14288
4168d2d6
UW
142892009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14290
14291 * spu-low.c (spu_kill): Wait for inferior to terminate.
14292 Call clear_inferiors.
14293 (spu_detach): Call clear_inferiors.
14294
81ecdfbb
RW
142952009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14296
14297 * aclocal.m4: Regenerate.
14298 * config.in: Likewise.
14299 * configure: Likewise.
14300
0b9ff2c0
UW
143012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14302
14303 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14304 (parse_spufs_run): New function.
14305 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14306 (ppc_breakpoint_at): Handle SPU breakpoints.
14307
efcbbd14
UW
143082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14309
14310 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14311 (SPUFS_MAGIC): Define.
14312 (spu_enumerate_spu_ids): New function.
14313 (linux_qxfer_spu): New function.
14314 (linux_target_ops): Install linux_qxfer_spu.
14315
f4d9bade
UW
143162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14317
14318 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14319 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14320 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14321 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14322 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14323 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14324 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14325 (init_registers_powerpc_cell32l): Add prototype.
14326 (init_registers_powerpc_cell64l): Likewise.
14327 (ppc_arch_setup): Detect Cell/B.E. architecture.
14328
96e946ca
RW
143292009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14330
14331 * Makefile.in (datarootdir): New variable.
14332
58d6951d
DJ
143332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * linux-low.c (linux_write_memory): Update debugging output.
14336 * Makefile.in (clean): Add new descriptions.
14337 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14338 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14339 * configure.srv: Add new files for arm*-*-linux*.
14340 * linux-arm-low.c: Add new declarations.
14341 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14342 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14343 (HWCAP_VFPv3D16): New.
14344 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14345 instead of __IWMMXT__.
14346 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14347 (arm_arch_setup): New.
14348 (target_regsets): Remove #ifdef. Add VFP regset.
14349 (the_low_target): Use arm_arch_setup.
14350
12b42a12
DJ
143512009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14354 the main thread again.
14355
ac8c974e
AR
143562009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14357
14358 Adding Neutrino gdbserver.
14359 * configure: Regenerated.
14360 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14361 * configure.srv (i[34567]86-*-nto*): New target.
14362 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14363 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14364 (nto_comctrl) [__QNX__]: New function.
14365 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14366
4424e0c3 143672009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14368
14369 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14370 srv_tgtobj.
14371
912cf4ba
PA
143722009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14373 Pedro Alves <pedro@codesourcery.com>
14374
14375 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14376 don't support CONTEXT_EXTENDED_REGISTERS.
14377 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14378 (the_low_target): Install them.
14379 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14380 failing with ERROR_PIPE_NOT_CONNECTED.
14381
aa5ca48f
DE
143822009-06-30 Doug Evans <dje@google.com>
14383 Pierre Muller <muller@ics.u-strasbg.fr>
14384
14385 Add h/w watchpoint support to x86-linux, win32-i386.
14386 * Makefile.in (SFILES): Add i386-low.c
14387 (i386_low_h): Define.
14388 (i386-low.o): Add dependencies.
14389 (linux-x86-low.o): Add i386-low.h dependency.
14390 (win32-i386-low.o): Ditto.
14391 * i386-low.c: New file.
14392 * i386-low.h: New file.
14393 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14394 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14395 * linux-low.c (linux_add_process): Initialize arch_private.
14396 (linux_remove_process): Free arch_private.
14397 (add_lwp): Initialize arch_private.
14398 (delete_lwp): Free arch_private.
14399 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14400 provided.
14401 * linux-low.h (process_info_private): New member arch_private.
14402 (lwp_info): New member arch_private.
14403 (linux_target_ops): New members new_process, new_thread,
14404 prepare_to_resume.
14405 (ptid_of): New macro.
14406 * linux-x86-low.c: Include stddef.h, i386-low.h.
14407 (arch_process_info): New struct.
14408 (arch_lwp_info): New struct.
14409 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14410 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14411 (i386_dr_low_get_status): New function.
14412 (x86_insert_point, x86_remove_point): New functions.
14413 (x86_stopped_by_watchpoint): New function.
14414 (x86_stopped_data_address): New function.
14415 (x86_linux_new_process, x86_linux_new_thread): New functions.
14416 (x86_linux_prepare_to_resume): New function.
14417 (the_low_target): Add entries for insert_point, remove_point,
14418 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14419 prepare_to_resume.
14420 * server.c (debug_hw_points): New global.
14421 (monitor_show_help): Document set debug-hw-points.
14422 (handle_query): Process "set debug-hw-points".
14423 * server.h (debug_hw_points): Declare.
14424 (paddress): Declare.
14425 * utils.c (NUMCELLS, CELLSIZE): New macros.
14426 (get_sell, xsnprintf, paddress): New functions.
14427 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14428 remove_point, stopped_by_watchpoint, stopped_data_address.
14429 * win32-i386-low.c: Include i386-low.h.
14430 (debug_reg_state): Replaces dr.
14431 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14432 (i386_dr_low_get_status): New function.
14433 (i386_insert_point, i386_remove_point): New functions.
14434 (i386_stopped_by_watchpoint): New function.
14435 (i386_stopped_data_address): New function.
14436 (i386_initial_stuff): Update.
14437 (get_thread_context,set_thread_context,i386_thread_added): Update.
14438 (the_low_target): Add entries for insert_point,
14439 remove_point, stopped_by_watchpoint, stopped_data_address.
14440 * win32-low.c (win32_insert_watchpoint): New function.
14441 (win32_remove_watchpoint): New function.
14442 (win32_stopped_by_watchpoint): New function.
14443 (win32_stopped_data_address): New function.
14444 (win32_target_ops): Add entries for insert_watchpoint,
14445 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14446 * win32-low.h (win32_target_ops): New members insert_point,
14447 remove_point, stopped_by_watchpoint, stopped_data_address.
14448
d993e290
PA
144492009-06-25 Pedro Alves <pedro@codesourcery.com>
14450
14451 * server.c (process_serial_event): Re-return unsupported, not
14452 error, if the type isn't recognized. Re-allow supporting only
14453 insert or remove packets. Also call require_running for
14454 breakpoints. Add missing break statement to default case. Tidy.
14455 * target.h (struct target_ops): Rename insert_watchpoint to
14456 insert_point, and remove_watchpoint to remove_point.
14457
14458 * linux-low.h (struct linux_target_ops): Likewise.
14459 * linux-low.c (linux_insert_watchpoint): Rename to ...
14460 (linux_insert_point): ... this. Adjust.
14461 (linux_remove_watchpoint): Rename to ...
14462 (linux_remove_point): ... this. Adjust.
14463 (linux_target_ops): Adjust.
14464 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14465 (cris_insert_point): ... this.
14466 (cris_remove_watchpoint): Rename to ...
14467 (cris_remove_point): ... this.
14468 (the_low_target): Adjust.
14469
0f54c268
PM
144702009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14471
14472 * server.c (handle_v_kill): Pass signal_pid to
14473 kill_inferior if multi_process is zero.
14474
c6314022
AR
144752009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14476
14477 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14478 * target.h (target_ops): Comment for *_watchpoint to make it clear
14479 the functions can get types '0' and '1'.
14480
4463ce24
AR
144812009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14482
14483 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14484 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14485 * regcache.c (get_regcache): Likewise.
14486 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14487 * win32-low.c (child_fetch_inferior_registers): Remove check for
14488 regno 0.
14489
cf8fd78b
PA
144902009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14491 Pedro Alves <pedro@codesourcery.com>
14492
14493 * target.h (struct target_ops) <supports_multi_process>: New
14494 callback.
14495 (target_supports_multi_process): New.
14496 * server.c (handle_query): Even if GDB reports support, only
14497 enable multi-process if the target also supports it. Report
14498 multi-process support only if the target backend supports it.
14499 * linux-low.c (linux_supports_multi_process): New function.
14500 (linux_target_ops): Install it as target_supports_multi_process
14501 callback.
14502
47c0c975
DE
145032009-05-24 Doug Evans <dje@google.com>
14504
e09875d4
DE
14505 Global renaming of find_thread_pid to find_thread_ptid.
14506 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14507 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14508 All callers updated.
14509
e27d73f6
DE
14510 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14511 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14512 directly.
14513
47c0c975
DE
14514 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14515 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14516 (linux_resume_one_lwp): Ditto.
14517
2acc282a
DE
145182009-05-23 Doug Evans <dje@google.com>
14519
14520 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14521 from struct inferior_list_entry * to struct lwp_info *.
14522 All callers updated.
14523
9f1036c1
DE
145242009-05-13 Doug Evans <dje@google.com>
14525
14526 * linux-x86-low.c: Don't include assert.h.
14527 (x86_siginfo_fixup): Use fatal, not assert.
14528 (x86_arch_setup): Fix comment.
14529
d0722149
DE
145302009-05-12 Doug Evans <dje@google.com>
14531
14532 Biarch support for i386/amd64 gdbserver.
14533 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14534 Add linux-x86-low.c.
14535 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14536 (linux-x86-low.o): Add.
14537 * linux-x86-64-low.c: Delete.
14538 * linux-i386-low.c: Delete.
14539 * linux-x86-low.c: New file.
14540 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14541 linux-x86-low.o.
14542 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14543 linux-x86-low.o.
14544 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14545 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14546 (linux_child_pid_to_exec_file): New function.
14547 (elf_64_header_p, elf_64_file_p): New functions.
14548 (siginfo_fixup): New function.
14549 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14550 give target a chance to convert layout.
14551 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14552 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14553
fdeb2a12
DE
145542009-05-07 Doug Evans <dje@google.com>
14555
14556 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14557 (regsets_store_inferior_registers): Ditto.
14558
a6dbe5df
PA
145592009-05-06 Pedro Alves <pedro@codesourcery.com>
14560
14561 PR server/10048
14562
14563 * linux-low.c (must_set_ptrace_flags): Delete.
14564 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14565 of the global.
14566 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14567 `lwp->must_set_ptrace_flags' instead.
ba42693b 14568 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14569 (linux_wait_1): ... not here.
14570
5091eb23
DE
145712009-04-30 Doug Evans <dje@google.com>
14572
9f767825
DE
14573 * inferiors.c (started_inferior_callback): New function.
14574 (attached_inferior_callback): New function.
14575 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14576 * server.c (print_started_pid, print_attached_pid): New functions.
14577 (detach_or_kill_for_exit): New function.
14578 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14579 * server.h (have_started_inferiors_p): Declare.
14580 (have_attached_inferiors_p): Declare.
14581
5091eb23
DE
14582 * inferiors.c (remove_process): Fix memory leak, free process.
14583 * linux-low.c (linux_remove_process): New function.
14584 (linux_kill): Call it instead of remove_process.
14585 (linux_detach, linux_wait_1): Ditto.
14586
155c8968
PA
145872009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14588
14589 * configure.srv: Add x86 Windows CE target.
14590
7fe519cb
UW
145912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14592
14593 * inferiors.c (get_thread_process): Make global.
14594 * server.h (get_thread_process): Add prototype.
14595 * thread-db.c (find_one_thread): Use get_thread_process
14596 instead of current_process.
14597 (thread_db_get_tls_address): Do not crash if called when
14598 thread layer is not yet initialized.
14599
5472f405
UW
146002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14601
14602 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14603 * spu-low.c (current_tid): Rename to ...
14604 (current_ptid): ... this.
14605 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14606 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14607 ptid_get_lwp (current_ptid) instead of current_tid.
14608 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14609 instead of current_tid. Use find_process_pid to verify pid
14610 argument is valid. Pass proper argument to remove_process.
14611 (spu_thread_alive): Compare current_ptid instead of current_tid.
14612 (spu_resume): Likewise.
14613
55ac2b99
PA
146142009-04-02 Pedro Alves <pedro@codesourcery.com>
14615
14616 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14617 variable.
14618
95954743
PA
146192009-04-01 Pedro Alves <pedro@codesourcery.com>
14620
14621 Implement the multiprocess extensions, and add linux multiprocess
14622 support.
14623
14624 * server.h (ULONGEST): Declare.
14625 (struct ptid, ptid_t): New.
14626 (minus_one_ptid, null_ptid): Declare.
14627 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14628 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14629 (struct inferior_list_entry): Change `id' type from unsigned from
14630 to ptid_t.
14631 (struct sym_cache, struct breakpoint, struct
14632 process_info_private): Forward declare.
14633 (struct process_info): Declare.
14634 (current_process): Declare.
14635 (all_processes): Declare.
14636 (initialize_inferiors): Declare.
14637 (add_thread): Adjust to use ptid_t.
14638 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14639 (add_process, remove_process, find_thread_pid): Declare.
14640 (find_inferior_id): Adjust to use ptid_t.
14641 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14642 (multi_process): Declare.
14643 (push_event): Adjust to use ptid_t.
14644 (read_ptid, write_ptid): Declare.
14645 (prepare_resume_reply): Adjust to use ptid_t.
14646 (clear_symbol_cache): Declare.
14647 * inferiors.c (all_processes): New.
14648 (null_ptid, minus_one_ptid): New.
14649 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14650 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14651 (add_thread): Change unsigned long to ptid. Remove gdb_id
14652 parameter. Adjust.
14653 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14654 (gdb_id_to_thread): Rename to ...
14655 (find_thread_pid): ... this. Change unsigned long to ptid.
14656 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14657 (loaded_dll, pull_pid_from_list): Adjust.
14658 (add_process, remove_process, find_process_pid)
14659 (get_thread_process, current_process, initialize_inferiors): New.
14660 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14661 (struct target_waitstatus) <related_pid>: Ditto.
14662 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14663 return type to int.
14664 (struct target_ops) <join>: Add `pid' argument.
14665 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14666 (struct target_ops) <wait>: Add `ptid' field. Change return type
14667 to ptid.
14668 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14669 (mywait): Add `ptid' argument. Change return type to ptid_t.
14670 (target_pid_to_str): Declare.
14671 * target.c (set_desired_inferior): Adjust to use ptids.
14672 (mywait): Add new `ptid' argument. Adjust.
14673 (target_pid_to_str): New.
14674 * mem-break.h (free_all_breakpoints): Declare.
14675 * mem-break.c (breakpoints): Delelete.
14676 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14677 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14678 to use per-process breakpoint list.
14679 (free_all_breakpoints): New.
14680 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14681 (symbol_cache, all_symbols_looked_up): Delete.
14682 (hexchars): New.
14683 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14684 read_ptid): New.
14685 (prepare_resume_reply): Change ptid argument's type from unsigned
14686 long to ptid_t. Adjust. Implement W;process and X;process.
14687 (free_sym_cache, clear_symbol_cache): New.
14688 (look_up_one_symbol): Adjust to per-process symbol cache. *
14689 * server.c (cont_thread, general_thread, step_thread): Change type
14690 to ptid_t.
14691 (attached): Delete.
14692 (multi_process): New.
14693 (last_ptid): Change type to ptid_t.
14694 (struct vstop_notif) <ptid>: Change type to ptid_t.
14695 (queue_stop_reply, push_event): Change `ptid' argument's type to
14696 ptid_t.
14697 (discard_queued_stop_replies): Add `pid' argument.
14698 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14699 changes. Don't reference the `attached' global.
14700 (attach_inferior): Adjust to mywait interface changes.
14701 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14702 features. Handle and report "multiprocess+". Handle
14703 "qAttached:PID".
14704 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14705 changes.
14706 (handle_v_kill): New.
14707 (handle_v_stopped): Adjust to use target_pid_to_str.
14708 (handle_v_requests): Allow multiple attaches and runs when
14709 multiprocess extensions are in effect. Handle "vKill".
14710 (myresume): Adjust to use ptids.
14711 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14712 (handle_status): Adjust to discard_queued_stop_replies interface
14713 change.
14714 (first_thread_of, kill_inferior_callback)
14715 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14716 (main): Call initialize_inferiors. Adjust to use ptids, killing
14717 and detaching from all inferiors. Handle multiprocess packet
14718 variants.
14719 * linux-low.h: Include gdb_proc_service.h.
14720 (struct process_info_private): New.
14721 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14722 <lwpid_of>: Use ptid_get_lwp.
14723 (get_lwp_thread): Adjust.
14724 (struct lwp_info): Add `dead' member.
14725 (find_lwp_pid): Declare.
14726 * linux-low.c (thread_db_active): Delete.
14727 (new_inferior): Adjust comment.
14728 (inferior_pid): Delete.
14729 (linux_add_process): New.
14730 (handle_extended_wait): Adjust.
14731 (add_lwp): Change unsigned long to ptid.
14732 (linux_create_inferior): Add process to processes table. Adjust
14733 to use ptids. Don't set new_inferior here.
14734 (linux_attach_lwp): Rename to ...
14735 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14736 it. Adjust to use ptids.
14737 (linux_attach_lwp): New.
14738 (linux_attach): Add process to processes table. Don't set
14739 new_inferior here.
14740 (struct counter): New.
14741 (second_thread_of_pid_p, last_thread_of_process_p): New.
14742 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14743 multiple processes.
14744 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14745 processes. Remove process from process table.
14746 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14747 to multiple processes.
14748 (any_thread_of): New.
14749 (linux_detach): Add `pid' argument, and handle it. Remove process
14750 from processes table.
14751 (linux_join): Add `pid' argument. Handle it.
14752 (linux_thread_alive): Change unsighed long argument to ptid_t.
14753 Consider dead lwps as not being alive.
14754 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14755 threads we're not interested in.
14756 (same_lwp, find_lwp_pid): New.
14757 (linux_wait_for_lwp): Change `pid' argument's type from int to
14758 ptid_t. Adjust.
14759 (linux_wait_for_event): Rename to ...
14760 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14761 from int to ptid_t. Adjust.
14762 (linux_wait_for_event): New.
14763 (linux_wait_1): Add `ptid' argument. Change return type to
14764 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14765 that exit from the process table.
14766 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14767 Adjust.
14768 (mark_lwp_dead): New.
14769 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14770 stopping all threads, mark its main lwp as dead.
14771 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14772 ptids.
14773 (fetch_register, usr_store_inferior_registers)
14774 (regsets_fetch_inferior_registers)
14775 (regsets_store_inferior_registers, linux_read_memory)
14776 (linux_write_memory): Inline `inferior_pid'.
14777 (linux_look_up_symbols): Adjust to use per-process
14778 `thread_db_active'.
14779 (linux_request_interrupt): Adjust to use ptids.
14780 (linux_read_auxv): Inline `inferior_pid'.
14781 (initialize_low): Don't reference thread_db_active.
14782 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14783 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14784 (ps_getpid): Return the pid of the current inferior.
14785 * thread-db.c (proc_handle, thread_agent): Delete.
14786 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14787 per-process data.
14788 (find_one_thread): Change argument type to ptid_t. Adjust to
14789 per-process data.
14790 (maybe_attach_thread): Adjust to per-process data and ptids.
14791 (thread_db_find_new_threads): Ditto.
14792 (thread_db_init): Ditto.
14793 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14794 processes table. Adjust to use ptids.
14795 (spu_kill, spu_detach): Adjust interface. Remove process from
14796 processes table.
14797 (spu_join, spu_thread_alive): Adjust interface.
14798 (spu_wait): Adjust interface. Remove process from processes
14799 table. Adjust to use ptids.
14800 * win32-low.c (current_inferior_tid): Delete.
14801 (current_inferior_ptid): New.
14802 (debug_event_ptid): New.
14803 (thread_rec): Take a ptid. Adjust.
14804 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14805 (child_delete_thread): Ditto.
14806 (do_initial_child_stuff): Add `attached' argument. Add process to
14807 processes table.
14808 (child_fetch_inferior_registers, child_store_inferior_registers):
14809 Adjust.
14810 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14811 (win32_attach): Pass 1 to do_initial_child_stuff.
14812 (win32_kill): Adjust interface. Remove process from processes
14813 table.
14814 (win32_detach): Ditto.
14815 (win32_join): Adjust interface.
14816 (win32_thread_alive): Take a ptid.
14817 (win32_resume): Adjust to use ptids.
14818 (get_child_debug_event): Ditto.
14819 (win32_wait): Adjust interface. Remove exiting process from
14820 processes table.
14821
bd99dc85
PA
148222009-04-01 Pedro Alves <pedro@codesourcery.com>
14823
14824 Non-stop mode support.
14825
14826 * server.h (non_stop): Declare.
14827 (gdb_client_data, handler_func): Declare.
14828 (delete_file_handler, add_file_handler, start_event_loop):
14829 Declare.
14830 (handle_serial_event, handle_target_event, push_event)
14831 (putpkt_notif): Declare.
14832 * target.h (enum resume_kind): New.
14833 (struct thread_resume): Replace `step' field by `kind' field.
14834 (TARGET_WNOHANG): Define.
14835 (struct target_ops) <wait>: Add `options' argument.
14836 <supports_non_stop, async, start_non_stop>: New fields.
14837 (target_supports_non_stop, target_async): New.
14838 (start_non_stop): Declare.
14839 (mywait): Add `options' argument.
14840 * target.c (mywait): Add `options' argument. Print child exit
14841 notifications here.
14842 (start_non_stop): New.
14843 * server.c (non_stop, own_buf, mem_buf): New globals.
14844 (struct vstop_notif): New.
14845 (notif_queue): New global.
14846 (queue_stop_reply, push_event, discard_queued_stop_replies)
14847 (send_next_stop_reply): New.
14848 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14849 interface changes.
14850 (attach_inferior): In non-stop mode, don't wait for the target
14851 here.
14852 (handle_general_set): Handle QNonStop.
14853 (handle_query): When handling qC, return the current general
14854 thread, instead of the first thread of the list.
14855 (handle_query): If the backend supports non-stop mode, include
14856 QNonStop+ in the qSupported query response.
14857 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14858 and non-stop mode.
14859 (handle_v_attach, handle_v_run): Handle non-stop mode.
14860 (handle_v_stopped): New.
14861 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14862 (myresume): Adjust to use resume_kind. Handle non-stop.
14863 (queue_stop_reply_callback): New.
14864 (handle_status): Handle non-stop mode.
14865 (main): Clear non_stop flag on reconnection. Use the event-loop.
14866 Refactor serial protocol handling from here ...
14867 (process_serial_event): ... to this new function. When GDB
14868 selects any thread, select one here. In non-stop mode, wait until
14869 GDB acks all pending events before exiting.
14870 (handle_serial_event, handle_target_event): New.
14871 * remote-utils.c (remote_open): Install remote_desc in the event
14872 loop.
14873 (remote_close): Remove remote_desc from the event loop.
14874 (putpkt_binary): Rename to...
14875 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14876 (putpkt_binary): New as wrapper around putpkt_binary_1.
14877 (putpkt_notif): New.
14878 (prepare_resume_reply): In non-stop mode, don't change the
14879 general_thread.
14880 * event-loop.c: New.
14881 * Makefile.in (OBJ): Add event-loop.o.
14882 (event-loop.o): New rule.
14883
14884 * linux-low.h (pid_of): Moved here.
14885 (lwpid_of): New.
14886 (get_lwp_thread): Use lwpid_of.
14887 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14888 * linux-low.c (pid_of): Delete.
14889 (inferior_pid): Use lwpid_of.
14890 (linux_event_pipe): New.
14891 (target_is_async_p): New.
14892 (delete_lwp): New.
14893 (handle_extended_wait): Use lwpid_of.
14894 (add_lwp): Don't set lwpid field.
14895 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14896 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14897 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14898 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14899 first. Adjust to linux_wait_for_event interface changes. Use
14900 lwpid_of.
14901 (linux_detach): Don't delete the main lwp here.
14902 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14903 (status_pending_p): Don't consider explicitly suspended lwps.
14904 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14905 pointer. Add OPTIONS argument. Change return type to int. Use
14906 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14907 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14908 pointer. Add status pointer argument. Return a pid instead of a
14909 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14910 changes. In non-stop mode, don't switch to a random thread.
14911 (linux_wait): Rename to...
14912 (linux_wait_1): ... this. Add target_options argument, and handle
14913 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14914 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14915 clean exit and signal exit code. Don't stop all threads in
14916 non-stop mode. In all-stop mode, only stop all threads when
14917 reporting a stop to GDB. Handle explicit thread stop requests.
14918 (async_file_flush, async_file_mark): New.
14919 (linux_wait): New.
14920 (send_sigstop): Use lwpid_of.
14921 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14922 interface changes. In non-stop mode, don't switch to a random
14923 thread.
14924 (linux_resume_one_lwp): Use lwpid_of.
14925 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14926 (linux_resume_one_thread): ... this. Handle resume_stop. In
14927 non-stop mode, don't look for pending flag in all threads.
14928 (resume_status_pending_p): Don't consider explicitly suspended
14929 threads.
14930 (my_waitpid): Reimplement. Emulate __WALL.
14931 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14932 Use lwpid_of.
14933 (sigchld_handler, linux_supports_non_stop, linux_async)
14934 (linux_start_non_stop): New.
14935 (linux_target_ops): Register linux_supports_non_stop, linux_async
14936 and linux_start_non_stop.
14937 (initialize_low): Install SIGCHLD handler.
14938 * thread-db.c (thread_db_create_event, find_one_thread)
14939 (thread_db_get_tls_address): Use lwpid_of.
14940 * win32-low.c (win32_detach): Adjust to use resume_kind.
14941 (win32_wait): Add `options' argument.
14942 * spu-low.c (spu_resume): Adjust to use resume_kind.
14943 (spu_wait): Add `options' argument.
14944
5b1c542e
PA
149452009-04-01 Pedro Alves <pedro@codesourcery.com>
14946
14947 Decouple target code from remote protocol.
14948
14949 * target.h (enum target_waitkind): New.
14950 (struct target_waitstatus): New.
14951 (struct target_ops) <wait>: Return an unsigned long. Take a
14952 target_waitstatus pointer instead of a char pointer.
14953 (mywait): Likewise.
14954 * target.c (mywait): Change prototype to return an unsigned long.
14955 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14956 * server.h (thread_from_wait, old_thread_from_wait): Delete
14957 declarations.
14958 (prepare_resume_reply): Change prototype to take a
14959 target_waitstatus.
14960 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14961 (last_status, last_ptid): New.
14962 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14963 pid instead of a signal.
14964 (attach_inferior): Remove "status" and "signal" parameters.
14965 Adjust.
14966 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14967 not as an address.
14968 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14969 (handle_v_requests, myresume): Remove "status" and "signal"
14970 parameters. Adjust.
14971 (handle_status): New.
14972 (main): Delete local `status'. Adjust.
14973 * remote-utils.c: Include target.h.
14974 (prepare_resume_reply): Change prototype to take a
14975 target_waitstatus. Adjust.
14976
14977 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14978 interface.
14979 * spu-low.c (spu_wait): Adjust.
14980 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14981 Delete.
14982 (win32_wait): Adjust.
14983
2bd7c093
PA
149842009-04-01 Pedro Alves <pedro@codesourcery.com>
14985
14986 * target.h (struct thread_resume): Delete leave_stopped member.
14987 (struct target_ops): Add a `n' argument to the `resume' callback.
14988 * server.c (start_inferior): Adjust.
14989 (handle_v_cont, myresume): Adjust.
14990 * linux-low.c (check_removed_breakpoint): Adjust to resume
14991 interface change, and to removed leave_stopped field.
14992 (resume_ptr): Delete.
14993 (struct thread_resume_array): New.
14994 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14995 resume interface change.
14996 (linux_continue_one_thread, linux_queue_one_thread)
14997 (resume_status_pending_p): Check if the resume field is NULL
14998 instead of checking the leave_stopped member.
14999 (linux_resume): Adjust to the target resume interface change.
15000 * spu-low.c (spu_resume): Adjust to the target resume interface
15001 change.
15002 * win32-low.c (win32_detach, win32_resume): Ditto.
15003
c35fafde
PA
150042009-04-01 Pedro Alves <pedro@codesourcery.com>
15005
15006 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15007 flag.
15008 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15009 pending.
15010 (linux_continue_one_thread): Only preserve the stepping flag if
15011 there's a pending breakpoint.
15012
0a59d50b
PA
150132009-03-31 Pedro Alves <pedro@codesourcery.com>
15014
15015 * server.c (main): After the inferior having exited, call
15016 remote_close before exiting gdbserver.
15017
f04c6d38
TJB
150182009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15019
15020 Fix size of FPSCR in Power 7 processors.
15021 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15022 (PPC_FEATURE_HAS_DFP): New #define.
15023 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15024 size of the FPSCR.
15025
78e5cee6
PA
150262009-03-23 Pedro Alves <pedro@codesourcery.com>
15027
15028 * server.c (handle_query) Whitespace and formatting.
15029
1b3f6016
PA
150302009-03-22 Pedro Alves <pedro@codesourcery.com>
15031
15032 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15033 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15034 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15035 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15036 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15037 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15038 Makefile.in, configure.ac: Fix whitespace throughout.
15039 * configure: Regenerate.
15040
a07b2135
PA
150412009-03-22 Pedro Alves <pedro@codesourcery.com>
15042
15043 * inferiors.c (find_inferior): Make it safe for the callback
15044 function to delete the currently iterated inferior.
15045
67cc2626
PA
150462009-03-22 Pedro Alves <pedro@codesourcery.com>
15047
15048 * Makefile.in (linuw_low_h): Move higher.
15049 (thread-db.o): Depend on $(linux_low_h).
15050
54a0b537
PA
150512009-03-17 Pedro Alves <pedro@codesourcery.com>
15052
15053 Rename "process" to "lwp" throughout.
15054
15055 * linux-low.c (all_processes): Rename to...
15056 (all_lwps): ... this.
15057 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15058 (add_process): Rename to ...
15059 (add_lwp): ... this. Adjust.
15060 (linux_create_inferior): Adjust.
15061 (linux_attach_lwp): Adjust.
15062 (linux_attach): Adjust.
15063 (linux_kill_one_process): Rename to ...
15064 (linux_kill_one_lwp): ... this. Adjust.
15065 (linux_kill): Adjust.
15066 (linux_detach_one_process): Rename to ...
15067 (linux_detach_one_lwp): ... this. Adjust.
15068 (linux_detach): Adjust.
15069 (check_removed_breakpoint): Adjust.
15070 (status_pending_p): Adjust.
15071 (linux_wait_for_process): Rename to ...
15072 (linux_wait_for_lwp): ... this. Adjust.
15073 (linux_wait_for_event): Adjust.
15074 (send_sigstop): Adjust.
15075 (wait_for_sigstop): Adjust.
15076 (stop_all_processes): Rename to ...
15077 (stop_all_lwps): ... this.
15078 (linux_resume_one_process): Rename to ...
15079 (linux_resume_one_lwp): ... this. Adjust.
15080 (linux_set_resume_request, linux_continue_one_thread)
15081 (linux_queue_one_thread, resume_status_pending_p)
15082 (usr_store_inferior_registers, regsets_store_inferior_registers)
15083 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15084 Adjust.
15085 * linux-low.h (get_process): Rename to ...
15086 (get_lwp): ... this. Adjust.
15087 (get_thread_process): Rename to ...
15088 (get_thread_lwp): ... this. Adjust.
15089 (get_process_thread): Rename to ...
15090 (get_lwp_thread): ... this. Adjust.
15091 (struct process_info): Rename to ...
15092 (struct lwp_info): ... this.
15093 (all_processes): Rename to ...
15094 (all_lwps): ... this.
15095 * proc-service.c (ps_lgetregs): Adjust.
15096 * thread-db.c (thread_db_create_event, find_one_thread)
15097 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15098
0b16c5cf
PA
150992009-03-14 Pedro Alves <pedro@codesourcery.com>
15100
15101 * server.c (handle_query): Handle "qAttached".
15102
32de4b9d
NS
151032009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15104
15105 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15106 GPLv3, update license URL.
15107
2aecd87f
DE
151082009-03-01 Doug Evans <dje@google.com>
15109
93efd302 15110 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15111 (server_h): Add gdb_signals.h.
15112 (signals.o): Update.
15113 * server.h (target_signal_from_host,target_signal_to_host_p)
15114 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15115
86b1f9c5
PM
151162009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15117
15118 * remote-utils.c (getpkt): Also generate remote-debug
15119 information if noack_mode is set.
15120
4aa995e1
PA
151212009-02-06 Pedro Alves <pedro@codesourcery.com>
15122
15123 * server.c (handle_query): Report qXfer:siginfo:read and
15124 qXfer:siginfo:write as supported and handle them.
15125 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15126 * linux-low.c (linux_xfer_siginfo): New.
15127 (linux_target_ops): Set it.
15128
62709adf
PA
151292009-01-26 Pedro Alves <pedro@codesourcery.com>
15130
15131 * server.c (gdbserver_usage): Mention --remote-debug.
15132 (main): Accept '--remote-debug' switch.
15133
aef93bd7
DE
151342009-01-18 Doug Evans <dje@google.com>
15135
15136 * regcache.c (new_register_cache): No need to check result of xcalloc.
15137 * server.c (handle_search_memory): Back out calls to xmalloc,
15138 result is checked and error is returned to user upon failure.
15139 (handle_query): Ditto. Add more checks for result of malloc.
15140 (handle_v_cont): Check result of malloc, report error back to
15141 user upon failure.
15142 (handle_v_run): Ditto. Call freeargv.
15143 * server.h (freeargv): Declare.
15144 * utils.c (freeargv): New fn.
15145
54363045
DE
151462009-01-15 Doug Evans <dje@google.com>
15147
f626972c
DE
15148 * gdbreplay.c (perror_with_name): Make arg const char *.
15149 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15150 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15151 * utils.c (perror_with_name): Make arg const char *.
54363045 15152
18aae699
PA
151532009-01-14 Pedro Alves <pedro@codesourcery.com>
15154
15155 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15156 when handling a EXIT_PROCESS_DEBUG_EVENT.
15157
ff703abe
JB
151582009-01-06 Joel Brobecker <brobecker@adacore.com>
15159
15160 * gdbreplay.c (gdbreplay_version): Update copyright year.
15161 * server.c (gdbserver_version): Likewise.
15162
f21cc1a2 151632009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15164
15165 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15166 (handle_extended_wait): Improve comment.
0e21c1ec 15167
bca929d3
DE
151682008-12-13 Doug Evans <dje@google.com>
15169
15170 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15171 * server.h (ATTR_MALLOC): New macro.
15172 (xmalloc,xcalloc,xstrdup): Declare.
15173 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15174 * inferiors.c: Ditto.
15175 * linux-low.c: Ditto.
15176 * mem-break.c: Ditto.
15177 * regcache.c: Ditto.
15178 * remote-utils.c: Ditto.
15179 * server.c: Ditto.
15180 * target.c: Ditto.
15181 * win32-low.c: Ditto.
15182
97438e3f
DE
151832008-12-12 Doug Evans <dje@google.com>
15184
896c7fbb
DE
15185 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15186 in debugging printf.
15187
97438e3f
DE
15188 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15189
e3b886f8
DE
151902008-12-09 Doug Evans <dje@google.com>
15191
15192 * linux-low.h (struct process_info): Delete member tid, unused.
15193 * thread-db.c (find_one_thread): Update.
15194 (maybe_attach_thread): Update.
15195
07e059b5
VP
151962008-12-02 Pedro Alves <pedro@codesourcery.com>
15197
889bf7c5
PA
15198 * target.h (struct target_ops): Add qxfer_osdata member.
15199 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15200 and dirent.h.
15201 (linux_qxfer_osdata): New functions.
15202 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15203 callback.
15204 * server.c (handle_query): Handle "qXfer:osdata:read:".
15205 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15206 (buffer_xml_printf): New functions.
15207 * server.h (struct buffer): New.
15208 (buffer_grow_str, buffer_grow_str0): New macros.
15209 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15210 (buffer_xml_printf): Declare.
07e059b5 15211
4cab47ab
DE
152122008-11-24 Doug Evans <dje@google.com>
15213
15214 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15215
f142445f
DJ
152162008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15217
15218 * server.c (handle_v_run): Always use the supplied argument list.
15219
d0107bb6 152202008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15221
d0107bb6
BW
15222 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15223 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15224
2c4ad781
TJB
152252008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15226
15227 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15228 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15229 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15230 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15231 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15232 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15233 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15234 XML target descriptions.
15235 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15236 when inferior is running on an ISA 2.05 or later processor. Add
15237 special case to return offset for full 64-bit slot of FPSCR when
15238 in 32-bits.
15239
dfb64f85
DJ
152402008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15241
15242 * Makefile.in (SFILES, clean): Added sparc64 files.
15243 (reg-sparc64.o, reg-sparc64.c): New.
15244 * configure.srv (sparc*-*-linux*): New configuration.
15245 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15246 syscall arguments for SPARC.
15247 (regsets_store_inferior_registers): Likewise.
15248 * linux-sparc-low.c: New file.
15249
66b6e1dd
DE
152502008-10-21 Doug Evans <dje@google.com>
15251
15252 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15253 (READLINE_DIR,READLINE_DEP): Delete.
15254 (INTERNAL_CFLAGS): Update.
15255 (LINTFLAGS): Update.
15256
9b710a42
PA
152572008-10-10 Pedro Alves <pedro@codesourcery.com>
15258
15259 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15260 whole argv from the last run, not just argv[0].
15261
5822d809
PA
152622008-09-08 Pedro Alves <pedro@codesourcery.com>
15263
15264 * regcache.c (new_register_cache): Return NULL if the register
15265 cache size isn't known yet.
15266 (free_register_cache): Avoid dereferencing a NULL regcache.
15267
74aac56f
DJ
152682008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * configure.srv: Merge MIPS and MIPS64.
15271
400b20f5
MR
152722008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15273
15274 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15275
677c5bb1
LM
152762008-08-18 Luis Machado <luisgpm@br.ibm.com>
15277
15278 * Makefile.in: Add required vsx dependencies.
15279
15280 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15281 Declare init_registers_powerpc_vsx32l.
15282 Declare init_registers_powerpc_vsx64l.
15283 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15284 (ppc_arch_setup): Check for VSX in hwcap.
15285 (ppc_fill_vsxregset): New function.
15286 (ppc_store_vsxregset): New function.
15287 Add new VSX entry in regset_info target_regsets.
15288
15289 * configure.srv: Add new VSX dependencies.
15290
a6f3e723
SL
152912008-08-12 Pedro Alves <pedro@codesourcery.com>
15292
15293 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15294 (remote_open): Set or clear transport_is_reliable.
15295 (putpkt_binary): Don't expect acks in noack mode.
15296 (getpkt): Don't send ack/nac in noack mode.
15297 * server.c (handle_general_set): Handle QStartNoAckMode.
15298 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15299 qSupported.
15300 (main): Reset noack_mode on every connection.
15301 * server.h (noack_mode): Declare.
15302
a417dc56
RW
153032008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15304
15305 * Makefile.in (GDBREPLAY_OBS): New variable.
15306 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15307
3221518c
UW
153082008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15309 Daniel Jacobowitz <dan@codesourcery.com>
15310
15311 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15312 (usr_store_inferior_registers): Likewise.
15313 (regsets_store_inferior_registers): Likewise.
15314
ec56be1b
PA
153152008-07-31 Rolf Jansen <rj@surtec.com>
15316 Pedro Alves <pedro@codesourcery.com>
15317
15318 * configure.ac: Check for memmem declaration.
15319 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15320 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15321 (disable_packet_qfThreadInfo): Unconditionally compile.
15322 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15323 * configure, config.in: Regenerate.
15324
2fe5e3ff
DE
153252008-07-28 Doug Kwan <dougkwan@google.com>
15326
15327 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15328 (linux_write_memory): Remove declaration of errno.
15329
836acd6d
UW
153302008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15331
15332 * linux-low.c (handle_extended_wait): Do not use "status"
15333 variable uninitialized.
15334
aeba519e
PA
153352008-07-07 Pedro Alves <pedro@codesourcery.com>
15336
15337 * server.c (handle_v_attach): Inhibit reporting dll changes.
15338
db42f210
PA
153392008-06-27 Pedro Alves <pedro@codesourcery.com>
15340
15341 * remote-utils.c (prepare_resume_reply): If requested, don't
15342 output "thread:TID" in the T stop reply.
15343
15344 * server.c (disable_packet_vCont, disable_packet_Tthread)
15345 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15346 (handle_query): If requested, disable support for qC, qfThreadInfo
15347 and qsThreadInfo.
15348 (handle_v_requests): If requested, disable support for vCont.
15349 (gdbserver_show_disableable): New.
15350 (main): Handle --disable-packet and --disable-packet=LIST.
15351
15352 * server.h (disable_packet_vCont, disable_packet_Tthread)
15353 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15354
8e4c5421
CD
153552008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15356
15357 * server.c (gdbserver_usage): Mention --version.
15358
6e23a804
DJ
153592008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15360
15361 * Makefile.in (gdbreplay.o): New rule.
15362
90aa6a40
JM
153632008-06-06 Joseph Myers <joseph@codesourcery.com>
15364
15365 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15366 message, not gdbserver.
15367
c16158bc 153682008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15369 Nathan Sidwell <nathan@codesourcery.com>
15370 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15371
15372 * acinclude.m4: Include ../../config/acx.m4.
15373 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15374 * configure, config.in: Regenerate.
15375 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15376 * server.c (gdbserver_version): Print PKGVERSION.
15377 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15378 (main): Adjust gdbserver_usage calls.
15379 * gdbreplay.c (version, host_name): Add declarations.
15380 (gdbreplay_version, gdbreplay_usage): New.
15381 (main): Accept --version and --help options.
15382
aeb75bf5
DJ
153832008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15384
15385 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15386 (arm_breakpoint_at): Handle Thumb.
15387 (the_low_target): Add comment.
15388
76b233dd
UW
153892008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15390
15391 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15392
08388c79
DE
153932008-05-09 Doug Evans <dje@google.com>
15394
a3c83fae
DE
15395 * server.h (decode_search_memory_packet): Declare.
15396 * remote-utils.c (decode_search_memory_packet): New fn.
15397 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15398 (handle_search_memory): New fn.
15399 (handle_query): Process qSearch:memory packets.
15400
bb9c3d36
UW
154012008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15402
15403 * regcache.c (registers_length): Remove.
15404 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15405 full register packet.
15406 * regcache.h (registers_length): Remove prototype.
15407 * server.h (PBUFSIZ): Define to 16384.
15408
7284e1be
UW
154092008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15410
15411 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15412 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15413 powerpc-64l.o, and powerpc-altivec64l.o.
15414 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15415 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15416 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15417 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15418 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15419 to srv_xmlfiles.
15420
15421 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15422 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15423 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15424 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15425 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15426 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15427 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15428 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15429 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15430 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15431 (clean): Update.
15432
15433 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15434 (init_registers_powerpc_32l): ... this new prototype.
15435 (init_registers_powerpc_32): Remove, replace by ...
15436 (init_registers_powerpc_altivec32l): ... this new prototype.
15437 (init_registers_powerpc_e500): Remove, replace by ...
15438 (init_registers_powerpc_e500l): ... this new prototype.
15439 (init_registers_ppc64): Remove, replace by ...
15440 (init_registers_powerpc_64l): ... this new prototype.
15441 (init_registers_powerpc_64): Remove, replace by ...
15442 (init_registers_powerpc_altivec64l): ... this new prototype.
15443 (ppc_num_regs): Set to 73.
15444 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15445 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15446 (ppc_cannot_store_register): Handle orig_r3 and trap.
15447 (ppc_arch_setup): Update init_registers_... calls.
15448 (ppc_fill_gregset): Handle orig_r3 and trap.
15449
15450 * inferiors.c (clear_inferiors): Reset current_inferior.
15451
fdc59709
PB
154522008-04-23 Paolo Bonzini <bonzini@gnu.org>
15453
889bf7c5
PA
15454 * acinclude.m4: Add override.m4.
15455 * configure: Regenerate.
fdc59709 15456
c9b2f845
UW
154572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15458
15459 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15460 initial call to init_register_ppc64.
15461
550512b8
UW
154622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15463
43aaf8b6
PA
15464 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15465 single powerpc*-*-linux* case.
550512b8
UW
15466 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15467
b6430ec3
UW
154682008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15469
15470 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15471 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15472 from reg_xmlfiles.
15473 * linux-ppc-low.c: Include <elf.h>.
15474 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15475 (ppc_hwcap): New global variable.
15476 (ppc_regmap): Remove __SPE__ #ifdef sections.
15477 (ppc_regmap_e500): New global variable.
15478 (ppc_cannot_store_register): Update __SPE__ special case.
15479 (ppc_get_hwcap): New function.
15480 (ppc_arch_setup): Use it to determine whether inferior supports
15481 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15482 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15483 Do not access registers if target does not support AltiVec.
15484 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15485 Do not access registers if target does not support SPE.
15486 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15487
52fa2412
UW
154882008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15489
15490 * linux-low.c (disabled_regsets, num_regsets): New.
15491 (use_regsets_p): Delete.
15492 (linux_wait_for_process): Clear disabled_regsets.
15493 (regsets_fetch_inferior_registers): Check and set it.
15494 (regsets_store_inferior_registers): Likewise.
15495 (linux_fetch_registers, linux_store_registers): Do not use
15496 use_regsets_p.
15497 (initialize_low): Allocate disabled_regsets.
15498
e28b3332
DJ
154992008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15500
15501 * Makefile.in (LIBOBJS): New.
15502 (OBS): Use LIBOBJS.
15503 (memmem.o): New rule.
15504 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15505 * configure: Regenerated.
15506
4536995d
UW
155072008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15508
15509 * server.c (handle_query): Never return "unsupported" for
15510 qXfer:features:read queries.
15511
221c031f
UW
155122008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15513
15514 * server.c (get_features_xml): Fix inverted condition.
15515 (handle_query): Always support qXfer:feature:read.
15516
ccd213ac
DJ
155172008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15518
15519 * server.c (wrapper_argv): New.
15520 (start_inferior): Handle wrapper_argv. If set, expect an extra
15521 trap.
15522 (gdbserver_usage): Document --wrapper.
15523 (main): Parse --wrapper.
15524
6fe305f7
UW
155252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15526
15527 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15528 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15529 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15530 (ppc_set_pc): Likewise.
15531 (ppc_arch_setup): New function.
15532 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15533 of collect_register.
889bf7c5 15534 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15535
5b0a002e
UW
155362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15537
15538 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15539 instead of linux-ppc64-low.o.
15540 * linux-ppc64-low.c: Remove file.
15541 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15542 (linux-ppc64-low.o): Remove rule.
15543
15544 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15545 (init_registers_powerpc_64): Likewise.
15546 (ppc_regmap): Conditionally define depending on __powerpc64__.
15547 (ppc_cannot_store_register): Do not special-case "fpscr" when
15548 compiled on __powerpc64__.
15549 (ppc_collect_ptrace_register): New function.
15550 (ppc_supply_ptrace_register): New function.
15551 (ppc_breakpoint): Change type to "unsigned int".
15552 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15553 (the_low_target): Conditionally provide initializers for the
889bf7c5 15554 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15555 collect_ptrace_register and supply_ptrace_register members.
15556
9b4b61c8
UW
155572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15558
15559 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15560 * server.c (gdbserver_xmltarget): Define.
15561 (get_features_xml): Use it to replace "target.xml" and arch_string.
15562
15563 * configure.srv: Remove srv_xmltarget. Add XML files that were
15564 mentioned there to srv_xmlfiles instead. Remove conditional tests
15565 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15566 srv_xmlfiles and srv_regobj to include all possible choices.
15567 * configure.ac (srv_xmltarget): Remove.
15568 (srv_xmlfiles): Do not add "target.xml".
15569 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15570 checks for supplementary target information.
15571 * configure: Regenerate.
15572 * Makefile.in (XML_TARGET): Remove.
15573 (target.xml): Remove rule.
15574 (clean): Do not clean up target.xml.
15575 (.PRECIOUS): Do not mention target.xml.
15576
15577 * target.h (struct target_ops): Remove arch_string member.
15578 * linux-low.c (linux_arch_string): Remove.
15579 (linux_target_ops): Remove arch_string initializer.
15580 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15581 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15582 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15583 * spu-low.c (spu_arch_string): Remove.
15584 (spu_target_ops): Remove arch_string initializer.
15585 * win32-low.c (win32_arch_string): Remove.
15586 (win32_target_ops): Remove arch_string initializer.
15587 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15588 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15589 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15590
ee1a7ae4
UW
155912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15592
15593 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15594 by collect_ptrace_register and supply_ptrace_register hooks.
15595 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15596 instead of checking for the_low_target.left_pad_xfer.
15597 (usr_store_inferior_registers): Use collect_ptrace_register callback
15598 instead of checking for the_low_target.left_pad_xfer.
15599
15600 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15601 (s390_supply_ptrace_register): Likewise.
15602 (s390_fill_gregset): Call s390_collect_ptrace_register.
15603 (the_low_target): Update.
15604
15605 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15606 (ppc_supply_ptrace_register): Likewise.
15607 (the_low_target): Update.
15608
15609 * linux-i386-low.c (the_low_target): Update.
15610 * linux-x86-64-low.c (the_low_target): Update.
15611
d61ddec4
UW
156122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15613
15614 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15615 reg-s390.o and reg-s390x.o.
15616
15617 * linux-low.c (new_inferior): New global variable.
15618 (linux_create_inferior, linux_attach): Set it.
15619 (linux_wait_for_process): Call the_low_target.arch_setup after the
15620 target has stopped for the first time.
15621 (initialize_low): Do not call the_low_target.arch_setup.
15622
15623 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15624 (s390_set_pc): Likewise.
15625 (s390_arch_setup): New function.
15626 (the_low_target): Use s390_arch_setup as arch_setup routine.
15627
15628 * regcache.c (realloc_register_cache): New function.
15629 (set_register_cache): Call it for each existing regcache.
15630
d05b4ac3
UW
156312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15632
15633 * server.h (init_registers): Remove prototype.
15634
15635 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15636 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15637 instead of init_registers ().
15638 * linux-arm-low.c (init_registers_arm): Add prototype.
15639 (init_registers_arm_with_iwmmxt): Likewise.
15640 (the_low_target): Add initializer for arch_setup field.
15641 * linux-cris-low.c (init_registers_cris): Add prototype.
15642 (the_low_target): Add initializer for arch_setup field.
15643 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15644 (the_low_target): Add initializer for arch_setup field.
15645 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15646 (the_low_target): Add initializer for arch_setup field.
15647 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15648 (the_low_target): Add initializer for arch_setup field.
15649 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15650 (the_low_target): Add initializer for arch_setup field.
15651 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15652 (the_low_target): Add initializer for arch_setup field.
15653 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15654 (init_registers_mips64_linux): Likewise.
15655 (the_low_target): Add initializer for arch_setup field.
15656 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15657 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15658 (the_low_target): Add initializer for arch_setup field.
15659 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15660 (init_registers_powerpc_64): Likewise.
15661 (the_low_target): Add initializer for arch_setup field.
15662 * linux-s390-low.c (init_registers_s390): Add prototype.
15663 (init_registers_s390x): Likewise.
15664 (the_low_target): Add initializer for arch_setup field.
15665 * linux-sh-low.c (init_registers_sh): Add prototype.
15666 (the_low_target): Add initializer for arch_setup field.
15667 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15668 (the_low_target): Add initializer for arch_setup field.
15669 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15670 (the_low_target): Add initializer for arch_setup field.
15671
15672 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15673 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15674 instead of init_registers ().
15675 * win32-arm-low.c (init_registers_arm): Add prototype.
15676 (the_low_target): Add initializer for arch_setup field.
15677 * win32-i386-low.c (init_registers_i386): Add prototype.
15678 (the_low_target): Add initializer for arch_setup field.
15679
15680 * spu-low.c (init_registers_spu): Add prototype.
15681 (initialize_low): Call initialie_registers_spu () instead of
15682 initialize_registers ().
15683
fd96d250
PA
156842008-02-19 Pedro Alves <pedro@codesourcery.com>
15685
15686 * server.c (handle_v_requests): When handling the vRun and vAttach
15687 packets, if already debugging a process, don't kill it. Return an
15688 error instead.
15689
d41b6bb4
DJ
156902008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15691
15692 * server.c (handle_query): Correct length check.
15693
5ac588cf
PA
156942008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15695
15696 * win32-low.c (do_initial_child_stuff): Add process handle
15697 parameter. Set current_process_handle and current_process_id from the
15698 parameters. Clear globals.
15699 (win32_create_inferior): Don't set current_process_handle and
15700 current_process_id here. Instead pass them on the call to
15701 do_initial_child_stuff.
15702 (win32_attach): Likewise.
15703 (win32_clear_inferiors): New.
15704 (win32_kill): Don't close the current process handle or the
15705 current thread handle here. Instead call win32_clear_inferiors.
15706 (win32_detach): Don't open a new handle to the process. Call
15707 win32_clear_inferiors.
15708 (win32_join): Don't rely on current_process_handle; open a new
15709 handle using the process id.
15710 (win32_wait): Call win32_clear_inferiors when the inferior process
15711 has exited.
15712
ecd7ecbc
DJ
157132008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15714
15715 * server.c (monitor_show_help): Add "exit".
15716
1525d545
MG
157172008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15718
ecd7ecbc 15719 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15720 (clean): Add reg-xtensa.c.
15721 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15722 * configure.srv (xtensa*-*-linux*) New target.
15723 * linux-xtensa-low.c: New.
15724 * xtensa-xtregs.c: New.
1525d545 15725
59a016f0
PA
157262008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15727
15728 * hostio.c: Don't include errno.h.
15729 (errno_to_fileio_errno): Move to hostio-errno.
15730 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15731 error number outputting to the target->hostio_last_error callback.
15732 (hostio_packet_error): Use FILEIO_EINVAL directly.
15733 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15734 calls to hostio_error.
15735 * hostio-errno.c: New.
15736 * server.h (hostio_last_error_from_errno): Declare.
15737 * target.h (target_ops): Add hostio_last_error member.
15738 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15739 as hostio_last_error handler.
889bf7c5 15740 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15741 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15742 (wince_hostio_last_error): New functions.
15743 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15744 as hostio_last_error handler.
15745 (win32_target_ops) [!_WIN32_WCE]: Register
15746 hostio_last_error_from_errno as hostio_last_error handler.
15747 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15748 (hostio-errno.o): New rule.
15749 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15750 * configure.srv (srv_hostio_err_objs): New variable. Default to
15751 hostio-errno.o.
15752 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15753 * configure: Regenerate.
15754
2d717e4f
DJ
157552008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15758 (linux_kill, linux_detach): Clean up the process list.
15759 * remote-utils.c (remote_open): Improve port number parsing.
15760 (putpkt_binary, input_interrupt): Only send interrupts if the target
15761 is running.
15762 * server.c (extended_protocol): Make static.
15763 (attached): Define earlier.
15764 (exit_requested, response_needed, program_argv): New variables.
15765 (target_running): New.
15766 (start_inferior): Clear attached here.
15767 (attach_inferior): Set attached here.
15768 (require_running): Define.
15769 (handle_query): Use require_running and target_running. Implement
15770 "monitor exit".
15771 (handle_v_attach, handle_v_run): New.
15772 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15773 (gdbserver_usage): Update.
15774 (main): Redo argument parsing. Handle --debug and --multi. Handle
15775 --attach along with other options or after the port. Save
15776 program_argv. Support no initial program. Resynchronize
15777 communication with GDB after an error. Handle "monitor exit".
15778 Use require_running and target_running. Always allow the extended
15779 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15780 restart in extended mode.
15781 * README: Refer to the GDB manual. Update --attach usage.
15782
7407e2de
AS
157832007-12-20 Andreas Schwab <schwab@suse.de>
15784
15785 * linux-low.c (STACK_SIZE): Define.
15786 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15787 (linux_test_for_tracefork): Likewise.
15788
b65d95c5
DJ
157892007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15790
15791 * linux-low.c (linux_wait_for_event): Update messages. Do not
15792 reinsert auto-delete breakpoints.
15793 * mem-break.c (struct breakpoint): Change return type of handler to
15794 int.
15795 (set_breakpoint_at): Update handler type.
15796 (reinsert_breakpoint_handler): Return 1 instead of calling
15797 delete_breakpoint.
15798 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15799 setting a new one.
15800 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15801 * mem-break.h (set_breakpoint_at): Update handler type.
15802 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15803 * win32-low.c (auto_delete_breakpoint): New.
15804 (get_child_debug_event): Use it.
15805
4e799345
DJ
158062007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15807
15808 * configure.ac: Check for pread and pwrite.
15809 * hostio.c (handle_pread): Fall back to lseek and read.
15810 (handle_pwrite): Fall back to lseek and write.
15811 * config.in, configure: Regenerated.
15812
27524b67
DJ
158132007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15814
15815 * server.c (myresume): Add own_buf argument.
15816 (main): Update calls.
15817
a20d5e98
DJ
158182007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15821 * remote-utils.c (remote_open): Do not call disable_async_io.
15822 (block_async_io): Delete.
15823 (unblock_async_io): Make static.
15824 (initialize_async_io): New.
15825 * server.c (handle_v_cont): Handle async I/O here.
15826 (myresume): Likewise. Move other common resume tasks here...
15827 (main): ... from here. Call initialize_async_io. Disable async
15828 I/O before the main loop.
15829 * server.h (initialize_async_io): Declare.
15830 (block_async_io, unblock_async_io): Delete prototypes.
15831 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15832
b79d787e
DJ
158332007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15834
15835 * remote-utils.c (readchar): Allow binary data in received messages.
15836
d97903b2
PA
158372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15838
15839 * win32-low.c (attaching): New global.
15840 (win32_create_inferior): Clear the `attaching' global.
15841 (win32_attach): Set the `attaching' global.
15842 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15843 attaching. Only set a breakpoint at the entry point if not
15844 attaching.
15845
311de423
PA
158462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15847
15848 * server.c (main): Don't report dll events on the initial
15849 connection on attaches.
15850
6c2d16d2
PA
158512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15852
15853 * server.c (main): Relax numerical bases supported for the pid of
15854 the --attach command line argument.
15855
5ca906e6
PA
158562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15857
15858 * win32-low.c (win32_attach): Call OpenProcess before
15859 DebugActiveProcess, not after. Add last error output to error
15860 call.
15861
9c6c8194
PA
158622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15863
15864 * win32-low.c (win32_get_thread_context)
15865 (win32_set_thread_context): New functions.
15866 (thread_rec): Use win32_get_thread_context.
15867 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15868 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15869 field.
15870
4d5d1aaa
PA
158712007-12-03 Leo Zayas
15872 Pedro Alves <pedro_alves@portugalmail.pt>
15873
15874 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15875 global variables.
15876 (child_add_thread): Minor cleanup.
15877 (child_continue): Resume artificially suspended threads before
15878 calling ContinueDebugEvent.
15879 (suspend_one_thread): New.
15880 (fake_breakpoint_event): New.
15881 (get_child_debug_event): Change return type to int. Check here if
15882 gdb sent an interrupt request. If a soft interrupt was requested,
15883 fake a breakpoint event. Return 0 if there is no event to handle,
15884 and 1 otherwise.
15885 (win32_wait): Don't check here if gdb sent an interrupt request.
15886 Ensure there is a valid event to handle.
15887 (win32_request_interrupt): Add soft interruption method as last
15888 resort.
15889
c436e841
PA
158902007-12-03 Leo Zayas
15891 Pedro Alves <pedro_alves@portugalmail.pt>
15892
15893 * win32-low.h (win32_thread_info): Add descriptions to the
15894 structure members. Replace `suspend_count' counter by a
15895 `suspended' flag.
15896 * win32-low.c (thread_rec): Update condition of when to get the
15897 context from the inferior. Rely on ContextFlags being set if it
15898 has already been retrieved. Only suspend the inferior thread if
15899 we haven't already. Warn if that fails.
15900 (continue_one_thread): s/suspend_count/suspended/. Only call
15901 ResumeThread once. Warn if that fails.
15902
e7b5fa67
PA
159032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15904
15905 * win32-low.c (win32_wait): Don't read from the inferior when it
15906 has already exited.
15907
a385171d
PA
159082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15909
15910 * Makefile.in (win32_low_h): New variable.
15911 (win32-low.o): Add dependency on $(win32_low_h).
15912 (win32-arm-low.o, win32-i386-low.o): New rules.
15913
f80c84b3
DJ
159142007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15915
15916 * hostio.c: Correct copyright year.
15917
a6b151f1
DJ
159182007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15919
15920 * Makefile.in (OBS): Add hostio.o.
15921 (hostio.o): New rule.
15922 * server.h (handle_vFile): Declare.
15923 * hostio.c: New file.
15924 * server.c (handle_v_requests): Take packet_len and new_packet_len
15925 for binary packets. Call handle_vFile.
15926 (main): Update call to handle_v_requests.
15927
f9387fc3
DJ
159282007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15929
15930 * linux-low.c: Include <sched.h>.
15931
51c2684e
DJ
159322007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15933
15934 * linux-low.c (linux_tracefork_grandchild): New.
15935 (linux_tracefork_child): Use clone.
15936 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15937
75f83163
JB
159382007-10-31 Joel Brobecker <brobecker@adacore.com>
15939
15940 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15941
da5898ce
DJ
159422007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15945
24a09b5f
DJ
159462007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15947
15948 * inferiors.c (change_inferior_id): Delete.
15949 (add_pid_to_list, pull_pid_from_list): New.
15950 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15951 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15952 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15953 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15954 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15955 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15956 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15957 (using_threads): Always set to 1.
15958 (handle_extended_wait): New.
15959 (add_process): Do not set TID.
15960 (linux_create_inferior): Set must_set_ptrace_flags.
15961 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15962 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15963 (linux_thread_alive): Rename TID argument to LWPID.
15964 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15965 (linux_wait_for_event): Do not use TID or check using_threads. Update
15966 call to dead_thread_notify. Call handle_extended_wait.
15967 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15968 (send_sigstop): Delete sigstop_sent.
15969 (wait_for_sigstop): Avoid TID.
15970 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15971 (linux_test_for_tracefork): New.
15972 (linux_lookup_signals): Use thread_db_active and
15973 linux_supports_tracefork_flag.
15974 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15975 * linux-low.h (get_process_thread): Avoid TID.
15976 (struct process_ifo): Move thread_known and tid to the end. Remove
15977 sigstop_sent.
15978 (linux_attach_lwp, thread_db_init): Update prototypes.
15979 * server.h (change_inferior_id): Delete prototype.
15980 (add_pid_to_list, pull_pid_from_list): New prototypes.
15981 * thread-db.c (thread_db_use_events): New.
15982 (find_first_thread): Rename to...
15983 (find_one_thread): ...this. Update callers and messages. Do not
15984 call fatal. Check thread_db_use_events. Do not call
15985 change_inferior_id or new_thread_notify.
15986 (maybe_attach_thread): Update. Do not call new_thread_notify.
15987 (thread_db_init): Set thread_db_use_events. Check use_events.
15988 * utils.c (fatal, warning): Correct message prefix.
15989
30ed0a8f
DJ
159902007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15991
15992 * Makefile.in (clean): Remove new files.
15993 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15994 (powerpc-64.o, powerpc-64.c): New rules.
15995 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15996 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15997 with SPE.
15998 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15999 SPE targets.
16000 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16001 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16002 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16003 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16004 (target_regsets): Add AltiVec and SPE register sets.
16005 * configure.ac: Check for AltiVec and SPE.
16006 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16007 (ppc_fill_vrregset, ppc_store_vrregset): New.
16008 (target_regsets): Add AltiVec register set.
16009 * configure: Regenerated.
16010
fd462a61
DJ
160112007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16012
16013 * linux-low.c (O_LARGEFILE): Define.
16014 (linux_read_memory): Use /proc/PID/mem.
16015 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16016 * configure, config.in: Regenerated.
16017
69f223ed
DJ
160182007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16019
16020 * linux-low.c (linux_wait_for_event): Do not pass signals while
16021 single-stepping.
16022
aec18585
PA
160232007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16024
16025 * win32-low.c (create_process): New.
16026 (win32_create_inferior): Use create_process instead of
16027 CreateProcess. If create_process failed retry appending an ".exe"
16028 suffix. Store the GetLastError result immediatelly after
16029 create_process calls and use it on the call to error.
16030
34d86ddd
PA
160312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16032
16033 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16034
5a0e3bd0
JB
160352007-08-23 Joel Brobecker <brobecker@adacore.com>
16036
16037 * configure.ac: Switch license to GPLv3.
16038
f88c79e6
MS
160392007-08-01 Michael Snyder <msnyder@access-company.com>
16040
16041 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16042
6b3d9b83
PA
160432007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16044
16045 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16046 typedef.
16047 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16048 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16049 CloseToolhelp32Snapshot.
16050 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16051 CloseToolhelp32Snapshot.
16052
c588c53c
MS
160532007-07-27 Michael Snyder <michael.snyder@access-company.com>
16054
16055 * server.c (main): Check for inferior exit before main loop.
16056
aa0403d9
PA
160572007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16058
16059 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16060 instead of on tmp_desc.
16061
255e7678
DJ
160622007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16063 Daniel Jacobowitz <dan@codesourcery.com>
16064
16065 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16066 (add_thread): Minor cleanups.
16067 (clear_inferiors): Move lower in the file. Clear the DLL
16068 list.
16069 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16070 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16071 (xml_escape_text): New.
16072 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16073 for qSupported.
16074 (handle_v_cont): Report errors.
16075 (gdbserver_version): Update.
16076 (main): Correct size of own_buf. Do not report initial DLL events.
16077 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16078 (unloaded_dll, xml_escape_text): New.
16079 * win32-low.c (enum target_waitkind): Update comments.
16080 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16081 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16082 (win32_EnumProcessModules, win32_GetModuleInformation)
16083 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16084 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16085 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16086 (win32_Module32First, win32_Module32Next, load_toolhelp)
16087 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16088 (get_child_debug_event): Handle DLL events.
16089 (win32_wait): Likewise.
16090
0d37add9
DJ
160912007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16092
16093 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16094 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16095
45e2715e
PA
160962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16097
16098 * win32-low.c (handle_output_debug_string): Ignore event if not
16099 waiting.
16100
c5674cf1
PA
161012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16102
16103 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16104
2bbe3cc1
DJ
161052007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16106
16107 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16108
ae13219e
DJ
161092007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16110
16111 * inferiors.c (change_inferior_id): Add comment.
16112 * linux-low.c (check_removed_breakpoint): Add an early
16113 prototype. Improve debug output.
16114 (linux_attach): Doc update.
16115 (linux_detach_one_process, linux_detach): Clean up before releasing
16116 each process.
16117 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16118 * linux-low.h (struct process_info): Doc improvement.
16119 * mem-break.c (delete_all_breakpoints): New.
16120 * mem-break.h (delete_all_breakpoints): New prototype.
16121 * thread-db.c (find_first_thread): New.
16122 (thread_db_create_event): Call it instead of
16123 thread_db_find_new_threads. Clean up unused variables.
16124 (maybe_attach_thread): Remove first thread handling.
16125 (thread_db_find_new_threads): Use find_first_thread.
16126 (thread_db_get_tls_address): Likewise.
16127
4105de34
DJ
161282007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16129
16130 * thread-db.c (thread_db_find_new_threads): Add prototype.
16131 (thread_db_create_event): Check for the main thread before adding
16132 a new thread.
16133 (maybe_attach_thread): Only enable event reporting if TID == 0.
16134 (thread_db_get_tls_address): Check for new threads.
16135
2b876972
DJ
161362007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16137
16138 * linux-low.c (linux_create_inferior): Try execv before execvp.
16139 * spu-low.c (spu_create_inferior): Likewise.
16140
7a245884
DJ
161412007-06-13 Mike Frysinger <vapier@gentoo.org>
16142
16143 * linux-low.c (linux_create_inferior): Change execv to execvp.
16144 * spu-low.c (spu_create_inferior): Likewies.
16145
117ce543
DJ
161462007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16147
16148 * Makefile.in (clean): Clean new files instead of deleted ones.
16149 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16150 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16151 rules.
16152 * configure.srv: Specify XML files and new regformats for MIPS and
16153 MIPS64 GNU/Linux.
16154 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16155 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16156 an entry for the restart register.
16157 (mips_cannot_fetch_register, mips_cannot_store_register)
16158 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16159 register names to match the XML descriptions.
16160 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16161 restart register instead of $0.
16162
0e7f50da
UW
161632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16164 Markus Deuling <deuling@de.ibm.com>
16165
16166 * remote-utils.c (decode_xfer_write): New function.
16167 * server.h (decode_xfer_write): Add prototype.
16168 * server.c (handle_query): Add PACKET_LEN argument. Support
16169 qXfer:spu:read and qXfer:spu:write packets.
16170 (main): Pass packet_len to handle_query.
16171 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16172 * target.h (target_ops): Add qxfer_spu.
16173
374c1d38
UW
161742007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16175
16176 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16177 accessing non-seekable spufs files.
16178
bb63802a
UW
161792007-05-16 Markus Deuling <deuling@de.ibm.com>
16180
889bf7c5 16181 * server.c (handle_query): Add reply for qC packet.
bb63802a 16182
7390519e
PA
161832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16184 Leo Zayas <lerele@champenstudios@com>
16185
16186 * server.h (check_remote_input_interrupt_request): New function.
16187 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16188 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16189 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16190 (check_remote_input_interrupt_request): New function.
16191 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16192 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16193 winapi_GenerateConsoleCtrlEvent): New typedefs.
16194 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16195 to 250 ms.
16196 (win32_wait): Check for remote interrupt request
16197 with check_remote_input_interrupt_request.
16198 (win32_request_interrupt): New function.
16199 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16200
34b34921
PA
162012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16202
16203 * win32-low.c (debug_registers_changed,
16204 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16205 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16206 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16207 (thread_rec): Get context using the low target.
16208 (child_add_thread): Call thread_added on the low target,
16209 which does the same thing.
16210 (regptr): Delete.
16211 (do_initial_child_stuff): Remove debug registers references.
16212 Set context using the low target. Resume threads after
16213 setting the contexts.
16214 (child_continue): Remove dead variable. Remove debug
16215 registers references.
16216 (child_fetch_inferior_registers): Go through the low target.
16217 (do_child_store_inferior_registers): Remove.
16218 (child_store_inferior_registers): Go through the low target.
16219 (win32_resume): Remove debug registers references.
16220 Set context using the low target.
16221 (handle_exception): Change return type to void. Don't record
16222 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16223 first chance exception.
889bf7c5 16224 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16225 goto loop. Always return after waiting for debug event.
16226 (win32_wait): Convert to switch statement. Handle spurious
16227 events.
16228
16229 * win32-i386-low.c (debug_registers_changed,
16230 debug_registers_used): New.
16231 (initial_stuff): Rename to ...
16232 (i386_initial_stuff): ... this. Clear debug registers
16233 state variables.
16234 (store_debug_registers): Delete.
16235 (i386_get_thread_context): New.
16236 (load_debug_registers): Delete.
16237 (i386_set_thread_context): New.
16238 (i386_thread_added): New.
16239 (single_step): Rename to ...
16240 (i386_single_step): ... this.
16241 (do_fetch_inferior_registers): Rename to ...
16242 (i386_fetch_inferior_register): ... this.
16243 (i386_store_inferior_register): New.
16244 (the_low_target): Adapt to new interface.
16245
16246 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16247 (arm_get_thread_context): New.
16248 (arm_set_thread_context): New.
16249 (regptr): New.
16250 (do_fetch_inferior_registers): Rename to ...
16251 (arm_fetch_inferior_register): ... this.
16252 (arm_store_inferior_register): New.
16253 (arm_wince_breakpoint): Reimplement as unsigned long.
16254 (arm_wince_breakpoint_len): Define.
16255 (the_low_target): Adapt to new interface.
16256
16257 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16258 load_debug_registers. Add get_thread_context, set_thread_context,
16259 thread_added and store_inferior_register. Rename
16260 fetch_inferior_registers to fetch_inferior_register.
16261 (regptr): Remove declaration.
16262
dd6953e1
PA
162632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16264
16265 * linux-low.c (linux_detach): Change return type to int. Return 0.
16266 * spu-low.c (spu_detach): Likewise.
16267
444d6139
PA
162682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16269
16270 * target.h (target_ops): Change return type of detach to int.
16271 Add join.
16272 (join_inferior): New.
16273 * server.c (main): Don't skip detach support on mingw32.
16274 If the inferior doesn't support detaching return error.
16275 Call join_inferior instead of using waitpid.
16276 * linux-low.c (linux_join): New.
16277 (linux_target_op): Add linux_join.
16278 * spu-low.c (spu_join): New.
16279 (spu_target_ops): Add spu_join.
16280 * win32-low.c (win32_detach): Adapt to new interface.
16281 Reopen current_process_handle before detaching. Issue a child
16282 resume before detaching.
16283 (win32_join): New.
16284 (win32_target_op): Add win32_join.
16285
1d5315fe
PA
162862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16287
16288 * win32-low.c (win32-attach): Fix return value.
16289 * target.h (target_ops): Describe ATTACH return values.
16290
bf914831
PA
162912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16292
16293 * win32-low.c (GETPROCADDRESS): Define.
16294 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16295 (winapi_DebugSetProcessKillOnExit): Likewise.
16296 (win32_create_inferior): Force usage of ansi CreateProcessA.
16297 (win32_attach): Use GETPROCADDRESS.
16298 (win32_detach): Likewise.
16299
f72f3e60
PA
163002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16301
16302 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16303
ed50f18f
PA
163042007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16305
16306 * win32-low.c: Commit leftover changes from 2007-03-29.
16307
0c2ead7e
DJ
163082007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16309
16310 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16311 fields short instead of int. Add explicit padding.
16312 (i387_cache_to_fsave): Remove unnecessary casts.
16313 (i387_fsave_to_cache): Doc fix.
16314 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16315
73725ff3
DJ
163162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16317
16318 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16319 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16320
d99f33d8
PA
163212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16322
16323 * configure.srv (arm*-*-mingw32ce*): Move near the other
16324 arm targets.
16325
68070c10
PA
163262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16327
2482afc6 16328 * configure.ac: Add errno checking.
68070c10
PA
16329 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16330 sys/file.h and malloc.h.
16331 (AC_CHECK_DECLS): Add perror.
16332 (srv_mingwce): Handle.
2482afc6 16333 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16334 win32-i386-low.o to srv_tgtobj.
16335 (i[34567]86-*-mingw*): Likewise.
16336 (arm*-*-mingw32ce*): Add case.
16337 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16338 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16339 [__MINGW32CE__] (strerror): New function.
16340 [__MINGW32CE__] (errno): Define to GetLastError.
16341 [__MINGW32CE__] (COUNTOF): New macro.
16342 (remote_open): Remove extra close call.
16343 * mem-break.c (delete_breakpoint_at): New function.
16344 * mem-break.h (delete_breakpoint_at): Declare.
16345 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16346 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16347 [USE_WIN32API] (read, write): Add char* casts.
16348 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16349 * server.h: Include wincecompat.h on Windows CE.
16350 [HAVE_ERRNO_H]: Check.
16351 (perror): Declare if not declared.
16352 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16353 (perror_with_name): Remove errno declaration.
16354 * wincecompat.h: New.
16355 * wincecompat.c: New.
16356 * win32-low.h: New.
16357 * win32-arm-low.c: New.
16358 * win32-i386-low.c: New.
16359 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16360 (OUTMSG2): Make it safe.
16361 (_T): New macro.
16362 (COUNTOF): New macro.
16363 (NUM_REGS): Get it from the low target.
16364 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16365 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16366 (thread_rec): Let low target handle debug registers.
16367 (child_add_thread): Likewise.
16368 (child_init_thread_list): Likewise.
16369 (continue_one_thread): Likewise.
16370 (regptr): New.
16371 (do_child_fetch_inferior_registers): Move to ...
16372 * win32-i386-low.c: ... here, and rename to ...
16373 (do_fetch_inferior_registers): ... this.
889bf7c5 16374 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16375 Go through the low target.
16376 (do_child_store_inferior_registers): Use regptr.
16377 (strwinerror): New function.
16378 (win32_create_inferior): Handle Windows CE.
16379 Use strwinerror instead of strerror on Windows error
16380 codes. Add program to the error output.
16381 Don't close the main thread handle on Windows CE.
16382 (win32_attach): Use coredll.dll on Windows CE.
16383 (win32_kill): Close current process and current
16384 thread handles.
16385 (win32_detach): Use coredll.dll on Windows CE.
16386 (win32_resume): Let low target handle debug registers, and
16387 step request.
16388 (handle_exception): Add/Remove initial breakpoint. Avoid
16389 non-existant WSTOPSIG on Windows CE.
16390 (win32_read_inferior_memory): Cast to remove warning.
16391 (win32_arch_string): Go through the low target.
16392 (initialize_low): Call set_breakpoint_data with the low
16393 target's breakpoint.
16394 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16395 FOP_REGNUM, mappings): Move to ...
16396 * win32-i386-low.c: ... here.
16397 * win32-low.c (win32_thread_info): Move to ...
16398 * win32-low.h: ... here.
16399 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16400 win32-arm-low.c and wincecompat.c.
16401 (all:): Add $EXEEXT.
16402 (install-only:): Likewise.
16403 (gdbserver:): Likewise.
16404 (gdbreplay:): Likewise.
16405 * config.in: Regenerate.
16406 * configure: Regenerate.
16407
41093d81
PA
164082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16409
16410 * win32-low.c: Rename typedef thread_info to
16411 win32_thread_info throughout.
16412
544afa54
PA
164132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16414
16415 * win32-i386-low.c: Rename to ...
16416 * win32-low.c: ... this.
16417 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16418 * Makefile.in: Likewise.
16419
bce7165d
PA
164202007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16421
16422 * remote-utils.c (monitor_output): Constify msg parameter.
16423 * server.h (monitor_output): Likewise.
16424 * win32-i386-low.c (handle_output_debug_string): New.
16425 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16426 handle_output_debug_string.
16427 (get_child_debug_event): Likewise.
16428
506c7aa0
DJ
164292007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16430
16431 * server.c (main): Correct strtoul check.
16432
42c81e2a
DJ
164332007-03-27 Jon Ringle <jon@ringle.org>
16434
16435 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16436
9453113a
DJ
164372007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16438
16439 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16440
64a69107
DJ
164412007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16442
16443 * terminal.h: Check HAVE_SGTTY_H.
16444
164452007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16446
16447 * remote-utils.c (remote_open): Print out the assigned port number.
16448
c74d0ad8
DJ
164492007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16450
16451 * remote-utils.c (monitor_output): New function.
16452 * server.c (debug_threads): Define here.
16453 (monitor_show_help): New function.
16454 (handle_query): Handle qRcmd.
16455 (main): Do not handle 'd' packet.
16456 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16457 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16458 of debug_threads.
16459
de7c3b4a
PA
164602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16461
16462 * Makefile.in (EXEEXT): New.
16463 (clean): Use $(EXEEXT).
16464
ef57601b
PA
164652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16466
16467 * target.h (target_ops): Rename send_signal to request_interrupt,
16468 and remove enum target_signal parameter.
16469 * linux-low.c (linux_request_interrupt): Rename from
16470 linux_send_signal, and always send SIGINT.
16471 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16472 and always send SIGINT.
16473 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16474 of send_signal.
16475 (input_interrupt): Likewise.
16476
820f2bda
PA
164772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16478
16479 * server.c (get_features_xml): Check if target implemented
16480 arch_string.
16481 * win32-i386-low.c (win32_arch_string): New.
16482 (win32_target_ops): Add win32_arch_string as arch_string member.
16483
ab39bf24
UW
164842007-02-22 Markus Deuling <deuling@de.ibm.com>
16485
16486 * spu-low.c (spu_arch_string): New.
16487 (spu_target_ops): Add spu_arch_string.
16488
61ff6e04
DJ
164892007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16490
16491 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16492 * configure.ac: Do not check for terminal.h.
16493 * configure, config.in: Regenerated.
16494
fb1e4ffc
DJ
164952007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16496
16497 * Makefile.in (OBS): Add $(XML_BUILTIN).
16498 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16499 (clean): Update.
16500 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16501 (arm-with-iwmmxt.c): New.
16502 * config.in, configure: Regenerate.
16503 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16504 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16505 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16506 (arm*-*-linux*): Add iWMMXt and regset support.
16507 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16508 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16509 (arm_store_wmmxregset, target_regsets): New.
16510 * server.c (get_features_xml): Take annex argument. Check builtin
16511 XML documents.
16512 (handle_query): Handle multiple annexes.
16513
0f48aa01
DJ
165142007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16515
16516 * remote-utils.c [USE_WIN32API] (read, write): Define.
16517 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16518 write.
16519
23181151
DJ
165202007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16521
16522 * linux-i386-low.c (the_low_target): Set arch_string.
16523 * linux-x86-64-low.c (the_low_target): Likewise.
16524 * linux-low.c (linux_arch_string): New.
16525 (linux_target_ops): Add it.
16526 * linux-low.h (struct linux_target_ops): Add arch_string.
16527 * server.c (write_qxfer_response): Use const void * for DATA.
16528 (get_features_xml): New.
16529 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16530 * target.h (struct target_ops): Add arch_string method.
16531
9d606399
DJ
165322007-01-03 Denis Pilat <denis.pilat@st.com>
16533 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * linux-low.c (linux_kill): Handle being called with no threads.
16536 * win32-i386-low.c (win32_kill): Likewise.
16537 (get_child_debug_event): Clear current_process_handle.
16538
165392006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16540 Daniel Jacobowitz <dan@codesourcery.com>
16541
16542 * remote-utils.c (remote_open): Check the type of specified
16543 serial port devices before opening them.
16544 * server.c (main): Kill the inferior if an error occurs during
16545 the first remote_open.
16546
a5e13d24
DJ
165472006-12-05 Markus Deuling <deuling@de.ibm.com>
16548
16549 * README: Update supported targets.
16550
186947f7
DJ
165512006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16552
16553 * Makefile.in (clean): Remove reg-mips64.c.
16554 (reg-mips64.c, reg-mips64.o): New rules.
16555 * configure.srv: Handle mips64. Include regset support for mips.
16556 * linux-mips-low.c (union mips_register): New.
16557 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16558 (mips_breakpoint, mips_breakpoint_at): Use int.
16559 (mips_collect_register, mips_supply_register)
16560 (mips_collect_register_32bit, mips_supply_register_32bit)
16561 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16562 (mips_store_fpregset, target_regsets): New.
16563 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16564
a13e2c95
UW
165652006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16566
16567 * configure.srv: Add target "spu*-*-*".
16568 * Makefile.in (clean): Remove reg-spu.c.
16569 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16570 * spu-low.c: New file.
16571
cb7283db
DJ
165722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16573
16574 * configure.ac: Correct td_thr_tls_get_addr test.
16575 * configure: Regenerated.
16576
89be2091
DJ
165772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16578
16579 * linux-low.c (linux_wait_for_event): Reformat. Use the
16580 pass_signals array.
16581 * remote-utils.c (decode_address_to_semicolon): New.
16582 * server.c (pass_signals, handle_general_set): New.
16583 (handle_query): Mention QPassSignals for qSupported.
16584 (main): Call handle_general_set.
16585 * server.h (pass_signals, decode_address_to_semicolon): New.
16586
000ef4f0
DJ
165872006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16588
16589 * server.c (handle_query): Correct error handling for read_auxv.
16590
b7149293
UW
165912005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16592
16593 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16594 and srv_linux_thread_db to yes.
16595 * linux-s390-low.c (s390_fill_gregset): New function.
16596 (target_regsets): Define data structure.
16597
dae5f5cf
DJ
165982006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16599
16600 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16601 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16602 * config.in, configure: Regenerated.
16603 * inferiors.c (gdb_id_to_thread): New function.
16604 (gdb_id_to_thread_id): Use it.
16605 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16606 * linux-low.h (struct process_info): Add th member.
16607 (thread_db_get_tls_address): New prototype.
16608 * remote-utils.c (decode_address): Make non-static.
16609 * server.c (handle_query): Handle qGetTLSAddr.
16610 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16611 * target.h (struct target_ops): Add get_tls_address.
16612 * thread-db.c (maybe_attach_thread): Save the thread handle.
16613 (thread_db_get_tls_address): New.
16614
32ca6d61
DJ
166152006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16616
16617 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16618 (linux_resume_one_process): Take a siginfo_t *. Update all
16619 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16620 (struct pending_signals): Add a siginfo_t.
16621 (linux_wait_for_process): Always set last_status.
16622 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16623 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16624 * linux-low.h (struct process_info): Add last_status.
16625
5ffff7c1
DJ
166262006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16627
16628 * remote-utils.c (try_rle): New function.
16629 (putpkt_binary): Use it.
16630
8695c747
DJ
166312006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16632
16633 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16634 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16635 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16636 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16637 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16638 point registers.
16639
290fadea
RS
166402006-08-08 Richard Sandiford <richard@codesourcery.com>
16641
16642 * server.c (terminal_fd): New variable.
16643 (old_foreground_pgrp): Likewise.
16644 (restore_old_foreground_pgrp): New function.
16645 (start_inferior): Record the terminal file descriptor in terminal_fd
16646 and its original foreground group in old_foreground_pgrp. Register
16647 restore_old_foreground_pgrp with atexit().
16648
9f2e1e63
DJ
166492006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16650
16651 * server.c (handle_query): Correct qPart to qXfer.
16652
b80864fb
DJ
166532006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16654
16655 * configure.ac: Check for more headers which are missing on
16656 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16657 * configure.srv: Add Cygwin and mingw32.
16658 * remote-utils.c: Don't include headers unconditionally which
16659 are missing on mingw32. Include <winsock.h> for mingw32.
16660 (remote_open): Adjust for mingw32 support. Flush
16661 standard error after writing to it.
16662 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16663 (unblock_async_io, enable_async_io, disable_async_io)
16664 (readchar, getpkt): Update for Winsock support.
16665 (prepare_resume_reply): Expect a protocol signal number.
16666 * server.c: Disable <sys/wait.h> on mingw32.
16667 (start_inferior): Adjust for mingw32 support. Flush
16668 standard error after writing to it.
16669 (attach_inferior): Likewise. Use protocol signal
16670 numbers.
16671 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16672 and names.
16673 * win32-i386-low.c: New file.
16674 * Makefile.in (XM_CLIBS): Set.
16675 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16676 (win32-i386-low.o): New dependency rule.
16677 * linux-low.c (linux_wait): Use target signal numbers.
16678 * target.h (struct target_ops): Doc fix.
16679 * server.h (target_signal_to_name): New prototype.
16680 * gdbreplay.c: Don't include headers unconditionally which
16681 are missing on mingw32. Include <winsock.h> for mingw32.
16682 (remote_close, remote_open): Adjust for Winsock support.
16683 * configure, config.in: Regenerated.
16684
0876f84a
DJ
166852006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16686
16687 * server.c (decode_xfer_read, write_qxfer_response): New.
16688 (handle_query): Take a packet length argument. Handle
16689 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16690 the qSupported response.
16691 (main): Update call to handle_query.
16692
01f9e8fa
DJ
166932006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16694
16695 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16696 (putpkt_binary): Renamed from putpkt and adjusted for binary
16697 data.
16698 (putpkt): New wrapper for putpkt_binary.
16699 (readchar): Don't mask off the high bit.
16700 (decode_X_packet): New function.
16701 * server.c (main): Call putpkt_binary if a handler sets the packet
16702 length. Save the length of the incoming packet. Handle 'X'.
16703 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16704
be2a5f71
DJ
167052006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16706
16707 * server.c (handle_query): Handle qSupported.
16708
ea025f5f
DJ
167092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16710
16711 * remote-utils.c (all_symbols_looked_up): New variable.
16712 (look_up_one_symbol): Check it.
16713 * server.h (look_up_one_symbol): New declaration.
16714 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16715
9308fc88
DJ
167162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16717
16718 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16719 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16720 (PTRACE_GET_THREAD_AREA): Define.
16721 (ps_get_thread_area): New function.
16722
52fb6437
NS
167232006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16724
16725 * configure.srv (m68k*-*-uclinux*): New target.
16726 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16727 (linux_resume_one_process): Remove extraneous cast.
16728 (linux_read_offsets): New.
16729 (linux_target_op): Add linux_read_offsets on mmuless systems.
16730 * server.c (handle_query): Add qOffsets logic.
16731 * target.h (struct target_ops): Add read_offsets.
16732
21b0f40c
DJ
167332006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16734
16735 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16736 (PTRACE_GET_THREAD_AREA): Define.
16737 (ps_get_thread_area): New function.
16738 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16739 (linux-x86-64-low.o): Update.
16740
0050a760
DJ
167412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16742
16743 * configure.ac: Remove checks for prfpregset_t.
16744 * gdb_proc_service.h: New file.
16745 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16746 new "gdb_proc_service.h".
16747 * proc-service.c: Likewise.
16748 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16749 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16750 * Makefile.in (gdb_proc_service_h): Updated.
16751 * configure, config.in: Regenerated.
16752
b92a518e
DJ
167532006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16754
16755 * remote-utils.c (prepare_resume_reply): Move declaration
16756 of gdb_id_from_wait to the top of the block.
16757
545587ee
DJ
167582006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * linux-low.c (regsets_store_inferior_registers): Read the regset
16761 from the target before filling it.
16762
9db87ebd
DJ
167632006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16764
16765 * server.c (attach_inferior): Return SIGTRAP for a successful
16766 attach.
16767
dd24457d
DJ
167682006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * Makefile.in (OBS): Add version.o.
16771 (STAGESTUFF): Delete.
16772 (version.o): Add dependencies.
16773 (version.c): Replace rule.
16774 (clean): Remove version.c.
16775 * server.c (gdbserver_version): New.
16776 (gdbserver_usage): Use printf.
16777 (main): Handle --version and --help.
16778 * server.h (version, host_name): Add declarations.
16779
6f0f660e
EZ
167802005-12-23 Eli Zaretskii <eliz@gnu.org>
16781
889bf7c5
PA
16782 * linux-arm-low.c:
16783 * linux-arm-low.c:
16784 * inferiors.c:
16785 * i387-fp.h:
16786 * i387-fp.c:
16787 * gdbreplay.c:
16788 * regcache.c:
16789 * proc-service.c:
16790 * mem-break.h:
16791 * mem-break.c:
16792 * linux-x86-64-low.c:
16793 * linux-sh-low.c:
16794 * linux-s390-low.c:
16795 * linux-ppc64-low.c:
16796 * linux-ppc-low.c:
16797 * linux-mips-low.c:
16798 * linux-m68k-low.c:
16799 * linux-m32r-low.c:
16800 * linux-low.h:
16801 * linux-low.c:
16802 * linux-ia64-low.c:
16803 * linux-i386-low.c:
16804 * linux-crisv32-low.c:
16805 * thread-db.c:
16806 * terminal.h:
16807 * target.h:
16808 * target.c:
16809 * server.h:
16810 * server.c:
16811 * remote-utils.c:
16812 * regcache.h:
16813 * utils.c:
16814 * Makefile.in:
16815 * configure.ac:
6f0f660e
EZ
16816 * gdbserver.1: Add (C) after Copyright. Update the FSF
16817 address.
16818
9d1fb177
DJ
168192005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16820
16821 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16822 (arm_breakpoint_at): Recognize both breakpoints.
16823 (the_low_target): Use the correct breakpoint instruction.
16824
011a70c2
DJ
168252005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16826
16827 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16828 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16829 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16830 (the_low_target): Update.
16831
7fb85e41
AS
168322005-10-25 Andreas Schwab <schwab@suse.de>
16833
16834 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16835
16836 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16837 (ia64_num_regs): Reduce to 462.
16838
3db0444b
DJ
168392005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16840
16841 * acinclude.m4: Correct quoting.
16842 * aclocal.m4: Regenerated.
16843
16844 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16845 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16846 (thread_db_init): Call thread_db_err_str.
16847 * configure.ac: Check for TD_VERSION.
16848 * config.in, configure: Regenerated.
16849
bee0189a
DJ
168502005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16851
16852 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16853
e9d25b98
DJ
168542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16855
16856 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16857 is not available. Define HAVE_PTRACE_GETREGS if it is.
16858 * config.in, configure: Regenerated.
16859 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16860 * linux-i386-low.c, linux-m68k-low.c: Update to use
16861 HAVE_PTRACE_GETREGS.
16862 * linux-low.c (regsets_fetch_inferior_registers)
16863 (regsets_store_inferior_registers): Only return 0 if we processed
16864 GENERAL_REGS.
16865 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16866 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16867
a06660f7
DJ
168682005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16869
16870 * inferiors.c (struct thread_info): Add gdb_id.
16871 (add_thread): Add gdb_id argument.
16872 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16873 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16874 calls to add_thread.
16875 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16876 * server.c (handle_query): Use thread_to_gdb_id.
16877 (handle_v_cont, main): Use gdb_id_to_thread_id.
16878 * server.h (add_thread): Update prototype.
16879 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16880 prototypes.
16881
5a1f5858
DJ
168822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16883
16884 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16885 left-padded registers.
16886 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16887 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16888
e122f1f5
SE
168892005-07-01 Steve Ellcey <sje@cup.hp.com>
16890
16891 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16892 * configure: Regenerate.
16893 * config.in: Regenerate.
16894 * server.h (NEED_DECLARATION_STRERROR):
16895 Replace with !HAVE_DECL_STRERROR.
16896
d592fa2f
DJ
168972005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16898
16899 * linux-low.c (linux_wait, linux_send_signal): Don't test
16900 an unsigned long variable for > 0 if it could be MAX_ULONG.
16901 * server.c (myresume): Likewise.
16902 * target.c (set_desired_inferior): Likewise.
16903
ccbd4912
MK
169042005-06-13 Mark Kettenis <kettenis@gnu.org>
16905
16906 * configure.ac: Simplify and improve check for socklen_t.
16907 * configure, config.in: Regenerate.
16908
f450004a
DJ
169092005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16910
16911 * acconfig.h: Remove.
16912 * configure.ac: Add a test for socklen_t. Use three-argument
16913 AC_DEFINE throughout.
16914 * config.in: Regenerated using autoheader 2.59.
16915 * configure: Regenerated.
16916
16917 * gdbreplay.c (socklen_t): Provide a default.
16918 (remote_open): Use socklen_t.
16919 * remote-utils.c (socklen_t): Provide a default.
16920 (remote_open): Use socklen_t.
16921 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16922 unsigned char.
16923
16924 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16925 char for buffers.
16926 * linux-low.c (linux_read_memory, linux_write_memory)
16927 (linux_read_auxv): Likewise.
16928 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16929 (check_mem_write): Likewise.
16930 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16931 Likewise.
16932 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16933 (registers_from_string, register_data): Likewise.
16934 * server.c (handle_query, main): Likewise.
16935 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16936 (decode_M_packet): Likewise.
16937 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16938 * target.h (struct target_ops): Update read_memory, write_memory,
16939 and read_auxv.
16940 (read_inferior_memory, write_inferior_memory): Update.
16941 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16942 to unsigned char *.
16943 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16944 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16945 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16946 linux-s390-low.c, linux-sh-low.c: Update for changes in
16947 read_inferior_memory and the_low_target->breakpoint.
16948
eee84df1
DJ
169492005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16950
16951 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16952 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16953 * configure.srv: Add powerpc64-*-linux*.
16954 * linux-ppc64-low.c: New file.
16955
45b134e5
OF
169562005-05-23 Orjan Friberg <orjanf@axis.com>
16957
16958 * linux-cris-low.c: New file with support for CRIS.
16959 * linux-crisv32-low.c: Ditto for CRISv32.
16960 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16961 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16962 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16963 reg-crisv32.o, and reg-crisv32.c to make rules.
16964 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16965 recognized targets.
16966
48d93c75
UW
169672005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16968
16969 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16970 of sizeof (PTRACE_XFER_TYPE).
16971 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16972
e013ee27
OF
169732005-05-12 Orjan Friberg <orjanf@axis.com>
16974
889bf7c5 16975 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16976 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16977 pointers for hardware watchpoint support.
16978 * linux-low.h (struct linux_target_ops): Ditto.
16979 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16980 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16981 to linux_target_ops.
16982 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16983 reply packet.
16984 * server.c (main): Recognize 'Z' and 'z' packets.
16985
b0ded00b
UW
169862005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16987
16988 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16989 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16990 (the_low_target): Add new members.
16991
8643e2ad
DJ
169922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16993
16994 * proc-service.c (ps_lgetregs): Search all_processes instead of
16995 all_threads.
16996
fc620387
DJ
169972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16998
16999 * server.c (start_inferior): Change return type to int.
17000 (attach_inferior): Change sigptr to int *.
17001 (handle_v_cont, handle_v_requests): Change signal to int *.
17002 (main): Change signal to int.
17003
170042005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17005
17006 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17007 * configure.srv: Add m32r*-*-linux*.
17008 * linux-m32r-low.c: New file.
17009
e0e76420
DJ
170102005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17011
17012 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17013
a1928bad
DJ
170142005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17015
17016 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17017 Take unsigned long arguments for PIDs.
17018 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17019 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17020 (wait_for_sigstop, linux_resume_one_process)
17021 (regsets_fetch_inferior_registers, linux_send_signal)
17022 (linux_read_auxv): Likewise. Update the types of variables holding
17023 PIDs. Update format string specifiers.
17024 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17025 * remote-utils.c (prepare_resume_reply): Likewise.
17026 * server.c (cont_thread, general_thread, step_thread)
17027 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17028 unsigned long.
17029 (handle_query): Update format specifiers.
17030 (handle_v_cont, main): Use strtoul for thread IDs.
17031 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17032 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17033 (general_thread, step_thread, thread_from_wait)
17034 (old_thread_from_wait): Update.
17035 * target.h (struct thread_resume): Use unsigned long for THREAD.
17036 (struct target_ops): Use unsigned long for arguments to attach and
17037 thread_alive.
17038
dcdb98d2
DJ
170392005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17040
17041 * acinclude.m4: Include bfd/bfd.m4 directly.
17042 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17043 <agriffis@toolchain.org>.
17044 * aclocal.m4, configure: Regenerated.
17045
bec39cab
AC
170462005-01-07 Andrew Cagney <cagney@gnu.org>
17047
17048 * configure.ac: Rename configure.in, require autoconf 2.59.
17049 * configure: Re-generate.
17050
434c4c77
DJ
170512004-12-08 Daniel Jacobowitz <dan@debian.org>
17052
17053 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17054 LIBS when finished.
17055 * aclocal.m4: Regenerated.
17056 * configure: Regenerated.
17057
db1d3e1b
AS
170582004-11-21 Andreas Schwab <schwab@suse.de>
17059
17060 * linux-m68k-low.c (m68k_num_gregs): Define.
17061 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17062 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17063 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17064 (m68k_breakpoint_at): New. Add to the_low_target.
17065
17066 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17067 srv_linux_thread_db to yes.
17068
43360365
JB
170692004-10-20 Joel Brobecker <brobecker@gnat.com>
17070
17071 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17072 (ARCH_SET_FS): Likewise.
17073 (ARCH_GET_FS): Likewise.
17074 (ARCH_GET_GS): Likewise.
17075
fd500816
DJ
170762004-10-16 Daniel Jacobowitz <dan@debian.org>
17077
17078 * linux-i386-low.c (ps_get_thread_area): New.
17079 * linux-x86-64-low.c (ps_get_thread_area): New.
17080 * linux-low.c: Include <sys/syscall.h>.
17081 (linux_kill_one_process): Don't kill the first thread here.
17082 (linux_kill): Kill the first thread here.
17083 (kill_lwp): New function.
17084 (send_sigstop, linux_send_signal): Use it.
17085 * proc-service.c: Clean up #ifdefs.
17086 (fpregset_info): Delete.
17087 (ps_lgetregs): Update and enable implementation.
17088 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17089 implementations.
17090 * remote-utils.c (struct sym_cache, symbol_cache): New.
17091 (input_interrupt): Print a clearer message.
17092 (async_io_enabled): New variable.
17093 (enable_async_io, disable_async_io): Use it. Update comments.
17094 (look_up_one_symbol): Use the symbol cache.
17095 * thread-db.c (thread_db_look_up_symbols): New function.
17096 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17097
f6de3c42
DJ
170982004-10-16 Daniel Jacobowitz <dan@debian.org>
17099
17100 * configure.in: Test for -rdynamic.
17101 * configure: Regenerated.
17102 * Makefile (INTERNAL_LDFLAGS): New.
17103 (gdbserver, gdbreplay): Use it.
17104
2c0fc042
AC
171052004-09-02 Andrew Cagney <cagney@gnu.org>
17106
17107 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17108
075b3282
DJ
171092004-03-23 Daniel Jacobowitz <drow@mvista.com>
17110
17111 * linux-low.c (linux_wait): Clear all_processes list also.
17112
fa6a77dc
DJ
171132004-03-12 Daniel Jacobowitz <drow@mvista.com>
17114
17115 * linux-low.c: Include <errno.h>. Remove extern declaration of
17116 errno.
17117
6d782a97
DJ
171182004-03-12 Daniel Jacobowitz <drow@mvista.com>
17119
17120 * gdbreplay.c, server.h, utils.c: Update copyright years.
17121
3a7fb99b
DJ
171222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17123
17124 * server.c (main): Print child status or termination signal from
17125 variable 'signal', not 'sig'.
17126
c3e735a6
DJ
171272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17128
17129 * linux-low.c (linux_read_memory): Change return type to
17130 int. Check for and return error from ptrace().
17131 * target.c (read_inferior_memory): Change return type to int. Pass
17132 back return status from the_target->read_memory().
17133 * target.h (struct target_ops): Adapt *read_memory() prototype.
17134 Update comment.
17135 (read_inferior_memory): Adapt prototype.
17136 * server.c (main): Return an error packet if
17137 read_inferior_memory() returns an error.
17138
a59d1c82
DJ
171392004-03-04 Daniel Jacobowitz <drow@mvista.com>
17140
17141 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17142 Unify with other clean targets.
17143
dc3f8883
DJ
171442004-02-29 Daniel Jacobowitz <drow@mvista.com>
17145
17146 * server.c (handle_v_cont): Call set_desired_inferior.
17147
89a208da
DJ
171482004-02-29 Daniel Jacobowitz <drow@mvista.com>
17149
17150 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17151
62ea82f5
DJ
171522004-02-29 Daniel Jacobowitz <drow@mvista.com>
17153
17154 * linux-low.c (linux_wait): Unblock async I/O.
17155 (linux_resume): Block and enable async I/O.
17156 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17157 * server.h (block_async_io, unblock_async_io): Add prototypes.
17158
6910d122
DJ
171592004-02-29 Daniel Jacobowitz <drow@mvista.com>
17160
17161 * remote-utils.c (remote_open): Print a status notice after
17162 opening a TCP port.
17163 * server.c (attach_inferior): Print a status notice after
17164 attaching.
17165
171662004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17167
17168 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17169
c89dc5d4
DJ
171702004-02-26 Daniel Jacobowitz <drow@mvista.com>
17171
17172 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17173 error packet.
17174 * server.c, target.h: Update copyright years.
17175
4b8dad4a
RM
171762004-02-25 Roland McGrath <roland@redhat.com>
17177
17178 * target.h (struct target_ops): New member `read_auxv'.
17179 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17180 * linux-low.c (linux_read_auxv): New function.
17181 (linux_target_ops): Initialize `read_auxv' member to that.
17182
d7446758
JB
171832004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17184
17185 Committed by Jim Blandy <jimb@redhat.com>.
17186
17187 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17188 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17189 instead of GPR_SIZE to distiguish s390 and s390x targets.
17190
5544ad89
DJ
171912004-01-31 Daniel Jacobowitz <drow@mvista.com>
17192
17193 * linux-low.c: Update copyright year.
17194 (check_removed_breakpoint): Clear pending_is_breakpoint.
17195 (linux_set_resume_request, linux_queue_one_thread)
17196 (resume_status_pending_p): New functions.
17197 (linux_continue_one_thread): Use process->resume.
17198 (linux_resume): Only resume threads if there are no pending events.
17199 * linux-low.h (struct process_info): Add resume request
17200 pointer.
17201
2a68b70e
DJ
172022004-01-30 Daniel Jacobowitz <drow@mvista.com>
17203
17204 * regcache.c (new_register_cache): Clear the allocated register
17205 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17206
64386c31
DJ
172072003-10-13 Daniel Jacobowitz <drow@mvista.com>
17208
17209 * linux-low.c (linux_resume): Take a struct thread_resume *
17210 argument.
17211 (linux_wait): Update call.
17212 (resume_ptr): New static variable.
17213 (linux_continue_one_thread): Renamed from
17214 linux_continue_one_process. Use resume_ptr.
17215 (linux_resume): Use linux_continue_one_thread.
17216 * server.c (handle_v_cont, handle_v_requests): New functions.
17217 (myresume): New function.
17218 (main): Handle 'v' case.
17219 * target.h (struct thread_resume): New type.
17220 (struct target_ops): Change argument of "resume" to struct
17221 thread_resume *.
17222 (myresume): Delete macro.
17223
c938e9b0
L
172242003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17225
17226 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17227 (uninstall): Support DESTDIR.
17228
7f313d07
BC
17229Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17230
17231 * configure.srv: Add xscale*linux copy of arm*linux entry.
17232
3b2fc2ea
DJ
172332003-07-24 Daniel Jacobowitz <drow@mvista.com>
17234
17235 * linux-arm-low.c (arm_reinsert_addr): New function.
17236 (the_low_target): Add arm_reinsert_addr.
17237
1c0a559e
MK
172382003-07-08 Mark Kettenis <kettenis@gnu.org>
17239
17240 * mem-break.c: Remove whitespace at end of file.
17241
43d5792c
DJ
172422003-06-28 Daniel Jacobowitz <drow@mvista.com>
17243
17244 * configure.in: Check whether we need to prototype strerror.
17245 * server.h: Optionally prototype strerror.
17246 * gdbreplay.c (perror_with_name): Use strerror.
17247 * linux-low.c (linux_attach_lwp): Use strerror.
17248 * utils.c (perror_with_name): Use strerror.
17249 * config.in, configure: Regenerated.
17250
c8a86edf
DJ
172512003-06-28 Daniel Jacobowitz <drow@mvista.com>
17252
17253 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17254 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17255
73d37363
DJ
172562003-06-20 Daniel Jacobowitz <drow@mvista.com>
17257
17258 * Makefile.in (SFILES): Update.
17259 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17260 low-sun3.c: Remove files.
17261
6ad8ae5c
DJ
172622003-06-17 Daniel Jacobowitz <drow@mvista.com>
17263
17264 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17265 (linux_detach_one_process, linux_detach): New functions.
17266 (linux_target_ops): Add linux_detach.
17267 * server.c (main): Handle 'D' packet.
17268 * target.h (struct target_ops): Add "detach" member.
17269 (detach_inferior): Define.
17270
1581182a
MK
172712003-06-13 Mark Kettenis <kettenis@gnu.org>
17272
17273 From Kelley Cook <kelleycook@wideopenwest.com>:
17274 * configure.srv: Accept i[34567]86 variants.
17275
e5379b03
DJ
172762003-06-05 Daniel Jacobowitz <drow@mvista.com>
17277
17278 * linux-low.c (linux_wait_for_event): Correct comment typos.
17279 (linux_resume_one_process): Call check_removed_breakpoint.
17280 (linux_send_signal): New function.
17281 (linux_target_ops): Add linux_send_signal.
17282 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17283 of kill.
17284 * target.h (struct target_ops): Add send_signal.
17285
2ff29de4
JB
172862003-05-29 Jim Blandy <jimb@redhat.com>
17287
17288 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17289 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17290 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17291 away part of the register's value.
17292
254787d4
DJ
172932003-03-26 Daniel Jacobowitz <drow@mvista.com>
17294
17295 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17296 (linux_wait_for_event, linux_init_signals): Likewise.
17297
94e10508
DJ
172982003-03-17 Daniel Jacobowitz <drow@mvista.com>
17299
17300 * configure.in: Check for stdlib.h.
17301 * configure: Regenerated.
17302 * config.in: Regenerated.
17303
4c0711e0
DJ
173042003-01-04 Andreas Schwab <schwab@suse.de>
17305
17306 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17307
ef66e766
AC
173082003-01-02 Andrew Cagney <ac131313@redhat.com>
17309
17310 * Makefile.in: Remove obsolete code.
17311
a1358604
DJ
173122002-11-20 Daniel Jacobowitz <drow@mvista.com>
17313
17314 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17315 defined(PT_FPR0_HI).
17316
23ce3b1c
DJ
173172002-11-17 Stuart Hughes <seh@zee2.com>
17318
17319 * linux-arm-low.c (arm_num_regs): Increase.
17320 (arm_regmap): Include status register.
17321
173222002-11-17 Daniel Jacobowitz <drow@mvista.com>
17323
17324 * linux-low.c (register_addr): Remove incorrect -1 check.
17325
a9fa9f7d
DJ
173262002-08-29 Daniel Jacobowitz <drow@mvista.com>
17327
17328 * linux-low.c (linux_create_inferior): Call setpgid. Return
17329 the new PID.
17330 (unstopped_p, linux_signal_pid): Remove.
17331 (linux_target_ops): Remove linux_signal_pid.
17332 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17333 global instead of target method.
17334 * target.h (struct target_ops): Remove signal_pid. Update comment
17335 for create_inferior.
17336 * server.c (signal_pid): New variable.
17337 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17338 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17339 (attach_inferior): Set signal_pid.
17340
17574093
DJ
173412002-08-23 Daniel Jacobowitz <drow@mvista.com>
17342
17343 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17344
173452002-08-20 Jim Blandy <jimb@redhat.com>
17346
17347 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17348 default for this.
17349
173502002-08-01 Andrew Cagney <cagney@redhat.com>
17351
17352 * Makefile.in: Make chill references obsolete.
17353
173542002-07-24 Kevin Buettner <kevinb@redhat.com>
17355
17356 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17357 * configure: Regenerate.
17358 * config.in: Regenerate.
17359
173602002-07-09 David O'Brien <obrien@FreeBSD.org>
17361
17362 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17363 (perror_with_name, remote_close, remote_open, expect, play): Static.
17364
173652002-07-04 Michal Ludvig <mludvig@suse.cz>
17366
4b8dad4a 17367 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17368 byte offsets instead of an array of indexes.
17369 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17370
173712002-06-13 Daniel Jacobowitz <drow@mvista.com>
17372
17373 * regcache.c: Add comment.
17374
173752002-06-11 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * thread-db.c: New file.
17378 * proc-service.c: New file.
17379 * acinclude.m4: New file.
17380 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17381 proc-service.o, and thread-db.o.
17382 (linux-low.o): Add USE_THREAD_DB.
17383 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17384 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17385 * aclocal.m4: Regenerated.
17386 * config.in: Regenerated.
17387 * configure: Regenerated.
17388 * configure.in: Check for proc_service.h, sys/procfs.h,
17389 thread_db.h, and linux/elf.h headrs.
17390 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17391 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17392 Check for -lthread_db and thread support.
17393 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17394 PowerPC, and SuperH.
17395 * i387-fp.c: Constify arguments.
17396 * i387-fp.h: Likewise.
17397 * inferiors.c: (struct thread_info): Renamed from
17398 `struct inferior_info'. Remove PID member. Use generic inferior
17399 list header. All uses updated.
17400 (inferiors, signal_pid): Removed.
17401 (all_threads): New variable.
17402 (get_thread): Define.
17403 (add_inferior_to_list): New function.
17404 (for_each_inferior): New function.
17405 (change_inferior_id): New function.
17406 (add_inferior): Removed.
17407 (remove_inferior): New function.
17408 (add_thread): New function.
17409 (free_one_thread): New function.
17410 (remove_thread): New function.
17411 (clear_inferiors): Use for_each_inferior and free_one_thread.
17412 (find_inferior): New function.
17413 (find_inferior_id): New function.
17414 (inferior_target_data): Update argument type.
17415 (set_inferior_target_data): Likewise.
17416 (inferior_regcache_data): Likewise.
17417 (set_inferior_regcache_data): Likewise.
17418 * linux-low.c (linux_bp_reinsert): Remove.
17419 (all_processes, stopping_threads, using_thrads)
17420 (struct pending_signals, debug_threads, pid_of): New.
17421 (inferior_pid): Replace with macro.
17422 (struct inferior_linux_data): Remove.
17423 (get_stop_pc, add_process): New functions.
17424 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17425 Use add_process and add_thread.
17426 (linux_attach_lwp): New function, based on old linux_attach. Use
17427 add_process and add_thread. Set stop_expected for new threads.
17428 (linux_attach): New function.
17429 (linux_kill_one_process): New function.
17430 (linux_kill): Kill all LWPs.
17431 (linux_thread_alive): Use find_inferior_id.
17432 (check_removed_breakpoints, status_pending_p): New functions.
17433 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17434 Update. Use WNOHANG. Wait for cloned processes also. Update process
17435 struct for the found process.
17436 (linux_wait_for_event): New function.
17437 (linux_wait): Use it. Support LWPs.
17438 (send_sigstop, wait_for_sigstop, stop_all_processes)
17439 (linux_resume_one_process, linux_continue_one_process): New functions.
17440 (linux_resume): Support LWPs.
17441 (REGISTER_RAW_SIZE): Remove.
17442 (fetch_register): Use register_size instead. Call supply_register.
17443 (usr_store_inferior_registers): Likewise. Call collect_register.
17444 Fix recursive case.
17445 (regsets_fetch_inferior_registers): Improve error message.
17446 (regsets_store_inferior_registers): Add debugging.
17447 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17448 (unstopped_p, linux_signal_pid): New functions.
17449 (linux_target_ops): Add linux_signal_pid.
17450 (linux_init_signals): New function.
17451 (initialize_low): Call it. Initialize using_threads.
17452 * regcache.c (inferior_regcache_data): Add valid
17453 flag.
17454 (get_regcache): Fetch registers lazily. Add fetch argument
17455 and update all callers.
17456 (regcache_invalidate_one, regcache_invalidate): New
17457 functions.
17458 (new_register_cache): Renamed from create_register_cache.
17459 Return the new regcache.
17460 (free_register_cache): Change argument to a void *.
17461 (registers_to_string, registers_from_string): Call get_regcache
17462 with fetch flag set.
17463 (register_data): Make static. Pass fetch flag to get_regcache.
17464 (supply_register): Call get_regcache with fetch flag clear.
17465 (collect_register): Call get_regcache with fetch flag set.
17466 (collect_register_as_string): New function.
17467 * regcache.h: Update.
17468 * remote-utils.c (putpkt): Flush after debug output and use
17469 stderr.
17470 Handle input interrupts while waiting for an ACK.
17471 (input_interrupt): Use signal_pid method.
17472 (getpkt): Flush after debug output and use stderr.
17473 (outreg): Use collect_register_as_string.
17474 (new_thread_notify, dead_thread_notify): New functions.
17475 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17476 and general_thread.
17477 (look_up_one_symbol): Flush after debug output.
17478 * server.c (step_thread, server_waiting): New variables.
17479 (start_inferior): Don't use signal_pid. Update call to mywait.
17480 (attach_inferior): Update call to mywait.
17481 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17482 (main): Don't fetch/store registers explicitly. Use
17483 set_desired_inferior. Support proposed ``Hs'' packet. Update
17484 calls to mywait.
17485 * server.h: Update.
17486 (struct inferior_list, struct_inferior_list_entry): New.
17487 * target.c (set_desired_inferior): New.
17488 (write_inferior_memory): Constify.
17489 (mywait): New function.
17490 * target.h: Update.
17491 (struct target_ops): New signal_pid method.
17492 (mywait): Removed macro, added prototype.
17493
17494 * linux-low.h (regset_func): Removed.
17495 (regset_fill_func, regset_store_func): New.
17496 (enum regset_type): New.
17497 (struct regset_info): Add type field. Use new operation types.
17498 (struct linux_target_ops): stop_pc renamed to get_pc.
17499 Add decr_pc_after_break and breakpoint_at.
17500 (get_process, get_thread_proess, get_process_thread)
17501 (strut process_info, all_processes, linux_attach_lwp)
17502 (thread_db_init): New.
17503
17504 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17505 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17506 (the_low_target): Add new members.
17507 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17508 (i386_store_fpxregset): Constify.
17509 (target_regsets): Add new kind identifier.
17510 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17511 (i386_set_pc): Add debugging.
17512 (i386_breakpoint_at): New function.
17513 (the_low_target): Add new members.
17514 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17515 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17516 (mips_breakpoint_at): New.
17517 (the_low_target): Add new members.
17518 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17519 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17520 (the_low_target): Add new members.
17521 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17522 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17523 (the_low_target): Add new members.
17524 * linux-x86-64-low.c (target_regsets): Add new kind
17525 identifier.
17526
175272002-05-15 Daniel Jacobowitz <drow@mvista.com>
17528
17529 From Martin Pool <mbp@samba.org>:
17530 * server.c (gdbserver_usage): New function.
17531 (main): Call it.
17532
175332002-05-14 Daniel Jacobowitz <drow@mvista.com>
17534
17535 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17536 stop_at -> stop_pc.
17537
175382002-05-04 Andrew Cagney <ac131313@redhat.com>
17539
17540 * Makefile.in: Remove obsolete code.
17541
175422002-04-24 Michal Ludvig <mludvig@suse.cz>
17543
17544 * linux-low.c (regsets_fetch_inferior_registers),
17545 (regsets_store_inferior_registers): Removed cast to int from
17546 ptrace() calls.
17547 * regcache.h: Added declaration of struct inferior_info.
17548
175492002-04-20 Daniel Jacobowitz <drow@mvista.com>
17550
17551 * inferiors.c (struct inferior_info): Add regcache_data.
17552 (add_inferior): Call create_register_cache.
17553 (clear_inferiors): Call free_register_cache.
17554 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17555 * regcache.c (struct inferior_regcache_data): New.
17556 (registers): Remove.
17557 (get_regcache): New function.
17558 (create_register_cache, free_register_cache): New functions.
17559 (set_register_cache): Don't initialize the register cache here.
17560 (registers_to_string, registers_from_string, register_data): Call
17561 get_regcache.
17562 * regcache.h: Add prototypes.
17563 * server.h: Likewise.
17564
175652002-04-20 Daniel Jacobowitz <drow@mvista.com>
17566
17567 * mem-break.c: New file.
17568 * mem-break.h: New file.
17569 * Makefile.in: Add mem-break.o rule; update server.h
17570 dependencies.
17571 * inferiors.c (struct inferior_info): Add target_data
17572 member.
17573 (clear_inferiors): Free target_data member if set.
17574 (inferior_target_data, set_inferior_target_data): New functions.
17575 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17576 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17577 * linux-low.c (linux_bp_reinsert): New variable.
17578 (struct inferior_linux_data): New.
17579 (linux_create_inferior): Use set_inferior_target_data.
17580 (linux_attach): Likewise. Call add_inferior.
17581 (linux_wait_for_one_inferior): New function.
17582 (linux_wait): Call it.
17583 (linux_write_memory): Add const.
17584 (initialize_low): Call set_breakpoint_data.
17585 * linux-low.h (struct linux_target_ops): Add breakpoint
17586 handling members.
17587 * server.c (attach_inferior): Remove extra add_inferior
17588 call.
17589 * server.h: Include mem-break.h. Update inferior.c
17590 prototypes.
17591 * target.c (read_inferior_memory)
17592 (write_inferior_memory): New functions.
17593 * target.h (read_inferior_memory)
17594 (write_inferior_memory): Change macros to prototypes.
17595 (struct target_ops): Update comments. Add const to write_memory
17596 definition.
17597
175982002-04-11 Daniel Jacobowitz <drow@mvista.com>
17599
17600 * linux-low.c (usr_store_inferior_registers): Support
17601 registers which are allowed to fail to store.
17602 * linux-low.h (linux_target_ops): Likewise.
17603 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17604 (ppc_cannot_store_register): FPSCR may not be storable.
17605
176062002-04-09 Daniel Jacobowitz <drow@mvista.com>
17607
17608 * server.h: Include <string.h> if HAVE_STRING_H.
17609 * ChangeLog: Correct paths in last ChangeLog entry.
17610
176112002-04-09 Daniel Jacobowitz <drow@mvista.com>
17612
17613 * linux-low.h: Remove obsolete prototypes.
17614 (struct linux_target_ops): New.
17615 (extern the_low_target): New.
17616 * linux-low.c (num_regs, regmap): Remove declarations.
17617 (register_addr): Use the_low_target explicitly.
17618 (fetch_register): Likewise.
17619 (usr_fetch_inferior_registers): Likewise.
17620 (usr_store_inferior_registers): Likewise.
17621 * linux-arm-low.c (num_regs): Remove.
17622 (arm_num_regs): Define.
17623 (arm_regmap): Renamed from regmap, made static.
17624 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17625 made static.
17626 (arm_cannot_store_register): Renamed from cannot_store_register,
17627 made static.
17628 (the_low_target): New.
17629 * linux-i386-low.c (num_regs): Remove.
17630 (i386_num_regs): Define.
17631 (i386_regmap): Renamed from regmap, made static.
17632 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17633 made static.
17634 (i386_cannot_store_register): Renamed from cannot_store_register,
17635 made static.
17636 (the_low_target): New.
17637 * linux-ia64-low.c (num_regs): Remove.
17638 (ia64_num_regs): Define.
17639 (ia64_regmap): Renamed from regmap, made static.
17640 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17641 made static.
17642 (ia64_cannot_store_register): Renamed from cannot_store_register,
17643 made static.
17644 (the_low_target): New.
17645 * linux-m68k-low.c (num_regs): Remove.
17646 (m68k_num_regs): Define.
17647 (m68k_regmap): Renamed from regmap, made static.
17648 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17649 made static.
17650 (m68k_cannot_store_register): Renamed from cannot_store_register,
17651 made static.
17652 (the_low_target): New.
17653 * linux-mips-low.c (num_regs): Remove.
17654 (mips_num_regs): Define.
17655 (mips_regmap): Renamed from regmap, made static.
17656 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17657 made static.
17658 (mips_cannot_store_register): Renamed from cannot_store_register,
17659 made static.
17660 (the_low_target): New.
17661 * linux-ppc-low.c (num_regs): Remove.
17662 (ppc_num_regs): Define.
17663 (ppc_regmap): Renamed from regmap, made static.
17664 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17665 made static.
17666 (ppc_cannot_store_register): Renamed from cannot_store_register,
17667 made static.
17668 (the_low_target): New.
17669 * linux-s390-low.c (num_regs): Remove.
17670 (s390_num_regs): Define.
17671 (s390_regmap): Renamed from regmap, made static.
17672 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17673 made static.
17674 (s390_cannot_store_register): Renamed from cannot_store_register,
17675 made static.
17676 (the_low_target): New.
17677 * linux-sh-low.c (num_regs): Remove.
17678 (sh_num_regs): Define.
17679 (sh_regmap): Renamed from regmap, made static.
17680 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17681 made static.
17682 (sh_cannot_store_register): Renamed from cannot_store_register,
17683 made static.
17684 (the_low_target): New.
17685 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17686 (the_low_target): New.
17687
176882002-04-09 Daniel Jacobowitz <drow@mvista.com>
17689
17690 * Makefile.in: Add stamp-h target.
17691 * configure.in: Create stamp-h.
17692 * configure: Regenerated.
17693
176942002-04-09 Daniel Jacobowitz <drow@mvista.com>
17695
17696 * inferiors.c: New file.
17697 * target.c: New file.
17698 * target.h: New file.
17699 * Makefile.in: Add target.o and inferiors.o. Update
17700 dependencies.
17701 * linux-low.c (inferior_pid): New static variable,
17702 moved from server.c.
17703 (linux_create_inferior): Renamed from create_inferior.
17704 Call add_inferior. Return 0 on success instead of a PID.
17705 (linux_attach): Renamed from myattach.
17706 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17707 (linux_thread_alive): Renamed from mythread_alive.
17708 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17709 child dies.
17710 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17711 (regsets_store_inferior_registers): Correct error message.
17712 Add missing ``return 0''.
17713 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17714 (linux_store_registers): Renamed from store_inferior_registers.
17715 (linux_read_memory): Renamed from read_inferior_memory.
17716 (linux_write_memory): Renamed from write_inferior_memory.
17717 (linux_target_ops): New structure.
17718 (initialize_low): Call set_target_ops ().
17719 * remote-utils.c (unhexify): New function.
17720 (hexify): New function.
17721 (input_interrupt): Send signals to ``signal_pid''.
17722 * server.c (inferior_pid): Remove.
17723 (start_inferior): Update create_inferior call.
17724 (attach_inferior): Call add_inferior.
17725 (handle_query): New function.
17726 (main): Call handle_query for `q' packets.
17727 * server.h: Include "target.h". Remove obsolete prototypes.
17728 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17729
177302002-04-09 Daniel Jacobowitz <drow@mvista.com>
17731
17732 * Makefile.in: Add WARN_CFLAGS. Update configury
17733 dependencies.
17734 * configure.in: Check for <string.h>
17735 * configure: Regenerate.
17736 * config.in: Regenerate.
17737 * gdbreplay.c: Include needed system headers.
17738 (remote_open): Remove strchr prototype.
17739 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17740 * regcache.c (supply_register): Change buf argument to const void *.
17741 (supply_register_by_name): Likewise.
17742 (collect_register): Change buf argument to void *.
17743 (collect_register_by_name): Likewise.
17744 * regcache.h: Add missing prototypes.
17745 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17746 * server.c (handle_query): New function.
17747 (attached): New static variable, moved out of main.
17748 (main): Quiet longjmp clobber warnings.
17749 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17750 * utils.c (error): Remove NORETURN.
17751 (fatal): Likewise.
This page took 2.231852 seconds and 4 git commands to generate.