]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[ARM, thumb] Fix disassembling bug after reloading a symbol file
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e7e97a2e
CB
12019-10-31 Christian Biesinger <cbiesinger@google.com>
2
3 * config.in: Regenerate.
4 * configure: Regenerate.
5 * configure.ac: Also check for strerror_r.
6
75cafaa6
CB
72019-10-31 Christian Biesinger <cbiesinger@google.com>
8
9 * ax.h (debug_agent): Remove duplicate declaration.
10
30baf67b
TV
112019-10-26 Tom de Vries <tdevries@suse.de>
12
13 * linux-aarch64-low.c: Fix typos in comments.
14 * linux-arm-low.c: Same.
15 * linux-low.c: Same.
16 * linux-ppc-low.c: Same.
17 * proc-service.c: Same.
18 * regcache.h: Same.
19 * server.c: Same.
20 * tracepoint.c: Same.
21 * win32-low.c: Same.
22
52c64cf7
TT
232019-10-25 Tom Tromey <tromey@adacore.com>
24
25 * utils.c (xstrdup): Remove.
26
c12d372d
TT
272019-10-23 Tom Tromey <tom@tromey.com>
28
29 * configure, config.in: Rebuild.
30
4d0b984b
TT
312019-10-23 Tom Tromey <tom@tromey.com>
32
33 * configure: Rebuild.
34 * acinclude.m4: Use m4_include, not sinclude.
35
c5adaa19
TT
362019-10-17 Tom Tromey <tromey@adacore.com>
37
38 * configure: Rebuild.
39 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
40 in AC_CONFIG_FILES invocation.
41 * Makefile.in (stamp-h, Makefile): Use new-style config.status
42 invocation.
43
fec4e896
CB
442019-10-16 Christian Biesinger <cbiesinger@google.com>
45
46 * server.c: Include xml-builtin.h.
47 (get_xml_features): Don't declare xml_builtins here.
48
00975ff6
AB
492019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
50
51 * Makefile.in: Remove references to vec-ipa.o.
52
0dc32745
AB
532019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
54
55 * Makefile.in: Remove references to vec.c.
56
3e6ec53a
CB
572019-10-02 Christian Biesinger <cbiesinger@google.com>
58
59 * server.c (server_waiting): Change to bool.
60 (extended_protocol): Likewise.
61 (response_needed): Likewise.
62 (exit_requested): Likewise.
63 (run_once): Likewise.
64 (report_no_resumed): Likewise.
65 (non_stop): Likewise.
66 (disable_packet_vCont): Likewise.
67 (disable_packet_Tthread): Likewise.
68 (disable_packet_qC): Likewise.
69 (disable_packet_qfThreadInfo): Likewise.
70 (handle_general_set): Update.
71 (handle_detach): Update.
72 (handle_monitor_command): Update.
73 (handle_query): Update.
74 (captured_main): Update.
75 (process_serial_event): Update.
76 * server.h (server_waiting): Change to bool.
77 (disable_packet_vCont): Likewise.
78 (disable_packet_Tthread): Likewise.
79 (disable_packet_qC): Likewise.
80 (disable_packet_qfThreadInfo): Likewise.
81 (run_once): Likewise.
82 (non_stop): Likewise.
83 * target.c (target_stop_and_wait): Update.
84
80fd2826
TT
852019-10-02 Tom Tromey <tromey@adacore.com>
86
87 * Makefile.in (SFILES): Add common-inferior.c.
88 (OBS): Add common-inferior.o.
89 * server.c (startup_with_shell): Don't define.
90
46f29a9a
AB
912019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
92
93 * linux-low.c (linux_low_read_btrace): Update for change to
94 std::vector.
95
f9d949fb
CB
962019-09-20 Christian Biesinger <cbiesinger@google.com>
97
98 * debug.c (debug_threads): Remove comment in favor of the header.
99 * debug.h (using_threads): Add declaration.
100 (debug_threads): Add comment.
101 * linux-aarch64-low.c: Include debug.h and remove declaration of
102 debug_threads.
103 * nto-low.c: Likewise.
104 * remote-utils.c: Likewise.
105 * thread-db.c: Likewise.
106
abf516c6
UW
1072019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
108
109 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
110 and powerpc-cell64l-ipa.o.
111 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
112 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
113 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
114 (spu*-*-*): Remove.
115
116 * spu-low.c: Remove file.
117
118 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
119 (parse_spufs_run): Remove.
120 (ppc_get_pc): Remove Cell/B.E. support.
121 (ppc_set_pc): Likewise.
122 (ppc_breakpoint_at): Likewise.
123 (ppc_arch_setup): Likewise.
124 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
125 tdesc_powerpc_cell32l.
126 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
127 or init_registers_powerpc_cell32l.
128 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
129 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
130 or init_registers_powerpc_cell32l.
131 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
132 (init_registers_powerpc_cell32l): Remove prototype.
133 (init_registers_powerpc_cell64l): Likewise.
134
135 * target.h (struct target_ops): Remove qxfer_spu member.
136 * server.c (handle_qxfer_spu): Remove.
137 (qxfer_packets): Remove entry for "spu".
138 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
139 * linux-low.c (SPUFS_MAGIC): Remove.
140 (spu_enumerate_spu_ids): Remove.
141 (linux_qxfer_spu): Remove.
142 (linux_target_ops): Remove qxfer_spu member.
143 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
144 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
145 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
146
2d41fa11
SDJ
1472019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
148
149 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
150 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
151 * config.in: Regenerate.
152 * configure: Regenerate.
153
d59b55f0
TT
1542019-08-15 Tom Tromey <tromey@adacore.com>
155
156 * target.c (target_write_memory): Use gdb::byte_vector.
157
4196ab2a
TT
1582019-08-15 Tom Tromey <tromey@adacore.com>
159
160 * tracepoint.c (write_inferior_data_pointer)
161 (write_inferior_integer, write_inferior_int8)
162 (write_inferior_uinteger, m_tracepoint_action_download)
163 (r_tracepoint_action_download, x_tracepoint_action_download)
164 (l_tracepoint_action_download, clear_inferior_trace_buffer)
165 (download_agent_expr, download_tracepoint_1)
166 (download_trace_state_variables, upload_fast_traceframes): Update.
167 * server.c (gdb_write_memory): Update.
168 * remote-utils.c (relocate_instruction): Update.
169 * proc-service.c (ps_pdwrite): Update.
170 * mem-break.c (remove_memory_breakpoint)
171 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
172 (uninsert_fast_tracepoint_jumps_at)
173 (reinsert_fast_tracepoint_jumps_at): Update.
174 * linux-x86-low.c (append_insns)
175 (i386_install_fast_tracepoint_jump_pad)
176 (amd64_write_goto_address, i386_write_goto_address): Update.
177 * linux-s390-low.c (append_insns, s390_write_goto_address):
178 Update.
179 * linux-ppc-low.c (ppc_relocate_instruction)
180 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
181 (ppc_write_goto_address): Update.
182 * linux-aarch64-low.c (append_insns): Update.
183 * target.h (struct target_ops): Update.
184 (write_inferior_memory): Don't declare.
185 * target.c (target_write_memory): Rename from
186 write_inferior_memory. Remove old target_write_memory.
187
c6778d00
TT
1882019-08-15 Tom Tromey <tromey@adacore.com>
189
190 * target.c (write_inferior_memory): Use std::vector.
191
404f2902
FCE
1922019-08-06 Frank Ch. Eigler <fche@redhat.com>
193
194 PR build/24886
195 * configure.ac: Drop enable-libmcheck support.
196 * configure, config.in: Rebuild.
197 * acinclude.m4: Don't include it.
198
4c5aa8e0
AH
1992019-07-19 Alan Hayward <alan.hayward@arm.com>
200
201 * configure.srv: Remove Arm xml files.
202
7cc17433
AH
2032019-07-19 Alan Hayward <alan.hayward@arm.com>
204
205 * configure.srv: Add new files. Remove xml generated files.
206 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
207 registers.
208 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
209 * linux-aarch32-tdesc.c: New file.
210 * linux-aarch32-tdesc.h: New file.
211 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
212 * linux-arm-low.c (init_registers_arm, tdesc_arm)
213 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
214 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
215 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
216 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
217 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
218 (arm_read_description): Call arm_linux_read_description.
219 (initialize_low_arch): Don't init registers.
220 * linux-arm-tdesc.c: New file.
221 * linux-arm-tdesc.h: New file.
222
166a82be
AH
2232019-07-10 Alan Hayward <alan.hayward@arm.com>
224
225 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
226 Move counter inside for.
227 (arm_read_description): Check ptrace earlier.
228 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
229
268a13a5
TT
2302019-07-09 Tom Tromey <tom@tromey.com>
231
232 * configure: Rebuild.
233 * configure.ac: Change common to gdbsupport.
234 * acinclude.m4: Change common to gdbsupport.
235 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
236 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
237 common to gdbsupport.
238 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
239 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
240 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
241 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
242 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
243 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
244 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
245 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
246 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
247 common to gdbsupport.
248
350fab54
AH
2492019-07-04 Alan Hayward <alan.hayward@arm.com>
250
251 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
252 defines.
253 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
254
2b40fda7
AH
2552019-07-04 Alan Hayward <alan.hayward@arm.com>
256
257 * configure.srv: Remove legacy xml.
258 * linux-aarch64-low.c (initialize_low_arch): Remove
259 initialize_low_tdesc call.
260 * linux-aarch64-tdesc-selftest.c: Remove file.
261 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
262 * linux-x86-low.c (initialize_low_arch): Remove
263 initialize_low_tdesc call.
264 * linux-x86-tdesc-selftest.c: Remove file.
265 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
266
7d10623d
TV
2672019-06-20 Tom de Vries <tdevries@suse.de>
268
269 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
270 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
271
8d6a48df
TV
2722019-06-19 Tom de Vries <tdevries@suse.de>
273
274 * debug.h (debug_write): Change return type to ssize_t.
275 * debug.c (debug_write): Same.
276
73cc7272
TT
2772019-06-14 Tom Tromey <tom@tromey.com>
278
279 * configure.ac: Use new path to gnulib.
280 * configure: Rebuild.
281 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
282 to gnulib.
283
08f10e02
TT
2842019-06-11 Tom Tromey <tom@tromey.com>
285
286 * Makefile.in (SFILES): Add alloc.c.
287 (OBS): Add alloc.o.
288 (IPA_OBJS): Add alloc-ipa.o.
289 (alloc-ipa.o): New target.
290 (%.o: ../%.c): New pattern rule.
291
422186a9
TT
2922019-06-10 Tom Tromey <tromey@adacore.com>
293
294 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
295 end warning with a newline.
296 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
297 newline.
298 * thread-db.c (attach_thread): Don't end warning with a newline.
299 (thread_db_notice_clone): Likewise.
300 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
301 newline.
302 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
303 end warning with a newline.
304
b02f78f9
PA
3052019-06-04 Pedro Alves <palves@redhat.com>
306
307 * server.c (captured_main): Use make_unique_xstrdup.
308
88ed7edb
TT
3092019-06-02 Tom Tromey <tom@tromey.com>
310
311 * gdbreplay.c (fromhex): Remove.
312 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
313
33a6bc35
TT
3142019-05-29 Tom Tromey <tromey@adacore.com>
315
316 * configure: Rebuild.
317
e90a813d
KB
3182019-05-06 Kevin Buettner <kevinb@redhat.com>
319
320 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
321 sign extension code on 32-bit builds.
322
353ea2d1
EZ
3232019-05-03 Eli Zaretskii <eliz@gnu.org>
324
325 * remote-utils.c:
326 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
327
b494cdff
TT
3282019-04-19 Tom Tromey <tom@tromey.com>
329
330 * server.c (struct vstop_notif): Derive from notif_event.
331 <base>: Remove.
332 (queue_stop_reply): Update.
333 (remove_all_on_match_ptid): Change type. Rewrite.
334 (discard_queued_stop_replies): Rewrite.
335 (in_queued_stop_replies_ptid): Change type.
336 (in_queued_stop_replies): Rewrite.
337 (notif_stop): Update.
338 (queue_stop_reply_callback): Update.
339 (captured_main): Don't call initialize_notif.
340 (push_stop_notification): Update.
341 * notif.c (notif_write_event, handle_notif_ack)
342 (notif_event_enque, notif_push): Update.
343 (notif_event_xfree, initialize_notif): Remove.
344 * notif.h (struct notif_event): Include <list>, not
345 "common/queue.h".
346 (struct notif_server) <queue>: Now a std::list.
347 (notif_event_p): Remove typedef.
348 (initialize_notif): Don't declare.
349 (struct notif_event): Add virtual destructor.
350
a7e559cc
AH
3512019-04-17 Alan Hayward <alan.hayward@arm.com>
352
353 * ax.c (ax_vdebug): Call debug_printf.
354 * debug.c (debug_write): New function.
355 * debug.h (debug_write): New declaration.
356 * linux-low.c (sigchld_handler): Call debug_write.
357
aeb2e706
AH
3582019-04-17 Alan Hayward <alan.hayward@arm.com>
359
360 * debug.c (debug_set_output): New function.
361 (debug_vprintf): Send output to debug_file.
362 (debug_flush): Likewise.
363 * debug.h (debug_set_output): New declaration.
364 * server.c (handle_monitor_command): Add debug-file option.
365 (captured_main): Likewise.
366
c1bc0935
AH
3672019-04-17 Alan Hayward <alan.hayward@arm.com>
368
369 * debug.c (remote_debug): Add definition.
370 * debug.h (remote_debug): Add declaration.
371 * hostio.c (remote_debug): Remove declaration.
372 * remote-utils.c (struct ui_file): Likewise.
373 (remote_debug): Likewise.
374 * remote-utils.h (remote_debug): Likewise,
375 * server.c (remote_debug): Remove definition.
376
3f52fdbc
KB
3772019-04-10 Kevin Buettner <kevinb@redhat.com>
378
379 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
380 when using a 64-bit gdbserver.
381
b0319eaa
TT
3822019-04-09 Tom Tromey <tromey@adacore.com>
383
384 * linux-low.c (select_event_lwp): Use find_thread_in_random.
385
eedc3f4f
TT
3862019-04-08 Tom Tromey <tom@tromey.com>
387
388 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
389 throw.
390 (linux_resume_one_lwp): Likewise.
391
230d2906
TT
3922019-04-08 Tom Tromey <tom@tromey.com>
393
394 * gdbreplay.c: Update.
395 * linux-low.c: Update.
396 * server.c: Update.
397
a70b8144
TT
3982019-04-08 Tom Tromey <tom@tromey.com>
399
400 * server.c: Use C++ exception handling.
401 * linux-low.c: Use C++ exception handling.
402 * gdbreplay.c: Use C++ exception handling.
403
3d6e9d23
TT
4042019-04-08 Tom Tromey <tom@tromey.com>
405
406 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
407 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
408 (captured_main, main): Update.
409 * gdbreplay.c (main): Update.
410
0570503d
PFC
4112019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
412
413 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
414 value in argument pointer, return 1 if the entry is found and 0
415 otherwise. Move comment.
416 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
417 * linux-low.h (linux_get_auxv): Declare.
418 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
419
227a9e65
TT
4202019-04-05 Tom Tromey <tromey@adacore.com>
421
422 * server.c (gdbserver_usage): Use upper-case for metasyntactic
423 variables.
424
69f4c9cc
AH
4252019-03-28 Alan Hayward <alan.hayward@arm.com>
426
427 * linux-low.c (AT_HWCAP2): Add define if not already included.
428
974c89e0
AH
4292019-03-26 Alan Hayward <alan.hayward@arm.com>
430
431 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
432 (aarch64_arch_setup): Call linux_get_hwcap.
433 * linux-arm-low.c (arm_get_hwcap): Remove function.
434 (arm_read_description): Call linux_get_hwcap.
435 * linux-low.c (linux_get_auxv): New function.
436 (linux_get_hwcap): Likewise.
437 (linux_get_hwcap2): Likewise.
438 * linux-low.h (linux_get_hwcap): New declaration.
439 (linux_get_hwcap2): Likewise.
440 * linux-ppc-low.c (ppc_get_auxv): Remove function.
441 (ppc_arch_setup): Call linux_get_hwcap.
442 * linux-s390-low.c (s390_get_hwcap): Remove function.
443 (s390_arch_setup): Call linux_get_hwcap.
444
1ef53e6b
AH
4452019-03-22 Alan Hayward <alan.hayward@arm.com>
446 Jiong Wang <jiong.wang@arm.com>
447
448 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
449 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
450 to fail.
451 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
452
ee4fbcfa
AH
4532019-03-22 Alan Hayward <alan.hayward@arm.com>
454 Jiong Wang <jiong.wang@arm.com>
455
456 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
457 (aarch64_get_hwcap): New function.
458 (aarch64_arch_setup): Read APIA hwcap.
459
6dc0ebde
AH
4602019-03-22 Alan Hayward <alan.hayward@arm.com>
461 Jiong Wang <jiong.wang@arm.com>
462
463 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
464 (initialize_low_tracepoint): Likewise.
465 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
466 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
467 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
468 (aarch64_linux_read_description): Likewise.
469 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
470
1163a4b7
JB
4712019-03-12 John Baldwin <jhb@FreeBSD.org>
472
473 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
474 i386_create_target_description for 'segments' parameter.
475 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
476 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
477 * win32-i386-low.c (i386_arch_setup): Likewise.
478
d3a70e03
TT
4792019-03-12 Tom Tromey <tromey@adacore.com>
480
481 * linux-low.c (iterate_over_lwps): Update.
482
37991b4f
TT
4832019-03-06 Tom Tromey <tom@tromey.com>
484
485 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
486 (captured_main): Use SCOPE_EXIT.
487
45950eb6
SDJ
4882019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
489
490 * configure.srv: Use '$enable_unittest' instead of '$development'
491 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
492 case.
493
43ac54fc
TT
4942019-02-27 Tom Tromey <tromey@adacore.com>
495
496 * gdbreplay.c (logchar): Handle \r\n.
497
df0da8a2
AH
4982019-02-07 Alan Hayward <alan.hayward@arm.com>
499
500 * linux-low.c (linux_attach): Add process before lwp.
501 * server.c (attach_inferior): Check if already attached.
502
1a5c2598
TT
5032019-02-07 Tom Tromey <tom@tromey.com>
504
505 * x86-tdesc.h: Rename include guard.
506 * x86-low.h: Add include guard.
507 * wincecompat.h: Rename include guard.
508 * win32-low.h: Add include guard.
509 * utils.h: Rename include guard.
510 * tracepoint.h: Rename include guard.
511 * tdesc.h: Rename include guard.
512 * target.h: Rename include guard.
513 * server.h: Rename include guard.
514 * remote-utils.h: Rename include guard.
515 * regcache.h: Rename include guard.
516 * nto-low.h: Rename include guard.
517 * notif.h: Add include guard.
518 * mem-break.h: Rename include guard.
519 * lynx-low.h: Add include guard.
520 * linux-x86-tdesc.h: Add include guard.
521 * linux-s390-tdesc.h: Add include guard.
522 * linux-ppc-tdesc-init.h: Add include guard.
523 * linux-low.h: Add include guard.
524 * linux-aarch64-tdesc.h: Add include guard.
525 * linux-aarch32-low.h: Add include guard.
526 * inferiors.h: Rename include guard.
527 * i387-fp.h: Rename include guard.
528 * hostio.h: Rename include guard.
529 * gdbthread.h: Rename include guard.
530 * gdb_proc_service.h: Rename include guard.
531 * event-loop.h: Rename include guard.
532 * dll.h: Rename include guard.
533 * debug.h: Rename include guard.
534 * ax.h: Rename include guard.
535
956cc47c
SN
5362018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
537
538 PR gdb/23985
539 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
540 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
541
a0707f3c
TT
5422019-01-25 Tom Tromey <tom@tromey.com>
543
544 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
545
0747795c
TT
5462019-01-25 Tom Tromey <tom@tromey.com>
547
548 * win32-low.c: Fix common/ includes.
549 * win32-i386-low.c: Fix common/ includes.
550 * tracepoint.c: Fix common/ includes.
551 * thread-db.c: Fix common/ includes.
552 * target.h: Fix common/ includes.
553 * symbol.c: Fix common/ includes.
554 * spu-low.c: Fix common/ includes.
555 * server.h: Fix common/ includes.
556 * server.c: Fix common/ includes.
557 * remote-utils.c: Fix common/ includes.
558 * regcache.h: Fix common/ includes.
559 * regcache.c: Fix common/ includes.
560 * nto-x86-low.c: Fix common/ includes.
561 * notif.h: Fix common/ includes.
562 * mem-break.h: Fix common/ includes.
563 * lynx-low.c: Fix common/ includes.
564 * lynx-i386-low.c: Fix common/ includes.
565 * linux-x86-tdesc-selftest.c: Fix common/ includes.
566 * linux-x86-low.c: Fix common/ includes.
567 * linux-low.c: Fix common/ includes.
568 * inferiors.h: Fix common/ includes.
569 * i387-fp.c: Fix common/ includes.
570 * hostio.c: Fix common/ includes.
571 * hostio-errno.c: Fix common/ includes.
572 * gdbthread.h: Fix common/ includes.
573 * gdbreplay.c: Fix common/ includes.
574 * fork-child.c: Fix common/ includes.
575 * event-loop.c: Fix common/ includes.
576 * ax.c:
577 (enum gdb_agent_op): Fix common/ includes.
578
be6d4f74
TT
5792019-01-21 Tom Tromey <tom@tromey.com>
580
581 * tracepoint.c: Fix includes.
582 * remote-utils.c: Fix includes.
583 * linux-x86-low.c: Fix includes.
584
66d91b39
JB
5852019-01-01 Joel Brobecker <brobecker@adacore.com>
586
587 * gdbreplay.c (gdbreplay_version): Update copyright year in
588 version message.
589 * server.c (gdbserver_version): Likewise.
590
754e3168
AH
5912018-12-05 Alan Hayward <alan.hayward@arm.com>
592
593 * linux-low.c (add_lwp): Switch ordering.
594
d105de22
TT
5952018-11-29 Tom Tromey <tom@tromey.com>
596
597 * win32-low.c (win32_join): Take pid, not process.
598 * target.h (struct target_ops) <join>: Change argument type.
599 (join_inferior): Change argument name.
600 * spu-low.c (spu_join): Take pid, not process.
601 * server.c (handle_detach): Preserve pid before destroying
602 process.
603 * lynx-low.c (lynx_join): Take pid, not process.
604 * linux-low.c (linux_join): Take pid, not process.
605
50138245
AH
6062018-11-23 Alan Hayward <alan.hayward@arm.com>
607
608 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
609 (aarch64_cannot_fetch_register): Likewise.
610 (struct linux_target_ops): Update references.
611
64f57f3d
PFC
6122018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
613
614 * linux-ppc-low.c: Include nat/linux-ptrace.h.
615
8d619c01
EBM
6162018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
617
618 * configure.srv (ipa_ppc_linux_regobj): Add
619 powerpc-isa207-htm-vsx32l-ipa.o and
620 powerpc-isa207-htm-vsx64l-ipa.o.
621 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
622 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
623 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
624 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
625 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
626 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
627 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
628 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
629 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
630 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
631 (init_registers_powerpc_isa207_htm_vsx32l)
632 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
633 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
634 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
635 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
636 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
637 (ppc_store_tm_ctarregset): New functions.
638 (ppc_regsets): Add entries for HTM regsets.
639 (ppc_arch_setup): Set htm in features struct when needed. Set
640 sizes for the HTM regsets.
641 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
642 (initialize_low_arch): Call
643 init_registers_powerpc_isa207_htm_vsx32l and
644 init_registers_powerpc_isa207_htm_vsx64l.
645 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
646 PPC_TDESC_ISA207_HTM_VSX.
647 (initialize_low_tracepoint): Call
648 init_registers_powerpc_isa207_htm_vsx32l and
649 init_registers_powerpc_isa207_htm_vsx64l.
650
232bfb86
EBM
6512018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
652
653 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
654 rs6000/power-linux-pmu.xml to srv_xmlfiles.
655 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
656 (ppc_store_pmuregset): New functions.
657 (ppc_regsets): Add entries for ebb and pmu regsets.
658 (ppc_arch_setup): Set isa207 in features struct if the ebb and
659 pmu regsets are available. Set sizes for these regsets.
660
f2cf6173
EBM
6612018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
662
663 * configure.srv (ipa_ppc_linux_regobj): Add
664 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
665 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
666 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
667 rs6000/powerpc-isa207-vsx32l.xml, and
668 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
669 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
670 <PPC_TDESC_ISA207_VSX>: New enum value.
671 (init_registers_powerpc_isa207_vsx32l): Declare.
672 (init_registers_powerpc_isa207_vsx64l): Declare.
673 * linux-ppc-low.c (ppc_fill_tarregset): New function.
674 (ppc_store_tarregset): New function.
675 (ppc_regsets): Add entry for the TAR regset.
676 (ppc_arch_setup): Set isa207 in features struct when needed. Set
677 size for the TAR regsets.
678 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
679 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
680 and init_registers_powerpc_isa207_vsx64l.
681 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
682 (initialize_low_tracepoint): Call
683 init_registers_powerpc_isa207_vsx32l and
684 init_registers_powerpc_isa207_vsx64l.
685
7ca18ed6
EBM
6862018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
687 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
688
689 * configure.srv (ipa_ppc_linux_regobj): Add
690 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
691 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
692 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
693 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
694 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
695 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
696 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
697 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
698 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
699 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
700 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
701 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
702 (ppc_hwcap): Add comment.
703 (ppc_hwcap2): New global.
704 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
705 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
706 (ppc_regsets): Add entries for the DSCR and PPR regsets.
707 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
708 when needed. Set sizes for the the DSCR and PPR regsets.
709 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
710 (initialize_low_arch): Call
711 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
712 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
713 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
714 PPC_TDESC_ISA205_PPR_DSCR_VSX.
715 (initialize_low_tracepoint): Call
716 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
717 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
718
5c849b22
PFC
7192018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
720
721 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
722
8ecfd7bd
SDJ
7232018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
724 Simon Marchi <simark@simark.ca>
725
726 * acinclude.m4: Include "../selftest.m4".
727 * configure: Regenerate.
728 * configure.ac: Use "GDB_AC_SELFTEST".
729 * configure.srv: Use "$enable_unittests" instead of
730 "$development" when checking whether unit tests have been
731 enabled.
732 * server.c (captured_main): Update message informing that
733 selftests have been disabled.
734
96643e35
TT
7352018-10-04 Tom Tromey <tom@tromey.com>
736
737 * configure: Rebuild.
738
da4ae14a
TT
7392018-10-04 Tom Tromey <tom@tromey.com>
740
741 * server.c (handle_status): Rename inner "thread".
742 (process_serial_event): Declare "res" in 'm' case.
743 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
744 (iterate_over_lwps): Rename inner "thread".
745 (linux_qxfer_libraries_svr4): Rename inner "len".
746 * gdbthread.h (find_thread_in_random): Rename inner "thread".
747
7c619dbd
GB
7482018-10-01 Gary Benson <gbenson@redhat.com>
749
750 * gdb_proc_service.h: Moved common code to
751 common/gdb_proc_service.h.
752
3795e814
GB
7532018-10-01 Gary Benson <gbenson@redhat.com>
754
755 * gdb_proc_service.h: Synchronize comments and whitespace with
756 GDB's version of this file.
757
49b036f1
TT
7582018-09-25 Tom Tromey <tom@tromey.com>
759
760 * configure: Rebuild.
761 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
762
8ff03f0b
SM
7632018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
764
765 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
766 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
767 ($(IPA_LIB)): Sort IPA_OBJS.
768
a1cd91dc
SM
7692018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
770
771 * Makefile.in: Remove references to $(ADD_DEPS).
772
752312ba
TT
7732018-09-16 Tom Tromey <tom@tromey.com>
774
775 * remote-utils.c (remote_open): Use GNU style for metasyntactic
776 variables.
777 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
778 variables.
779
f1628857
TT
7802018-09-05 Tom Tromey <tom@tromey.com>
781
782 * configure: Rebuild.
783
ad202fcc
SM
7842018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
785
786 PR build/23399
787 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
788
d3d8724a
TT
7892018-08-27 Tom Tromey <tom@tromey.com>
790
791 PR build/23087:
792 * configure: Rebuild.
793
b4f183d2
TT
7942018-08-27 Tom Tromey <tom@tromey.com>
795
796 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
797 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
798 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
799 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
800 (s390x_emit_stack_adjust): Add casts to unsigned char.
801
4e2aa472
SM
8022018-08-22 Simon Marchi <simon.marchi@ericsson.com>
803
804 PR gdb/23374
805 PR gdb/23375
806 * server.h (struct client_state) <disable_randomization>:
807 Initialize to 1.
808
cf4088a9
SM
8092018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
810
811 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
812 variable.
813 (mips_supply_ptrace_register): Likewise.
814
a0de763e
TT
8152018-07-22 Tom Tromey <tom@tromey.com>
816
817 * configure: Rebuild.
818
b0a7723d
TT
8192018-07-22 Tom Tromey <tom@tromey.com>
820
821 * win32-low.c (win32_create_inferior): Remove unused variables.
822 * gdbreplay.c (remote_open): Remove unused variable.
823 * remote-utils.c (remote_prepare): Remove unused variable.
824 * x86-tdesc.h (X86_TDESC_H): Define.
825 (amd64_expedite_regs): Define conditionally.
826 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
827 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
828 * remote-utils.c (readchar): Remove unused variable.
829
a780ef4f
PA
8302018-07-13 Pedro Alves <palves@redhat.com>
831
832 * linux-low.c (linux_kill): Change parameter to process_info
833 pointer instead of pid. Adjust.
834 * lynx-low.c (lynx_kill): Likewise.
835 * nto-low.c (nto_kill): Likewise.
836 * spu-low.c (spu_kill): Likewise.
837 * win32-low.c (win32_kill): Likewise.
838 * server.c (handle_v_kill, kill_inferior_callback)
839 (detach_or_kill_for_exit): Adjust.
840 * target.c (kill_inferior): Change parameter to process_info
841 pointer instead of pid. Adjust.
842 * target.h (struct target_ops) <kill>: Change parameter to
843 process_info pointer instead of pid. Adjust all implementations
844 and callers.
845 (kill_inferior): Likewise.
846
ef2ddb33
PA
8472018-07-13 Pedro Alves <palves@redhat.com>
848
849 * linux-low.c (linux_detach, linux_join): Change parameter to
850 process_info pointer instead of pid. Adjust.
851 * lynx-low.c (lynx_detach, lynx_join): Likewise.
852 * nto-low.c (nto_detach): Likewise.
853 * spu-low.c (spu_detach, spu_join): Likewise.
854 * win32-low.c (win32_detach, win32_join): Likewise.
855 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
856 * target.h (struct target_ops) <detach, join>: Change parameter to
857 process_info pointer instead of pid. Adjust all implementations
858 and callers.
859 (detach_inferior, join_inferior): Rename 'pid' parameter to
860 'proc'.
861
c7ab0aef
SDJ
8622018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
863 Jan Kratochvil <jan.kratochvil@redhat.com>
864 Paul Fertser <fercerpav@gmail.com>
865 Tsutomu Seki <sekiriki@gmail.com>
866
867 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
868 (OBS): Add 'common/netstuff.o'.
869 (GDBREPLAY_OBS): Likewise.
870 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
871 (remote_open): Implement support for IPv6
872 connections.
873 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
874 and 'wspiapi.h'.
875 (handle_accept_event): Accept connections from IPv6 sources.
876 (remote_prepare): Handle IPv6-style hostnames; implement
877 support for IPv6 connections.
878 (remote_open): Implement support for printing connections from
879 IPv6 sources.
880
31445d10
PA
8812018-07-11 Pedro Alves <palves@redhat.com>
882
883 PR gdb/23377
884 * mem-break.c (any_persistent_commands): Add process_info
885 parameter and use it instead of relying on the current process.
886 Change return type to bool.
887 * mem-break.h (any_persistent_commands): Add process_info
888 parameter and change return type to bool.
889 * server.c (handle_detach): Remove require_running_or_return call.
890 Look up the process_info for the process we're about to detach.
891 If not found, return back error to GDB. Adjust
892 any_persistent_commands call to pass down a process pointer.
893
cb197132
PA
8942018-07-11 Pedro Alves <palves@redhat.com>
895
896 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
897 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
898 instead of collect_register_by_name.
899 * regcache.c (regcache_raw_get_unsigned_by_name): New.
900 * regcache.h (regcache_raw_get_unsigned_by_name): New.
901
1b919490
VB
9022018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
903 Pedro Alves <palves@redhat.com>
904
905 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
906
d7e15655
TT
9072018-07-03 Tom Tromey <tom@tromey.com>
908
909 * linux-low.c: Update.
910 * lynx-low.c: Update.
911 * mem-break.c: Update.
912 * nto-low.c: Update.
913 * remote-utils.c: Update.
914 * server.c: Update.
915 * spu-low.c: Update.
916 * target.c: Update.
917 * win32-low.c: Update.
918
26a57c92
TT
9192018-07-03 Tom Tromey <tom@tromey.com>
920
921 * server.c: Update.
922
0e998d96
TT
9232018-07-03 Tom Tromey <tom@tromey.com>
924
925 * linux-low.c: Update.
926
cc6bcb54
TT
9272018-07-03 Tom Tromey <tom@tromey.com>
928
929 * target.c: Update.
930
e38504b3
TT
9312018-07-03 Tom Tromey <tom@tromey.com>
932
933 * linux-low.c: Update.
934 * linux-mips-low.c: Update.
935 * lynx-low.c: Update.
936 * nto-low.c: Update.
937 * remote-utils.c: Update.
938 * server.c: Update.
939 * spu-low.c: Update.
940 * target.c: Update.
941 * thread-db.c: Update.
942
e99b03dc
TT
9432018-07-03 Tom Tromey <tom@tromey.com>
944
945 * linux-low.c: Update.
946 * linux-mips-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 * tracepoint.c: Update.
955
f2907e49
TT
9562018-07-03 Tom Tromey <tom@tromey.com>
957
958 * linux-low.c: Update.
959 * linux-ppc-low.c: Update.
960 * linux-x86-low.c: Update.
961 * proc-service.c: Update.
962 * server.c: Update.
963 * spu-low.c: Update.
964 * thread-db.c: Update.
965 * win32-low.c: Update.
966
fd79271b
TT
9672018-07-03 Tom Tromey <tom@tromey.com>
968
969 * linux-low.c: Update.
970 * lynx-low.c: Update.
971 * nto-low.c: Update.
972 * remote-utils.c: Update.
973 * spu-low.c: Update.
974 * thread-db.c: Update.
975 * win32-low.c: Update.
976
c0867626
SDJ
9772018-06-29 Joel Brobecker <brobecker@adacore.com>
978
979 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
980 parameter in call to 'amd64_create_target_description'.
981
2512d7ef
JK
9822018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
983
984 * x86-tdesc.h: Remove executable permission flag.
985
d0ac1c44
SM
9862018-06-19 Simon Marchi <simon.marchi@ericsson.com>
987
988 * configure.ac: Remove AC_PREREQ, add missing quoting.
989 * configure: Re-generate.
990 * config.in: Re-generate.
991 * aclocal.m4: Re-generate.
992
c4eb05ff
SM
9932018-06-18 Simon Marchi <simon.marchi@ericsson.com>
994
995 * tracepoint.h (current_traceframe): Remove declaration.
996
02895270
AH
9972018-06-18 Alan Hayward <alan.hayward@arm.com>
998
999 * linux-aarch64-low.c (is_sve_tdesc): New function.
1000 (aarch64_sve_regs_copy_to_regcache): Likewise.
1001 (aarch64_sve_regs_copy_from_regcache): Likewise.
1002 (aarch64_regs_info): Add SVE checks.
1003 (initialize_low_arch): Initialize SVE.
1004
e9902bfc
AH
10052018-06-18 Alan Hayward <alan.hayward@arm.com>
1006
1007 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1008
fefa175e
AH
10092018-06-11 Alan Hayward <alan.hayward@arm.com>
1010
1011 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1012 (initialize_low_tracepoint): Likewise
1013 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1014 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1015 param.
1016 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1017 checks.
1018 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1019
b91ad3ff
AH
10202018-06-11 Alan Hayward <alan.hayward@arm.com>
1021
1022 * server.h (PBUFSIZ): Increase size
1023
f868386e
AH
10242018-06-11 Alan Hayward <alan.hayward@arm.com>
1025
1026 * regcache.c (regcache::raw_compare): New function.
1027 * regcache.h (regcache::raw_compare): New declaration.
1028
9c861883
AH
10292018-06-11 Alan Hayward <alan.hayward@arm.com>
1030
1031 * regcache.c (new_register_cache): Use new.
1032 (free_register_cache): Use delete.
1033 (register_data): Use const.
1034 (supply_register): Move body inside regcache.
1035 (regcache::raw_supply): New override function.
1036 (collect_register): Move body inside regcache.
1037 (regcache::raw_collect): New override function.
1038 (regcache::get_register_status): New override function.
1039 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1040
40591844
TT
10412018-06-09 Tom Tromey <tom@tromey.com>
1042
1043 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1044 declare queue.
1045 (event_queue): Use std::queue.
1046 (gdb_event_xfree): Remove.
1047 (initialize_event_loop, process_event, wait_for_event): Update.
1048
6341380d
SC
10492018-06-08 Stan Cox <scox@redhat.com>
1050
1051 * win32-low.c (win32_create_inferior): last_ptid and last_status
1052 moved to client_state.
1053
03349c93
PA
10542018-06-08 Pedro Alves <palves@redhat.com>
1055
1056 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1057 common/common-exceptions.o, common/common-utils.o,
1058 common/errors.o, common/print-utils.o and utils.o.
1059 * gdbreplay.c: Include "common-defs.h" instead of the two
1060 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1061 string.h or alloca.h.
1062 (perror_with_name): Delete.
1063 (remote_open): Use xstrdup instead of strdup.
1064 (main): Rename to ...
1065 (captured_main): ... this.
1066 (main): New.
1067
8dcc53b3
TT
10682018-06-08 Tom Tromey <tom@tromey.com>
1069
1070 * linux-low.c (linux_low_read_btrace): Update.
1071
c12a5089
SC
10722018-06-04 Stan Cox <scox@redhat.com>
1073
1074 * server.h (struct client_state): New.
1075 * server.c (cont_thread, general_thread, multi_process)
1076 (report_fork_events, report_vfork_events, report_exec_events)
1077 (report_thread_events, swbreak_feature, hwbreak_feature)
1078 (vCont_supported, disable_randomization, pass_signals)
1079 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1080 Moved to client_state.
1081 * remote-utils.c (remote_debug, noack_mode)
1082 (transport_is_reliable): Moved to client_state.
1083 * tracepoint.c (current_traceframe): Moved to client_state.
1084
1085 Update all callers.
1086 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1087 linux-low.c, remote-utils.h, target.c: Use client_state.
1088
122394f1
AH
10892018-05-31 Alan Hayward <alan.hayward@arm.com>
1090
1091 * configure.srv: Add new c/h file.
1092
95228a0d
AH
10932018-05-31 Alan Hayward <alan.hayward@arm.com>
1094
1095 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1096 null VQ.
1097
d8dab6c3
MR
10982018-05-25 Maciej W. Rozycki <macro@mips.com>
1099
1100 * gdb.arch/mips-fpregset-core.exp: New test.
1101 * gdb.arch/mips-fpregset-core.c: New test source.
1102
81e25b7c
EK
11032018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1104
1105 PR server/23198
1106 * hostio.c (require_int): Do not report overflow for integers
1107 between 0xfffffff and 0x7fffffff.
1108
7e947ad3
MR
11092018-05-22 Maciej W. Rozycki <macro@mips.com>
1110
1111 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1112 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1113 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1114 functions.
1115 (the_low_target): Wire them.
1116
1d75a658
PFC
11172018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1118
1119 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1120 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1121 mode. Call collect_register_by_name with vscr using
1122 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1123 (ppc_store_vrregset): Add and set vscr_offset variable as in
1124 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1125 vscr_offset.
1126
d078308a
PFC
11272018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1128
1129 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1130 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1131 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1132
7273b5fc
PFC
11332018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1134
1135 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1136 (ppc_store_vsxregset): Likewise.
1137 (ppc_fill_vrregset): Likewise.
1138 (ppc_store_vrregset): Likewise.
1139 (ppc_fill_evrregset): Likewise.
1140 (ppc_store_evrregset): Likewise.
1141 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1142 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1143 needed.
1144
2e077f5e
PFC
11452018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1146
1147 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1148 wordsize of the inferior. Call ppc_linux_target_wordsize.
1149
bd64614e
PFC
11502018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1151
1152 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1153 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1154 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1155 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1156 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1157 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1158 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1159 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1160 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1161 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1162 (tdesc_powerpc_e500l): Remove.
1163 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1164 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1165 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1166 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1167 linux-ppc-tdesc.h.
1168 (ppc_arch_setup): Remove target description matching code. Fill a
1169 ppc_linux_features struct and call ppc_linux_match_description
1170 with it.
1171
75d74cca
MR
11722018-05-22 Maciej W. Rozycki <macro@mips.com>
1173
1174 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1175 width of the requested register exceeds the width of the
1176 `ptrace' data type.
1177 (mips_cannot_store_register): Likewise.
1178
e4439e43
MR
11792018-05-21 Maciej W. Rozycki <macro@mips.com>
1180
1181 * linux-mips-low.c (mips_fetch_register): New function. Update
1182 preceding comment.
1183 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1184 (the_low_target): Wire `mips_fetch_register'.
1185
55271bf9
JB
11862018-05-10 Joel Brobecker <brobecker@adacore.com>
1187
1188 * lynx-i386-low.c (LYNXOS_178): New macro.
1189 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1190 the layout on LynxOS-178.
1191 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1192 handle floating point registers that are not supported by
1193 LynxOS-178.
1194
1a34f210
TT
11952018-05-10 Tom Tromey <tom@tromey.com>
1196
1197 * configure: Rebuild.
1198
190852c8
JB
11992018-05-10 Joel Brobecker <brobecker@adacore.com>
1200
1201 PR server/23158:
1202 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1203 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1204 Use it to set the expedite_regs field in the given tdesc.
1205 * x86-tdesc.h: New file.
1206 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1207 Adjust following the addition of the new expedite_regs parameter
1208 to init_target_desc.
1209 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1210 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1211 (i386_linux_read_description, amd64_linux_read_description):
1212 Adjust following the addition of the new expedite_regs parameter
1213 to init_target_desc.
1214 * lynx-i386-low.c: #include "x86-tdesc.h".
1215 (lynx_i386_arch_setup): Adjust following the addition of the new
1216 expedite_regs parameter to init_target_desc.
1217 * nto-x86-low.c: #include "x86-tdesc.h".
1218 (nto_x86_arch_setup): Adjust following the addition of the new
1219 expedite_regs parameter to init_target_desc.
1220 * win32-i386-low.c: #include "x86-tdesc.h".
1221 (i386_arch_setup): Adjust following the addition of the new
1222 expedite_regs parameter to init_target_desc.
1223
7dbac825
JB
12242018-05-10 Joel Brobecker <brobecker@adacore.com>
1225
1226 PR server/23158:
1227 * win32-low.c (win32_create_inferior): Add call to my_wait
1228 setting last_status global.
1229
906994d9
JB
12302018-05-10 Joel Brobecker <brobecker@adacore.com>
1231
1232 PR server/23158:
1233 * win32-low.c (create_process): Only call gdb_tilde_expand if
1234 inferior_cwd is not NULL.
1235
8ee22052
AB
12362018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1237
1238 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1239 registers to the cache if their values have changed.
1240 (i387_xsave_to_cache): Provide default values for x87 control
1241 registers when these features are available, but disabled.
1242 * regcache.c (supply_register_by_name_zeroed): New function.
1243 * regcache.h (supply_register_by_name_zeroed): Declare new
1244 function.
1245
aff689d3
TT
12462018-05-07 Tom Tromey <tom@tromey.com>
1247
1248 * configure: Rebuild.
1249
85e26832
TT
12502018-05-04 Tom Tromey <tom@tromey.com>
1251
1252 * configure: Rebuild.
1253
a3b60e45
JK
12542018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1255 Pedro Alves <palves@redhat.com>
1256
1257 * linux-aarch64-low.c (aarch64_stopped_data_address):
1258 Likewise.
1259
632e107b
TT
12602018-04-27 Tom Tromey <tom@tromey.com>
1261
1262 * configure: Rebuild.
1263
458412c3
TT
12642018-04-23 Tom Tromey <tom@tromey.com>
1265
1266 * configure: Rebuild.
1267
f31c089e
SM
12682018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1269
1270 * Makefile.in (depcomp): Add "..".
1271 (all_deps_files): New and use it.
1272
b319b098
AH
12732018-04-18 Alan Hayward <alan.hayward@arm.com>
1274
1275 * configure.srv (aarch64*-*-linux*): Don't include xml.
1276 (i[34567]86-*-cygwin*): Likewise.
1277 (i[34567]86-*-linux*): Likewise.
1278 (i[34567]86-*-lynxos*): Likewise.
1279 (i[34567]86-*-mingw32ce*): Likewise.
1280 (i[34567]86-*-mingw*): Likewise.
1281 (i[34567]86-*-nto*): Likewise.
1282 (tic6x-*-uclinux): Likewise.
1283 (x86_64-*-linux*): Likewise.
1284 (x86_64-*-mingw*): Likewise.
1285 (x86_64-*-cygwin*): Likewise.
1286
3b74854b
AH
12872018-04-18 Alan Hayward <alan.hayward@arm.com>
1288
1289 * tdesc.c: Remove xml parameter.
1290
e98577a9
AH
12912018-04-18 Alan Hayward <alan.hayward@arm.com>
1292
1293 * server.c (get_features_xml): Remove cast.
1294 * tdesc.c (void target_desc::accept): Fill in function.
1295 (tdesc_get_features_xml): Remove old xml creation.
1296 (print_xml_feature::visit_pre): Add xml vistor.
1297 * tdesc.h (struct target_desc): Make xmltarget mutable.
1298 (tdesc_get_features_xml): Remove declaration.
1299
d278f585
AH
13002018-04-18 Alan Hayward <alan.hayward@arm.com>
1301
1302 * tdesc.c (tdesc_architecture_name): Add new function.
1303 (tdesc_osabi_name): Likewise.
1304 (tdesc_get_features_xml): Use new functions.
1305
eee8a18d
AH
13062018-04-18 Alan Hayward <alan.hayward@arm.com>
1307
1308 * tdesc.c (tdesc_create_flags): Remove.
1309 (tdesc_add_flag): Likewise.
1310 (tdesc_named_type): Likewise.
1311 (tdesc_create_union): Likewise.
1312 (tdesc_create_struct): Likewise.
1313 (tdesc_create_vector): Likewise.
1314 (tdesc_add_bitfield): Likewise.
1315 (tdesc_add_field): Likewise.
1316 (tdesc_set_struct_size): Likewise.
1317
82ec9bc7
AH
13182018-04-18 Alan Hayward <alan.hayward@arm.com>
1319
1320 * tdesc.c (~target_desc): Remove implictly deleted items.
1321 (init_target_desc): Iterate all features.
1322 (tdesc_get_features_xml): Use vector.
1323 (tdesc_create_feature): Create feature.
1324 * tdesc.h (tdesc_feature) Remove
1325 (target_desc): Add features.
1326
ea3e7d71
AH
13272018-04-18 Alan Hayward <alan.hayward@arm.com>
1328
1329 * Makefile.in: Add common/tdesc.c
1330 * tdesc.c (init_target_desc): init all reg_defs from register
1331 vector.
1332 (tdesc_create_reg): Create tdesc_reg.
1333 * tdesc.h (tdesc_feature): Add register vector.
1334
17d08cd4
SM
13352018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1336
1337 * tdesc.h (struct target_desc) <features>: Change type to
1338 std::vector<std::string>.
1339 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1340 changes.
1341 (tdesc_get_features_xml): Likewise.
1342 (tdesc_create_feature): Likewise.
1343
5cd3e386
AH
13442018-03-26 Alan Hayward <alan.hayward@arm.com>
1345
1346 * regcache.c (find_register_by_number): Return a ref.
1347 (find_regno): Use references.
1348 (register_size): Likewise.
1349 (register_data): Likewise.
1350 * tdesc.c (target_desc::~target_desc): Remove free calls.
1351 (target_desc::operator==): Use std::vector compare.
1352 (init_target_desc): Use reference.
1353 (tdesc_create_reg): Use reg constructors.
1354 * tdesc.h (struct target_desc): Replace pointer with object.
1355
dff7492c
AH
13562018-03-23 Alan Hayward <alan.hayward@arm.com>
1357
1358 * regcache.c (find_register_by_number): Make static.
1359 (find_regno): Use find_register_by_number
1360 * regcache.h (struct reg): Remove declaration.
1361
d80e5242
AH
13622018-03-23 Alan Hayward <alan.hayward@arm.com>
1363
1364 * tdesc.c (target_desc::~target_desc): Move to here.
1365 (target_desc::operator==): Likewise.
1366 * tdesc.h (target_desc::~target_desc): Move from here.
1367 (target_desc::operator==): Likewise.
1368
f69c5afb
AA
13692018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1370
1371 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1372
ce29f843
AA
13732018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1374
1375 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1376 S390_TDESC_GS.
1377 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1378 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1379 and init_registers_s390_gs_linux64.
1380
c49bd90b
AA
13812018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1382
1383 * linux-s390-low.c (s390_fill_gs): Remove function.
1384 (s390_fill_gsbc): Remove function.
1385 (s390_regsets): Set fill functions for the guarded storage regsets
1386 to NULL.
1387
7edb9bd3
AA
13882018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1389
1390 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1391 the word size. Add comment.
1392 (s390_get_wordsize): New function.
1393 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1394 pswm with it. Instead, use s390_get_wordsize to determine the
1395 word size first and derive the correct tdesc from that directly.
1396
39be3c7e
SM
13972018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * Makefile.in: Include silent-rules.mk.
1400 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1401 (COMPILE): Add ECHO_CXX.
1402 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1403 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1404 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1405 (version-generated.c): Add ECHO_GEN.
1406 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1407 (IPAGENT_COMPILE): Add ECHO_CXX.
1408 (%-generated.c): Add ECHO_REGDAT.
1409
3ae9ce5d
TT
14102018-03-14 Tom Tromey <tom@tromey.com>
1411
1412 PR cli/14977:
1413 * ax.c (ax_printf): Special case for NULL.
1414
e6a58aa8
SM
14152018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1416
1417 * linux-low.c (linux_qxfer_libraries_svr4): Use
1418 xml_escape_text_append.
1419
f6e8a41e
SM
14202018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1421
1422 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1423
b9671caf
SM
14242018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1425
1426 * server.c (handle_general_set): Remove unnecessary xstrdup.
1427
e80aaf61
SM
14282018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1429
1430 * server.c (parse_debug_format_options): Adjust to
1431 delim_string_to_char_ptr_vec changes.
1432 * thread-db.c (thread_db_load_search): Adjust to
1433 dirnames_to_char_ptr_vec changes.
1434
b1223e78
MM
14352018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1436
1437 * target.h (target_enable_btrace, target_disable_btrace)
1438 (target_read_btrace, target_read_btrace_conf): Turn macro into
1439 inline function. Throw error if target method is not defined.
1440 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1441 check for btrace target method. Be prepared to handle exceptions
1442 from btrace target methods.
1443
81561546
SDJ
14442018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1445
1446 * server.c (captured_main): Change order of error message printed
1447 when the current working directory cannot be found.
1448
25e3c82c
SDJ
14492018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1450
1451 * server.c: Include "filenames.h" and "pathstuff.h".
1452 (program_name): Delete variable.
1453 (program_path): New anonymous class.
1454 (get_exec_wrapper): Use "program_path" instead of
1455 "program_name".
1456 (handle_v_run): Likewise.
1457 (captured_main): Likewise.
1458 (process_serial_event): Likewise.
1459
b4987c95
SDJ
14602018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1461
1462 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1463 (OBJS): Add "pathstuff.o".
1464 * server.c (current_directory): New global variable.
1465 (captured_main): Initialize "current_directory".
1466
f46cd62a
AH
14672018-02-26 Alan Hayward <alan.hayward@arm.com>
1468
1469 * tdesc.c: Use common/tdesc.h.
1470 * tdesc.h: Likewise.
1471
a543c5ca
AH
14722018-02-20 Alan Hayward <alan.hayward@arm.com>
1473 Simon Marchi <simon.marchi@ericsson.com>
1474
1475 * Makefile.in: Switch order of make rules.
1476
b5884fa7
AH
14772018-02-19 Alan Hayward <alan.hayward@arm.com>
1478
1479 * Makefile.in: Add common directory in build.
1480 * configure.ac: Add common reference.
1481 * configure: Regenerate.
1482
de6242d3
MM
14832018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1484
1485 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1486 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1487 * spu-low.c (spu_target_ops): Likewise.
1488 * win32-low.c (win32_target_ops): Likewise.
1489 * server.c (supported_btrace_packets): Report packets unconditionally.
1490 * target.h (target_ops) <supports_btrace>: Remove.
1491 (target_supports_btrace): Remove.
1492
9ee23a85
MM
14932018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1494
1495 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1496 (handle_btrace_disable): Change return type to void. Use exceptions
1497 to report errors.
1498 (handle_btrace_general_set): Catch exception and copy message to
1499 return message.
1500
8ce47547
TT
15012018-02-08 Tom Tromey <tom@tromey.com>
1502
1503 * linux-low.c (install_software_single_step_breakpoints): Use
1504 make_scoped_restore.
1505 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1506 (do_restore_current_thread_cleanup): Remove.
1507 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1508 declare.
1509
45dd3607
TT
15102018-02-08 Tom Tromey <tom@tromey.com>
1511
1512 * mem-break.c (set_raw_breakpoint_at): Use
1513 gdb::unique_xmalloc_ptr.
1514
e671cd59
PA
15152018-01-30 Pedro Alves <palves@redhat.com>
1516
1517 PR gdb/13211
1518 * target.c (target_terminal::terminal_state): Rename to ...
1519 (target_terminal::m_terminal_state): ... this.
1520
a0aad537
JC
15212018-01-19 James Clarke <jrtc27@jrtc27.com>
1522
1523 * linux-low.c (handle_extended_wait): Surround call to
1524 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1525
4d9b86e1
SM
15262018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1527
1528 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1529 linux_ptrace_attach_fail_reason_string now returning an
1530 std::string.
1531 (linux_attach): Likewise.
1532 * thread-db.c (attach_thread): Likewise.
1533
f517c180
EA
15342018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1535
1536 PR gdb/21559
1537 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1538 checking for fs_base/gs_base fields in struct user_regs_struct.
1539 * configure: Regenerate.
1540
9a70f35c
YQ
15412018-01-16 Yao Qi <yao.qi@linaro.org>
1542
1543 PR gdb/18749
1544 * linux-low.c (fetch_register): Call supply_register instead of
1545 error.
1546
605fd3c6
YQ
15472018-01-08 Yao Qi <yao.qi@linaro.org>
1548 Simon Marchi <simon.marchi@ericsson.com>
1549
1550 * Makefile.in (OBS): Remove selftest.o.
1551 * configure.ac: Set srv_selftest_objs if $development is true.
1552 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1553 * configure: Re-generated.
1554 * server.c (captured_main): Wrap variable selftest_filter with
1555 GDB_SELF_TEST.
1556
2cc05030
SM
15572018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1558
1559 * server.c (parse_debug_format_options): Return std::string.
1560 (handle_monitor_command, captured_main): Adjust.
1561
e379cee6
PA
15622018-01-05 Pedro Alves <palves@redhat.com>
1563
1564 PR gdb/18653
1565 * server.c (captured_main): Pass quiet=false to
1566 save_original_signals_state.
1567
82e1e79a
JB
15682018-01-01 Joel Brobecker <brobecker@adacore.com>
1569
1570 * gdbreplay.c (gdbreplay_version): Update copyright year in
1571 version message.
1572 * server.c (gdbserver_version): Likewise.
1573
8e481c3b
TT
15742017-12-08 Tom Tromey <tom@tromey.com>
1575
1576 * ax.c (ax_printf): Update.
1577
a8806230
YQ
15782017-12-07 Yao Qi <yao.qi@linaro.org>
1579
1580 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1581 aarch64_linux_read_description.
1582 * linux-amd64-ipa.c (idx2mask): New array.
1583 (get_ipa_tdesc): Move idx2mask out.
1584 (initialize_low_tracepoint): Initialize target descriptions.
1585 * linux-i386-ipa.c (idx2mask): New array.
1586 (get_ipa_tdesc): Move idx2mask out.
1587 (initialize_low_tracepoint): Initialize target descriptions.
1588
d4a0e8b5
SM
15892017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1590
1591 * tdesc.c (struct tdesc_type): Change return type.
1592 (tdesc_add_flag): Change parameter type.
1593 (tdesc_add_bitfield): Likewise.
1594 (tdesc_add_field): Likewise.
1595 (tdesc_set_struct_size): Likewise.
1596
798a7429
SM
15972017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * regcache.c (registers_to_string): Remove unused variable.
1600
c0e15c9b
SM
16012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1602
1603 * inferiors.c (for_each_inferior_with_data): Remove.
1604 * inferiors.h (for_each_inferior_with_data): Remove.
1605 * server.c (handle_qxfer_threads_worker): Change parameter type.
1606 (handle_qxfer_threads_proper): Use for_each_thread.
1607
f0045347
SM
16082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1609
1610 * inferiors.c (for_each_inferior): Remove.
1611 (clear_inferiors): Use for_each_thread.
1612 * inferiors.h (for_each_inferior): Remove.
1613 * linux-low.c (linux_wait_for_event_filtered): Use
1614 for_each_thread.
1615 (linux_stabilize_threads): Likewise.
1616 * regcache.c (regcache_release): Likewise.
1617 * server.c (gdb_wants_all_threads_stopped): Likewise.
1618 (clear_pending_status_callback): Remove.
1619 (handle_status): Use for_each_thread.
1620 (captured_main): Likewise.
1621 * win32-low.c (child_init_thread_list): Likewise.
1622 (win32_clear_inferiors): Likewise.
1623 (fake_breakpoint_event): Likewise.
1624
9521758b
SM
16252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1626
1627 * inferiors.h (find_inferior): Remove.
1628 * inferiors.c (find_inferior): Remove.
1629
8f86d7aa
SM
16302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1631
1632 * linux-low.c (resume_status_pending_p): Update comment.
1633 (need_step_over_p): Update comment.
1634
e2b44075
SM
16352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1636
1637 * linux-low.c (proceed_one_lwp): Return void, change parameter
1638 type.
1639 (unsuspend_and_proceed_one_lwp): Likewise.
1640 (proceed_all_lwps): Use for_each_thread.
1641 (unstop_all_lwps): Likewise.
1642
c80825ff
SM
16432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1644
1645 * linux-low.c (linux_resume_one_thread): Return void, take
1646 parameter directly.
1647 (linux_resume): Use for_each_thread.
1648
df3e4dbe
SM
16492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1650
1651 * linux-low.c (send_sigstop_callback): Return void, change
1652 parameter type. Rename to...
1653 (send_sigstop): ... this.
1654 (suspend_and_send_sigstop_callback): Return void, change parameter
1655 type. Rename to...
1656 (suspend_and_send_sigstop): ... this.
1657 (stop_all_lwps): Use for_each_thread.
1658
5a6b0a41
SM
16592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1660
1661 * linux-low.c (lwp_running): Return bool, remove unused
1662 argument.
1663 (linux_stabilize_threads): Use find_thread.
1664
39a64da5
SM
16652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1666
1667 * linux-low.c (select_singlestep_lwp_callback): Remove.
1668 (count_events_callback): Remove.
1669 (select_event_lwp_callback): Remove.
1670 (select_event_lwp): Use find_thread/for_each_thread.
1671
a1385b7b
SM
16722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * linux-low.c (not_stopped_callback): Return bool, take filter
1675 argument directly.
1676 (linux_wait_for_event_filtered): Use find_thread.
1677 (linux_wait_1): Likewise.
1678
454296a2
SM
16792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1680
1681 * linux-low.c (same_lwp): Remove.
1682 (find_lwp_pid): Use find_thread.
1683
6b2a85da
SM
16842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1685
1686 * linux-low.c (delete_lwp_callback): Remove.
1687 (linux_mourn): Use for_each_thread.
1688
798a38e8
SM
16892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1690
1691 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1692 args parameter, don't check for pid.
1693 (linux_detach): Use for_each_thread.
1694
e4eb0dec
SM
16952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1696
1697 * linux-low.c (struct counter): Remove.
1698 (second_thread_of_pid_p): Remove.
1699 (last_thread_of_process_p): Use find_thread.
1700
83e1b6c1
SM
17012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1702
1703 * inferiors.c (find_inferior_in_random): Remove.
1704 * inferiors.h (find_inferior_in_random): Remove.
1705 * linux-low.c (status_pending_p_callback): Return bool, accept
1706 parameter ptid directly.
1707 (linux_wait_for_event_filtered): Use find_thread_in_random.
1708 (linux_wait_1): Likewise.
1709
8dc7b443
SM
17102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1711
1712 * inferiors.c (find_inferior_id): Remove.
1713 (find_thread_ptid): Move implemention from find_inferior_id to
1714 here.
1715 * inferiors.h (find_inferior_id): Remove.
1716 * server.c (handle_status): Use find_thread_ptid.
1717 (process_serial_event): Likewise.
1718 * thread-db.c (find_one_thread): Likewise.
1719 (thread_db_thread_handle): Likewise.
1720 * win32-low.c (thread_rec): Likewise.
1721 (child_delete_thread): Likewise.
1722 (win32_thread_alive): Likewise.
1723 (get_child_debug_event): Likewise.
1724
da25033c
SM
17252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * linux-mips-low.c (update_watch_registers_callback): Return
1728 void, remove pid_p parameter, don't check for pid.
1729 (mips_insert_point, mips_remove_point): Use for_each_thread.
1730
c91bb56b
SM
17312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1732
1733 * lynx.low (lynx_delete_thread_callback): Remove.
1734 (lynx_mourn): Use for_each_thread.
1735
634a3254
SM
17362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1737
1738 * regcache.c (regcache_invalidate_one): Remove.
1739 (regcache_invalidate_pid): use for_each_thread.
1740
41272101
TT
17412017-11-26 Tom Tromey <tom@tromey.com>
1742
1743 * linux-low.c (linux_create_inferior): Update.
1744
f5291a6f
UW
17452017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1746
1747 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1748
6654d750
AH
17492017-11-24 Alan Hayward <alan.hayward@arm.com>
1750
1751 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1752 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1753 * linux-aarch64-tdesc-selftest.c: New file.
1754 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1755
17562017-11-24 Alan Hayward <alan.hayward@arm.com>
1757
1758 * configure.srv: Add new file.
1759 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1760 * linux-aarch64-tdesc-selftest.c: New file.
1761 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1762
49bdb7ee
AH
17632017-11-24 Alan Hayward <alan.hayward@arm.com>
1764
1765 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1766 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1767 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1768
d6d7ce56
AH
17692017-11-24 Alan Hayward <alan.hayward@arm.com>
1770
1771 * configure.srv: Add new files.
1772 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1773 aarch64_linux_read_description.
1774 * linux-aarch64-low.c (aarch64_linux_read_description):
1775 Merge with aarch64_arch_setup.
1776 (aarch64_arch_setup): Call aarch64_linux_read_description.
1777 * linux-aarch64-tdesc.c: New file.
1778 * linux-aarch64-tdesc.h: New file.
1779
506fe5f4
YQ
17802017-11-24 Yao Qi <yao.qi@linaro.org>
1781
1782 * configure.srv: Set $srv_regobj for tic6x-linux.
1783 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1784 (tic6x_read_description): Move some code to tic6x_arch_setup.
1785 (tic6x_tdesc_test): New function.
1786 (initialize_low_arch): Call selftests::register_test.
1787
29f9a567
YQ
17882017-11-22 Yao Qi <yao.qi@linaro.org>
1789
1790 * remote-utils.c (prepare_resume_reply): Use memcpy.
1791
578290ec
SM
17922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1793
1794 * linux-low.c (kill_one_lwp_callback): Return void, take
1795 argument directly, don't filter on pid.
1796 (linux_kill): Use for_each_thread.
1797
eca55aec
SM
17982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1799
1800 * linux-low.c (need_step_over_p): Return bool, remove dummy
1801 argument.
1802 (linux_resume, proceed_all_lwps): Use find_thread.
1803
25c28b4d
SM
18042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * linux-low.c (resume_status_pending_p): Return bool, remove
1807 flag_p argument.
1808 (linux_resume): Use find_thread.
1809
5fdda392
SM
18102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1811
1812 * linux-low.c (struct thread_resume_array): Remove.
1813 (linux_set_resume_request): Return void, take arguments
1814 directly.
1815 (linux_resume): Use for_each_thread.
1816
fcb056a5
SM
18172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1820 return bool, remove data argument.
1821 (linux_stabilize_threads): Use find_thread.
1822
139720c5
SM
18232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * linux-low.c (unsuspend_one_lwp): Remove.
1826 (unsuspend_all_lwps): Use for_each_thread, inline code from
1827 unsuspend_one_lwp.
1828
6d1e5673
SM
18292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1830
1831 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1832 * linux-low.c (struct iterate_over_lwps_args): Remove.
1833 (iterate_over_lwps_filter): Remove.
1834 (iterate_over_lwps): Use find_thread.
1835
bbf550d5
SM
18362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1837
1838 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1839 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1840 code from reset_lwp_ptrace_options_callback.
1841
00192f77
SM
18422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1843
1844 * linux-arm-low.c (struct update_registers_data): Remove.
1845 (update_registers_callback): Return void, take arguments
1846 directly, don't check thread's pid.
1847 (arm_insert_point, arm_remove_point): Use for_each_thread.
1848
2bee2b6c
SM
18492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1850
1851 * win32-low.c (continue_one_thread): Return void, take argument
1852 directly.
1853 (child_continue): Use for_each_thread.
1854
0b360f19
SM
18552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1856
1857 * win32-i386-low.c (update_debug_registers_callback): Rename
1858 to ...
1859 (update_debug_registers): ... this, return void, remove pid_p arg.
1860 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1861
f27866ba
SM
18622017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1863
1864 * inferiors.h (struct process_info): Add constructor, initialize
1865 fields..
1866 <syscalls_to_catch>: Change type to std::vector<int>.
1867 * inferiors.c (add_process): Allocate process_info with new.
1868 (remove_process): Free process_info with delete.
1869 * linux-low.c (handle_extended_wait): Adjust.
1870 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1871 * server.c (handle_general_set): Adjust.
1872
e849ea89
PA
18732017-11-16 Pedro Alves <palves@redhat.com>
1874
1875 * remote-utils.c (remote_close): Block SIGIO signals instead of
1876 uninstalling the SIGIO handler.
1877
1d0aa65c
AH
18782017-11-16 Alan Hayward <alan.hayward@arm.com>
1879
1880 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1881
3491a34c
YQ
18822017-11-16 Yao Qi <yao.qi@linaro.org>
1883
1884 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1885 (tic6x_store_gregset): Likewise.
1886 (tic6x_usrregs_info): Move it up.
1887
a602f924
AH
18882017-11-15 Alan Hayward <alan.hayward@arm.com>
1889
1890 * Makefile.in: Update arch rules.
1891 * configure.srv: Explicitly mark arch/ files.
1892
5616b6c3
AS
18932017-11-13 Andreas Schwab <schwab@suse.de>
1894
1895 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1896 function.
1897 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1898
d1928160
PA
18992017-11-06 Pedro Alves <palves@redhat.com>
1900
1901 * config.in, configure: Regenerate.
1902
bac608e7
SM
19032017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1904
1905 * target.c (struct thread_search): Remove.
1906 (thread_search_callback): Remove.
1907 (prepare_to_access_memory): Use for_each_thread instead of
1908 find_inferior. Inline code from thread_search_callback.
1909
eaddb425
SM
19102017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1911
1912 * server.c (struct visit_actioned_threads_data): Remove.
1913 (visit_actioned_threads): Change prototype to take arguments
1914 directly.
1915 (resume): Use find_thread instead of find_inferior.
1916
99078d34
SM
19172017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1918
1919 * server.c (queue_stop_reply_callback): Change prototype, return
1920 void.
1921 (find_status_pending_thread_callback): Remove.
1922 (handle_status): Replace find_inferior with find_thread and
1923 for_each_thread.
1924
cc628f3d
AH
19252017-10-25 Alan Hayward <alan.hayward@arm.com>
1926
1927 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1928 with REGNO.
1929 (aarch64_store_gregset): Likewise.
1930 (aarch64_fill_fpregset): Likewise.
1931 (aarch64_store_fpregset): Likewise.
1932
4d3bb80e
SM
19332017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1934
1935 * gdbthread.h (find_thread, for_each_thread): New functions.
1936 * inferiors.c (thread_of_pid): Remove.
1937 (find_any_thread_of_pid): Use find_thread.
1938 * linux-low.c (num_lwps): Use for_each_thread.
1939
7a7cdfa0
YQ
19402017-10-17 Yao Qi <yao.qi@linaro.org>
1941
1942 * Makefile.in: Remove one rule.
1943 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1944
e675d170
YQ
19452017-10-17 Yao Qi <yao.qi@linaro.org>
1946
1947 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1948 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1949
7eb4e0f9
YQ
19502017-10-17 Yao Qi <yao.qi@linaro.org>
1951
1952 * configure.srv: Rename arm.o with arch/arm.o.
1953
60d6cfc9
YQ
19542017-10-17 Yao Qi <yao.qi@linaro.org>
1955
1956 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1957 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1958 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1959 (arch-i386.o, arch-amd64.o): Remove rules.
1960 (arch/%.o): New rule.
1961 Update POSTCOMPILE and COMPILE.pre.
1962 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1963 * configure: Re-generated.
1964 * configure.srv: Replace arch-i386.o with arch/i386.o.
1965 Replace arch-amd64.o with arch/amd64.o.
1966
5bfda255
YQ
19672017-10-16 Yao Qi <yao.qi@linaro.org>
1968
1969 * configure: Regenerated.
1970
9c80ecd6
SM
19712017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1972
1973 * inferiors.h: (struct inferior_list): Remove.
1974 (struct inferior_list_entry); Remove.
1975 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1976 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1977 get_first_inferior): Remove.
1978 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1979 find_inferior_id, find_inferior_in_random): Change signature.
1980 * inferiors.c (all_threads): Change type to
1981 std::list<thread_info *>.
1982 (get_thread): Remove macro.
1983 (find_inferior, find_inferior_id): Change signature, implement
1984 using find_thread.
1985 (find_inferior_in_random): Change signature, implement using
1986 find_thread_in_random.
1987 (for_each_inferior, for_each_inferior_with_data): Change
1988 signature, implement using for_each_thread.
1989 (add_inferior_to_list, remove_inferior): Remove.
1990 (add_thread, get_first_thread, thread_of_pid,
1991 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1992 (get_first_inferior, one_inferior_p, clear_inferior_list):
1993 Remove.
1994 (clear_inferiors, get_thread_process): Update.
1995 * gdbthread.h: Include <list>.
1996 (struct thread_info) <entry>: Remove field.
1997 <id>: New field.
1998 (all_threads): Change type to std::list<thread_info *>.
1999 (get_first_inferior): Add doc.
2000 (find_thread, for_each_thread, find_thread_in_random): New
2001 functions.
2002 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2003 * linux-arm-low.c (update_registers_callback): Update.
2004 * linux-low.c (second_thread_of_pid_p): Update.
2005 (kill_one_lwp_callback, linux_detach_lwp_callback,
2006 delete_lwp_callback, status_pending_p_callback, same_lwp,
2007 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2008 iterate_over_lwps, not_stopped_callback,
2009 resume_stopped_resumed_lwps, count_events_callback,
2010 select_singlestep_lwp_callback, select_event_lwp_callback,
2011 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2012 suspend_and_send_sigstop_callback, wait_for_sigstop,
2013 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2014 lwp_running, linux_set_resume_request, resume_status_pending_p,
2015 need_step_over_p, start_step_over, linux_resume_one_thread,
2016 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2017 reset_lwp_ptrace_options_callback): Update.
2018 * linux-mips-low.c (update_watch_registers_callback): Update.
2019 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2020 Update.
2021 (free_register_cache_thread_one): Remove.
2022 (regcache_release): Update.
2023 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2024 handle_qxfer_threads_worker): Update.
2025 (handle_query): Update, use list iterator.
2026 (visit_actioned_threads, handle_pending_status,
2027 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2028 clear_pending_status_callback, set_pending_status_callback,
2029 find_status_pending_thread_callback, handle_status,
2030 process_serial_event): Update.
2031 * target.c (thread_search_callback): Update.
2032 * thread-db.c (thread_db_get_tls_address): Update.
2033 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2034 Update.
2035 * win32-i386-low.c (update_debug_registers_callback): Update.
2036 * win32-low.c (delete_thread_info, child_delete_thread,
2037 continue_one_thread, suspend_one_thread,
2038 get_child_debug_event): Adjust.
2039
9179355e
SM
20402017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2041
2042 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2043 * inferiors.h: Include <list>.
2044 (struct process_info) <entry>: Remove field.
2045 <pid>: New field.
2046 (pid_of): Change macro to function.
2047 (ptid_of, lwpid_of): Remove macro.
2048 (all_processes): Change type to std::list<process_info *>.
2049 (ALL_PROCESSES): Remove macro.
2050 (for_each_process, find_process): New function.
2051 * inferiors.c (all_processes): Change type to
2052 std::list<process_info *>.
2053 (find_thread_process): Adjust.
2054 (add_process): Likewise.
2055 (remove_process): Likewise.
2056 (find_process_pid): Likewise.
2057 (get_first_process): Likewise.
2058 (started_inferior_callback): Remove.
2059 (have_started_inferiors_p): Adjust.
2060 (attached_inferior_callback): Remove.
2061 (have_attached_inferiors_p): Adjust.
2062 * linux-low.c (check_zombie_leaders): Likewise.
2063 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2064 (x86_linux_update_xmltarget): Adjust.
2065 * server.c (handle_query): Likewise.
2066 (gdb_reattached_process): Remove.
2067 (handle_status): Adjust.
2068 (kill_inferior_callback): Likewise.
2069 (detach_or_kill_inferior): Remove.
2070 (print_started_pid): Likewise.
2071 (print_attached_pid): Likewise.
2072 (detach_or_kill_for_exit): Update.
2073 (process_serial_event): Likewise.
2074 * linux-arm-low.c (arm_new_fork): Likewise.
2075
c9cb8905
SM
20762017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2077
2078 * dll.h: Include <list>.
2079 (struct dll_info): Add constructor.
2080 <entry>: Remove field.
2081 (all_dlls): Change type to std::list<dll_info>.
2082 * dll.c: Include <algorithm>.
2083 (get_dll): Remove macro.
2084 (all_dlls): Change type to std::list<dll_info *>.
2085 (free_one_dll): Remove.
2086 (match_dll): Likewise.
2087 (loaded_dll): Adjust.
2088 (unloaded_dll): Adjust to all_dlls type change, use
2089 std::find_if. Inline code from match_dll.
2090 (clear_dlls): Adjust to all_dlls type change.
2091 * server.c (emit_dll_description): Remove.
2092 (handle_qxfer_libraries): Adjust to all_dlls type change,
2093 integrate emit_dll_description's functionality.
2094
04ec7890
SM
20952017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2096
2097 * linux-low.h (struct linux_target_ops) <delete_process>: New
2098 field.
2099 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2100 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2101 (struct linux_target_ops): Add delete_process callback.
2102 * linux-arm-low.c (arm_delete_process): New.
2103 (struct linux_target_ops): Add delete_process callback.
2104 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2105 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2106 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2107 * linux-mips-low.c (mips_linux_delete_process): New.
2108 (struct linux_target_ops): Add delete_process callback.
2109 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2110 * linux-s390-low.c (struct linux_target_ops): Likewise.
2111 * linux-sh-low.c (struct linux_target_ops): Likewise.
2112 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2113 * linux-tile-low.c (struct linux_target_ops): Likewise.
2114 * linux-x86-low.c (x86_linux_delete_process): New.
2115 (struct linux_target_ops): Add delete_process callback.
2116 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2117
466eecee
SM
21182017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2119
2120 * linux-aarch64-low.c (the_low_target): Add thread delete
2121 callback.
2122 * linux-arm-low.c (arm_delete_thread): New function.
2123 (the_low_target): Add thread delete callback.
2124 * linux-bfin-low.c (the_low_target): Likewise.
2125 * linux-crisv32-low.c (the_low_target): Likewise.
2126 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2127 set.
2128 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2129 field.
2130 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2131 * linux-mips-low.c (mips_linux_delete_thread): New function.
2132 (the_low_target): Add thread delete callback.
2133 * linux-ppc-low.c (the_low_target): Likewise.
2134 * linux-s390-low.c (the_low_target): Likewise.
2135 * linux-sh-low.c (the_low_target): Likewise.
2136 * linux-tic6x-low.c (the_low_target): Likewise.
2137 * linux-tile-low.c (the_low_target): Likewise.
2138 * linux-x86-low.c (the_low_target): Likewise.
2139 * linux-xtensa-low.c (the_low_target): Likewise.
2140
b79f7801
YZ
21412017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2142
2143 * win32-low.c: Include "common-inferior.h".
2144
bc3b087d
SDJ
21452017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2146
2147 * inferiors.c (set_inferior_cwd): New function.
2148 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2149 (handle_query): Inform that QSetWorkingDir is supported.
2150 * win32-low.c (create_process): Pass the inferior's cwd to
2151 CreateProcess.
2152
d092c5a2
SDJ
21532017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2154
2155 * inferiors.c (current_inferior_cwd): New global variable.
2156 (get_inferior_cwd): New function.
2157 * inferiors.h (struct process_info) <cwd>: New field.
2158
7da0a886
SDJ
21592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2160
2161 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2162 (OBS): Add gdb_tilde_expand.o.
2163
289a6840
SM
21642017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2165
2166 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2167 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2168
256642e8
PA
21692017-09-29 Pedro Alves <palves@redhat.com>
2170
2171 * ax.c (gdb_parse_agent_expr): Constify.
2172 * ax.h (gdb_parse_agent_expr): Constify.
2173 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2174 Constify.
2175 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2176 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2177 * remote-utils.h (read_ptid): Constify.
2178 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2179 (process_point_options, process_serial_event): Constify.
2180 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2181 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2182 (cmd_qtbuffer): Constify.
2183
5b9ca4d4
PA
21842017-09-29 Pedro Alves <palves@redhat.com>
2185
2186 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2187 fails.
2188
94c207e0
PA
21892017-09-29 Pedro Alves <palves@redhat.com>
2190
2191 * linux-low.c (handle_extended_wait): Pass parent thread instead
2192 of process to thread_db_notice_clone.
2193 * linux-low.h (thread_db_notice_clone): Replace parent process
2194 parameter with parent thread parameter.
2195 * thread-db.c (find_one_thread): Add comment.
2196 (thread_db_notice_clone): Replace parent process parameter with
2197 parent thread parameter. Temporarily switch to the parent thread.
2198
75352e28
SDJ
21992017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2200
2201 * gdbthread.h: Include "common-gdbthread.h".
2202 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2203 "if" when validating the ptid.
2204 * remote-utils.c: Include "gdbthread.h".
2205 (prepare_resume_reply): Use "switch_to_thread".
2206 * target.c (done_accessing_memory): Likewise.
2207
ad339634
AA
22082017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2209
2210 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2211 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2212 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2213 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2214 s390x-gs-linux64-ipa.o to ipa_obj.
2215 * linux-s390-low.c (HWCAP_S390_GS): New define.
2216 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2217 New functions.
2218 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2219 (s390_arch_setup): Check for guarded-storage support and choose
2220 appropriate tdesc.
2221 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2222 init_registers_s390x_gs_linux64.
2223 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2224 enum value.
2225 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2226 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2227
cc4d742f
SM
22282017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2229
2230 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2231
f6327dcb
KB
22322017-09-21 Kevin Buettner <kevinb@redhat.com>
2233
2234 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2235 (thread_db_thread_handle): Declare.
2236 * linux-low.c (linux_target_ops): Initialize thread_handle.
2237 * server.c (handle_qxfer_threads_worker): Add support for
2238 "handle" attribute.
2239 * target.h (struct target_ops): Add new function pointer,
2240 thread_handle.
2241 (target_thread_handle): Define.
2242 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2243 field in lwp.
2244 (thread_db_thread_handle): New function.
2245
86299109
KB
22462017-09-21 Kevin Buettner <kevinb@redhat.com>
2247
2248 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2249 * linux-low.h (thread_db_notice_clone): Declare.
2250 * thread-db.c (thread_db_notice_clone): New function.
2251
f557a88a
PA
22522017-09-21 Pedro Alves <palves@redhat.com>
2253
2254 * server.c (gdb_read_memory, handle_status, process_serial_event)
2255 (handle_serial_event, handle_target_event): Adjust to
2256 set_desired_thread prototype change.
2257 * target.c (set_desired_thread): Remove 'use_general' parameter
2258 and adjust.
2259 * target.h (set_desired_thread): Remove 'use_general' parameter.
2260
223ffa71
TT
22612017-09-20 Tom Tromey <tom@tromey.com>
2262
2263 * target.c (target_terminal::terminal_state): Define.
2264 (target_terminal::init): Rename from target_terminal_init.
2265 (target_terminal::inferior): Rename from
2266 target_terminal_inferior.
2267 (target_terminal::ours): Rename from target_terminal_ours.
2268 (target_terminal::ours_for_output, target_terminal::info): New.
2269
04fd3ba9
SM
22702017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2271
2272 * server.c (accumulate_file_name_length): Remove.
2273 (emit_dll_description): Adjust to std::string change.
2274 (handle_qxfer_libraries): Use std::string to hold document.
2275
5e187554
SM
22762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2277
2278 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2279 return type of xml_escape_text.
2280 * server.c (emit_dll_description): Likewise.
2281
1526853e
SM
22822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2283
2284 * server.c (captured_main): Accept argument for --selftest.
2285 Update run_tests call.
2286 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2287 when registering selftests.
2288
c4dfafab
SDJ
22892017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2290
2291 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2292 instead of "VEC" for "target_desc.reg_defs".
2293 (regcache_cpy): Likewise.
2294 (registers_to_string): Likewise.
2295 (registers_from_string): Likewise.
2296 (find_regno): Likewise.
2297 (supply_regblock): Likewise.
2298 (regcache_raw_read_unsigned): Likewise.
2299 * tdesc.c (init_target_desc): Likewise.
2300 (tdesc_create_reg): Likewise.
2301 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2302 (struct target_desc) <reg_defs>: Convert to "std::vector".
2303 (target_desc): Do not initialize "reg_defs".
2304 (~target_desc): Update code to use "std::vector" instead of "VEC"
2305 for "target_desc.reg_defs".
2306 (operator==): Likewise.
2307
124aceb4
SM
23082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2309
2310 * inferiors.h (thread_to_gdb_id): Remove.
2311 * inferiors.c (thread_to_gdb_id): Remove.
2312 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2313 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2314 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2315 Likewise.
2316 * nto-low.c (nto_fetch_registers, nto_store_registers,
2317 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2318
96cde54f
SM
23192017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2320
2321 * inferiors.h (gdb_id_to_thread_id): Remove.
2322 * inferiors.c (gdb_id_to_thread_id): Remove.
2323 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2324 removal. Move pid declaration closer to where it's used.
2325
e8ca139e
SM
23262017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2327
2328 * server.c (handle_detach): New function.
2329 (process_serial_event): Move code out, call handle_detach.
2330
f8a4e119
SM
23312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2332
2333 * server.c (require_running): Rename to ...
2334 (require_running_or_return): ... this ...
2335 (require_running_or_break): ... and this.
2336 (handle_query, process_serial_event): Adjust.
2337
0eb0a407
SM
23382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2339
2340 * linux-low.c (linux_set_resume_request): Remove unused
2341 variables.
2342
785922a5
SM
23432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 * server.c (first_thread_of): Remove.
2346 (process_serial_event): Replace usage of first_thread_of with
2347 find_any_thread_of_pid.
2348 * tracepoint.c (same_process_p): Remove.
2349 (gdb_agent_about_to_close): Replace usage of same_process_p with
2350 find_any_thread_of_pid.
2351 * linux-x86-low.c (same_process_callback): Remove.
2352 (x86_arch_setup_process_callback): Replace usage of
2353 same_process_callback with find_any_thread_of_pid.
2354 * thread-db.c (any_thread_of): Remove.
2355 (switch_to_process): Replace usage of any_thread_of with
2356 find_any_thread_of_pid.
2357 * inferiors.c (thread_pid_matches_callback): Remove.
2358 (find_thread_process): Adjust to use find_any_thread_of_pid.
2359
a059f00c
SDJ
23602017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2361
2362 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2363 with "!VEC_empty".
a059f00c 2364
cc397f3a
SDJ
23652017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2366
2367 * linux-low.c (handle_extended_wait): Use
2368 "allocate_target_description" instead of "XNEW".
2369 * linux-x86-low.c (initialize_low_arch): Likewise.
2370
22916b07
YQ
23712017-09-05 Yao Qi <yao.qi@linaro.org>
2372
2373 * configure.srv (srv_i386_regobj): Remove.
2374 (srv_amd64_regobj): Remove.
2375 (srv_regobj): Set it to "" for x86 non-linux targets.
2376 * linux-x86-tdesc.c (i386_linux_read_description):
2377 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2378 (init_registers_i386): Remove the declaration.
2379 (tdesc_i386): Remove the declaration.
2380 (lynx_i386_arch_setup): Call i386_create_target_description.
2381 * nto-x86-low.c: Likewise.
2382 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2383 [!__x86_64__]: include arch/i386.h.
2384 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2385
38602d55
YQ
23862017-09-05 Yao Qi <yao.qi@linaro.org>
2387
2388 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2389 i386/amd64-XXX-linux from it.
2390
44b886ff
YQ
23912017-09-05 Yao Qi <yao.qi@linaro.org>
2392
2393 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2394 false.
2395 (ipa_amd64_linux_regobj): Remove.
2396 (ipa_x32_linux_regobj): Remove.
2397
b4570e4b
YQ
23982017-09-05 Yao Qi <yao.qi@linaro.org>
2399
2400 * Makefile.in (arch-amd64.o): New rule.
2401 * configure.srv: Append arch-amd64.o.
2402 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2403 (get_ipa_tdesc): Call amd64_linux_read_description.
2404 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2405 and init_registers_amd64_XXX.
2406 * linux-x86-low.c (x86_linux_read_description): Call
2407 amd64_linux_read_description.
2408 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2409 (initialize_low_arch): Don't call init_registers_x32_XXX and
2410 init_registers_amd64_XXX.
2411 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2412 and tdesc_amd64_XXX.
2413 [__x86_64__] (amd64_tdesc_test): New function.
2414 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2415 and init_registers_amd64_XXX.
2416 * linux-x86-tdesc.c: Include arch/amd64.h.
2417 (xcr0_to_tdesc_idx): New function.
2418 (i386_linux_read_description): New function.
2419 (amd64_get_ipa_tdesc_idx): New function.
2420 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2421 (amd64_get_ipa_tdesc): Declare.
2422
d1f28ea2
YQ
24232017-09-05 Yao Qi <yao.qi@linaro.org>
2424
2425 * configure.srv (srv_i386_linux_xmlfiles): Remove
2426 i386/i386-XXX-linux.xml from it.
2427
25a93583
YQ
24282017-09-05 Yao Qi <yao.qi@linaro.org>
2429
2430 * configure.srv: Set srv_i386_linux_regobj empty if $development
2431 is false.
2432 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2433 initialize_low_tdesc.
2434 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2435 with #if initialize_low_tdesc.
2436 * linux-x86-tdesc-selftest.c: New file.
2437 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2438
5f035c07
YQ
24392017-09-05 Yao Qi <yao.qi@linaro.org>
2440
2441 * Makefile.in (arch-i386.o): New rule.
2442 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2443 (x86_64-*-linux*): Likewise.
2444 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2445 include arch/i386.h.
2446 (i386_linux_read_description): Remove code and call
2447 i386_create_target_description.
2448 * tdesc.c (allocate_target_description): New function.
2449 * tdesc.h (set_tdesc_architecture): Remove declaration.
2450 (set_tdesc_osabi): Likewise.
2451
0abe8a89
YQ
24522017-09-05 Yao Qi <yao.qi@linaro.org>
2453
2454 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2455 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2456 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2457 .xmltarget.
2458 * server.c (get_features_xml): Call tdesc_get_features_xml.
2459 * tdesc.c (set_tdesc_architecture): New function.
2460 (set_tdesc_osabi): New function.
2461 (tdesc_get_features_xml): New function.
2462 (tdesc_create_feature): Add an argument.
2463 * tdesc.h (struct target_desc) <features>: New field.
2464 <arch, osabi>: New field.
2465 (~target_desc): xfree features, arch, and osabi.
2466 (target_desc::oerator==): Don't compare .xmltarget.
2467 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2468 (set_tdesc_osabi): Likewise.
2469 (tdesc_get_features_xml): Likewise.
2470
0a188386
YQ
24712017-09-05 Yao Qi <yao.qi@linaro.org>
2472
2473 * linux-x86-tdesc.c: Include selftest.h.
2474 (i386_tdesc_test): New function.
2475 (initialize_low_tdesc): Call selftests::register_test.
2476 * tdesc.h: Include regdef.h.
2477 (target_desc): Override operator == and !=.
2478
f49ff000
YQ
24792017-09-05 Yao Qi <yao.qi@linaro.org>
2480
2481 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2482 (ipa_obj): Likewise.
2483 * linux-i386-ipa.c: Include common/x86-xstate.h
2484 (get_ipa_tdesc): Call i386_linux_read_description.
2485 (initialize_low_tracepoint): Don't call init_registers_XXX
2486 functions, call initialize_low_tdesc instead.
2487 * linux-x86-low.c (x86_linux_read_description): Call
2488 i386_linux_read_description.
2489 (initialize_low_arch): Don't call init_registers_i386_XXX
2490 functions, call initialize_low_tdesc.
2491 * linux-x86-tdesc.c: New file.
2492 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2493 (i386_get_ipa_tdesc_idx): Declare.
2494 (i386_get_ipa_tdesc): Declare.
2495 (initialize_low_tdesc): Declare.
2496
2b68ef2f
YQ
24972017-09-05 Yao Qi <yao.qi@linaro.org>
2498
2499 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2500 instead of 0.
2501
f7000548
YQ
25022017-09-05 Yao Qi <yao.qi@linaro.org>
2503
2504 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2505 * regcache.c (get_thread_regcache): Use VEC_length.
2506 (init_register_cache): Likewise.
2507 (regcache_cpy): Likewise.
2508 (registers_to_string): Iterate reg_defs via VEC_iterate.
2509 (find_regno): Likewise.
2510 (find_register_by_number): Use VEC_index.
2511 (register_size): Call find_register_by_number.
2512 (register_data): Call find_register_by_number.
2513 (supply_regblock): Use VEC_length.
2514 (regcache_raw_read_unsigned): Likewise.
2515 * tdesc.c (init_target_desc): Iterate reg_defs via
2516 VEC_iterate.
2517 (default_description): Update initializer.
2518 (copy_target_description): Don't update field num_registers.
2519 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2520 <num_registers>: Remove.
2521
50a421ac
SM
25222017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2523
2524 * Makefile.in (.SECONDARY): Define target.
2525
23fdd69e
SM
25262017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2527
2528 * linux-low.c (linux_wait_1): Adjust.
2529 * server.c (queue_stop_reply_callback): Adjust.
2530
0a2dde4a
SDJ
25312017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2532
2533 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2534 QEnvironmentUnset and QEnvironmentReset packets.
2535 (handle_query): Inform remote that QEnvironmentHexEncoded,
2536 QEnvironmentUnset and QEnvironmentReset are supported.
2537
6afd337d
SM
25382017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2539
2540 * inferiors.h (inferior_target_data): Rename to ...
2541 (thread_target_data): ... this.
2542 (inferior_regcache_data): Rename to ...
2543 (thread_regcache_data): ... this.
2544 (set_inferior_regcache_data): Rename to ...
2545 (set_thread_regcache_data): ... this.
2546 * inferiors.c (inferior_target_data): Rename to ...
2547 (thread_target_data): ... this.
2548 (inferior_regcache_data): Rename to ...
2549 (thread_regcache_data): ... this.
2550 (set_inferior_regcache_data): Rename to ...
2551 (set_thread_regcache_data): ... this.
2552 (free_one_thread): Update.
2553 * linux-low.h (get_thread_lwp): Update.
2554 * regcache.c (get_thread_regcache): Update.
2555 (regcache_invalidate_thread): Update.
2556 (free_register_cache_thread): Update.
2557 * win32-i386-low.c (update_debug_registers_callback): Update.
2558 (win32_get_current_dr): Update.
2559 * win32-low.c (thread_rec): Update.
2560 (delete_thread_info): Update.
2561 (continue_one_thread): Update.
2562 (suspend_one_thread): Update.
2563
a160cc46
SM
25642017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2565
2566 * inferiors.c (set_inferior_target_data): Remove.
2567 * inferiors.h (set_inferior_target_data): Remove.
2568
6d580b63
YQ
25692017-08-18 Yao Qi <yao.qi@linaro.org>
2570
2571 * Makefile.in (OBS): Add selftest.o.
2572 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2573 * configure, config.in: Re-generated.
2574 * server.c: Include common/sefltest.h.
2575 (captured_main): Handle option --selftest.
2576
f5a29eb0
YQ
25772017-08-09 Yao Qi <yao.qi@linaro.org>
2578
2579 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2580 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2581 i386-avx-mpx.o and i386-mmx.o.
2582 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2583 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2584 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2585 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2586 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2587 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2588 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2589 i386/amd64-avx-mpx.xml.
2590
57757c2f
YQ
25912017-08-09 Yao Qi <yao.qi@linaro.org>
2592
2593 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2594 and x32-avx-avx512.o.
2595 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2596 i386/x32-avx-avx512.xml.
2597
229d26fc
SM
25982017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * tracepoint.h (enum class fast_tpoint_collect_result): New
2601 enumeration.
2602 (fast_tracepoint_collecting): Change return type to
2603 fast_tpoint_collect_result.
2604 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2605 * linux-low.h: Include tracepoint.h.
2606 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2607 fast_tpoint_collect_result.
2608 * linux-low.c (handle_tracepoints): Adjust.
2609 (linux_fast_tracepoint_collecting): Change return type to
2610 fast_tpoint_collect_result.
2611 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2612 linux_wait_1, stuck_in_jump_pad_callback,
2613 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2614 proceed_one_lwp): Adjust to type change.
2615
2e1e43e1
YQ
26162017-07-10 Yao Qi <yao.qi@linaro.org>
2617
2618 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2619
adc764e7
YQ
26202017-06-29 Yao Qi <yao.qi@linaro.org>
2621
2622 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2623 Remove.
2624 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2625
a206891a
SM
26262017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2629
9a6c7d9c
SDJ
26302017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2631
2632 * linux-low.c (linux_create_inferior): Adjust code to access the
2633 environment information via 'gdb_environ' class.
2634 * lynx-low.c (lynx_create_inferior): Likewise.
2635 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2636 (get_environ): Return a pointer to 'our_environ'.
2637 (captured_main): Initialize 'our_environ'.
2638 * server.h (get_environ): Adjust prototype.
2639 * spu-low.c (spu_create_inferior): Adjust code to access the
2640 environment information via 'gdb_environ' class.
2641
ae3e2ccf
SM
26422017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2643
2644 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2645 usage of "register" keyword.
2646
3e019bdc
SM
26472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2648
2649 * configure: Re-generate.
2650
8465943a
SM
26512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2652
2653 * configure: Re-generate.
2654
cf0dd6f0
SM
26552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2656
2657 * Makefile.in (COMPILE.pre): Add "-x c++".
2658
9845682b
SDJ
26592017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2660
2661 * fork-child.c: Conditionally include <signal.h>.
2662
aefd8b33
SDJ
26632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2664
2665 * server.c (handle_general_set): Handle new packet
2666 "QStartupWithShell".
2667 (handle_query): Add "QStartupWithShell" to the list of supported
2668 packets.
2669 (gdbserver_usage): Add help text explaining the
2670 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2671 options.
2672 (captured_main): Recognize and act upon the presence of the new
2673 CLI options.
2674
2090129c
SDJ
26752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2676 Pedro Alves <palves@redhat.com>
2677
2678 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2679 * configure: Regenerate.
2680 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2681 "fork-inferior.o".
2682 (i[34567]86-*-lynxos*): Likewise.
2683 (spu*-*-*): Likewise.
2684 * fork-child.c: New file.
2685 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2686 and "environ.h".
2687 (linux_ptrace_fun): New function.
2688 (linux_create_inferior): Adjust function prototype to reflect
2689 change on "target.h". Adjust function code to use
2690 "fork_inferior".
2691 (linux_request_interrupt): Delete "signal_pid".
2692 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2693 (lynx_ptrace_fun): New function.
2694 (lynx_create_inferior): Adjust function prototype to reflect
2695 change on "target.h". Adjust function code to use
2696 "fork_inferior".
2697 * nto-low.c (nto_create_inferior): Adjust function prototype and
2698 code to reflect change on "target.h". Update comments.
2699 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2700 "common-terminal.h" and "environ.h".
2701 (terminal_fd): Moved to fork-child.c.
2702 (old_foreground_pgrp): Likewise.
2703 (restore_old_foreground_pgrp): Likewise.
2704 (last_status): Make it global.
2705 (last_ptid): Likewise.
2706 (our_environ): New variable.
2707 (startup_with_shell): Likewise.
2708 (program_name): Likewise.
2709 (program_argv): Rename to...
2710 (program_args): ...this.
2711 (wrapper_argv): New variable.
2712 (start_inferior): Delete function.
2713 (get_exec_wrapper): New function.
2714 (get_exec_file): Likewise.
2715 (get_environ): Likewise.
2716 (prefork_hook): Likewise.
2717 (post_fork_inferior): Likewise.
2718 (postfork_hook): Likewise.
2719 (postfork_child_hook): Likewise.
2720 (handle_v_run): Update code to deal with arguments coming from the
2721 remote host. Update calls from "start_inferior" to
2722 "create_inferior".
2723 (captured_main): Likewise. Initialize environment variable. Call
2724 "have_job_control".
2725 * server.h (post_fork_inferior): New prototype.
2726 (get_environ): Likewise.
2727 (last_status): Declare.
2728 (last_ptid): Likewise.
2729 (signal_pid): Likewise.
2730 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2731 (spu_ptrace_fun): New function.
2732 (spu_create_inferior): Adjust function prototype to reflect change
2733 on "target.h". Adjust function code to use "fork_inferior".
2734 * target.c (target_terminal_init): New function.
2735 (target_terminal_inferior): Likewise.
2736 (target_terminal_ours): Likewise.
2737 * target.h: Include <vector>.
2738 (struct target_ops) <create_inferior>: Update prototype.
2739 (create_inferior): Update macro.
2740 * utils.c (gdb_flush_out_err): New function.
2741 * win32-low.c (win32_create_inferior): Adjust function prototype
2742 and code to reflect change on "target.h".
2743
043a4934
SDJ
27442017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2745
2746 * inferiors.c (switch_to_thread): New function.
2747
15652511
SDJ
27482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2749
2750 * Makefile.in (SFILE): Add "common/job-control.c".
2751 (OBS): Add "job-control.o".
2752
21ea5acd
SDJ
27532017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2754
2755 * Makefile: Remove "@host_makefile_frag@".
2756
e13cb306
PA
27572017-05-05 Pedro Alves <palves@redhat.com>
2758
2759 * configure: Regenerate.
2760
c94fee56
SDJ
27612017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2762
2763 * configure: Regenerate.
2764
a0ff9e1a
SM
27652017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2766
2767 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2768 software_single_step change of return type to
2769 std::vector<CORE_ADDR>.
2770 * linux-low.c (install_software_single_step_breakpoints):
2771 Likewise.
2772 * linux-low.h (install_software_single_step_breakpoints):
2773 Likewise.
2774
be628ab8
SDJ
27752017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2776
2777 * remote-utils.c: Include "gdb_termios.h" instead of
2778 "terminal.h".
2779 * terminal.h: Delete file.
2780
7c5ded6a
SDJ
27812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2782
2783 * server.c: Include <vector>.
2784 <program_argv, wrapper_argv>: Convert to std::vector.
2785 (start_inferior): Rewrite function to use C++.
2786 (handle_v_run): Likewise. Update code that calculates the argv
2787 based on the vRun packet; use C++.
2788 (captured_main): Likewise.
2789
436252de
SM
27902017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2791
2792 * server.c (handle_v_cont): Initialize thread_resume::thread
2793 with null_ptid.
2794
9bf2a700
PA
27952017-04-05 Pedro Alves <palves@redhat.com>
2796
2797 * configure: Regenerate.
2798
a121b7c1
PA
27992017-04-05 Pedro Alves <palves@redhat.com>
2800
2801 * gdbreplay.c (sync_error): Constify.
2802 * linux-x86-low.c (push_opcode): Constify.
2803
21c8a587
PA
28042017-04-05 Pedro Alves <palves@redhat.com>
2805
2806 * win32-low.c (get_child_debug_event)
2807 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2808 Report TARGET_WAITKIND_SPURIOUS instead.
2809
fb32b4f7
PA
28102017-04-05 Pedro Alves <palves@redhat.com>
2811
e79be6e5
SM
2812 * remote-utils.c (remote_prepare, remote_open): Constify.
2813 * remote-utils.h (remote_prepare, remote_open): Constify.
2814 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2815
65dd1e59
SM
28162017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2817
2818 * Makefile.in (clean): Clear .deps.
2819
8fa5b777
SM
28202017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2821
2822 * .gitignore: Remove generated files, replace with wildcard.
2823 * (clean): Replace removal of generated files with wildcard.
2824 (version.c): Replace with...
2825 (version-generated.c): ...this.
2826 (xml-builtin.c): Replace with...
2827 (xml-builtin-generated.c): ...this.
2828 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2829 (%.c: *regformats*): Replace with...
2830 (%-generated.c: *regformats*): ...this.
2831
a12e714b
MF
28322017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2833
2834 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2835 (xtensa_fill_gregset): Call collect_register_by_name for
2836 threadptr register.
2837 (xtensa_store_gregset): Call supply_register_by_name for
2838 threadptr register.
2839
1a09b50a
MF
28402017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2841
2842 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2843 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2844 (xtensa_store_gregset): Call supply_register for all registers in
2845 a0_regnum..a0_regnum + C0_NREGS range.
2846
1a01e7c6
SM
28472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2848
2849 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2850 (ax-ipa.o: ax.c): Remove.
2851 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2852 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2853 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2854 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2855 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2856
36bc18a8
SM
28572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2858
2859 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2860 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2861 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2862 (errors-ipa.o: ../common/errors.c): Remove.
2863 (format-ipa.o: ../common/format.c): Remove.
2864 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2865
a8ebe3d5
SM
28662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2867
2868 * Makefile.in (%-ipa.o: %.c): New rule.
2869 (tracepoint-ipa.o: tracepoint.c): Remove.
2870 (utils-ipa.o: utils.c): Remove.
2871 (remote-utils-ipa.o: remote-utils.c): Remove.
2872 (regcache-ipa.o: regcache.c): Remove.
2873 (i386-linux-ipa.o: i386-linux.c): Remove.
2874 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2875 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2876 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2877 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2878 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2879 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2880 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2881 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2882 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2883 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2884 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2885 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2886 (aarch64-ipa.o: aarch64.c): Remove.
2887 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2888 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2889 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2890 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2891 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2892 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2893 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2894 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2895 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2896 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2897 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2898 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2899 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2900 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2901 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2902 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2903 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2904 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2905 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2906 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2907 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2908 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2909 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2910 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2911 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2912 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2913 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2914 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2915 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2916 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2917 (tdesc-ipa.o: tdesc.c): Remove.
2918 (x32-linux-ipa.o: x32-linux.c): Remove.
2919 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2920 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2921
50cfacb7
SM
29222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2923
2924 * Makefile.in (%.o: ../arch/%.c): New rule.
2925 (arm.o: ../arch/arm.c): Remove.
2926 (arm-linux.o: ../arch/arm-linux.c): Remove.
2927 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2928 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2929
c5a22423
SM
29302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2931
2932 * Makefile.in (%.o: ../nat/%.c): New rule.
2933 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2934 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2935 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2936 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2937 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2938 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2939 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2940 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2941 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2942 (linux-personality.o: ../nat/linux-personality.c): Remove.
2943 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2944 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2945 (x86-linux.o: ../nat/x86-linux.c): Remove.
2946 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2947 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2948
6bda016b
SM
29492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2950
2951 * Makefile.in (%.o: ../common/%.c): New rule.
2952 (signals.o: ../common/signals.c): Remove.
2953 (print-utils.o: ../common/print-utils.c): Remove.
2954 (rsp-low.o: ../common/rsp-low.c): Remove.
2955 (common-utils.o: ../common/common-utils.c): Remove.
2956 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2957 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2958 (vec.o: ../common/vec.c): Remove.
2959 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2960 (xml-utils.o: ../common/xml-utils.c): Remove.
2961 (ptid.o: ../common/ptid.c): Remove.
2962 (buffer.o: ../common/buffer.c): Remove.
2963 (format.o: ../common/format.c): Remove.
2964 (filestuff.o: ../common/filestuff.c): Remove.
2965 (agent.o: ../common/agent.c): Remove.
2966 (errors.o: ../common/errors.c): Remove.
2967 (environ.o: ../common/environ.c): Remove.
2968 (common-debug.o: ../common/common-debug.c): Remove.
2969 (cleanups.o: ../common/cleanups.c): Remove.
2970 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2971 (fileio.o: ../common/fileio.c): Remove.
2972 (common-regcache.o: ../common/common-regcache.c): Remove.
2973 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2974 (new-op.o: ../common/new-op.c): Remove.
2975 (btrace-common.o: ../common/btrace-common.c): Remove.
2976
21122961
SM
29772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2978
2979 * Makefile.in (%.o: ../target/%.c): New rule.
2980 (waitstatus.o: ../target/waitstatus.c): Remove.
2981
c362e621
SM
29822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2983
2984 * Makefile.in
2985 (%.c: ../regformats/%.dat,
2986 (%.c: ../regformats/arm/%.dat,
2987 (%.c: ../regformats/i386/%.dat,
2988 (%.c: ../regformats/rs6000/%.dat): New rules.
2989 (aarch64.c): Remove.
2990 (reg-arm.c): Remove.
2991 (arm-with-iwmmxt.c): Remove.
2992 (arm-with-vfpv2.c): Remove.
2993 (arm-with-vfpv3.c): Remove.
2994 (arm-with-neon.c): Remove.
2995 (reg-bfin.c): Remove.
2996 (reg-cris.c): Remove.
2997 (reg-crisv32.c): Remove.
2998 (i386.c): Remove.
2999 (i386-linux.c): Remove.
3000 (i386-avx.c): Remove.
3001 (i386-avx-linux.c): Remove.
3002 (i386-avx-avx512.c): Remove.
3003 (i386-avx-avx512-linux.c): Remove.
3004 (i386-mpx.c): Remove.
3005 (i386-mpx-linux.c): Remove.
3006 (i386-avx-mpx-avx512-pku.c): Remove.
3007 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3008 (i386-avx-mpx.c): Remove.
3009 (i386-avx-mpx-linux.c): Remove.
3010 (i386-mmx.c): Remove.
3011 (i386-mmx-linux.c): Remove.
3012 (reg-ia64.c): Remove.
3013 (reg-m32r.c): Remove.
3014 (reg-m68k.c): Remove.
3015 (reg-cf.c): Remove.
3016 (mips-linux.c): Remove.
3017 (mips-dsp-linux.c): Remove.
3018 (mips64-linux.c): Remove.
3019 (mips64-dsp-linux.c): Remove.
3020 (nios2-linux.c): Remove.
3021 (powerpc-32.c): Remove.
3022 (powerpc-32l.c): Remove.
3023 (powerpc-altivec32l.c): Remove.
3024 (powerpc-cell32l.c): Remove.
3025 (powerpc-vsx32l.c): Remove.
3026 (powerpc-isa205-32l.c): Remove.
3027 (powerpc-isa205-altivec32l.c): Remove.
3028 (powerpc-isa205-vsx32l.c): Remove.
3029 (powerpc-e500l.c): Remove.
3030 (powerpc-64l.c): Remove.
3031 (powerpc-altivec64l.c): Remove.
3032 (powerpc-cell64l.c): Remove.
3033 (powerpc-vsx64l.c): Remove.
3034 (powerpc-isa205-64l.c): Remove.
3035 (powerpc-isa205-altivec64l.c): Remove.
3036 (powerpc-isa205-vsx64l.c): Remove.
3037 (s390-linux32.c): Remove.
3038 (s390-linux32v1.c): Remove.
3039 (s390-linux32v2.c): Remove.
3040 (s390-linux64.c): Remove.
3041 (s390-linux64v1.c): Remove.
3042 (s390-linux64v2.c): Remove.
3043 (s390-te-linux64.c): Remove.
3044 (s390-vx-linux64.c): Remove.
3045 (s390-tevx-linux64.c): Remove.
3046 (s390x-linux64.c): Remove.
3047 (s390x-linux64v1.c): Remove.
3048 (s390x-linux64v2.c): Remove.
3049 (s390x-te-linux64.c): Remove.
3050 (s390x-vx-linux64.c): Remove.
3051 (s390x-tevx-linux64.c): Remove.
3052 (tic6x-c64xp-linux.c): Remove.
3053 (tic6x-c64x-linux.c): Remove.
3054 (tic6x-c62x-linux.c): Remove.
3055 (reg-sh.c): Remove.
3056 (reg-sparc64.c): Remove.
3057 (reg-spu.c): Remove.
3058 (amd64.c): Remove.
3059 (amd64-linux.c): Remove.
3060 (amd64-avx.c): Remove.
3061 (amd64-avx-linux.c): Remove.
3062 (amd64-avx-avx512.c): Remove.
3063 (amd64-avx-avx512-linux.c): Remove.
3064 (amd64-mpx.c): Remove.
3065 (amd64-mpx-linux.c): Remove.
3066 (amd64-avx-mpx-avx512-pku.c): Remove.
3067 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3068 (amd64-avx-mpx.c): Remove.
3069 (amd64-avx-mpx-linux.c): Remove.
3070 (x32.c): Remove.
3071 (x32-linux.c): Remove.
3072 (x32-avx.c): Remove.
3073 (x32-avx-linux.c): Remove.
3074 (x32-avx-avx512.c): Remove.
3075 (x32-avx-avx512-linux.c): Remove.
3076 (reg-xtensa.c): Remove.
3077 (reg-tilegx.c): Remove.
3078 (reg-tilegx32.c): Remove.
3079
1672e0d9
SDJ
30802017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3081
3082 * Makefile.in (SFILES): Add "common/environ.c".
3083 (OBJS): Add "common/environ.h".
3084
239b6d10
WT
30852017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3086
3087 * configure.ac: Check if the fs_base and gs_base members of
3088 `struct user_regs_struct' exist.
3089 * config.in: Regenerated.
3090 * configure: Likewise.
3091
694b382c
AT
30922017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3093
3094 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3095 target_read_memory.
3096 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3097 (get_next_pcs_syscall_next_pc): Likewise.
3098
7dc53023
LM
30992016-12-23 Luis Machado <lgustavo@codesourcery.com>
3100
3101 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3102 * nto-x86-low.c: Likewise.
3103
ad02e4fe
SM
31042016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3105
3106 * Makefile.in: Include disable-implicit-rules.mk.
3107
dcb07cfa
PA
31082016-11-23 Pedro Alves <palves@redhat.com>
3109
3110 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3111 (debug_vprintf): Use std::chrono::steady_clock instead of
3112 gettimeofday. Use '.' instead of ':'.
3113 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3114 (get_timestamp): Use std::chrono::steady_clock instead of
3115 gettimeofday.
3116
8629c02c
SM
31172016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3118
3119 * Makefile.in: Fix whitespace formatting.
3120
b593ecca
SM
31212016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3122
3123 * Makefile.in (SFILES, OBS): Flatten list and order
3124 alphabetically.
3125
9986ba08
PA
31262016-11-23 Pedro Alves <palves@redhat.com>
3127
3128 * event-loop.c (handle_file_event): Use warning.
3129 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3130 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3131 Use warning.
3132
4eefa7bc
PA
31332016-11-23 Pedro Alves <palves@redhat.com>
3134
3135 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3136 output.
3137 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3138 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3139 debug_printf and debug_flush for debug output.
3140 * server.c (handle_general_set): Likewise.
3141 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3142 output.
3143
5443506e
SM
31442016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3145
3146 * Makefile.in (.c.o): Replace rule with ...
3147 (%.o: %.c): ... this one.
3148
3b165252
SM
31492016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3150
3151 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3152 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3153 make.
3154 * configure.ac: Remove checks for the make program.
3155 * configure: Re-generate.
3156
0bcda685
PA
31572016-10-28 Pedro Alves <palves@redhat.com>
3158
3159 * Makefile.in (CXX_DIALECT): Get from configure.
3160 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3161 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3162 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3163 * config.in: Regenerate.
3164 * configure: Regenerate.
3165
c3805894
YQ
31662016-10-27 Yao Qi <yao.qi@linaro.org>
3167
3168 * linux-low.c (linux_supports_range_stepping): Return true if
3169 can_software_single_step return true.
3170
89342618
YQ
31712016-10-27 Yao Qi <yao.qi@linaro.org>
3172
3173 * inferiors.c (find_inferior_in_random): New function.
3174 * inferiors.h (find_inferior_in_random): Declare.
3175 * linux-low.c (linux_wait_for_event_filtered): Call
3176 find_inferior_in_random instead of find_inferior.
3177
e3652c84
YQ
31782016-10-27 Yao Qi <yao.qi@linaro.org>
3179
3180 * linux-low.c (linux_wait_1): If single-step breakpoints are
3181 inserted, remove them.
3182
5a04c4cf
PA
31832016-10-26 Pedro Alves <palves@redhat.com>
3184
3185 * linux-low.c (handle_extended_wait): Link parent/child fork
3186 threads.
3187 (linux_wait_1): Unlink them.
3188 (linux_set_resume_request): Ignore resume requests for
3189 already-resumed and unhandled fork child threads.
3190 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3191 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3192 New functions.
3193 (handle_v_requests) <vCont>: Don't call require_running.
3194 * server.h (in_queued_stop_replies): New declaration.
3195
cb93dc7f
YQ
31962016-10-24 Yao Qi <yao.qi@linaro.org>
3197
3198 PR server/20733
3199 * linux-aarch64-low.c (append_insns): Cast the return value to
3200 'uint32_t *'.
3201
a1078bea
YQ
32022016-10-10 Yao Qi <yao.qi@linaro.org>
3203
3204 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3205
1fb77080
SDJ
32062016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3207
3208 * target.c (target_supports_multi_process): New function, moved
3209 from...
3210 * target.h (target_supports_multi_process): ... here. Remove
3211 macro.
3212
39b5a3b9
TT
32132016-10-05 Tom Tromey <tom@tromey.com>
3214
3215 PR remote/20655:
3216 * tracepoint.c (handle_tracepoint_bkpts): Check
3217 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3218
c1d0b70a
YQ
32192016-10-05 Yao Qi <yao.qi@linaro.org>
3220
3221 * configure.srv: Update the path of arm-*.xml files.
3222
0a69eedb
YQ
32232016-10-05 Terry Guo <terry.guo@arm.com>
3224 Yao Qi <yao.qi@linaro.org>
3225
3226 * Makefile.in: Adjust the path of rules.
3227 * configure.srv: Update the path of xml files.
3228 * regformats/arm-with-iwmmxt.dat: Regenerated.
3229 * regformats/arm-with-neon.dat: Likewise.
3230 * regformats/arm-with-vfpv2.dat: Likewise.
3231 * regformats/arm-with-vfpv3.dat Likewise.
3232
17e16485
YQ
32332016-09-30 Yao Qi <yao.qi@linaro.org>
3234
3235 PR gdbserver/20627
3236 * target.c (target_stop_and_wait): Don't call
3237 target_continue_no_signal, use resume_stop instead.
3238
edeeb602
YQ
32392016-09-26 Yao Qi <yao.qi@linaro.org>
3240
3241 * linux-low.c (linux_wait_1): Call debug_exit.
3242
503b1c39
PA
32432016-09-23 Pedro Alves <palves@redhat.com>
3244
3245 * Makefile.in (SFILES): Add common/new-op.c.
3246 (OBS): Add common/new-op.o.
3247 (new-op.o): New rule.
3248
74172ecf
SM
32492016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3250
3251 * .gitinore: Ignore more files.
3252
fc6cda2e
YQ
32532016-09-21 Yao Qi <yao.qi@linaro.org>
3254
3255 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3256 23.
3257
bc1e6c81
SDJ
32582016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3259
3260 * server.c (start_inferior): Call target_mourn_inferior instead of
3261 mourn_inferior; pass ptid_t argument to it.
3262 (resume): Likewise.
3263 (handle_target_event): Likewise.
3264 * target.c (target_mourn_inferior): New function.
3265 * target.h (mourn_inferior): Delete macro.
3266
0e00e962
AA
32672016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3268
3269 * linux-low.c (lwp_is_stepping): New function.
3270
1d8cb77d
CL
32712016-09-06 Carl Love <cel@us.ibm.com>
3272
3273 * server.c (start_inferior): Fixed comment, requested comment change
3274 didn't get updated correctly. Removed reference to ptrace () call as
3275 it is only true on Linux systems.
3276
7313bced
CL
32772016-09-06 Carl Love <cel@us.ibm.com>
3278
3279 * server.c (start_inferior): Do not call
3280 function target_post_create_inferior () if the
3281 inferior process has already exited.
3282
cf6de44d
PA
32832016-09-05 Pedro Alves <palves@redhat.com>
3284
3285 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3286 (COMPILE.pre, CC_LD): Use CXX directly.
3287 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3288 * acinclude.m4: Don't include build-with-cxx.m4.
3289 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3290 * configure: Regenerate.
3291
c1da6748
AT
32922016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3293
3294 PR gdb/19495
3295 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3296 call writing data to own_buf.
3297
f2b9e3df
SDJ
32982016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3299
3300 * target.c (mywait): Call target_wait instead of
3301 the_target->wait.
3302 (target_wait): New function.
3303
049a8570
SDJ
33042016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3305
3306 * server.c (start_inferior): New variable 'ptid'. Replace calls
3307 to the_target->resume by target_continue{,_no_signal}, depending
3308 on the case.
3309 * target.c (target_stop_and_wait): Call target_continue_no_signal
3310 instead of the_target->resume.
3311 (target_continue): New function.
3312
3aa5cfa0
AT
33132016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3314
3315 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3316
754653a7
AZ
33172016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3318
3319 PR server/20491
3320 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3321 ps_prochandle.
3322 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3323 * linux-arm-low.c (ps_get_thread_area): Likewise.
3324 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3325 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3326 * linux-mips-low.c (ps_get_thread_area): Likewise.
3327 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3328 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3329 * linux-x86-low.c (ps_get_thread_area): Likewise.
3330 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3331
ed036b40
PA
33322016-08-19 Pedro Alves <palves@redhat.com>
3333
3334 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3335
c8ef42ee
PA
33362016-08-19 Pedro Alves <palves@redhat.com>
3337
3338 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3339 comment. Use memcpy instead of casting through unsigned long.
3340
9c235a72
PA
33412016-08-19 Pedro Alves <palves@redhat.com>
3342
3343 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3344 allocating around 0x80000000.
3345
201506da
PA
33462016-08-19 Pedro Alves <palves@redhat.com>
3347
3348 PR gdb/20415
3349 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3350 (x32-avx512-linux-ipa.o): New rules.
3351 * configure.ac (x86_64-*-linux*): New x32 check.
3352 * configure.srv (ipa_x32_linux_regobj): New.
3353 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3354 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3355 descriptions.
3356 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3357 descriptions.
3358 * configure: Regenerate.
3359
f348d89a
PA
33602016-08-09 Pedro Alves <palves@redhat.com>
3361
3362 PR gdb/18653
3363 * Makefile.in (OBS): Add signals-state-save-restore.o.
3364 (signals-state-save-restore.o): New rule.
3365 * config.in: Regenerate.
3366 * configure: Regenerate.
3367 * linux-low.c: Include "signals-state-save-restore.h".
3368 (linux_create_inferior): Call
3369 restore_original_signals_state.
3370 * server.c: Include "dispositions-save-restore.h".
3371 (captured_main): Call save_original_signals_state.
3372
1baf5149
PA
33732016-08-05 Pedro Alves <palves@redhat.com>
3374
3375 * configure: Regenerate.
3376
fcd4a73d
YQ
33772016-08-04 Yao Qi <yao.qi@linaro.org>
3378
3379 * linux-low.c (regsets_fetch_inferior_registers): Check
3380 errno is ESRCH or not.
3381
979659d0
YQ
33822016-08-02 Yao Qi <yao.qi@linaro.org>
3383
3384 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3385 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3386 (thread_db_load_search): Update.
3387 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3388 td_ta_set_event and td_ta_event_getmsg.
3389
6598661d
PA
33902016-07-26 Pedro Alves <palves@redhat.com>
3391
3392 PR server/20414
3393 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3394 of unsigned long for 64-bit registers and use uint32_t instead of
3395 unsigned int for 32-bit registers.
3396
9cf12d57
PA
33972016-07-26 Pedro Alves <palves@redhat.com>
3398
3399 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3400 to 'ptrace'.
3401
305450ed
TT
34022016-07-21 Tom Tromey <tom@tromey.com>
3403
3404 * configure: Rebuild.
3405
2583da7c
YQ
34062016-07-21 Yao Qi <yao.qi@linaro.org>
3407
3408 * mem-break.c (find_gdb_breakpoint): Cast bp to
3409 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3410
21536b36
YQ
34112016-07-21 Yao Qi <yao.qi@linaro.org>
3412
3413 * server.c (handle_v_requests): Support s and S actions
3414 if target_supports_software_single_step return true.
3415
8901d193
YQ
34162016-07-21 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3419 is resume_step, call maybe_hw_step.
3420 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3421 and unstop them.
3422 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3423 breakpoints or not.
3424 (proceed_one_lwp): If resume request is resume_step, install
3425 reinsert breakpoints and call maybe_hw_step.
3426
0e9a339e
YQ
34272016-07-21 Yao Qi <yao.qi@linaro.org>
3428
3429 * linux-low.c (proceed_one_lwp): Declare.
3430 (linux_resume_one_thread): Remove local variable 'step'.
3431 Lift code enqueue signal. Call proceed_one_lwp instead of
3432 linux_resume_one_lwp.
3433
4281b351
YQ
34342016-07-21 Yao Qi <yao.qi@linaro.org>
3435
3436 * linux-low.c (linux_resume_one_thread): Call
3437 enqueue_pending_signal.
3438
984a2c04
YQ
34392016-07-21 Yao Qi <yao.qi@linaro.org>
3440
3441 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3442 * inferiors.c (do_restore_current_thread_cleanup): New function.
3443 (make_cleanup_restore_current_thread): Likewise.
3444 * linux-low.c (install_software_single_step_breakpoints): Call
3445 make_cleanup_restore_current_thread. Switch current_thread to
3446 thread.
3447
bec903c9
YQ
34482016-07-21 Yao Qi <yao.qi@linaro.org>
3449
3450 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3451 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3452 (clone_one_breakpoint): Likewise.
3453 (delete_reinsert_breakpoints): Change parameter to thread.
3454 Callers updated.
3455 (has_reinsert_breakpoints): Likewise.
3456 (uninsert_reinsert_breakpoints): Likewise.
3457 (reinsert_reinsert_breakpoints): Likewise.
3458 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3459 (delete_reinsert_breakpoints): Likewise.
3460 (reinsert_reinsert_breakpoints): Likewise.
3461 (uninsert_reinsert_breakpoints): Likewise.
3462 (has_reinsert_breakpoints): Likewise.
3463
63c40ec7
YQ
34642016-07-21 Yao Qi <yao.qi@linaro.org>
3465
3466 * inferiors.c (get_thread_process): Make parameter const.
3467 * inferiors.h (get_thread_process): Update declaration.
3468 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3469 Add new parameters child_thread and parent_thread. Callers
3470 updated.
3471 * mem-break.h (clone_all_breakpoints): Update declaration.
3472
9aa76cd0
YQ
34732016-07-21 Yao Qi <yao.qi@linaro.org>
3474
3475 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3476 <command_list, handler>: Remove.
3477 (struct gdb_breakpoint): New.
3478 (struct other_breakpoint): New.
3479 (struct reinsert_breakpoint): New.
3480 (is_gdb_breakpoint): New function.
3481 (any_persistent_commands): Update command_list if
3482 is_gdb_breakpoint returns true.
3483 (set_breakpoint): Create breakpoints according to their types.
3484 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3485 (set_gdb_breakpoint_1): Likewise.
3486 (set_gdb_breakpoint): Likewise.
3487 (clear_breakpoint_conditions): Change parameter type to
3488 'struct gdb_breakpoint *'.
3489 (clear_breakpoint_commands): Likewise.
3490 (clear_breakpoint_conditions_and_commands): Likewise.
3491 (add_condition_to_breakpoint): Likewise.
3492 (add_breakpoint_condition): Likewise.
3493 (add_commands_to_breakpoint): Likewise.
3494 (check_breakpoints): Check other_breakpoint.
3495 (clone_one_breakpoint): Clone breakpopint according to its type.
3496 * mem-break.h (struct gdb_breakpoint): Declare.
3497 (set_gdb_breakpoint): Update declaration.
3498 (clear_breakpoint_conditions_and_commands): Likewise.
3499 (add_breakpoint_condition): Likewise.
3500 (add_breakpoint_commands): Likewise.
3501 * server.c (process_point_options): Change parameter type to
3502 'struct gdb_breakpoint *'.
3503
811f8301
YQ
35042016-07-21 Yao Qi <yao.qi@linaro.org>
3505
3506 * mem-break.c (set_breakpoint_at): Rename it to ...
3507 (set_breakpoint_type_at): ... it.
3508 (set_breakpoint_at): Call set_breakpoint_type_at.
3509 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3510 * mem-break.h (set_breakpoint_at): Update comments.
3511
b1c51e36
CLT
35122016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3513
3514 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3515 to buf parameter.
3516 (nios2_store_gregset): Likewise.
3517
ced2dffb
PA
35182016-07-01 Pedro Alves <palves@redhat.com>
3519 Antoine Tremblay <antoine.tremblay@ericsson.com>
3520
3521 * linux-low.c: Change interface to take the target lwp_info
3522 pointer directly and return void. Handle detaching from a zombie
3523 thread.
3524 (linux_detach_lwp_callback): New function.
3525 (linux_detach): Detach from the leader thread after detaching from
3526 the clone threads.
3527
2ac09a5b
YQ
35282016-06-28 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3531 for variable new_offset.
3532 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3533 (aarch64_ftrace_insn_reloc_cb): Likewise.
3534 (aarch64_ftrace_insn_reloc_tb): Likewise.
3535 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3536 PRIx64 instead of PRIx32.
3537
79e7fd4f
YQ
35382016-06-28 Yao Qi <yao.qi@linaro.org>
3539
3540 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3541 (the_low_target): Install arm_get_syscall_trapinfo.
3542
061fc021
YQ
35432016-06-28 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3546 function.
3547 (the_low_target): Install aarch64_get_syscall_trapinfo.
3548
4cc32bec
YQ
35492016-06-28 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3552 Callers updated.
3553 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3554 Remove parameter sysno.
3555 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3556 sysret.
3557
782c1122
AA
35582016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3559
3560 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3561 (s390_emit_ne_goto): Likewise.
3562 (s390_emit_lt_goto): Likewise.
3563 (s390_emit_le_goto): Likewise.
3564 (s390_emit_gt_goto): Likewise.
3565 (s390_emit_ge_goto): Likewise.
3566 (s390x_emit_eq_goto): Likewise.
3567 (s390x_emit_ne_goto): Likewise.
3568 (s390x_emit_lt_goto): Likewise.
3569 (s390x_emit_le_goto): Likewise.
3570 (s390x_emit_gt_goto): Likewise.
3571 (s390x_emit_ge_goto): Likewise.
3572 (s390_emit_ops_impl): Mark variable static.
3573 (s390x_emit_ops): Likewise.
3574
2e7b624b
YQ
35752016-06-17 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-low.c (handle_extended_wait): Call
3578 uninsert_reinsert_breakpoints for the parent process. Remove
3579 reinsert breakpoints from the child process. Reinsert them to
3580 the parent process when vfork is done.
3581 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3582 (reinsert_reinsert_breakpoints): New function.
3583 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3584 (reinsert_reinsert_breakpoints): Declare.
3585
8a81c5d7
YQ
35862016-06-17 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-low.c (handle_extended_wait): If the parent is doing
3589 step-over, remove the reinsert breakpoints from the forked child.
3590
f50bf8e5
YQ
35912016-06-17 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-low.c (unsuspend_all_lwps): Declare.
3594 (linux_low_filter_event): If thread exited, call finish_step_over.
3595 If step-over is finished, unsuspend other threads.
3596
8376a3cb
YQ
35972016-06-17 Yao Qi <yao.qi@linaro.org>
3598
3599 * linux-low.c (linux_resume_one_lwp_throw): Assert
3600 has_reinsert_breakpoints returns false.
3601 * mem-break.c (delete_disabled_breakpoints): Assert
3602 bp type isn't reinsert_breakpoint.
3603
f79b145d
YQ
36042016-06-17 Yao Qi <yao.qi@linaro.org>
3605
3606 * linux-low.c (maybe_hw_step): New function.
3607 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3608 (finish_step_over): Switch current_thread to lwp temporarily,
3609 and assert has_reinsert_breakpoints returns true.
3610 (proceed_one_lwp): Call maybe_hw_step.
3611 * mem-break.c (has_reinsert_breakpoints): New function.
3612 * mem-break.h (has_reinsert_breakpoints): Declare.
3613
0ae534d2
JT
36142016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3615
3616 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3617
fcdad592
YQ
36182016-05-17 Yao Qi <yao.qi@linaro.org>
3619
3620 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3621 instead of find_inferior.
3622
9e784964
YQ
36232016-05-05 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3626 Initialize res to zero.
3627
cf2ebb6e
YQ
36282016-05-05 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3631 to uint32_t.
3632
c1aebf87
UW
36332016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3634
3635 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3636 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3637 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3638
35fd2deb 36392016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3640 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3641
3642 * tracepoint.c (write_inferior_int8): New function.
3643 (cmd_qtenable_disable): Write enable flag using
3644 write_inferior_int8.
3645
484b3c32
YQ
36462016-04-25 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3649 (need_step_over_p): Return zero if the LWP has pending signals
3650 can be delivered on software single step target.
3651
85ba7d86
YQ
36522016-04-25 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3655 return instead of error.
3656
3539aa13
YQ
36572016-04-22 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3660 to 23.
3661
5b061e98
YQ
36622016-04-22 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3665 signal when stepping over breakpoint with software single
3666 step.
3667
3451269c
PA
36682016-04-21 Pedro Alves <palves@redhat.com>
3669
3670 * linux-s390-low.c (s390_collect_ptrace_register)
3671 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3672 add casts.
3673 (s390_check_regset): Use void * instead of gdb_byte *.
3674
a2358508
PA
36752016-04-20 Pedro Alves <palves@redhat.com>
3676
3677 * configure: Renegerate.
3678
6885166d
YQ
36792016-04-20 Yao Qi <yao.qi@linaro.org>
3680
3681 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3682 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3683 number 16.
3684 (arm_store_gregset): Likewise.
3685
2b863f51
WT
36862016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3687
3688 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3689 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3690 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3691 (amd64-avx-mpx-linux.c): New rules.
3692 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3693 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3694 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3695 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3696 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3697 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3698 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3699 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3700 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3701 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3702 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3703 * linux-x86-low.c (x86_linux_read_description): Add case for
3704 X86_XSTATE_AVX_MPX_MASK.
3705 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3706 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3707 init_registers_i386_avx_mpx_linux.
3708 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3709 (initialize_low_tracepoint): Call
3710 init_registers_i386_avx_mpx_linux.
3711 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3712 (initialize_low_tracepoint): Call
3713 init_registers_amd64_avx_mpx_linux.
3714 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3715 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3716 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3717 declarations.
3718
9b30624b
PA
37192016-04-18 Pedro Alves <palves@redhat.com>
3720
3721 * configure: Regenerate.
3722
45e3745e
AT
37232016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3724
3725 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3726 (aarch64_emit_sub): Likewise.
3727
2afc13ff
PA
37282016-04-12 Pedro Alves <palves@redhat.com>
3729
3730 * utils.c (prepare_to_throw_exception): Delete.
3731
6e774b13
SM
37322016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3733
3734 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3735
4dca19f8
MK
37362016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3737
3738 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3739
d0a9981f
MK
37402016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3741
3742 * linux-aarch64-ipa.c: Add <elf.h> include.
3743 * linux-ppc-ipa.c: Add <elf.h> include.
3744 * linux-s390-ipa.c: Add <elf.h> include.
3745
252db07e
MK
37462016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3747
3748 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3749 (get_raw_reg_ptr): Likewise.
3750 (get_trace_state_variable_value_ptr): Likewise.
3751 (set_trace_state_variable_value_ptr): Likewise.
3752 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3753 char *.
3754
14e2b6d9
MK
37552016-03-31 Wei-cheng Wang <cole945@gmail.com>
3756 Marcin Kościelnicki <koriakin@0x04.net>
3757
3758 PR/17221
3759 * linux-ppc-low.c (emit_insns): New function.
3760 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3761 (ppc_emit_prologue): New function.
3762 (ppc_emit_epilogue): New function.
3763 (ppc_emit_add): New function.
3764 (ppc_emit_sub): New function.
3765 (ppc_emit_mul): New function.
3766 (ppc_emit_lsh): New function.
3767 (ppc_emit_rsh_signed): New function.
3768 (ppc_emit_rsh_unsigned): New function.
3769 (ppc_emit_ext): New function.
3770 (ppc_emit_zero_ext): New function.
3771 (ppc_emit_log_not): New function.
3772 (ppc_emit_bit_and): New function.
3773 (ppc_emit_bit_or): New function.
3774 (ppc_emit_bit_xor): New function.
3775 (ppc_emit_bit_not): New function.
3776 (ppc_emit_equal): New function.
3777 (ppc_emit_less_signed): New function.
3778 (ppc_emit_less_unsigned): New function.
3779 (ppc_emit_ref): New function.
3780 (ppc_emit_const): New function.
3781 (ppc_emit_reg): New function.
3782 (ppc_emit_pop): New function.
3783 (ppc_emit_stack_flush): New function.
3784 (ppc_emit_swap): New function.
3785 (ppc_emit_stack_adjust): New function.
3786 (ppc_emit_call): New function.
3787 (ppc_emit_int_call_1): New function.
3788 (ppc_emit_void_call_2): New function.
3789 (ppc_emit_if_goto): New function.
3790 (ppc_emit_goto): New function.
3791 (ppc_emit_eq_goto): New function.
3792 (ppc_emit_ne_goto): New function.
3793 (ppc_emit_lt_goto): New function.
3794 (ppc_emit_le_goto): New function.
3795 (ppc_emit_gt_goto): New function.
3796 (ppc_emit_ge_goto): New function.
3797 (ppc_write_goto_address): New function.
3798 (ppc_emit_ops_impl): New static variable.
3799 (ppc64v1_emit_prologue): New function.
3800 (ppc64v2_emit_prologue): New function.
3801 (ppc64_emit_epilogue): New function.
3802 (ppc64_emit_add): New function.
3803 (ppc64_emit_sub): New function.
3804 (ppc64_emit_mul): New function.
3805 (ppc64_emit_lsh): New function.
3806 (ppc64_emit_rsh_signed): New function.
3807 (ppc64_emit_rsh_unsigned): New function.
3808 (ppc64_emit_ext): New function.
3809 (ppc64_emit_zero_ext): New function.
3810 (ppc64_emit_log_not): New function.
3811 (ppc64_emit_bit_and): New function.
3812 (ppc64_emit_bit_or): New function.
3813 (ppc64_emit_bit_xor): New function.
3814 (ppc64_emit_bit_not): New function.
3815 (ppc64_emit_equal): New function.
3816 (ppc64_emit_less_signed): New function.
3817 (ppc64_emit_less_unsigned): New function.
3818 (ppc64_emit_ref): New function.
3819 (ppc64_emit_const): New function.
3820 (ppc64v1_emit_reg): New function.
3821 (ppc64v2_emit_reg): New function.
3822 (ppc64_emit_pop): New function.
3823 (ppc64_emit_stack_flush): New function.
3824 (ppc64_emit_swap): New function.
3825 (ppc64v1_emit_call): New function.
3826 (ppc64v2_emit_call): New function.
3827 (ppc64v1_emit_int_call_1): New function.
3828 (ppc64v2_emit_int_call_1): New function.
3829 (ppc64v1_emit_void_call_2): New function.
3830 (ppc64v2_emit_void_call_2): New function.
3831 (ppc64_emit_if_goto): New function.
3832 (ppc64_emit_eq_goto): New function.
3833 (ppc64_emit_ne_goto): New function.
3834 (ppc64_emit_lt_goto): New function.
3835 (ppc64_emit_le_goto): New function.
3836 (ppc64_emit_gt_goto): New function.
3837 (ppc64_emit_ge_goto): New function.
3838 (ppc64v1_emit_ops_impl): New static variable.
3839 (ppc64v2_emit_ops_impl): New static variable.
3840 (ppc_emit_ops): New function.
3841 (linux_low_target): Wire in ppc_emit_ops.
3842
a2174ba4
MK
38432016-03-31 Wei-cheng Wang <cole945@gmail.com>
3844 Marcin Kościelnicki <koriakin@0x04.net>
3845
3846 PR/17221
3847 * Makefile.in: Add powerpc-*-ipa.o
3848 * configure.srv: Add ipa_obj for powerpc*-linux.
3849 * linux-ppc-ipa.c: New file.
3850 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3851 includes.
3852 (PPC_FIELD): New macro.
3853 (PPC_SEXT): New macro.
3854 (PPC_OP6): New macro.
3855 (PPC_BO): New macro.
3856 (PPC_LI): New macro.
3857 (PPC_BD): New macro.
3858 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3859 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3860 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3861 (ppc_get_thread_area): New function.
3862 (is_elfv2_inferior): New function.
3863 (gen_ds_form): New function.
3864 (GEN_STD): New macro.
3865 (GEN_STDU): New macro.
3866 (GEN_LD): New macro.
3867 (GEN_LDU): New macro.
3868 (gen_d_form): New function.
3869 (GEN_ADDI): New macro.
3870 (GEN_ADDIS): New macro.
3871 (GEN_LI): New macro.
3872 (GEN_LIS): New macro.
3873 (GEN_ORI): New macro.
3874 (GEN_ORIS): New macro.
3875 (GEN_LWZ): New macro.
3876 (GEN_STW): New macro.
3877 (GEN_STWU): New macro.
3878 (gen_xfx_form): New function.
3879 (GEN_MFSPR): New macro.
3880 (GEN_MTSPR): New macro.
3881 (GEN_MFCR): New macro.
3882 (GEN_MTCR): New macro.
3883 (GEN_SYNC): New macro.
3884 (GEN_LWSYNC): New macro.
3885 (gen_x_form): New function.
3886 (GEN_OR): New macro.
3887 (GEN_MR): New macro.
3888 (GEN_LWARX): New macro.
3889 (GEN_STWCX): New macro.
3890 (GEN_CMPW): New macro.
3891 (gen_md_form): New function.
3892 (GEN_RLDICL): New macro.
3893 (GEN_RLDICR): New macro.
3894 (gen_i_form): New function.
3895 (GEN_B): New macro.
3896 (GEN_BL): New macro.
3897 (gen_b_form): New function.
3898 (GEN_BNE): New macro.
3899 (GEN_LOAD): New macro.
3900 (GEN_STORE): New macro.
3901 (gen_limm): New function.
3902 (gen_atomic_xchg): New function.
3903 (gen_call): New function.
3904 (ppc_relocate_instruction): New function.
3905 (ppc_install_fast_tracepoint_jump_pad): New function.
3906 (ppc_get_min_fast_tracepoint_insn_len): New function.
3907 (ppc_get_ipa_tdesc_idx): New function.
3908 (the_low_target): Wire in the new functions.
3909 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3910 tdescs.
3911 * linux-ppc-tdesc.h: New file.
3912
a13c4696
MK
39132016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3914
3915 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3916 (alloc_jump_pad_buffer): New function.
3917 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3918 (alloc_jump_pad_buffer): New function.
3919 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3920 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3921 (alloc_jump_pad_buffer): New function.
3922 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3923 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3924 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3925 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3926
1cda1512
MK
39272016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3928
3929 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3930 * linux-amd64-ipa.c: Likewise.
3931 * linux-i386-ipa.c: Likewise.
3932 * linux-s390-ipa.c: Likewise.
3933 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3934 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3935 set_trace_state_variable_value_ptr.
3936 (struct ipa_sym_addresses): Likewise.
3937 (symbol_list): Likewise.
3938 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3939 accessing gdb_collect directly.
3940 (gdb_collect_ptr_type): New typedef.
3941 (get_raw_reg_ptr_type): New typedef.
3942 (get_trace_state_variable_value_ptr_type): New typedef.
3943 (set_trace_state_variable_value_ptr_type): New typedef.
3944 (gdb_collect_ptr): New global.
3945 (get_raw_reg_ptr): New global.
3946 (get_trace_state_variable_value_ptr): New global.
3947 (set_trace_state_variable_value_ptr): New global.
3948 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3949 accessing get_raw_reg directly.
3950 (get_get_tsv_func_addr): Likewise for
3951 get_trace_state_variable_value_ptr.
3952 (get_set_tsv_func_addr): Likewise for
3953 set_trace_state_variable_value_ptr.
3954 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3955
72fb5488
SM
39562016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3957
3958 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3959
28170b88
MK
39602016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3961
3962 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3963 packets.
3964 (relocate_instruction): Remove own_buf.
3965 * server.c (own_buf): Make global.
3966 (handle_v_requests): Make global.
3967 * server.h (own_buf): New declaration.
3968 (handle_v_requests): New prototype.
3969
f39e8743
MK
39702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3971
3972 PR 18377
3973 * linux-s390-low.c (add_insns): New function.
3974 (s390_emit_prologue): New function.
3975 (s390_emit_epilogue): New function.
3976 (s390_emit_add): New function.
3977 (s390_emit_sub): New function.
3978 (s390_emit_mul): New function.
3979 (s390_emit_lsh): New function.
3980 (s390_emit_rsh_signed): New function.
3981 (s390_emit_rsh_unsigned): New function.
3982 (s390_emit_ext): New function.
3983 (s390_emit_log_not): New function.
3984 (s390_emit_bit_and): New function.
3985 (s390_emit_bit_or): New function.
3986 (s390_emit_bit_xor): New function.
3987 (s390_emit_bit_not): New function.
3988 (s390_emit_equal): New function.
3989 (s390_emit_less_signed): New function.
3990 (s390_emit_less_unsigned): New function.
3991 (s390_emit_ref): New function.
3992 (s390_emit_if_goto): New function.
3993 (s390_emit_goto): New function.
3994 (s390_write_goto_address): New function.
3995 (s390_emit_litpool): New function.
3996 (s390_emit_const): New function.
3997 (s390_emit_call): New function.
3998 (s390_emit_reg): New function.
3999 (s390_emit_pop): New function.
4000 (s390_emit_stack_flush): New function.
4001 (s390_emit_zero_ext): New function.
4002 (s390_emit_swap): New function.
4003 (s390_emit_stack_adjust): New function.
4004 (s390_emit_set_r2): New function.
4005 (s390_emit_int_call_1): New function.
4006 (s390_emit_void_call_2): New function.
4007 (s390_emit_eq_goto): New function.
4008 (s390_emit_ne_goto): New function.
4009 (s390_emit_lt_goto): New function.
4010 (s390_emit_le_goto): New function.
4011 (s390_emit_gt_goto): New function.
4012 (s390_emit_ge_goto): New function.
4013 (s390x_emit_prologue): New function.
4014 (s390x_emit_epilogue): New function.
4015 (s390x_emit_add): New function.
4016 (s390x_emit_sub): New function.
4017 (s390x_emit_mul): New function.
4018 (s390x_emit_lsh): New function.
4019 (s390x_emit_rsh_signed): New function.
4020 (s390x_emit_rsh_unsigned): New function.
4021 (s390x_emit_ext): New function.
4022 (s390x_emit_log_not): New function.
4023 (s390x_emit_bit_and): New function.
4024 (s390x_emit_bit_or): New function.
4025 (s390x_emit_bit_xor): New function.
4026 (s390x_emit_bit_not): New function.
4027 (s390x_emit_equal): New function.
4028 (s390x_emit_less_signed): New function.
4029 (s390x_emit_less_unsigned): New function.
4030 (s390x_emit_ref): New function.
4031 (s390x_emit_if_goto): New function.
4032 (s390x_emit_const): New function.
4033 (s390x_emit_call): New function.
4034 (s390x_emit_reg): New function.
4035 (s390x_emit_pop): New function.
4036 (s390x_emit_stack_flush): New function.
4037 (s390x_emit_zero_ext): New function.
4038 (s390x_emit_swap): New function.
4039 (s390x_emit_stack_adjust): New function.
4040 (s390x_emit_int_call_1): New function.
4041 (s390x_emit_void_call_2): New function.
4042 (s390x_emit_eq_goto): New function.
4043 (s390x_emit_ne_goto): New function.
4044 (s390x_emit_lt_goto): New function.
4045 (s390x_emit_le_goto): New function.
4046 (s390x_emit_gt_goto): New function.
4047 (s390x_emit_ge_goto): New function.
4048 (s390_emit_ops): New function.
4049 (struct linux_target_ops): Fill in emit_ops hook.
4050
abd9baf9
MK
40512016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4052
4053 PR 18377
4054 * Makefile.in: Add s390 IPA files.
4055 * configure.srv: Build IPA for s390.
4056 * linux-s390-ipa.c: New file.
4057 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4058 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4059 (tdesc_s390_linux32): Likewise.
4060 (init_registers_s390_linux32v1): Likewise.
4061 (tdesc_s390_linux32v1): Likewise.
4062 (init_registers_s390_linux32v2): Likewise.
4063 (tdesc_s390_linux32v2): Likewise.
4064 (init_registers_s390_linux64): Likewise.
4065 (tdesc_s390_linux64): Likewise.
4066 (init_registers_s390_linux64v1): Likewise.
4067 (tdesc_s390_linux64v1): Likewise.
4068 (init_registers_s390_linux64v2): Likewise.
4069 (tdesc_s390_linux64v2): Likewise.
4070 (init_registers_s390_te_linux64): Likewise.
4071 (tdesc_s390_te_linux64): Likewise.
4072 (init_registers_s390_vx_linux64): Likewise.
4073 (tdesc_s390_vx_linux64): Likewise.
4074 (init_registers_s390_tevx_linux64): Likewise.
4075 (tdesc_s390_tevx_linux64): Likewise.
4076 (init_registers_s390x_linux64): Likewise.
4077 (tdesc_s390x_linux64): Likewise.
4078 (init_registers_s390x_linux64v1): Likewise.
4079 (tdesc_s390x_linux64v1): Likewise.
4080 (init_registers_s390x_linux64v2): Likewise.
4081 (tdesc_s390x_linux64v2): Likewise.
4082 (init_registers_s390x_te_linux64): Likewise.
4083 (tdesc_s390x_te_linux64): Likewise.
4084 (init_registers_s390x_vx_linux64): Likewise.
4085 (tdesc_s390x_vx_linux64): Likewise.
4086 (init_registers_s390x_tevx_linux64): Likewise.
4087 (tdesc_s390x_tevx_linux64): Likewise.
4088 (have_hwcap_s390_vx): New static variable.
4089 (s390_arch_setup): Fill have_hwcap_s390_vx.
4090 (s390_get_thread_area): New function.
4091 (s390_ft_entry_gpr_esa): New const.
4092 (s390_ft_entry_gpr_zarch): New const.
4093 (s390_ft_entry_misc): New const.
4094 (s390_ft_entry_fr): New const.
4095 (s390_ft_entry_vr): New const.
4096 (s390_ft_main_31): New const.
4097 (s390_ft_main_64): New const.
4098 (s390_ft_exit_fr): New const.
4099 (s390_ft_exit_vr): New const.
4100 (s390_ft_exit_misc): New const.
4101 (s390_ft_exit_gpr_esa): New const.
4102 (s390_ft_exit_gpr_zarch): New const.
4103 (append_insns): New function.
4104 (s390_relocate_instruction): New function.
4105 (s390_install_fast_tracepoint_jump_pad): New function.
4106 (s390_get_min_fast_tracepoint_insn_len): New function.
4107 (s390_get_ipa_tdesc_idx): New function.
4108 (struct linux_target_ops): Wire in the above functions.
4109 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4110 * linux-s390-tdesc.h: New file.
4111
a4105d04
MK
41122016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4113
4114 * linux-s390-low.c (s390_supports_tracepoints): New function.
4115 (struct linux_target_ops): Fill supports_tracepoints hook.
4116
35ac8b3e
YQ
41172016-03-18 Yao Qi <yao.qi@linaro.org>
4118
4119 * linux-low.c (lwp_signal_can_be_delivered): New function.
4120 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4121
94610ec4
YQ
41222016-03-18 Yao Qi <yao.qi@linaro.org>
4123
4124 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4125 0 if signal is enqueued. Remove 'signal' from one debugging
4126 message. Move one debugging message to some lines below.
4127 Remove code setting 'signal' to 0.
4128
80aea927
YQ
41292016-03-18 Yao Qi <yao.qi@linaro.org>
4130
4131 * linux-low.c (linux_low_filter_event): Remove redundant
4132 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4133
b04fd3be
MK
41342016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4135
4136 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4137 (struct linux_target_ops): Wire in the above.
4138
c40c8d4b
YQ
41392016-03-03 Yao Qi <yao.qi@linaro.org>
4140
4141 * linux-low.c: Update comments to start_step_over.
4142
0f8288ae
YQ
41432016-03-03 Yao Qi <yao.qi@linaro.org>
4144
4145 PR server/19736
4146 * linux-low.c (handle_extended_wait): Set child suspended
4147 if event_lwp->bp_reinsert isn't zero.
4148
fdbd04a8
YQ
41492016-03-02 Yao Qi <yao.qi@linaro.org>
4150
4151 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4152 enqueue_pending_signal.
4153
6896a8fa
MK
41542016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4155
4156 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4157 is actually loaded.
4158
ab503087
MK
41592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4160
4161 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4162 (s390_regmap_3264) [!__s390x__]: New global.
4163 (s390_collect_ptrace_register): Skip map entries containing -1.
4164 (s390_supply_ptrace_register): Ditto.
4165 (s390_fill_gprs_high): New function.
4166 (s390_store_gprs_high): New function.
4167 (s390_regsets): Add NT_S390_HIGH_GPRS.
4168 (s390_get_hwcap): Enable on 31-bit.
4169 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4170 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4171 Detect NT_S390_HIGH_GPRS.
4172 (s390_usrregs_info_3264): Enable on 31-bit.
4173 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4174 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4175
ae91f625
MK
41762016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4177
4178 PR gdb/13808
4179 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4180 * configure.srv: Ditto.
4181 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4182 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4183 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4184 (init_registers_amd64_linux): Remove prototype.
4185 (tdesc_amd64_linux): Remove declaration.
4186 (get_ipa_tdesc): New function.
4187 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4188 initialize remaining tdescs.
4189 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4190 (init_registers_i386_linux): Remove prototype.
4191 (tdesc_i386_linux): Remove declaration.
4192 (get_ipa_tdesc): New function.
4193 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4194 initialize remaining tdescs.
4195 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4196 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4197 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4198 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4199 (x86_get_ipa_tdesc_idx): New function.
4200 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4201 * linux-x86-tdesc.h: New file.
4202 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4203 (target_get_ipa_tdesc_idx): New macro.
4204 * tracepoint.c (ipa_tdesc_idx): New macro.
4205 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4206 (symbol_list): Add ipa_tdesc_idx.
4207 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4208 (ipa_tdesc): Remove.
4209 (ipa_tdesc_idx): New variable.
4210 (get_context_regcache): Use get_ipa_tdesc.
4211 (gdb_collect): Ditto.
4212 (gdb_probe): Ditto.
4213 * tracepoint.h (get_ipa_tdesc): New prototype.
4214 (ipa_tdesc): Remove.
4215
e7ad2f14
PA
42162016-02-24 Pedro Alves <palves@redhat.com>
4217
4218 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4219 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4220 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4221 Factor out common code between the USE_SIGTRAP_SIGINFO and
4222 !USE_SIGTRAP_SIGINFO blocks.
4223 (linux_low_filter_event): Call save_stop_reason instead of
4224 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4225 Update comments.
4226 (linux_wait_1): Update comments.
4227
657f9cde
WW
42282016-02-24 Wei-cheng Wang <cole945@gmail.com>
4229
4230 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4231 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4232 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4233 ppc_insert_point, ppc_remove_point.
4234
b00b61e1
MK
42352016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4236
4237 * linux-s390-low.c (s390_supports_z_point_type): New function.
4238 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4239
553cb527
YQ
42402016-02-16 Yao Qi <yao.qi@linaro.org>
4241
4242 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4243 PC. Get pc from regcache_read_pc.
4244
a5652c21
YQ
42452016-02-12 Yao Qi <yao.qi@linaro.org>
4246
4247 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4248 or linux_get_pc_32bit.
4249 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4250
ed443b61
YQ
42512016-02-12 Yao Qi <yao.qi@linaro.org>
4252
4253 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4254 arm_linux_get_next_pcs_fixup.
4255
020ecd38
MK
42562016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4257
4258 * tracepoint.c (x_tracepoint_action_download): Change
4259 write_inferior_data_ptr to write_inferior_data_pointer.
4260 (cmd_qtstart): Likewise.
4261 (write_inferior_data_ptr): Remove.
4262 (download_agent_expr): Change write_inferior_data_ptr to
4263 write_inferior_data_pointer.
4264 (download_tracepoint_1): Likewise.
4265 (download_tracepoint): Likewise.
4266 (download_trace_state_variables): Likewise.
4267
7cae9051
WW
42682016-02-11 Wei-cheng Wang <cole945@gmail.com>
4269 Marcin Kościelnicki <koriakin@0x04.net>
4270
4271 * tracepoint.c (struct tracepoint_action_ops): Remove.
4272 (struct tracepoint_action): Remove ops.
4273 (m_tracepoint_action_download, r_tracepoint_action_download)
4274 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4275 size and offset accordingly.
4276 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4277 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4278 (tracepoint_action_send, tracepoint_action_download): New functions.
4279 Helpers for trace action handlers.
4280 (add_tracepoint_action): Remove setup actions ops.
4281 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4282
9f6a71b4
YQ
42832016-02-10 Yao Qi <yao.qi@linaro.org>
4284
4285 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4286
1e94266c
SM
42872016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4288
4289 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4290 to AC_OUTPUT.
4291 * configure: Regenerate.
4292
8adce034
SM
42932016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4294
4295 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4296 void * to gdb_byte *.
4297 * linux-low.c (siginfo_fixup): Likewise.
4298 (linux_xfer_siginfo): Likewise.
4299 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4300 Likewise.
4301 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4302
93813b37
WT
43032016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4304
4305 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4306 to srv_tgtobj.
4307 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4308 to srv_tgtobj.
4309 * linux-x86-low.c [__x86_64__]: Include
4310 "nat/amd64-linux-siginfo.h".
4311 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4312 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4313 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4314 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4315 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4316 (cpt_si_fd, si_timerid, si_overrun): Move from
4317 nat/amd64-linux-siginfo.c.
4318 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4319
8424cc97
SM
43202016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4321
4322 * server.c (skip_to_semicolon): Remove.
4323 (process_point_options): Use strchrnul instead of
4324 skip_to_semicolon.
4325
4d18591b
YQ
43262016-01-26 Yao Qi <yao.qi@linaro.org>
4327
4328 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4329 * linux-low.c (install_software_single_step_breakpoints): Don't
4330 call regcache_read_pc.
4331 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4332 argument pc.
4333
d8020970
YQ
43342016-01-26 Yao Qi <yao.qi@linaro.org>
4335
4336 * linux-low.c (install_software_single_step_breakpoints): Call
4337 regcache_read_pc instead of get_pc.
4338
8b207339
YQ
43392016-01-26 Yao Qi <yao.qi@linaro.org>
4340
4341 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4342 (unblock_async_io): Rename to ...
4343 (block_unblock_async_io): ... it. New function.
4344 (enable_async_io): Don't install SIGIO handler. Unblock it
4345 instead.
4346 (disable_async_io): Don't ignore SIGIO. Block it instead.
4347 (initialize_async_io): Install SIGIO handler. Don't call
4348 unblock_async_io.
4349
18879fef
YQ
43502016-01-26 Yao Qi <yao.qi@linaro.org>
4351
4352 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4353 first character is '\003', call *the_target->request_interrupt.
4354
a0f8e08a
YQ
43552016-01-25 Yao Qi <yao.qi@linaro.org>
4356
4357 * remote-utils.c (new_thread_notify): Remove.
4358 (dead_thread_notify): Likewise.
4359 * remote-utils.h (new_thread_notify): Remove declaration.
4360 (dead_thread_notify): Likewise.
4361
cc5fd9ab
MK
43622016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4363
4364 * gdb.trace/pending.exp: Fix expected message on continue.
4365
99e8eb11
MK
43662016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4367
4368 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4369 it works properly on big-endian machines where sizeof (CORE_ADDR)
4370 != sizeof (void *).
4371
a994041d
PA
43722016-01-21 Pedro Alves <palves@redhat.com>
4373
4374 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4375 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4376 * configure: Regenerate.
4377
f7a6a40d
YQ
43782016-01-21 Yao Qi <yao.qi@linaro.org>
4379
4380 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4381 is_thumb and set it according to CPSR saved on the stack.
4382 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4383 arm_sigreturn_next_pc.
4384
6f69e520
YQ
43852016-01-18 Yao Qi <yao.qi@linaro.org>
4386
4387 * linux-low.c (linux_set_pc_64bit): New function.
4388 (linux_get_pc_64bit): New function.
4389 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4390 Declare.
4391 * linux-sparc-low.c (debug_threads): Remove declaration.
4392 (sparc_get_pc): Remove.
4393 (the_low_target): Use linux_get_pc_64bit instead of
4394 sparc_get_pc.
4395 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4396 (the_low_target): Use linux_get_pc_64bit and
4397 linux_set_pc_64bit.
4398
276d4552
YQ
43992016-01-18 Yao Qi <yao.qi@linaro.org>
4400
4401 * linux-arm-low.c (debug_threads): Remove declaration.
4402 (arm_get_pc, arm_set_pc): Remove.
4403 (the_low_target): Use linux_get_pc_32bit and
4404 linux_set_pc_32bit.
4405 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4406 (the_low_target): Use linux_get_pc_32bit and
4407 linux_set_pc_32bit.
4408 * linux-cris-low.c (debug_threads): Remove declaration.
4409 (cris_get_pc, cris_set_pc,): Remove.
4410 (the_low_target): Use linux_get_pc_32bit and
4411 linux_set_pc_32bit.
4412 * linux-crisv32-low.c (debug_threads): Remove declaration.
4413 (cris_get_pc, cris_set_pc): Remove.
4414 (the_low_target): Use linux_get_pc_32bit and
4415 linux_set_pc_32bit.
4416 * linux-low.c: Include inttypes.h.
4417 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4418 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4419 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4420 (the_low_target): Use linux_get_pc_32bit and
4421 linux_set_pc_32bit.
4422 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4423 (the_low_target): Use linux_get_pc_32bit and
4424 linux_set_pc_32bit.
4425 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4426 (the_low_target): Use linux_get_pc_32bit and
4427 linux_set_pc_32bit.
4428 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4429 (the_low_target): Use linux_get_pc_32bit and
4430 linux_set_pc_32bit.
4431 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4432 (the_low_target): Use linux_get_pc_32bit and
4433 linux_set_pc_32bit.
4434
eb0edac8
GB
44352016-01-18 Gary Benson <gbenson@redhat.com>
4436
4437 * configure.ac (AC_FUNC_FORK): New check.
4438 * config.in: Regenerate.
4439 * configure: Likewise.
4440
1b451dda
YQ
44412016-01-14 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4444 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4445 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4446 arm_get_next_pcs_ctor.
4447
82075af2
JS
44482016-01-12 Josh Stone <jistone@redhat.com>
4449 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4450
4451 * inferiors.h: Include "gdb_vecs.h".
4452 (struct process_info): Add syscalls_to_catch.
4453 * inferiors.c (remove_process): Free syscalls_to_catch.
4454 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4455 syscall_return stops.
4456 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4457 * server.c (handle_general_set): Handle QCatchSyscalls.
4458 (handle_query): Report support for QCatchSyscalls.
4459 * target.h (struct target_ops): Add supports_catch_syscall.
4460 (target_supports_catch_syscall): New macro.
4461 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4462 (struct lwp_info): Add syscall_state.
4463 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4464 Maintain syscall_state and syscalls_to_catch across exec.
4465 (get_syscall_trapinfo): New function, proxy to the_low_target.
4466 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4467 (linux_low_filter_event): Toggle syscall_state entry/return for
4468 syscall traps, and set it ignored for all others.
4469 (gdb_catching_syscalls_p): New function.
4470 (gdb_catch_this_syscall_p): New function.
4471 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4472 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4473 (linux_supports_catch_syscall): New function.
4474 (linux_target_ops): Install it.
4475 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4476 (the_low_target): Install it.
4477
8f13a3ce
MF
44782016-01-12 Mike Frysinger <vapier@gentoo.org>
4479
4480 * acinclude.m4: Include new ../warning.m4 file.
4481 * configure: Regenerated.
4482 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4483
5b3da067
MF
44842016-01-12 Mike Frysinger <vapier@gentoo.org>
4485
4486 * ax.c (is_goto_target): Mark static.
4487 * linux-low.c (register_addr): Likewise.
4488 (linux_fetch_registers, linux_store_registers): Likewise.
4489 * mem-break.c (any_persistent_commands): Fix old prototype.
4490 (add_commands_to_breakpoint): Mark static.
4491 * regcache.c (find_register_by_name): Delete unused func.
4492 * remote-utils.c (hex_or_minus_one): Mark static.
4493 * server.c (monitor_show_help): Mark static.
4494 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4495 handle_v_requests): Likewise.
4496
bc504a31
PA
44972016-01-12 Pedro Alves <palves@redhat.com>
4498
4499 Remove use of the registered trademark symbol throughout.
4500
5a0dd67a
YQ
45012016-01-08 Yao Qi <yao.qi@linaro.org>
4502
4503 * remote-utils.c (getpkt): If c is '\003', call target hook
4504 request_interrupt.
4505
b2ca446f
YQ
45062016-01-06 Yao Qi <yao.qi@linaro.org>
4507
4508 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4509 linux-aarch32-low.c.
4510 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4511 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4512 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4513 (thumb2_breakpoint): Declare.
4514 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4515 linux-aarch32-low.h.
4516 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4517 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4518 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4519
edd88788
JB
45202016-01-01 Joel Brobecker <brobecker@adacore.com>
4521
4522 * gdbreplay.c (gdbreplay_version): Change copyright year in
4523 version message.
4524 * server.c (gdbserver_version): Likewise.
4525
65da7f14
PP
45262015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4527
4528 * server.c (crc32_table): Delete.
4529 (crc32): Use libiberty's xcrc32 function.
4530
4abd5ed2
JB
45312015-12-22 Joel Brobecker <brobecker@adacore.com>
4532
4533 * lynx-low.c (lynx_delete_thread_callback): New function.
4534 (lynx_mourn): Properly delete our process and all of its
4535 threads. Remove call to clear_inferiors.
4536
0e50fe5c
JB
45372015-12-22 Joel Brobecker <brobecker@adacore.com>
4538
4539 * target.c (thread_search_callback): Add check that
4540 the thread_stopped target callback is not NULL before
4541 calling it.
4542
35adc03f
YQ
45432015-12-21 Yao Qi <yao.qi@linaro.org>
4544
4545 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4546 arm breakpoint.
4547
bd2b2909
AT
45482015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4549
4550 * server.c (handle_query): Call target_supports_software_single_step.
4551
7fe5e27e
AT
45522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4553
4554 * linux-low.c (single_step): New function.
4555 (linux_resume_one_lwp_throw): Call single_step.
4556 (start_step_over): Likewise.
4557
d9311bfa
AT
45582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4559
4560 * Makefile.in (SFILES): Append arch/arm-linux.c,
4561 arch/arm-get-next-pcs.c.
4562 (arm-linux.o): New rule.
4563 (arm-get-next-pcs.o): New rule.
4564 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4565 arm-linux.o.
4566 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4567 to linux-aarch32-low.c.
4568 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4569 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4570 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4571 (thumb2_breakpoint_len): Likewise.
4572 (arm_is_thumb_mode): Make non-static.
4573 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4574 from linux-aarch32-low.c.
4575 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4576 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4577 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4578 (thumb2_breakpoint_len): Likewise.
4579 (arm_is_thumb_mode): New declaration.
4580 * linux-arm-low.c: Include arch/arm-linux.h
4581 aarch/arm-get-next-pcs.h, sys/syscall.h.
4582 (get_next_pcs_ops): New struct.
4583 (get_next_pcs_addr_bits_remove): New function.
4584 (get_next_pcs_is_thumb): New function.
4585 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4586 (arm_sigreturn_next_pc): Likewise.
4587 (get_next_pcs_syscall_next_pc): Likewise.
4588 (arm_gdbserver_get_next_pcs): Likewise.
4589 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4590 Initialize.
4591 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4592 * server.h: Include gdb_vecs.h.
4593
68ce2059
AT
45942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4595
4596 * Makefile.in (SFILES): Append common/common-regcache.c.
4597 (OBS): Append common-regcache.o.
4598 (common-regcache.o): New rule.
4599 * regcache.c (init_register_cache): Initialize cache to
4600 REG_UNAVAILABLE.
4601 (regcache_raw_read_unsigned): New function.
4602 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4603 register_status enum.
4604
fa5308bd
AT
46052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4606
4607 * linux-aarch64-low.c (the_low_targets): Rename
4608 breakpoint_reinsert_addr to get_next_pcs.
4609 * linux-arm-low.c (the_low_targets): Likewise.
4610 * linux-bfin-low.c (the_low_targets): Likewise.
4611 * linux-cris-low.c (the_low_targets): Likewise.
4612 * linux-crisv32-low.c (the_low_targets): Likewise.
4613 * linux-low.c (can_software_single_step): Likewise.
4614 (install_software_single_step_breakpoints): New function.
4615 (start_step_over): Use install_software_single_step_breakpoints.
4616 * linux-low.h: New CORE_ADDR vector.
4617 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4618 get_next_pcs.
4619 * linux-mips-low.c (the_low_targets): Likewise.
4620 * linux-nios2-low.c (the_low_targets): Likewise.
4621 * linux-sparc-low.c (the_low_targets): Likewise.
4622
4a6ed09b
PA
46232015-12-17 Pedro Alves <palves@redhat.com>
4624
4625 * linux-low.c (linux_kill_one_lwp): Remove references to
4626 LinuxThreads.
4627 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4628 to 'kill'.
4629 (linux_init_signals): Delete.
4630 (initialize_low): Adjust.
4631 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4632
7544db95
PA
46332015-12-16 Pedro Alves <palves@redhat.com>
4634
4635 * configure.ac (compiler warning flags): When testing a
4636 -Wno-foo option, check whether -Wfoo works instead.
4637 * configure: Regenerate.
4638
8020350c
DB
46392015-12-11 Don Breazeal <donb@codesourcery.com>
4640
4641 * server.c (process_serial_event): Don't exit from gdbserver
4642 in remote mode if there are still active inferiors.
4643
db91f502
YQ
46442015-12-11 Yao Qi <yao.qi@linaro.org>
4645
4646 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4647 arm_breakpoint_at if the process is 32-bit.
4648
b37a6290
YQ
46492015-12-11 Yao Qi <yao.qi@linaro.org>
4650
4651 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4652 arm breakpoint.
4653
17b1509a
YQ
46542015-12-07 Yao Qi <yao.qi@linaro.org>
4655
4656 * configure.srv: Append arm.o to srv_tgtobj for
4657 aarch64*-*-linux* target.
4658 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4659 from linux-arm-low.c.
4660 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4661 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4662 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4663 (thumb2_breakpoint_len): Likewise.
4664 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4665 (arm_breakpoint_kinds): Likewise.
4666 (arm_breakpoint_kind_from_pc): Likewise.
4667 (arm_sw_breakpoint_from_kind): Likewise.
4668 (arm_breakpoint_kind_from_current_state): Likewise.
4669 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4670 (arm_sw_breakpoint_from_kind): Declare.
4671 (arm_breakpoint_kind_from_current_state): Declare.
4672 (arm_breakpoint_at): Declare.
4673 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4674 arm_sw_breakpoint_from_kind if process is 32-bit.
4675 (aarch64_breakpoint_kind_from_pc): New function.
4676 (aarch64_breakpoint_kind_from_current_state): New function.
4677 (the_low_target): Initialize fields breakpoint_kind_from_pc
4678 and breakpoint_kind_from_current_state.
4679 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4680 linux-aarch32-low.c.
4681 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4682 (arm_breakpoint, arm_breakpoint_len): Likewise.
4683 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4684 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4685 (arm_is_thumb_mode): Likewise.
4686 (arm_breakpoint_at): Likewise.
4687 (arm_breakpoint_kind_from_pc): Likewise.
4688 (arm_sw_breakpoint_from_kind): Likewise.
4689 (arm_breakpoint_kind_from_current_state): Likewise.
4690
4691 Revert:
4692 2015-08-04 Yao Qi <yao.qi@linaro.org>
4693
4694 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4695 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4696 * server.c (extended_protocol): Remove "static".
4697 * server.h (extended_protocol): Declare it.
4698
ece66d65
JS
46992015-12-04 Josh Stone <jistone@redhat.com>
4700
4701 * target.h (struct target_ops) <arch_setup>: Rename to ...
4702 (struct target_ops) <post_create_inferior>: ... this.
4703 (target_arch_setup): Rename to ...
4704 (target_post_create_inferior): ... this, calling post_create_inferior.
4705 * server.c (start_inferior): Update target_arch_setup calls to
4706 target_post_create_inferior.
4707 * linux-low.c (linux_low_ptrace_options): Forward declare.
4708 (linux_arch_setup): Update its comment for general use.
4709 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4710 (struct linux_target_ops): Use linux_post_create_inferior.
4711 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4712 to post_create_inferior.
4713 * nto-low.c (struct nto_target_ops): Likewise.
4714 * spu-low.c (struct spu_target_ops): Likewise.
4715 * win32-low.c (struct win32_target_ops): Likewise.
4716
e58c48b4
AT
47172015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4718
4719 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4720
fbec8956
AT
47212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4722
4723 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4724 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4725 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4726 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4727 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4728 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4729 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4730 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4731 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4732 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4733 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4734 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4735
9b4c5f87
AT
47362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4737
4738 * linux-low.c (linux_look_up_symbols): Don't call
4739 linux_supports_traceclone.
4740 * linux-low.h (thread_db_init): Remove use_events argument.
4741 * thread-db.c (thread_db_use_event): Remove global variable.
4742 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4743 (struct thread_db) <td_create_bp>: Remove field.
4744 (thread_db_create_event): Remove function.
4745 (thread_db_enable_reporting): Likewise.
4746 (find_one_thread): Don't check for thread_db_use_events.
4747 (attach_thread): Likewise.
4748 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4749 (try_thread_db_load_1): Don't check for thread_db_use_events.
4750 (thread_db_init): Remove use_events argument and thread events
4751 handling.
4752 (remove_thread_event_breakpoints): Remove function.
4753 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4754
7d00775e
AT
47552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4756
4757 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4758 New function.
4759 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4760 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4761 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4762 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4763 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4764 Initialize.
4765 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4766 New function.
4767 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4768 * linux-low.c (can_hardware_single_step): Use
4769 supports_hardware_single_step.
4770 (can_software_single_step): New function.
4771 (start_step_over): Call can_software_single_step.
4772 (linux_supports_hardware_single_step): New function.
4773 (struct target_ops) <supports_software_single_step>: Initialize.
4774 * linux-low.h (struct linux_target_ops)
4775 <supports_hardware_single_step>: Initialize.
4776 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4777 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4778 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4779 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4780 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4781 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4782 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4783 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4784 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4785 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4786 Initialize.
4787 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4788 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4789 Initialize.
4790 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4791 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4792 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4793 New function.
4794 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4795 * target.h (struct target_ops): <supports_software_single_step>:
4796 New field.
4797 (target_supports_software_single_step): New macro.
4798
2d97cd35
AT
47992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4800
4801 * linux-low.c (linux_wait_1): Fix pc advance condition.
4802 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4803 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4804
769ef81f
AT
48052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4806
4807 * linux-arm-low.c (arm_is_thumb_mode): New function.
4808 (arm_breakpoint_at): Use arm_is_thumb_mode.
4809 (arm_breakpoint_kind_from_current_state): New function.
4810 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4811 Initialize.
4812 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4813 (linux_breakpoint_kind_from_current_state): New function.
4814 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4815 * linux-low.h (struct linux_target_ops)
4816 <breakpoint_kind_from_current_state>: New field.
4817 * target.h (struct target_ops): Likewise.
4818 (target_breakpoint_kind_from_current_state): New macro.
4819
1bebeeca
PA
48202015-11-30 Pedro Alves <palves@redhat.com>
4821
4822 * linux-low.c (linux_resume): Wake up the event loop before
4823 returning.
4824
a67a9fae
PA
48252015-11-30 Pedro Alves <palves@redhat.com>
4826
4827 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4828 check.
4829 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4830 to -1.
4831 * target.c (struct thread_search): New structure.
4832 (thread_search_callback): New function.
4833 (prev_general_thread): New global.
4834 (prepare_to_access_memory, done_accessing_memory): New functions.
4835 * target.h (prepare_to_access_memory, done_accessing_memory):
4836 Replace macros with function declarations.
4837
f2faf941
PA
48382015-11-30 Pedro Alves <palves@redhat.com>
4839
4840 PR 14618
4841 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4842 report TARGET_WAITKIND_NO_RESUMED.
4843 * remote-utils.c (prepare_resume_reply): Handle
4844 TARGET_WAITKIND_NO_RESUMED.
4845 * server.c (report_no_resumed): New global.
4846 (handle_query) <qSupported>: Handle "no-resumed+". Report
4847 "no-resumed+" support.
4848 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4849 return error if the client doesn't support no-resumed events.
4850 (push_stop_notification): New function.
4851 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4852 events if the client supports them.
4853
a681f9c9
PA
48542015-11-30 Pedro Alves <palves@redhat.com>
4855
4856 * linux-low.c (thread_still_has_status_pending_p): Don't check
4857 vCont;t here.
4858 (lwp_resumed): New function.
4859 (status_pending_p_callback): Return early if the LWP is not
4860 supposed to be resumed.
4861
65706a29
PA
48622015-11-30 Pedro Alves <palves@redhat.com>
4863
4864 * linux-low.c (handle_extended_wait): Assert that the LWP's
4865 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4866 thread create events, leave the new child's status pending.
4867 (linux_low_filter_event): If GDB wants to hear about thread exit
4868 events, leave the LWP marked dead and don't delete it.
4869 (linux_wait_for_event_filtered): Don't check for thread exit.
4870 (filter_exit_event): New function.
4871 (linux_wait_1): Use it, when returning an exit event.
4872 (linux_resume_one_lwp_throw): Assert that the LWP's
4873 waitstatus is TARGET_WAITKIND_IGNORE.
4874 * remote-utils.c (prepare_resume_reply): Handle
4875 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4876 * server.c (report_thread_events): New global.
4877 (handle_general_set): Handle QThreadEvents.
4878 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4879 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4880 TARGET_WAITKIND_THREAD_EXITED.
4881 * server.h (report_thread_events): Declare.
4882
56cf4bed
PA
48832015-11-30 Pedro Alves <palves@redhat.com>
4884
4885 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4886 the thread's last_resume_kind was resume_stop.
4887
500c1d85
PA
48882015-11-30 Pedro Alves <palves@redhat.com>
4889
4890 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4891 before returning.
4892
de979965
PA
48932015-11-30 Pedro Alves <palves@redhat.com>
4894
4895 * server.c (handle_v_requests): Handle vCtrlC.
4896
34c65914
PA
48972015-11-30 Pedro Alves <palves@redhat.com>
4898
4899 * gdbthread.h (find_any_thread_of_pid): Declare.
4900 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4901 functions.
4902 * server.c (handle_query): If current_thread is NULL, look for
4903 another thread of the selected process.
4904
79efa585 49052015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4906 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4907
4908 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4909 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4910 name in reply.
4911 * target.h (struct target_ops) <thread_name>: New field.
4912 (target_thread_name): New macro.
4913
80d82c19
JB
49142015-11-23 Joel Brobecker <brobecker@adacore.com>
4915
4916 * regcache.h (regcache_invalidate_pid): Add declaration.
4917 * regcache.c (regcache_invalidate_pid): New function, extracted
4918 from regcache_invalidate.
4919 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4920 Add trivial documentation comment.
4921 * lynx-low.c: Use regcache_invalidate_pid instead of
4922 regcache_invalidate.
4923
64da5dd5
JB
49242015-11-23 Joel Brobecker <brobecker@adacore.com>
4925
4926 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4927 and Elf64_auxv_t if the target is Android.
4928
37ce4055
DE
49292015-11-22 Doug Evans <xdje42@gmail.com>
4930
4931 * target.h: #include <sys/types.h>.
4932
06e03fff
PA
49332015-11-19 Pedro Alves <palves@redhat.com>
4934
4935 * linux-low.c (linux_process_qsupported): Change prototype.
4936 Adjust.
4937 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4938 Change prototype.
4939 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4940 and adjust to loop over all features.
4941 * server.c (handle_query) <qSupported>: Adjust to call
4942 target_process_qsupported once, passing it a vector of unprocessed
4943 features.
4944 * target.h (struct target_ops) <process_qsupported>: Change
4945 prototype.
4946 (target_process_qsupported): Adjust.
4947
9a084706
PA
49482015-11-19 Pedro Alves <palves@redhat.com>
4949
4950 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4951 mode.
4952 * configure: Regenerate.
4953
dad44a1f
PA
49542015-11-19 Pedro Alves <palves@redhat.com>
4955
4956 * configure: Regenerate.
4957
231c0592
YQ
49582015-11-19 Yao Qi <yao.qi@linaro.org>
4959
4960 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4961 type to uint32_t.
4962
6c1c9a8b
YQ
49632015-11-19 Yao Qi <yao.qi@linaro.org>
4964
4965 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4966 (struct aarch64_operand): Move enum out.
4967
9caa3311
YQ
49682015-11-19 Yao Qi <yao.qi@linaro.org>
4969
4970 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4971 struct user_fpsimd_state *.
4972 (aarch64_store_fpregset): Likewise.
4973
6a69a054
YQ
49742015-11-19 Yao Qi <yao.qi@linaro.org>
4975
4976 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4977 struct user_pt_regs *.
4978 (aarch64_store_gregset): Likewise.
4979
1798301e
PA
49802015-11-18 Pedro Alves <palves@redhat.com>
4981
4982 * Makefile.in (all_object_files): Add $IPA_OBJS.
4983
ce7715e2
PA
49842015-11-17 Pedro Alves <palves@redhat.com>
4985
4986 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4987 GDB_SIGNAL_0 and gdb_signal_to_string.
4988
c0879059
PA
49892015-11-17 Pedro Alves <palves@redhat.com>
4990
4991 * win32-low.c (handle_output_debug_string): Remove parameter.
4992 (win32_kill): Remove our_status local and adjust call to
4993 handle_output_debug_string.
4994 (get_child_debug_event): Adjust call to
4995 handle_output_debug_string.
4996
1996e237
SM
49972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4998
4999 * linux-mips-low.c (mips_fill_gregset): Add cast.
5000 (mips_store_gregset): Likewise.
5001 (mips_fill_fpregset): Likewise.
5002 (mips_store_fpregset): Likewise.
5003
cbec665b
SM
50042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5005
5006 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5007 priv.
5008
eb3e3c67
SM
50092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5010
5011 * linux-mips-low.c (mips_linux_new_thread): Change type of
5012 watch_type to enum target_hw_bp_type.
5013
171de4b8
SM
50142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5015
5016 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5017 Change return type to arm_hwbp_type.
5018
04248ead
SM
50192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5020
5021 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5022 (arm_store_gregset): Likewise.
5023 * linux-arm-low.c (arm_get_hwcap): Likewise.
5024 (arm_read_description): Likewise.
5025
04b3479c
SM
50262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5027
5028 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5029
2bc84e8a
SM
50302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5031
5032 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5033 (ppc_fill_vsxregset): Likewise.
5034 (ppc_store_vsxregset): Likewise.
5035 (ppc_fill_vrregset): Likewise.
5036 (ppc_store_vrregset): Likewise.
5037 (ppc_fill_evrregset): Likewise.
5038 (ppc_store_evrregset): Likewise.
5039
e6c5bb05
SM
50402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5041
5042 * linux-ppc-low.c (ppc_usrregs_info): Remove
5043 forward-declaration.
5044 (ppc_arch_setup): Move lower in file.
5045
7ea45d72
SM
50462015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5047
5048 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5049 (ps_pdwrite): Likewise.
5050
69291610
HW
50512015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5052
5053 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5054 to after assert checks.
5055
b42945fd
SM
50562015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5057
5058 * proc-service.c (ps_pdread): Add/adjust casts.
5059 (ps_pdwrite): Add/adjust casts.
5060
d6f85c84
SM
50612015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5062
5063 * server.c (handle_search_memory_1): Cast return value of
5064 memmem.
5065
f98cd059
SM
50662015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5067
5068 * server.c (write_qxfer_response): Change type of data to
5069 gdb_byte *.
5070
d2412fa5
PA
50712015-10-29 Pedro Alves <palves@redhat.com>
5072
5073 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5074
c17414a2
PA
50752015-10-29 Pedro Alves <palves@redhat.com>
5076
5077 * tracepoint.c (clear_installed_tracepoints): Add casts.
5078
e053fbc4
PA
50792015-10-29 Pedro Alves <palves@redhat.com>
5080
5081 * server.c (handle_v_cont, process_serial_event): Add enum
5082 gdb_signal casts to signal parsing code.
5083
add67df8
PA
50842015-10-29 Pedro Alves <palves@redhat.com>
5085
5086 * linux-low.h (NULL_REGSET): Define.
5087 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5088 * linux-arm-low.c (arm_regsets): Likewise.
5089 * linux-crisv32-low.c (cris_regsets): Likewise.
5090 * linux-m68k-low.c (m68k_regsets): Likewise.
5091 * linux-mips-low.c (mips_regsets): Likewise.
5092 * linux-nios2-low.c (nios2_regsets): Likewise.
5093 * linux-ppc-low.c (ppc_regsets): Likewise.
5094 * linux-s390-low.c (s390_regsets): Likewise.
5095 * linux-sh-low.c (sh_regsets): Likewise.
5096 * linux-sparc-low.c (sparc_regsets): Likewise.
5097 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5098 * linux-tile-low.c (tile_regsets): Likewise.
5099 * linux-x86-low.c (x86_regsets): Likewise.
5100 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5101
50bc912a
PA
51022015-10-29 Pedro Alves <palves@redhat.com>
5103
5104 * linux-low.h (NULL_REGSET): Define.
5105 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5106 * linux-arm-low.c (arm_regsets): Likewise.
5107 * linux-crisv32-low.c (cris_regsets): Likewise.
5108 * linux-m68k-low.c (m68k_regsets): Likewise.
5109 * linux-mips-low.c (mips_regsets): Likewise.
5110 * linux-nios2-low.c (nios2_regsets): Likewise.
5111 * linux-ppc-low.c (ppc_regsets): Likewise.
5112 * linux-s390-low.c (s390_regsets): Likewise.
5113 * linux-sh-low.c (sh_regsets): Likewise.
5114 * linux-sparc-low.c (sparc_regsets): Likewise.
5115 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5116 * linux-tile-low.c (tile_regsets): Likewise.
5117 * linux-x86-low.c (x86_regsets): Likewise.
5118 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5119
682b2546
DE
51202015-10-26 Doug Evans <dje@google.com>
5121
5122 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5123
963843d4
DE
51242015-10-26 Doug Evans <dje@google.com>
5125
5126 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5127
d41401ac
DE
51282015-10-26 Doug Evans <dje@google.com>
5129
5130 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5131 for debug_printf.
5132 (attach_thread, find_new_threads_callback): Ditto.
5133
3db28855
AT
51342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5135
5136 * mem-break.h (set_breakpoint_data): Remove.
5137
fb78e89c
AT
51382015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5139
5140 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5141 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5142 (initialize_low): Remove set_breakpoint_data call.
5143 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5144 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5145 (initialize_low): Remove set_breakpoint_data call.
5146 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5147 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5148 (initialize_low): Remove set_breakpoint_data call.
5149
2e6ee069
AT
51502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5151
5152 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5153 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5154 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5155 * target.h (target_breakpoint_kind_from_pc): New macro.
5156
1652a986
AT
51572015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5158
5159 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5160 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5161 the default breakpoint kind.
5162
abeead09
AT
51632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5164
5165 * linux-arm-low.c (arm_supports_z_point_type): Add software
5166 breakpoint support.
5167
b0b4b501
AT
51682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5169
5170 * linux-arm-low.c: Refactor breakpoint definitions.
5171 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5172 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5173
8689682c
AT
51742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5175
5176 * Makefile.in: Add arm.c/o.
5177 * configure.srv: Likewise.
5178 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5179 (arm_breakpoint_kind_from_pc): New function.
5180 (arm_sw_breakpoint_from_kind): Return proper kind.
5181 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5182
27165294
AT
51832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5184
5185 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5186 removal.
5187 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5188 (struct raw_breakpoint) <size>: Remove.
5189 (struct raw_breakpoint) <kind>: Add.
5190 (bp_size): New function.
5191 (bp_opcode): Likewise.
5192 (find_raw_breakpoint_at): Adjust for kind.
5193 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5194 (remove_memory_breakpoint): Adjust for kind call bp_size.
5195 (set_raw_breakpoint_at): Adjust for kind.
5196 (set_breakpoint): Likewise.
5197 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5198 (delete_raw_breakpoint): Adjust for kind.
5199 (delete_breakpoint): Likewise.
5200 (find_gdb_breakpoint): Likewise.
5201 (set_gdb_breakpoint_1): Likewise.
5202 (set_gdb_breakpoint): Likewise.
5203 (delete_gdb_breakpoint_1): Likewise.
5204 (delete_gdb_breakpoint): Likewise.
5205 (uninsert_raw_breakpoint): Likewise.
5206 (reinsert_raw_breakpoint): Likewise.
5207 (set_breakpoint_data): Remove.
5208 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5209 (check_mem_read): Adjust for kind call bp_size.
5210 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5211 (clone_one_breakpoint): Adjust for kind.
5212 * mem-break.h (set_gdb_breakpoint): Likewise.
5213 (delete_gdb_breakpoint): Likewise.
5214 * server.c (process_serial_event): Likewise.
5215
dd373349
AT
52162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5217
5218 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5219 (struct linux_target_ops) <breakpoint>: Remove.
5220 (struct linux_target_ops) <breakpoint_len>: Remove.
5221 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5222 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5223 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5224 (arm_sw_breakpoint_from_kind): New function.
5225 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5226 (struct linux_target_ops) <breakpoint>: Remove.
5227 (struct linux_target_ops) <breakpoint_len>: Remove.
5228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5230 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5231 (struct linux_target_ops) <breakpoint>: Remove.
5232 (struct linux_target_ops) <breakpoint_len>: Remove.
5233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5235 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5236 (struct linux_target_ops) <breakpoint>: Remove.
5237 (struct linux_target_ops) <breakpoint_len>: Remove.
5238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5240 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5241 and sw_breakpoint_from_kind to increment the pc.
5242 (linux_breakpoint_kind_from_pc): New function.
5243 (linux_sw_breakpoint_from_kind): New function.
5244 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5245 (initialize_low): Call breakpoint_kind_from_pc and
5246 sw_breakpoint_from_kind to replace breakpoint_data/len.
5247 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5248 New field.
5249 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5250 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5251 (struct linux_target_ops) <breakpoint>: Remove.
5252 (struct linux_target_ops) <breakpoint_len>: Remove.
5253 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5254 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5255 * linux-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5261 (struct linux_target_ops) <breakpoint>: Remove.
5262 (struct linux_target_ops) <breakpoint_len>: Remove.
5263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5264 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5265 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5266 (struct linux_target_ops) <breakpoint>: Remove.
5267 (struct linux_target_ops) <breakpoint_len>: Remove.
5268 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5269 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5270 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5271 (struct linux_target_ops) <breakpoint>: Remove.
5272 (struct linux_target_ops) <breakpoint_len>: Remove.
5273 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5274 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5275 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5276 (struct linux_target_ops) <breakpoint>: Remove.
5277 (struct linux_target_ops) <breakpoint_len>: Remove.
5278 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5279 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5280 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5281 (struct linux_target_ops) <breakpoint>: Remove.
5282 (struct linux_target_ops) <breakpoint_len>: Remove.
5283 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5284 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5285 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5286 (struct linux_target_ops) <breakpoint>: Remove.
5287 (struct linux_target_ops) <breakpoint_len>: Remove.
5288 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5289 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5290 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5291 (struct linux_target_ops) <breakpoint>: Remove.
5292 (struct linux_target_ops) <breakpoint_len>: Remove.
5293 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5294 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5295 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5296 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5297 (struct linux_target_ops) <breakpoint>: Remove.
5298 (struct linux_target_ops) <breakpoint_len>: Remove.
5299 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5300 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5301 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5302 (struct linux_target_ops) <breakpoint>: Remove.
5303 (struct linux_target_ops) <breakpoint_len>: Remove.
5304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5306
4cd98a19
AT
53072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5308
5309 * linux-cris-low.c (cris_get_pc): Remove void arg.
5310
774ee6d2
AR
53112015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5312
5313 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5314 variable name.
5315
833dcd29
AR
53162015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5317
5318 * inferiors.c (thread_pid_matches_callback): New function.
5319 (find_thread_process): New function.
5320 (remove_thread): Reset current_thread.
5321 (remove_process): Assert threads have been removed first.
5322
8d689ee5
YQ
53232015-10-15 Yao Qi <yao.qi@linaro.org>
5324
5325 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5326 if it is 3.
5327 (aarch64_remove_point): Likewise.
5328 * regcache.c (regcache_register_size): New function.
5329
1c2e1515
YQ
53302015-10-12 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-aarch64-low.c: Update all callers as emit_load_store
5333 is renamed to aarch64_emit_load_store.
5334
e1c587c3
YQ
53352015-10-12 Yao Qi <yao.qi@linaro.org>
5336
5337 * linux-aarch64-low.c: Update all callers of function renaming
5338 from emit_insn to aarch64_emit_insn.
5339
b6542f81
YQ
53402015-10-12 Yao Qi <yao.qi@linaro.org>
5341
5342 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5343 arch/aarch64-insn.h.
5344 (struct aarch64_memory_operand): Likewise.
5345 (ENCODE): Likewise.
5346 (emit_insn): Move to arch/aarch64-insn.c.
5347 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5348 (emit_load_store): Move to arch/aarch64-insn.c.
5349 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5350 (can_encode_int32): Remove.
5351
246994ce
YQ
53522015-10-12 Yao Qi <yao.qi@linaro.org>
5353
5354 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5355 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5356 (aarch64_relocate_instruction): Likewise.
5357 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5358 (struct aarch64_insn_visitor): Likewise.
5359
0badd99f
YQ
53602015-10-12 Yao Qi <yao.qi@linaro.org>
5361
5362 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5363 (struct aarch64_insn_visitor): New.
5364 (struct aarch64_insn_relocation_data): New.
5365 (aarch64_ftrace_insn_reloc_b): New function.
5366 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5367 (aarch64_ftrace_insn_reloc_cb): Likewise.
5368 (aarch64_ftrace_insn_reloc_tb): Likewise.
5369 (aarch64_ftrace_insn_reloc_adr): Likewise.
5370 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5371 (aarch64_ftrace_insn_reloc_others): Likewise.
5372 (visitor): New.
5373 (aarch64_relocate_instruction): Use visitor.
5374
dfaffe9d
YQ
53752015-10-12 Yao Qi <yao.qi@linaro.org>
5376
5377 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5378 int. Add argument buf.
5379 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5380 aarch64_relocate_instruction.
5381
70b439f0
YQ
53822015-10-12 Yao Qi <yao.qi@linaro.org>
5383
5384 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5385 argument insn. Remove local variable insn. Don't call
5386 target_read_uint32.
5387 (aarch64_install_fast_tracepoint_jump_pad): Call
5388 target_read_uint32.
5389
7781c06f
YQ
53902015-09-30 Yao Qi <yao.qi@linaro.org>
5391
5392 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5393 (emit_load_store_pair): Likewise.
5394
9a3c8263
SM
53952015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5396
5397 * dll.c (match_dll): Add cast(s).
5398 (unloaded_dll): Likewise.
5399 * linux-low.c (second_thread_of_pid_p): Likewise.
5400 (delete_lwp_callback): Likewise.
5401 (count_events_callback): Likewise.
5402 (select_event_lwp_callback): Likewise.
5403 (linux_set_resume_request): Likewise.
5404 * server.c (accumulate_file_name_length): Likewise.
5405 (emit_dll_description): Likewise.
5406 (handle_qxfer_threads_worker): Likewise.
5407 (visit_actioned_threads): Likewise.
5408 * thread-db.c (any_thread_of): Likewise.
5409 * tracepoint.c (same_process_p): Likewise.
5410 (match_blocktype): Likewise.
5411 (build_traceframe_info_xml): Likewise.
5412
224c3ddb
SM
54132015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5414
5415 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5416 assignment.
5417 (gdb_unparse_agent_expr): Likewise.
5418 * hostio.c (require_data): Likewise.
5419 (handle_pread): Likewise.
5420 * linux-low.c (disable_regset): Likewise.
5421 (fetch_register): Likewise.
5422 (store_register): Likewise.
5423 (get_dynamic): Likewise.
5424 (linux_qxfer_libraries_svr4): Likewise.
5425 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5426 (set_fast_tracepoint_jump): Likewise.
5427 (uninsert_fast_tracepoint_jumps_at): Likewise.
5428 (reinsert_fast_tracepoint_jumps_at): Likewise.
5429 (validate_inserted_breakpoint): Likewise.
5430 (clone_agent_expr): Likewise.
5431 * regcache.c (init_register_cache): Likewise.
5432 * remote-utils.c (putpkt_binary_1): Likewise.
5433 (decode_M_packet): Likewise.
5434 (decode_X_packet): Likewise.
5435 (look_up_one_symbol): Likewise.
5436 (relocate_instruction): Likewise.
5437 (monitor_output): Likewise.
5438 * server.c (handle_search_memory): Likewise.
5439 (handle_qxfer_exec_file): Likewise.
5440 (handle_qxfer_libraries): Likewise.
5441 (handle_qxfer): Likewise.
5442 (handle_query): Likewise.
5443 (handle_v_cont): Likewise.
5444 (handle_v_run): Likewise.
5445 (captured_main): Likewise.
5446 * target.c (write_inferior_memory): Likewise.
5447 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5448 * tracepoint.c (init_trace_buffer): Likewise.
5449 (add_tracepoint_action): Likewise.
5450 (add_traceframe): Likewise.
5451 (add_traceframe_block): Likewise.
5452 (cmd_qtdpsrc): Likewise.
5453 (cmd_qtdv): Likewise.
5454 (cmd_qtstatus): Likewise.
5455 (response_source): Likewise.
5456 (response_tsv): Likewise.
5457 (cmd_qtnotes): Likewise.
5458 (gdb_collect): Likewise.
5459 (initialize_tracepoint): Likewise.
5460
afbe19f8
PL
54612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5462
5463 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5464 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5465 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5466 <NOP>: New.
5467 (enum aarch64_condition_codes): New enum.
5468 (w0): New static global.
5469 (fp): Likewise.
5470 (lr): Likewise.
5471 (struct aarch64_memory_operand) <type>: New
5472 MEMORY_OPERAND_POSTINDEX type.
5473 (postindex_memory_operand): New helper function.
5474 (emit_ret): New function.
5475 (emit_load_store_pair): New function, factored out of emit_stp
5476 with support for MEMORY_OPERAND_POSTINDEX.
5477 (emit_stp): Rewrite using emit_load_store_pair.
5478 (emit_ldp): New function.
5479 (emit_load_store): Likewise.
5480 (emit_ldr): Mention post-index instruction in comment.
5481 (emit_ldrh): New function.
5482 (emit_ldrb): New function.
5483 (emit_ldrsw): Mention post-index instruction in comment.
5484 (emit_str): Likewise.
5485 (emit_subs): New function.
5486 (emit_cmp): Likewise.
5487 (emit_and): Likewise.
5488 (emit_orr): Likewise.
5489 (emit_orn): Likewise.
5490 (emit_eor): Likewise.
5491 (emit_mvn): Likewise.
5492 (emit_lslv): Likewise.
5493 (emit_lsrv): Likewise.
5494 (emit_asrv): Likewise.
5495 (emit_mul): Likewise.
5496 (emit_sbfm): Likewise.
5497 (emit_sbfx): Likewise.
5498 (emit_ubfm): Likewise.
5499 (emit_ubfx): Likewise.
5500 (emit_csinc): Likewise.
5501 (emit_cset): Likewise.
5502 (emit_nop): Likewise.
5503 (emit_ops_insns): New helper function.
5504 (emit_pop): Likewise.
5505 (emit_push): Likewise.
5506 (aarch64_emit_prologue): New function.
5507 (aarch64_emit_epilogue): Likewise.
5508 (aarch64_emit_add): Likewise.
5509 (aarch64_emit_sub): Likewise.
5510 (aarch64_emit_mul): Likewise.
5511 (aarch64_emit_lsh): Likewise.
5512 (aarch64_emit_rsh_signed): Likewise.
5513 (aarch64_emit_rsh_unsigned): Likewise.
5514 (aarch64_emit_ext): Likewise.
5515 (aarch64_emit_log_not): Likewise.
5516 (aarch64_emit_bit_and): Likewise.
5517 (aarch64_emit_bit_or): Likewise.
5518 (aarch64_emit_bit_xor): Likewise.
5519 (aarch64_emit_bit_not): Likewise.
5520 (aarch64_emit_equal): Likewise.
5521 (aarch64_emit_less_signed): Likewise.
5522 (aarch64_emit_less_unsigned): Likewise.
5523 (aarch64_emit_ref): Likewise.
5524 (aarch64_emit_if_goto): Likewise.
5525 (aarch64_emit_goto): Likewise.
5526 (aarch64_write_goto_address): Likewise.
5527 (aarch64_emit_const): Likewise.
5528 (aarch64_emit_call): Likewise.
5529 (aarch64_emit_reg): Likewise.
5530 (aarch64_emit_pop): Likewise.
5531 (aarch64_emit_stack_flush): Likewise.
5532 (aarch64_emit_zero_ext): Likewise.
5533 (aarch64_emit_swap): Likewise.
5534 (aarch64_emit_stack_adjust): Likewise.
5535 (aarch64_emit_int_call_1): Likewise.
5536 (aarch64_emit_void_call_2): Likewise.
5537 (aarch64_emit_eq_goto): Likewise.
5538 (aarch64_emit_ne_goto): Likewise.
5539 (aarch64_emit_lt_goto): Likewise.
5540 (aarch64_emit_le_goto): Likewise.
5541 (aarch64_emit_gt_goto): Likewise.
5542 (aarch64_emit_ge_got): Likewise.
5543 (aarch64_emit_ops_impl): New static global variable.
5544 (aarch64_emit_ops): New target function, return
5545 &aarch64_emit_ops_impl.
5546 (struct linux_target_ops): Install it.
5547
bb903df0
PL
55482015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5549
5550 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5551 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5552 aarch64-ipa.o.
5553 * linux-aarch64-ipa.c: New file.
5554 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5555 and endian.h.
5556 (aarch64_get_thread_area): New target method.
5557 (extract_signed_bitfield): New helper function.
5558 (aarch64_decode_ldr_literal): New function.
5559 (enum aarch64_opcodes): New enum.
5560 (struct aarch64_register): New struct.
5561 (struct aarch64_operand): New struct.
5562 (x0): New static global.
5563 (x1): Likewise.
5564 (x2): Likewise.
5565 (x3): Likewise.
5566 (x4): Likewise.
5567 (w2): Likewise.
5568 (ip0): Likewise.
5569 (sp): Likewise.
5570 (xzr): Likewise.
5571 (aarch64_register): New helper function.
5572 (register_operand): Likewise.
5573 (immediate_operand): Likewise.
5574 (struct aarch64_memory_operand): New struct.
5575 (offset_memory_operand): New helper function.
5576 (preindex_memory_operand): Likewise.
5577 (enum aarch64_system_control_registers): New enum.
5578 (ENCODE): New macro.
5579 (emit_insn): New helper function.
5580 (emit_b): New function.
5581 (emit_bcond): Likewise.
5582 (emit_cb): Likewise.
5583 (emit_tb): Likewise.
5584 (emit_blr): Likewise.
5585 (emit_stp): Likewise.
5586 (emit_ldp_q_offset): Likewise.
5587 (emit_stp_q_offset): Likewise.
5588 (emit_load_store): Likewise.
5589 (emit_ldr): Likewise.
5590 (emit_ldrsw): Likewise.
5591 (emit_str): Likewise.
5592 (emit_ldaxr): Likewise.
5593 (emit_stxr): Likewise.
5594 (emit_stlr): Likewise.
5595 (emit_data_processing_reg): Likewise.
5596 (emit_data_processing): Likewise.
5597 (emit_add): Likewise.
5598 (emit_sub): Likewise.
5599 (emit_mov): Likewise.
5600 (emit_movk): Likewise.
5601 (emit_mov_addr): Likewise.
5602 (emit_mrs): Likewise.
5603 (emit_msr): Likewise.
5604 (emit_sevl): Likewise.
5605 (emit_wfe): Likewise.
5606 (append_insns): Likewise.
5607 (can_encode_int32_in): New helper function.
5608 (aarch64_relocate_instruction): New function.
5609 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5610 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5611 (struct linux_target_ops): Install aarch64_get_thread_area,
5612 aarch64_install_fast_tracepoint_jump_pad and
5613 aarch64_get_min_fast_tracepoint_insn_len.
5614
787749ea
PL
56152015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5616
5617 * Makefile.in (aarch64-insn.o): New rule.
5618 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5619
9812b2e6
YQ
56202015-09-21 Yao Qi <yao.qi@linaro.org>
5621
5622 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5623
18fe412b
YQ
56242015-09-21 Yao Qi <yao.qi@linaro.org>
5625
5626 * tracepoint.c (max_jump_pad_size): Remove.
5627
a0cc84cd
YQ
56282015-09-18 Yao Qi <yao.qi@linaro.org>
5629
5630 * linux-aarch64-low.c: Don't include sys/uio.h.
5631 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5632
d78908cf
WW
56332015-09-16 Wei-cheng Wang <cole945@gmail.com>
5634
5635 * tracepoint.c (eval_result_type): Change prototype.
5636 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5637
d57e0d50
PA
56382015-09-15 Pedro Alves <palves@redhat.com>
5639
5640 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5641 Check whether to report exec events instead of checking whether
5642 multiprocess is enabled.
5643
5a676acc
PA
56442015-09-15 Pedro Alves <palves@redhat.com>
5645
5646 PR remote/18965
5647 * remote-utils.c (prepare_resume_reply): Merge
5648 TARGET_WAITKIND_VFORK_DONE switch case with the
5649 TARGET_WAITKIND_FORKED case.
5650
7c5d0fad
YQ
56512015-09-15 Yao Qi <yao.qi@linaro.org>
5652
5653 * server.c (handle_query): Check string comparison using
5654 "else if" instead of "if".
5655
750ce8d1
YQ
56562015-09-15 Yao Qi <yao.qi@linaro.org>
5657
5658 * server.c (vCont_supported): New global variable.
5659 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5660 matches. Append ";vContSupported+" to own_buf.
5661 (handle_v_requests): Append ";s;S" to own_buf if target supports
5662 hardware single step or vCont_supported is false.
5663 (capture_main): Set vCont_supported to zero.
5664
70b90b91
YQ
56652015-09-15 Yao Qi <yao.qi@linaro.org>
5666
5667 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5668 it to ...
5669 (linux_supports_hardware_single_step): ... New function.
5670 (linux_target_ops): Update.
5671 * lynx-low.c (lynx_target_ops): Set field
5672 supports_hardware_single_step to target_can_do_hardware_single_step.
5673 * nto-low.c (nto_target_ops): Likewise.
5674 * spu-low.c (spu_target_ops): Likewise.
5675 * win32-low.c (win32_target_ops): Likewise.
5676 * target.c (target_can_do_hardware_single_step): New function.
5677 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5678 Remove. <supports_hardware_single_step>: New field.
5679 (target_supports_conditional_breakpoints): Remove.
5680 (target_supports_hardware_single_step): New macro.
5681 (target_can_do_hardware_single_step): Declare.
5682 * server.c (handle_query): Use target_supports_hardware_single_step
5683 instead of target_supports_conditional_breakpoints.
5684
ade90bde
YQ
56852015-09-15 Yao Qi <yao.qi@linaro.org>
5686
5687 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5688 function.
5689 (struct linux_target_ops the_low_target): Install
5690 aarch64_linux_siginfo_fixup.
5691
94585166
DB
56922015-09-11 Don Breazeal <donb@codesourcery.com>
5693 Luis Machado <lgustavo@codesourcery.com>
5694
5695 * linux-low.c (linux_mourn): Static declaration.
5696 (linux_arch_setup): Move in front of
5697 handle_extended_wait.
5698 (linux_arch_setup_thread): New function.
5699 (handle_extended_wait): Handle exec events. Call
5700 linux_arch_setup_thread. Make event_lwp argument a
5701 pointer-to-a-pointer.
5702 (check_zombie_leaders): Do not check stopped threads.
5703 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5704 (linux_low_filter_event): Add lwp and thread for exec'ing
5705 non-leader thread if leader thread has been deleted.
5706 Refactor code into linux_arch_setup_thread and call it.
5707 Pass child lwp pointer by reference to handle_extended_wait.
5708 (linux_wait_for_event_filtered): Update comment.
5709 (linux_wait_1): Prevent clobbering exec event status.
5710 (linux_supports_exec_events): New function.
5711 (linux_target_ops) <supports_exec_events>: Initialize new member.
5712 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5713 new member.
5714 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5715 * server.c (report_exec_events): New global variable.
5716 (handle_query): Handle qSupported query for exec-events feature.
5717 (captured_main): Initialize report_exec_events.
5718 * server.h (report_exec_events): Declare new global variable.
5719 * target.h (struct target_ops) <supports_exec_events>: New
5720 member.
5721 (target_supports_exec_events): New macro.
5722 * win32-low.c (win32_target_ops) <supports_exec_events>:
5723 Initialize new member.
5724
0568462b
MM
57252015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5726
5727 * linux-low.c (linux_low_enable_btrace): Remove.
5728 (linux_target_ops): Replace linux_low_enable_btrace with
5729 linux_enable_btrace.
5730
39edd165
YQ
57312015-09-03 Yao Qi <yao.qi@linaro.org>
5732
5733 * linux-aarch64-low.c (aarch64_insert_point): Call
5734 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5735 returns true.
5736
1db33b5a
UW
57372015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5738
5739 * linux-low.c (check_stopped_by_breakpoint): Use
5740 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5741
ab290430
PA
57422015-08-27 Pedro Alves <palves@redhat.com>
5743
5744 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5745
8d749320
SM
57462015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5747
6711b7f8
SM
5748 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5749 the XNEW-family equivalent.
8d749320
SM
5750 (compile_bytecodes): Likewise.
5751 * dll.c (loaded_dll): Likewise.
5752 * event-loop.c (append_callback_event): Likewise.
5753 (create_file_handler): Likewise.
5754 (create_file_event): Likewise.
5755 * hostio.c (handle_open): Likewise.
5756 * inferiors.c (add_thread): Likewise.
5757 (add_process): Likewise.
5758 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5759 * linux-arm-low.c (arm_new_process): Likewise.
5760 (arm_new_thread): Likewise.
5761 * linux-low.c (add_to_pid_list): Likewise.
5762 (linux_add_process): Likewise.
5763 (handle_extended_wait): Likewise.
5764 (add_lwp): Likewise.
5765 (enqueue_one_deferred_signal): Likewise.
5766 (enqueue_pending_signal): Likewise.
5767 (linux_resume_one_lwp_throw): Likewise.
5768 (linux_resume_one_thread): Likewise.
5769 (linux_read_memory): Likewise.
5770 (linux_write_memory): Likewise.
5771 * linux-mips-low.c (mips_linux_new_process): Likewise.
5772 (mips_linux_new_thread): Likewise.
5773 (mips_add_watchpoint): Likewise.
5774 * linux-x86-low.c (initialize_low_arch): Likewise.
5775 * lynx-low.c (lynx_add_process): Likewise.
5776 * mem-break.c (set_raw_breakpoint_at): Likewise.
5777 (set_breakpoint): Likewise.
5778 (add_condition_to_breakpoint): Likewise.
5779 (add_commands_to_breakpoint): Likewise.
5780 (clone_agent_expr): Likewise.
5781 (clone_one_breakpoint): Likewise.
5782 * regcache.c (new_register_cache): Likewise.
5783 * remote-utils.c (look_up_one_symbol): Likewise.
5784 * server.c (queue_stop_reply): Likewise.
5785 (start_inferior): Likewise.
5786 (queue_stop_reply_callback): Likewise.
5787 (handle_target_event): Likewise.
5788 * spu-low.c (fetch_ppc_memory): Likewise.
5789 (store_ppc_memory): Likewise.
5790 * target.c (set_target_ops): Likewise.
5791 * thread-db.c (thread_db_load_search): Likewise.
5792 (try_thread_db_load_1): Likewise.
5793 * tracepoint.c (add_tracepoint): Likewise.
5794 (add_tracepoint_action): Likewise.
5795 (create_trace_state_variable): Likewise.
5796 (cmd_qtdpsrc): Likewise.
5797 (cmd_qtro): Likewise.
5798 (add_while_stepping_state): Likewise.
5799 * win32-low.c (child_add_thread): Likewise.
5800 (get_image_name): Likewise.
5801
ed8b7b42
YQ
58022015-08-25 Yao Qi <yao.qi@linaro.org>
5803
5804 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5805
db3cb7cb
YQ
58062015-08-25 Yao Qi <yao.qi@linaro.org>
5807
5808 * Makefile.in (aarch64-linux.o): New rule.
5809 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5810 srv_tgtobj.
5811 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5812 (aarch64_init_debug_reg_state): Make it extern.
5813 (aarch64_linux_prepare_to_resume): Remove.
5814
f6011a1c
YQ
58152015-08-25 Yao Qi <yao.qi@linaro.org>
5816
5817 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5818 lwp_arch_private_info and ptid_of_lwp.
5819
88e2cf7e
YQ
58202015-08-25 Yao Qi <yao.qi@linaro.org>
5821
5822 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5823 Find proc_info by find_process_pid. All callers updated.
5824
5e35436e
YQ
58252015-08-25 Yao Qi <yao.qi@linaro.org>
5826
5827 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5828 Remove.
5829 (debug_reg_change_callback): Remove.
5830 (aarch64_notify_debug_reg_change): Remove.
5831
4a8a7965
YQ
58322015-08-25 Yao Qi <yao.qi@linaro.org>
5833
5834 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5835 Call current_lwp_ptid.
5836
32a271ee
YQ
58372015-08-25 Yao Qi <yao.qi@linaro.org>
5838
5839 * linux-aarch64-low.c (debug_reg_change_callback): Use
5840 debug_printf.
5841
0d51c8d7
YQ
58422015-08-25 Yao Qi <yao.qi@linaro.org>
5843
5844 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5845
31a43dd5
YQ
58462015-08-25 Yao Qi <yao.qi@linaro.org>
5847
5848 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5849
8ee52567
YQ
58502015-08-25 Yao Qi <yao.qi@linaro.org>
5851
5852 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5853 the code.
5854
ff3f0f45
YQ
58552015-08-25 Yao Qi <yao.qi@linaro.org>
5856
5857 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5858 Remove.
5859 (debug_reg_change_callback): Remove argument entry and add argument
5860 lwp. Remove local variable thread. Don't print thread id in the
5861 debugging output. Don't check whether pid of thread equals to pid.
5862 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5863 iterate_over_lwps instead find_inferior.
5864
3d40fbb5
PA
58652015-08-24 Pedro Alves <palves@redhat.com>
5866
5867 * inferiors.c (get_first_process): New function.
5868 * inferiors.h (get_first_process): New declaration.
5869 * remote-utils.c (read_ptid): Default to the first process in the
5870 list, instead of to the current thread's process.
5871
438e1e42
PA
58722015-08-24 Pedro Alves <palves@redhat.com>
5873
5874 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5875 * event-loop.c: Likewise.
5876 * remote-utils.c: Likewise.
5877 * tracepoint.c: Likewise.
5878
a8c6d4fc
PA
58792015-08-24 Pedro Alves <palves@redhat.com>
5880
5881 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5882 ptid_get_lwp.
5883
99b0bb12
PA
58842015-08-21 Pedro Alves <palves@redhat.com>
5885
5886 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5887 instead of literal 1.
5888
f8904751
PA
58892015-08-21 Pedro Alves <palves@redhat.com>
5890
5891 * tdesc.c (default_description): Explicitly zero-initialize.
5892
465a859e
PA
58932015-08-21 Pedro Alves <palves@redhat.com>
5894
5895 PR gdb/18749
5896 * inferiors.c (remove_thread): Discard any pending stop reply for
5897 this thread.
5898 * server.c (remove_all_on_match_pid): Rename to ...
5899 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5900 instead of a pid.
5901 (discard_queued_stop_replies): Change parameter to a ptid. Now
5902 extern.
5903 (handle_v_kill, kill_inferior_callback, captured_main)
5904 (process_serial_event): Adjust.
5905 * server.h (discard_queued_stop_replies): Declare.
5906
f0db101d
PA
59072015-08-21 Pedro Alves <palves@redhat.com>
5908
5909 * linux-low.c (wait_for_sigstop): Always switch to no thread
5910 selected if the previously current thread dies.
5911 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5912 process instead of the current thread's.
5913 * remote-utils.c (input_interrupt): Don't check if there's no
5914 current thread.
5915 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5916 current thread to the general thread fails, error out.
5917 (handle_qxfer_auxv, handle_qxfer_libraries)
5918 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5919 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5920 (handle_query): Check if there's a thread selected instead of
5921 checking whether there's any thread in the thread list.
5922 (handle_qxfer_threads, handle_qxfer_btrace)
5923 (handle_qxfer_btrace_conf): Don't error out early if there's no
5924 thread in the thread list.
5925 (handle_v_cont, myresume): Don't set the current thread to the
5926 continue thread.
5927 (process_serial_event) <Hg handling>: Also set thread_id if the
5928 previous general thread is still alive.
5929 (process_serial_event) <g/G handling>: If setting the current
5930 thread to the general thread fails, error out.
5931 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5932 thread's lwp instead of the current thread's.
5933 * target.c (set_desired_thread): If the desired thread was not
5934 found, leave the current thread pointing to NULL. Return an int
5935 (boolean) indicating success.
5936 * target.h (set_desired_thread): Change return type to int.
5937
40045d91
MF
59382015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5939
5940 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5941 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5942 #includes.
5943 (ps_get_thread_area): New function.
5944
45face3b
GB
59452015-08-19 Gary Benson <gbenson@redhat.com>
5946
5947 * hostio.c (handle_pread): Do not attempt to read more data
5948 than hostio_reply_with_data can fit in a packet.
5949
16d5f642
JB
59502015-08-18 Joel Brobecker <brobecker@adacore.com>
5951
5952 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5953
a738da3a
MF
59542015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5955
5956 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5957
33ebda9d
PA
59582015-08-06 Pedro Alves <palves@redhat.com>
5959
5960 * tracepoint.c (expr_eval_result): Now an int.
5961
a44892be
PA
59622015-08-06 Pedro Alves <palves@redhat.com>
5963
5964 * gdbthread.h (struct regcache): Forward declare.
5965 (struct thread_info) <regcache_data>: Now a struct regcache
5966 pointer.
5967 * inferiors.c (inferior_regcache_data)
5968 (set_inferior_regcache_data): Now work with struct regcache
5969 pointers.
5970 * inferiors.h (struct regcache): Forward declare.
5971 (inferior_regcache_data, set_inferior_regcache_data): Now work
5972 with struct regcache pointers.
5973 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5974 (free_register_cache_thread): Remove struct regcache pointer
5975 casts.
5976
608a1e46
PA
59772015-08-06 Pedro Alves <palves@redhat.com>
5978
5979 * server.c (captured_main): On error, print the exception message
5980 to stderr, and if run_once is set, throw a quit.
5981
f0ce0d3a
PA
59822015-08-06 Pedro Alves <palves@redhat.com>
5983
5984 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5985 the current thread.
5986
bf47e248
PA
59872015-08-06 Pedro Alves <palves@redhat.com>
5988
5989 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5990 reading beyond the passed in buffer length.
5991
b6b9ffcc
PL
59922015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5993
5994 * tracepoint.c (symbol_list) <required>: Remove.
5995
863d01bd
PA
59962015-08-06 Pedro Alves <palves@redhat.com>
5997
5998 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5999 count if stopping and suspending threads.
6000 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6001 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6002 (linux_detach): Complete an ongoing step-over.
6003 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6004 throughout.
6005 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6006 (linux_wait_1): If passing a signal to the inferior after
6007 finishing a step-over, unsuspend and re-resume all lwps. If we
6008 see a single-step event but the thread should be continuing, don't
6009 pass the trap to gdb.
6010 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6011 internal_error instead of gdb_assert.
6012 (enqueue_pending_signal): New function.
6013 (check_ptrace_stopped_lwp_gone): Add debug output.
6014 (start_step_over): Use internal_error instead of gdb_assert.
6015 (complete_ongoing_step_over): New function.
6016 (linux_resume_one_thread): Don't resume a suspended thread.
6017 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6018 it stepping.
6019
00db26fa
PA
60202015-08-06 Pedro Alves <palves@redhat.com>
6021
6022 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6023 (linux_thread_alive): Use lwp_is_marked_dead.
6024 (extended_event_reported): Delete.
6025 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6026 instead of extended_event_reported.
6027 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6028 as well.
6029 (lwp_is_marked_dead): New function.
6030 (lwp_running): Use lwp_is_marked_dead.
6031 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6032 comment.
6033
ad071a30
PA
60342015-08-06 Pedro Alves <palves@redhat.com>
6035
6036 * linux-low.c (linux_wait_1): Move fork event output out of the
6037 !report_to_gdb check. Pass event_child->waitstatus to
6038 target_waitstatus_to_string instead of ourstatus.
6039
524b57e6
YQ
60402015-08-04 Yao Qi <yao.qi@linaro.org>
6041
6042 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6043 if current_thread is 32 bit.
6044
6085d6f6
YQ
60452015-08-04 Yao Qi <yao.qi@linaro.org>
6046
6047 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6048 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6049 * server.c (extended_protocol): Remove "static".
6050 * server.h (extended_protocol): Declare it.
6051
8a7e4587
YQ
60522015-08-04 Yao Qi <yao.qi@linaro.org>
6053
6054 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6055 both aarch64 and aarch32.
6056 (aarch64_set_pc): Likewise.
6057
3b53ae99
YQ
60582015-08-04 Yao Qi <yao.qi@linaro.org>
6059
6060 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6061 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6062 arm-with-neon.xml to srv_xmlfiles.
6063 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6064 (is_64bit_tdesc): New function.
6065 (aarch64_linux_read_description): New function.
6066 (aarch64_arch_setup): Call aarch64_linux_read_description.
6067 (regs_info): Rename to regs_info_aarch64.
6068 (aarch64_regs_info): Return right regs_info.
6069 (initialize_low_arch): Call initialize_low_arch_aarch32.
6070
bd9e6534
YQ
60712015-08-04 Yao Qi <yao.qi@linaro.org>
6072
6073 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6074 * linux-aarch32-low.c: New file.
6075 * linux-aarch32-low.h: New file.
6076 * linux-arm-low.c (arm_fill_gregset): Move it to
6077 linux-aarch32-low.c.
6078 (arm_store_gregset): Likewise.
6079 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6080 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6081 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6082 (regs_info): Rename to regs_info_arm.
6083 (arm_regs_info): Return regs_info_aarch32 if
6084 have_ptrace_getregset is 1 and target description is
6085 arm_with_neon or arm_with_vfpv3.
6086 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6087 Call initialize_low_arch_aarch32 instead.
6088
ded48a5e
YQ
60892015-08-04 Yao Qi <yao.qi@linaro.org>
6090
6091 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6092 * linux-low.c: ... here.
6093 * linux-low.h (have_ptrace_getregset): Declare it.
6094
96e9210f
PA
60952015-08-04 Pedro Alves <palves@redhat.com>
6096
6097 * thread-db.c (struct thread_db): Use new typedefs.
6098 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6099 CHK calls.
6100 (disable_thread_event_reporting): Cast result of dlsym to
6101 destination function pointer type.
6102 (thread_db_mourn): Use td_ta_delete_ftype.
6103
af60a1ef
SL
61042015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6105
6106 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6107 arch variant.
6108 (CDX_BREAKPOINT): Define for R2.
6109 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6110 (the_low_target): Add comments.
6111
e8b41681
YQ
61122015-07-30 Yao Qi <yao.qi@linaro.org>
6113
6114 * linux-arm-low.c (arm_hwcap): Remove it.
6115 (arm_read_description): New local variable arm_hwcap. Don't
6116 set arm_hwcap to zero.
6117
89abb039
YQ
61182015-07-30 Yao Qi <yao.qi@linaro.org>
6119
6120 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6121 Use regcache->tdesc instead.
6122 (arm_store_wmmxregset): Likewise.
6123 (arm_fill_vfpregset): Likewise.
6124 (arm_store_vfpregset): Likewise.
6125
deca266c
YQ
61262015-07-30 Yao Qi <yao.qi@linaro.org>
6127
6128 * linux-arm-low.c: Include arch/arm.h.
6129 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6130 (arm_store_gregset): Likewise.
6131
aa58a496
SM
61322015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6133
6134 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6135 ptrace's 4th parameter.
6136
50904b25
YQ
61372015-07-27 Yao Qi <yao.qi@linaro.org>
6138
6139 * configure.srv (case aarch64*-*-linux*): Don't set
6140 srv_linux_usrregs.
6141
5826e159
PA
61422015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6143
6144 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6145 sys/ptrace.h.
6146 * linux-arm-low.c: Likewise.
6147 * linux-cris-low.c: Likewise.
6148 * linux-crisv32-low.c: Likewise.
6149 * linux-low.c: Likewise.
6150 * linux-m68k-low.c: Likewise.
6151 * linux-mips-low.c: Likewise.
6152 * linux-nios2-low.c: Likewise.
6153 * linux-s390-low.c: Likewise.
6154 * linux-sparc-low.c: Likewise.
6155 * linux-tic6x-low.c: Likewise.
6156 * linux-tile-low.c: Likewise.
6157 * linux-x86-low.c: Likewise.
6158
54019719
PA
61592015-07-24 Pedro Alves <palves@redhat.com>
6160
6161 * config.in: Regenerate.
6162 * configure: Regenerate.
6163
eb7aa561
PA
61642015-07-24 Pedro Alves <palves@redhat.com>
6165
6166 * acinclude.m4: Include ../ptrace.m4.
6167 * configure.ac: Call GDB_AC_PTRACE.
6168 * config.in, configure: Regenerate.
6169
55d7b841
YQ
61702015-07-24 Yao Qi <yao.qi@linaro.org>
6171
6172 * linux-low.c (linux_create_inferior): Remove setting to
6173 proc->priv->new_inferior.
6174 (linux_attach): Likewise.
6175 (linux_low_filter_event): Likewise.
6176 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6177
c06cbd92
YQ
61782015-07-24 Yao Qi <yao.qi@linaro.org>
6179
6180 * linux-low.c (linux_arch_setup): New function.
6181 (linux_low_filter_event): If proc->tdesc is NULL and
6182 proc->attached is true, call the_low_target.arch_setup.
6183 Otherwise, keep status pending, and return.
6184 (linux_resume_one_lwp_throw): Don't call get_pc if
6185 thread->while_stepping isn't NULL. Don't call
6186 get_thread_regcache if proc->tdesc is NULL.
6187 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6188 (linux_target_ops): Install arch_setup.
6189 * server.c (start_inferior): Call the_target->arch_setup.
6190 * target.h (struct target_ops) <arch_setup>: New field.
6191 (target_arch_setup): New marco.
6192 * lynx-low.c (lynx_target_ops): Update.
6193 * nto-low.c (nto_target_ops): Update.
6194 * spu-low.c (spu_target_ops): Update.
6195 * win32-low.c (win32_target_ops): Update.
6196
5ae3ebba
YQ
61972015-07-24 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-low.c (linux_add_process): Don't set
6200 proc->priv->new_inferior.
6201 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6202 (linux_attach): Likewise.
6203
eb97750b
YQ
62042015-07-24 Yao Qi <yao.qi@linaro.org>
6205
6206 * server.c (start_inferior): Code refactor.
6207
51aee833
YQ
62082015-07-24 Yao Qi <yao.qi@linaro.org>
6209
6210 * server.c (process_serial_event): Set general_thread.
6211
af1b22f3
YQ
62122015-07-21 Yao Qi <yao.qi@linaro.org>
6213
6214 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6215 aarch64_linux_get_debug_reg_capacity.
6216
554717a3
YQ
62172015-07-17 Yao Qi <yao.qi@linaro.org>
6218
6219 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6220 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6221 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6222 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6223 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6224 (AARCH64_HWP_ALIGNMENT): Likewise.
6225 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6226 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6227 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6228 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6229 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6230 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6231 (struct aarch64_debug_reg_state): Likewise.
6232 (struct arch_lwp_info): Likewise.
6233 (aarch64_align_watchpoint): Likewise.
6234 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6235 (aarch64_watchpoint_length): Likewise.
6236 (aarch64_point_encode_ctrl_reg): Likewise
6237 (aarch64_point_is_aligned): Likewise.
6238 (aarch64_align_watchpoint): Likewise.
6239 (aarch64_linux_set_debug_regs):
6240 (aarch64_dr_state_insert_one_point): Likewise.
6241 (aarch64_dr_state_remove_one_point): Likewise.
6242 (aarch64_handle_breakpoint): Likewise.
6243 (aarch64_handle_aligned_watchpoint): Likewise.
6244 (aarch64_handle_unaligned_watchpoint): Likewise.
6245 (aarch64_handle_watchpoint): Likewise.
6246
c67ca4de
YQ
62472015-07-17 Yao Qi <yao.qi@linaro.org>
6248
6249 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6250 and don't aarch64_get_debug_reg_state. All callers update.
6251 (aarch64_handle_aligned_watchpoint): Likewise.
6252 (aarch64_handle_unaligned_watchpoint): Likewise.
6253 (aarch64_handle_watchpoint): Likewise.
6254 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6255 (aarch64_remove_point): Likewise.
6256
25abf979
YQ
62572015-07-17 Yao Qi <yao.qi@linaro.org>
6258
6259 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6260 debug_printf.
6261 (aarch64_handle_unaligned_watchpoint): Likewise.
6262
db1ff28b
JK
62632015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6264
6265 Revert the previous 3 commits:
6266 Move gdb_regex* to common/
6267 Move linux_find_memory_regions_full & co.
6268 gdbserver build-id attribute generator
6269
700ca40f
JK
62702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6271 Jan Kratochvil <jan.kratochvil@redhat.com>
6272
6273 gdbserver build-id attribute generator.
6274 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6275 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6276 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6277 (find_phdr): New.
6278 (get_dynamic): Use find_pdhr to traverse program headers.
6279 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6280 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6281 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6282 (get_hex_build_id): New.
6283 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6284 to reply XML document.
6285
9904185c
JK
62862015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6287 Jan Kratochvil <jan.kratochvil@redhat.com>
6288
6289 * target.c: Include target/target-utils.h and fcntl.h.
6290 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6291 (target_fileio_read_stralloc): New functions.
6292
6e5b4429
JK
62932015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6294
6295 * Makefile.in (OBS): Add gdb_regex.o.
6296 (gdb_regex.o): New.
6297 * config.in: Rebuilt.
6298 * configure: Rebuilt.
6299
ddc98fbf
JK
63002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6301 Jan Kratochvil <jan.kratochvil@redhat.com>
6302
6303 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6304 * Makefile.in (OBS): Add target-utils.o.
6305 (linux-maps.o, target-utils.o): New.
6306 * configure.srv (srv_linux_obj): Add linux-maps.o.
6307
e57bb7a0
PL
63082015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6309
6310 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6311 function, return 1.
6312 (the_low_target): Install it.
6313
586b02a9
PA
63142015-07-14 Pedro Alves <palves@redhat.com>
6315
6316 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6317 Instead, ignore ECHILD, and throw an error for other errnos.
6318
58c1b36c
PA
63192015-07-10 Pedro Alves <palves@redhat.com>
6320
6321 * event-loop.c (struct callback_event) <data>: Change type to
6322 gdb_client_data instance instead of gdb_client_data pointer.
6323 (append_callback_event): Adjust.
6324
421530db
PL
63252015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6326
6327 * linux-aarch64-low.c: Add comments for each linux_target_ops
6328 method. Remove comments already covered in target_ops and
6329 linux_target_ops definitions.
6330 (the_low_target): Add comments for each unimplemented method.
6331
c2d65f38
YQ
63322015-07-09 Yao Qi <yao.qi@linaro.org>
6333
6334 * linux-aarch64-low.c (aarch64_regmap): Remove.
6335 (aarch64_usrregs_info): Remove.
6336 (regs_info): Set field usrregs to NULL.
6337
b20a6524
MM
63382015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6339
6340 * linux-low.c: Include "rsp-low.h"
6341 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6342 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6343 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6344 (handle_btrace_enable_pt): New.
6345 (handle_btrace_general_set): Support "pt".
6346 (handle_btrace_conf_general_set): Support "pt:size".
6347
96c97461
PL
63482015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6349
6350 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6351 Z_PACKET_SW_BP.
6352
37d66942
PL
63532015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6354
6355 * linux-aarch64-low.c: Remove comment about endianness.
6356 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6357 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6358 memcmp.
6359
dc06243f
GB
63602015-06-24 Gary Benson <gbenson@redhat.com>
6361
6362 * linux-i386-ipa.c (stdint.h): Do not include.
6363 * lynx-i386-low.c (stdint.h): Likewise.
6364 * lynx-ppc-low.c (stdint.h): Likewise.
6365 * mem-break.c (stdint.h): Likewise.
6366 * thread-db.c (stdint.h): Likewise.
6367 * tracepoint.c (stdint.h): Likewise.
6368 * win32-low.c (stdint.h): Likewise.
6369
124e13d9
SM
63702015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6371
6372 * server.c (write_qxfer_response): Update call to
6373 remote_escape_output.
6374
909c2cda
JK
63752015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6376 Jan Kratochvil <jan.kratochvil@redhat.com>
6377
6378 Merge multiple hex conversions.
6379 * gdbreplay.c (tohex): Rename to 'fromhex'.
6380 (logchar): Use fromhex.
6381
24c05f46
JK
63822015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6383
6384 * server.c (handle_qxfer_libraries): Set `version' attribute for
6385 <library-list>.
6386
14d2069a
GB
63872015-06-10 Gary Benson <gbenson@redhat.com>
6388
6389 * target.h (struct target_ops) <multifs_open>: New field.
6390 <multifs_unlink>: Likewise.
6391 <multifs_readlink>: Likewise.
6392 * linux-low.c (nat/linux-namespaces.h): New include.
6393 (linux_target_ops): Initialize the_target->multifs_open,
6394 the_target->multifs_unlink and the_target->multifs_readlink.
6395 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6396 * hostio.c (hostio_fs_pid): New static variable.
6397 (hostio_handle_new_gdb_connection): New function.
6398 (handle_setfs): Likewise.
6399 (handle_open): Use the_target->multifs_open as appropriate.
6400 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6401 (handle_readlink): Use the_target->multifs_readlink as
6402 appropriate.
6403 (handle_vFile): Handle vFile:setfs packets.
6404 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6405 after target_handle_new_gdb_connection.
6406
4b8b5e72
GB
64072015-06-10 Gary Benson <gbenson@redhat.com>
6408
6409 * configure.ac (AC_CHECK_FUNCS): Add setns.
6410 * config.in: Regenerate.
6411 * configure: Likewise.
6412 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6413 (linux-namespaces.o): New rule.
6414 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6415
3ac2e371
GB
64162015-06-09 Gary Benson <gbenson@redhat.com>
6417
6418 * hostio.c (handle_open): Process mode argument with
6419 fileio_to_host_mode.
6420
ca9b78ce
YQ
64212015-06-01 Yao Qi <yao.qi@linaro.org>
6422
6423 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6424 * linux-x86-low.c: Likewise.
6425
bfacd19d
DB
64262015-05-28 Don Breazeal <donb@codesourcery.com>
6427
6428 * linux-low.c (handle_extended_wait): Initialize
6429 thread_info.last_resume_kind for new fork children.
6430
452003ef
PA
64312015-05-15 Pedro Alves <palves@redhat.com>
6432
6433 * target.h (target_handle_new_gdb_connection): Rewrite using if
6434 wrapped in do/while.
6435
1041a03c
JB
64362015-05-14 Joel Brobecker <brobecker@adacore.com>
6437
6438 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6439 * configure, config.in: Regenerate.
6440 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6441 Declare typedef.
6442
c269dbdb
DB
64432015-05-12 Don Breazeal <donb@codesourcery.com>
6444
6445 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6446 PTRACE_EVENT_VFORK_DONE.
6447 (linux_low_ptrace_options, extended_event_reported): Add vfork
6448 events.
6449 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6450 and "vforkdone" for RSP 'T' Stop Reply Packet.
6451 * server.h (report_vfork_events): Declare
6452 global variable.
6453
3a8a0396
DB
64542015-05-12 Don Breazeal <donb@codesourcery.com>
6455
6456 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6457 (the_low_target) <new_fork>: Initialize new member.
6458 * linux-arm-low.c (arm_new_fork): New function.
6459 (the_low_target) <new_fork>: Initialize new member.
6460 * linux-low.c (handle_extended_wait): Call new target function
6461 new_fork.
6462 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6463 * linux-mips-low.c (mips_add_watchpoint): New function
6464 extracted from mips_insert_point.
6465 (the_low_target) <new_fork>: Initialize new member.
6466 (mips_linux_new_fork): New function.
6467 (mips_insert_point): Call mips_add_watchpoint.
6468 * linux-x86-low.c (x86_linux_new_fork): New function.
6469 (the_low_target) <new_fork>: Initialize new member.
6470
de0d863e
DB
64712015-05-12 Don Breazeal <donb@codesourcery.com>
6472
6473 * linux-low.c (handle_extended_wait): Implement return value,
6474 rename argument 'event_child' to 'event_lwp', handle
6475 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6476 (linux_low_ptrace_options): New function.
6477 (linux_low_filter_event): Call linux_low_ptrace_options,
6478 use different argument fo linux_enable_event_reporting,
6479 use return value from handle_extended_wait.
6480 (extended_event_reported): New function.
6481 (linux_wait_1): Call extended_event_reported and set
6482 status to report fork events.
6483 (linux_write_memory): Add pid to debug message.
6484 (reset_lwp_ptrace_options_callback): New function.
6485 (linux_handle_new_gdb_connection): New function.
6486 (linux_target_ops): Initialize new structure member.
6487 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6488 * lynx-low.c: Initialize new structure member.
6489 * remote-utils.c (prepare_resume_reply): Implement stop reason
6490 "fork" for "T" stop message.
6491 * server.c (handle_query): Call handle_new_gdb_connection.
6492 * server.h (report_fork_events): Declare global flag.
6493 * target.h (struct target_ops) <handle_new_gdb_connection>:
6494 New member.
6495 (target_handle_new_gdb_connection): New macro.
6496 * win32-low.c: Initialize new structure member.
6497
ddcbc397
DB
64982015-05-12 Don Breazeal <donb@codesourcery.com>
6499
6500 * mem-break.c (APPEND_TO_LIST): Define macro.
6501 (clone_agent_expr): New function.
6502 (clone_one_breakpoint): New function.
6503 (clone_all_breakpoints): New function.
6504 * mem-break.h: Declare new functions.
6505
89245bc0
DB
65062015-05-12 Don Breazeal <donb@codesourcery.com>
6507
6508 * linux-low.c (linux_supports_fork_events): New function.
6509 (linux_supports_vfork_events): New function.
6510 (linux_target_ops): Initialize new structure members.
6511 (initialize_low): Call linux_check_ptrace_features.
6512 * lynx-low.c (lynx_target_ops): Initialize new structure
6513 members.
6514 * server.c (report_fork_events, report_vfork_events):
6515 New global flags.
6516 (handle_query): Add new features to qSupported packet and
6517 response.
6518 (captured_main): Initialize new global variables.
6519 * target.h (struct target_ops) <supports_fork_events>:
6520 New member.
6521 <supports_vfork_events>: New member.
6522 (target_supports_fork_events): New macro.
6523 (target_supports_vfork_events): New macro.
6524 * win32-low.c (win32_target_ops): Initialize new structure
6525 members.
6526
835205d0
GB
65272015-05-12 Gary Benson <gbenson@redhat.com>
6528
6529 * server.c (handle_qxfer_exec_file): Use current process
6530 if annex is empty.
6531
21e94bd9
SL
65322015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6533
6534 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6535 Remove HAVE_PTRACE_GETREGS conditionals.
6536 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6537 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6538
45614f15
YQ
65392015-05-08 Yao Qi <yao.qi@linaro.org>
6540
6541 * linux-low.c (linux_supports_conditional_breakpoints): New
6542 function.
6543 (linux_target_ops): Install new target method.
6544 * lynx-low.c (lynx_target_ops): Install NULL hook for
6545 supports_conditional_breakpoints.
6546 * nto-low.c (nto_target_ops): Likewise.
6547 * spu-low.c (spu_target_ops): Likewise.
6548 * win32-low.c (win32_target_ops): Likewise.
6549 * server.c (handle_query): Check
6550 target_supports_conditional_breakpoints.
6551 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6552 New field.
6553 (target_supports_conditional_breakpoints): New macro.
6554
80ad801e
PA
65552015-05-06 Pedro Alves <palves@redhat.com>
6556
6557 PR server/18081
6558 * server.c (start_inferior): If the process exits, mourn it.
6559
819843c7
GB
65602015-04-21 Gary Benson <gbenson@redhat.com>
6561
6562 * hostio.c (fileio_open_flags_to_host): Factored out to
6563 fileio_to_host_openflags in common/fileio.c. Single use
6564 updated.
6565
a2d5a9d7
MF
65662015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6567
6568 * linux-xtensa-low.c (xtensa_fill_gregset)
6569 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6570 XCHAL_HAVE_LOOP.
6571
deb44829
MF
65722015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6573
6574 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6575 (regs_info): Replace usrregs pointer with NULL.
6576
e57f1de3
GB
65772015-04-17 Gary Benson <gbenson@redhat.com>
6578
6579 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6580 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6581 * server.c (handle_qxfer_exec_file): New function.
6582 (qxfer_packets): Add exec-file entry.
6583 (handle_query): Report qXfer:exec-file:read as supported packet.
6584
62828379
RN
65852015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6586
6587 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6588
b88bb450
GB
65892015-04-09 Gary Benson <gbenson@redhat.com>
6590
6591 * hostio-errno.c (errno_to_fileio_error): Remove function.
6592 Update caller to use remote_fileio_to_fio_error.
6593
c8f4bfdd
YQ
65942015-04-09 Yao Qi <yao.qi@linaro.org>
6595
6596 * linux-low.c (linux_insert_point): Call
6597 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6598 (linux_remove_point): Call remove_memory_breakpoint if type is
6599 raw_bkpt_type_sw.
6600 * linux-x86-low.c (x86_insert_point): Don't call
6601 insert_memory_breakpoint.
6602 (x86_remove_point): Don't call remove_memory_breakpoint.
6603
41f98f02
PA
66042015-04-01 Pedro Alves <palves@redhat.com>
6605 Cleber Rosa <crosa@redhat.com>
6606
6607 * server.c (gdbserver_usage): Reorganize and extend the usage
6608 message.
6609
2bf6fb9d
PA
66102015-03-24 Pedro Alves <palves@redhat.com>
6611
6612 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6613 output. Also dump TRAP_TRACE.
6614 (linux_low_filter_event): In debug output, distinguish a
6615 resume_stop SIGSTOP from a delayed SIGSTOP.
6616
369f6daa
GB
66172015-03-24 Gary Benson <gbenson@redhat.com>
6618
6619 * linux-x86-low.c (x86_linux_new_thread): Moved to
6620 nat/x86-linux.c.
6621 (x86_linux_prepare_to_resume): Likewise.
6622
8e5d4070
GB
66232015-03-24 Gary Benson <gbenson@redhat.com>
6624
6625 * Makefile.in (x86-linux-dregs.o): New rule.
6626 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6627 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6628 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6629 (x86_linux_dr_get): Likewise.
6630 (x86_linux_dr_set): Likewise.
6631 (update_debug_registers_callback): Likewise.
6632 (x86_linux_dr_set_addr): Likewise.
6633 (x86_linux_dr_get_addr): Likewise.
6634 (x86_linux_dr_set_control): Likewise.
6635 (x86_linux_dr_get_control): Likewise.
6636 (x86_linux_dr_get_status): Likewise.
6637 (x86_linux_update_debug_registers): Likewise.
6638
2b95d440
GB
66392015-03-24 Gary Benson <gbenson@redhat.com>
6640
6641 * linux-x86-low.c (x86_linux_update_debug_registers):
6642 New function, factored out from...
6643 (x86_linux_prepare_to_resume): ...this.
6644
14b0bc68
GB
66452015-03-24 Gary Benson <gbenson@redhat.com>
6646
6647 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6648 (x86_linux_dr_set): Likewise.
6649 (update_debug_registers_callback): Likewise.
6650 (x86_linux_dr_set_addr): Likewise.
6651 (x86_linux_dr_get_addr): Likewise.
6652 (x86_linux_dr_set_control): Likewise.
6653 (x86_linux_dr_get_control): Likewise.
6654 (x86_linux_dr_get_status): Likewise.
6655 (x86_linux_prepare_to_resume): Likewise.
6656
5dfe6ca8
GB
66572015-03-24 Gary Benson <gbenson@redhat.com>
6658
6659 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6660 Use perror_with_name. Pass string through gettext.
6661 (x86_linux_dr_set): Likewise.
6662
d33472ad
GB
66632015-03-24 Gary Benson <gbenson@redhat.com>
6664
6665 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6666 (x86_linux_dr_set_addr): ...this.
6667 (x86_dr_low_get_addr): Rename to...
6668 (x86_linux_dr_get_addr): ...this.
6669 (x86_dr_low_set_control): Rename to...
6670 (x86_linux_dr_set_control): ...this.
6671 (x86_dr_low_get_control): Rename to...
6672 (x86_linux_dr_get_control): ...this.
6673 (x86_dr_low_get_status): Rename to...
6674 (x86_linux_dr_get_status): ...this.
6675 (x86_dr_low): Update with new function names.
6676
4b134ca1
GB
66772015-03-24 Gary Benson <gbenson@redhat.com>
6678
6679 * Makefile.in (x86-linux.o): New rule.
6680 * configure.srv: Add x86-linux.o to relevant targets.
6681 * linux-low.c (lwp_set_arch_private_info): New function.
6682 (lwp_arch_private_info): Likewise.
6683 * linux-x86-low.c: Include nat/x86-linux.h.
6684 (arch_lwp_info): Removed structure.
6685 (update_debug_registers_callback):
6686 Use lwp_set_debug_registers_changed.
6687 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6688 and lwp_set_debug_registers_changed.
6689 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6690
34c703da
GB
66912015-03-24 Gary Benson <gbenson@redhat.com>
6692
6693 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6694 * linux-arm-low.c (arm_new_thread): Likewise.
6695 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6696 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6697 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6698 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6699
cff068da
GB
67002015-03-24 Gary Benson <gbenson@redhat.com>
6701
6702 * linux-low.c (ptid_of_lwp): New function.
6703 (lwp_is_stopped): Likewise.
6704 (lwp_stop_reason): Likewise.
6705 * linux-x86-low.c (update_debug_registers_callback):
6706 Use lwp_is_stopped.
6707 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6708 lwp_stop_reason.
6709
b2f7c7e8
GB
67102015-03-24 Gary Benson <gbenson@redhat.com>
6711
6712 * linux-low.h (linux_stop_lwp): Remove declaration.
6713
6d4ee8c6
GB
67142015-03-24 Gary Benson <gbenson@redhat.com>
6715
6716 * linux-low.h: Include nat/linux-nat.h.
6717 * linux-low.c (iterate_over_lwps_args): New structure.
6718 (iterate_over_lwps_filter): New function.
6719 (iterate_over_lwps): Likewise.
6720 * linux-x86-low.c (update_debug_registers_callback):
6721 Update signature to what iterate_over_lwps expects.
6722 Remove PID check that iterate_over_lwps now performs.
6723 (x86_dr_low_set_addr): Use iterate_over_lwps.
6724 (x86_dr_low_set_control): Likewise.
6725
70a0bb6b
GB
67262015-03-24 Gary Benson <gbenson@redhat.com>
6727
6728 * linux-x86-low.c (x86_debug_reg_state): New function.
6729 (x86_linux_prepare_to_resume): Use the above.
6730
7b669087
GB
67312015-03-24 Gary Benson <gbenson@redhat.com>
6732
6733 * linux-low.c (current_lwp_ptid): New function.
6734 * linux-x86-low.c: Include nat/linux-nat.h.
6735 (x86_dr_low_get_addr): Use current_lwp_ptid.
6736 (x86_dr_low_get_control): Likewise.
6737 (x86_dr_low_get_status): Likewise.
6738
eef49a3d
PA
67392015-03-20 Pedro Alves <palves@redhat.com>
6740
6741 * tracepoint.c (cmd_qtstatus): Make "str" const.
6742
b2333d22
PA
67432015-03-20 Pedro Alves <palves@redhat.com>
6744
6745 * server.c (handle_general_set): Make "req_str" const.
6746
23f238d3
PA
67472015-03-19 Pedro Alves <palves@redhat.com>
6748
6749 * linux-low.c (linux_resume_one_lwp): Rename to ...
6750 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6751 instead call perror_with_name.
6752 (check_ptrace_stopped_lwp_gone): New function.
6753 (linux_resume_one_lwp): Reimplement as wrapper around
6754 linux_resume_one_lwp_throw that swallows errors if the LWP is
6755 gone.
6756
91baf43f
PA
67572015-03-19 Pedro Alves <palves@redhat.com>
6758
6759 * linux-low.c (count_events_callback, select_event_lwp_callback):
6760 No longer check whether the thread has resume_stop as last resume
6761 kind.
6762
8bf3b159
PA
67632015-03-19 Pedro Alves <palves@redhat.com>
6764
6765 * linux-low.c (count_events_callback, select_event_lwp_callback):
6766 Use the lwp's status_pending_p field, not the thread's.
6767
b90fc188
PA
67682015-03-19 Pedro Alves <palves@redhat.com>
6769
6770 * linux-low.c (select_event_lwp_callback): Update comments to
6771 no longer mention SIGTRAP.
6772
464b0089
GB
67732015-03-18 Gary Benson <gbenson@redhat.com>
6774
6775 * server.c (handle_query): Do not report vFile:fstat as supported.
6776
aa9e327f
GB
67772015-03-11 Gary Benson <gbenson@redhat.com>
6778
6779 * hostio.c (sys/types.h): New include.
6780 (sys/stat.h): Likewise.
6781 (common-remote-fileio.h): Likewise.
6782 (handle_fstat): New function.
6783 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6784
791c0056
GB
67852015-03-11 Gary Benson <gbenson@redhat.com>
6786
6787 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6788 struct stat.st_blocks and struct stat.st_blksize.
6789 * configure: Regenerate.
6790 * config.in: Likewise.
6791 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6792 (OBS): Add common-remote-fileio.o.
6793 (common-remote-fileio.o): New rule.
6794
9a9df970
PA
67952015-03-09 Pedro Alves <palves@redhat.com>
6796
6797 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6798 'struct sockaddr' pointer in 'accept' call.
6799
9eb1356e
PA
68002015-03-09 Pedro Alves <palves@redhat.com>
6801
6802 Revert:
6803 2015-03-07 Pedro Alves <palves@redhat.com>
6804 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6805 or <winsock2.h> here. Instead include "gdb_socket.h".
6806 (remote_open): Use union gdb_sockaddr_u.
6807 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6808 or <winsock2.h> here. Instead include "gdb_socket.h".
6809 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6810 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6811 or <sys/un.h>.
6812 (init_named_socket, gdb_agent_helper_thread): Use union
6813 gdb_sockaddr_u.
6814
aac331e4
PA
68152015-03-07 Pedro Alves <palves@redhat.com>
6816
6817 * configure.ac (build_warnings): Move
6818 -Wdeclaration-after-statement to the C-specific set.
6819 * configure: Regenerate.
6820
366c75fc
PA
68212015-03-07 Pedro Alves <palves@redhat.com>
6822
6823 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6824 or <winsock2.h> here. Instead include "gdb_socket.h".
6825 (remote_open): Use union gdb_sockaddr_u.
6826 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6827 or <winsock2.h> here. Instead include "gdb_socket.h".
6828 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6829 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6830 or <sys/un.h>.
6831 (init_named_socket, gdb_agent_helper_thread): Use union
6832 gdb_sockaddr_u.
6833
492d29ea
PA
68342015-03-07 Pedro Alves <palves@redhat.com>
6835
6836 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6837 instead.
6838
60a191ed
YQ
68392015-03-06 Yao Qi <yao.qi@linaro.org>
6840
6841 * linux-aarch64-low.c (aarch64_insert_point): Use
6842 show_debug_regs as a boolean.
6843 (aarch64_remove_point): Likewise.
6844
f5771b1d
PA
68452015-03-05 Pedro Alves <palves@redhat.com>
6846
6847 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6848 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6849 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6850 * nto-low.c (nto_target_ops): Likewise.
6851 * spu-low.c (spu_target_ops): Likewise.
6852 * win32-low.c (win32_target_ops): Likewise.
6853
3e572f71
PA
68542015-03-04 Pedro Alves <palves@redhat.com>
6855
72f4393d 6856 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6857 Decide whether a breakpoint triggered based on the SIGTRAP's
6858 siginfo.si_code.
72f4393d
L
6859 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6860 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6861 (linux_low_filter_event): Check for breakpoints before checking
6862 watchpoints.
6863 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6864 siginfo.si_code.
72f4393d
L
6865 (linux_stopped_by_sw_breakpoint)
6866 (linux_supports_stopped_by_sw_breakpoint)
6867 (linux_stopped_by_hw_breakpoint)
6868 (linux_supports_stopped_by_hw_breakpoint): New functions.
6869 (linux_target_ops): Install new target methods.
3e572f71 6870
1ec68e26
PA
68712015-03-04 Pedro Alves <palves@redhat.com>
6872
6873 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6874 * server.c (swbreak_feature, hwbreak_feature): New globals.
6875 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6876 (captured_main): Clear swbreak_feature and hwbreak_feature.
6877 * server.h (swbreak_feature, hwbreak_feature): Declare.
6878 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6879 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6880 supports_stopped_by_hw_breakpoint>: New fields.
6881 (target_supports_stopped_by_sw_breakpoint)
6882 (target_stopped_by_sw_breakpoint)
6883 (target_supports_stopped_by_hw_breakpoint)
6884 (target_stopped_by_hw_breakpoint): Declare.
6885
15c66dd6
PA
68862015-03-04 Pedro Alves <palves@redhat.com>
6887
6888 enum lwp_stop_reason -> enum target_stop_reason
6889 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6890 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6891 (linux_wait_1, stuck_in_jump_pad_callback)
6892 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6893 (linux_stopped_by_watchpoint):
6894 * linux-low.h (enum lwp_stop_reason): Delete.
6895 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6896 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6897
98fc70d6
YQ
68982015-03-04 Yao Qi <yao.qi@linaro.org>
6899
6900 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6901
dd2ac174
GB
69022015-03-03 Gary Benson <gbenson@redhat.com>
6903
6904 * hostio.c (handle_vFile): Fix prefix lengths.
6905
d68e53f4
MM
69062015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6907
6908 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6909 ptr_bits.
6910
bf2d68ab
AA
69112015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6912
6913 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6914 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6915 (clean): Add "rm -f" for above C files.
6916 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6917 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6918 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6919 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6920 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6921 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6922 (init_registers_s390x_vx_linux64)
6923 (init_registers_s390x_tevx_linux64)
6924 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6925 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6926 declarations.
6927 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6928 (s390_store_vxrs_high): New functions.
6929 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6930 NT_S390_VXRS_HIGH.
6931 (s390_arch_setup): Add logic for selecting one of the new target
6932 descriptions. Activate the new vector regsets if applicable.
6933 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6934 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6935 and init_registers_s390x_tevx_linux64.
6936
c966a859
PA
69372015-03-01 Pedro Alves <palves@redhat.com>
6938
6939 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6940 parameter.
6941
4180215b
PA
69422015-02-27 Pedro Alves <palves@redhat.com>
6943
6944 * linux-x86-low.c (u_debugreg_offset): New function.
6945 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6946
749bab01
PA
69472015-02-27 Pedro Alves <palves@redhat.com>
6948
6949 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6950 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6951 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6952 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6953 (ps_lsetfpregs, ps_getpid)
6954 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6955 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6956 (ps_lsetxregs, ps_plog): Declare.
6957
3c14e5a3
PA
69582015-02-27 Pedro Alves <palves@redhat.com>
6959
6960 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6961 IP_AGENT_EXPORT_FUNC.
6962 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6963 IP_AGENT_EXPORT_FUNC.
6964 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6965 (IP_AGENT_EXPORT): Delete.
6966 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6967 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6968 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6969 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6970 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6971 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6972 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6973 (traceframe_read_count, traceframe_write_count)
6974 (traceframes_created, trace_state_variables, get_raw_reg)
6975 (get_trace_state_variable_value, set_trace_state_variable_value)
6976 (ust_loaded, helper_thread_id, cmd_buf): Use
6977 IPA_SYM_EXPORTED_NAME.
6978 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6979 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6980 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6981 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6982 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6983 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6984 EXTERN_C_PUSH/EXTERN_C_POP.
6985 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6986 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6987 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6988 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6989 (traceframe_write_count, traceframe_read_count)
6990 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6991 (about_to_request_buffer_space, get_trace_state_variable_value)
6992 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6993 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6994 EXTERN_C_PUSH/EXTERN_C_POP.
6995 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6996 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6997 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6998 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6999 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7000 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7001 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7002 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7003 Define.
7004 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7005 (IP_AGENT_EXPORT_VAR_DECL): Define.
7006 (tracing): Declare.
7007 (gdb_agent_get_raw_reg): Declare.
7008
fe978cb0
PA
70092015-02-27 Tom Tromey <tromey@redhat.com>
7010 Pedro Alves <palves@redhat.com>
7011
7012 Rename symbols whose names are reserved C++ keywords throughout.
7013
3bc3d82a
PA
70142015-02-27 Pedro Alves <palves@redhat.com>
7015
7016 * Makefile.in (COMPILER): New, get it from autoconf.
7017 (CXX): Get from autoconf instead.
7018 (COMPILE.pre): Use COMPILER.
7019 (CC-LD): Rename to ...
7020 (CC_LD): ... this. Use COMPILER.
7021 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7022 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7023 * acinclude.m4: Include build-with-cxx.m4.
7024 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7025 Disable -Werror by default if building in C++ mode.
7026 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7027 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7028 the C++ compiler. Save/restore CXXFLAGS too.
7029 * configure: Regenerate.
7030
07697489
PA
70312015-02-27 Pedro Alves <palves@redhat.com>
7032
7033 * acinclude.m4: Include libiberty.m4.
7034 * configure.ac: Call libiberty_INIT.
7035 * config.in, configure: Regenerate.
7036
9beb7c4e
PA
70372015-02-26 Pedro Alves <palves@redhat.com>
7038
7039 * linux-low.c (linux_wait_1): When incrementing the PC past a
7040 program breakpoint always use the_low_target.breakpoint_len as
7041 increment, rather than the maximum between that and
7042 the_low_target.decr_pc_after_break.
7043
8090aef2
PA
70442015-02-23 Pedro Alves <palves@redhat.com>
7045
7046 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7047 thread was doing a step-over; always adjust the PC if
7048 we stepped over a permanent breakpoint.
7049 (linux_wait_1): If we stepped over breakpoint that was on top of a
7050 permanent breakpoint, manually advance the PC past it.
7051
bc9540e8
PA
70522015-02-23 Pedro Alves <palves@redhat.com>
7053
7054 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7055 modes.
7056 (x86_fill_gregset, x86_store_gregset): Use it when handling
7057 $orig_eax.
7058
2db9a427
PA
70592015-02-20 Pedro Alves <palves@redhat.com>
7060
7061 * thread-db.c: Include "nat/linux-procfs.h".
7062 (thread_db_init): Skip listing new threads if the kernel supports
7063 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7064
afa8d396
PA
70652015-02-20 Pedro Alves <palves@redhat.com>
7066
7067 * linux-low.c (status_pending_p_callback): Use ptid_match.
7068
c9587f88
AT
70692015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7070
7071 PR breakpoints/16812
7072 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7073 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7074 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7075
b05ec7a5
AT
70762015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7077
7078 PR breakpoints/15956
7079 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7080
d33501a5
MM
70812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7082
7083 * linux-low.c (linux_low_btrace_conf): Print size.
7084 * server.c (handle_btrace_conf_general_set): New.
7085 (hanle_general_set): Call handle_btrace_conf_general_set.
7086 (handle_query): Report Qbtrace-conf:bts:size as supported.
7087
f4abbc16
MM
70882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7089
7090 * linux-low.c (linux_low_enable_btrace): Update parameters.
7091 (linux_low_btrace_conf): New.
7092 (linux_target_ops)<to_btrace_conf>: Initialize.
7093 * server.c (current_btrace_conf): New.
7094 (handle_btrace_enable): Rename to ...
7095 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7096 to target_enable_btrace. Update comment. Update users.
7097 (handle_qxfer_btrace_conf): New.
7098 (qxfer_packets): Add btrace-conf entry.
7099 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7100 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7101 (target_ops)<read_btrace_conf>: New.
7102 (target_enable_btrace): Update parameters.
7103 (target_read_btrace_conf): New.
7104
043c3577
MM
71052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7106
7107 * server.c (handle_btrace_general_set): Remove call to
7108 target_supports_btrace.
7109 (supported_btrace_packets): New.
7110 (handle_query): Call supported_btrace_packets.
7111 * target.h: include btrace-common.h.
7112 (btrace_target_info): Removed.
7113 (supports_btrace, target_supports_btrace): Update parameters.
7114
734b0e4b
MM
71152015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7116
7117 * Makefile.in (SFILES): Add common/btrace-common.c.
7118 (OBS): Add common/btrace-common.o.
7119 (btrace-common.o): Add build rules.
7120 * linux-low: Include btrace-common.h.
7121 (linux_low_read_btrace): Use struct btrace_data. Call
7122 btrace_data_init and btrace_data_fini.
7123
d6c146e9
PA
71242015-02-06 Pedro Alves <palves@redhat.com>
7125
7126 * thread-db.c (find_new_threads_callback): Add debug output.
7127
20ba1ce6
PA
71282015-02-04 Pedro Alves <palves@redhat.com>
7129
7130 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7131 (resume_stopped_resumed_lwps): New function.
7132 (linux_wait_for_event_filtered): Use it.
7133
8cc73a39
SDJ
71342015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7135
7136 * Makefile.in (SFILES): Add linux-personality.c.
7137 (linux-personality.o): New rule.
7138 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7139 list of objects to be built.
7140 * linux-low.c: Include nat/linux-personality.h.
7141 (linux_create_inferior): Remove code to disable address space
7142 randomization (moved to ../nat/linux-personality.c). Create
7143 cleanup to disable address space randomization.
7144
fb23d554
SDJ
71452015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7146
7147 * Makefile.in (posix-strerror.o): New rule.
7148 (mingw-strerror.o): Likewise.
7149 * configure: Regenerated.
7150 * configure.ac: Source file ../common/common.host. Initialize new
7151 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7152
cdf43629
YQ
71532015-01-14 Yao Qi <yao@codesourcery.com>
7154
7155 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7156 (ppc-linux.o): New rule.
7157 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7158 * configure.ac: AC_CHECK_FUNCS(getauxval).
7159 * config.in: Re-generated.
7160 * configure: Re-generated.
7161 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7162 ppc64_64bit_inferior_p
7163
514c5338
YQ
71642015-01-14 Yao Qi <yao@codesourcery.com>
7165
7166 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7167 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7168 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7169 (PT_ORIG_R3, PT_TRAP): Likewise.
7170 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7171 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7172 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7173
3368c1e5
JB
71742015-01-10 Joel Brobecker <brobecker@adacore.com>
7175
7176 * i387-fp.c (i387_cache_to_xsave): In look over
7177 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7178 zmmh_low_space field by use of zmmh_high_space.
7179
582511be
PA
71802015-01-09 Pedro Alves <palves@redhat.com>
7181
7182 * linux-low.c (step_over_bkpt): Move higher up in the file.
7183 (handle_extended_wait): Don't store the stop_pc here.
7184 (get_stop_pc): Adjust comments and rename to ...
7185 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7186 stopped for a software breakpoint or hardware breakpoint.
7187 (thread_still_has_status_pending_p): New function.
7188 (status_pending_p_callback): Use
7189 thread_still_has_status_pending_p. If the event is no longer
7190 interesting, resume the LWP.
7191 (handle_tracepoints): Add assert.
7192 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7193 (wstatus_maybe_breakpoint): New function.
7194 (cancel_breakpoint): Delete function.
7195 (check_stopped_by_watchpoint): New function, factored out from
7196 linux_low_filter_event.
7197 (lp_status_maybe_breakpoint): Delete function.
7198 (linux_low_filter_event): Remove filter_ptid argument.
7199 Leave thread group exits pending here. Store the LWP's stop PC.
7200 Always leave events pending.
7201 (linux_wait_for_event_filtered): Pull all events out of the
7202 kernel, and leave them all pending.
7203 (count_events_callback, select_event_lwp_callback): Consider all
7204 events.
7205 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7206 (select_event_lwp): Only give preference to the stepping LWP in
7207 all-stop mode. Adjust comments.
7208 (ignore_event): New function.
7209 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7210 references to cancel_breakpoints. Adjust to renames. Also give
7211 equal priority to all LWPs that have had events in non-stop mode.
7212 If reporting a software breakpoint event, unadjust the LWP's PC.
7213 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7214 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7215 Adjust.
7216 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7217 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7218 (linux_stopped_by_watchpoint): Adjust.
7219 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7220 * linux-low.h (enum lwp_stop_reason): New.
7221 (struct lwp_info) <stop_pc>: Adjust comment.
7222 <stopped_by_watchpoint>: Delete field.
7223 <stop_reason>: New field.
7224 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7225 * mem-break.c (software_breakpoint_inserted_here)
7226 (hardware_breakpoint_inserted_here): New function.
7227 * mem-break.h (software_breakpoint_inserted_here)
7228 (hardware_breakpoint_inserted_here): Declare.
7229 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7230 (cancel_breakpoints): Delete.
7231 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7232 (upload_fast_traceframes): Remove references to
7233 cancel_breakpoints.
7234
a33e3959
PA
72352015-01-09 Pedro Alves <palves@redhat.com>
7236
7237 * thread-db.c (find_new_threads_callback): Ignore thread if the
7238 kernel thread ID is -1.
7239
8784d563
PA
72402015-01-09 Pedro Alves <palves@redhat.com>
7241
7242 * linux-low.c (linux_attach_fail_reason_string): Move to
7243 nat/linux-ptrace.c, and rename.
7244 (linux_attach_lwp): Update comment.
7245 (attach_proc_task_lwp_callback): New function.
7246 (linux_attach): Adjust to rename and use
7247 linux_proc_attach_tgid_threads.
7248 (linux_attach_fail_reason_string): Delete declaration.
7249
76f2b779
JB
72502015-01-01 Joel Brobecker <brobecker@adacore.com>
7251
7252 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7253 * server.c (gdbserver_version): Likewise.
7254
fafcc06a
SDJ
72552014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7256
7257 * remote-utils.c: Include ctype.h.
7258 (input_interrupt): Explicitly handle the case when the char
7259 received is the NUL byte. Improve the printing of non-ASCII
7260 characters.
7261
beed38b8
JB
72622014-12-16 Joel Brobecker <brobecker@adacore.com>
7263
7264 * linux-low.c (linux_low_filter_event): Update call to
7265 linux_enable_event_reporting following the addition of
7266 a new parameter to that function.
7267
bf330350
CU
72682014-12-16 Catalin Udma <catalin.udma@freescale.com>
7269
7270 PR server/17457
7271 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7272 (AARCH64_FPCR_REGNO): Likewise.
7273 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7274 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7275 (aarch64_store_fpregset): Likewise.
7276
5227d625
JB
72772014-12-15 Joel Brobecker <brobecker@adacore.com>
7278
7279 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7280 Remove FIXME comment about assumption about N.
7281
f93b65a0
JB
72822014-12-13 Joel Brobecker <brobecker@adacore.com>
7283
7284 * configure.ac: If large-file support is disabled in GDBserver,
7285 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7286 * configure: Regenerate.
7287
e5a9158d
AA
72882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7289
7290 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7291 warning upon ENODATA from ptrace.
7292 * linux-s390-low.c (s390_store_tdb): New.
7293 (s390_regsets): Add regset for NT_S390_TDB.
7294
feea5f36
AA
72952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7296
7297 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7298 without a fill_function.
7299 * linux-s390-low.c (s390_fill_last_break): Remove.
7300 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7301 (s390_arch_setup): Use regset's size instead of fill_function for
7302 loop end condition.
7303
098dbe61
AA
73042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7305
7306 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7307 the regset's store function when ptrace returned an error.
7308 * regcache.c (get_thread_regcache): Invalidate register cache
7309 before fetching inferior's registers.
7310
28eef672
AA
73112014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7312
7313 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7314 while-loop as for-loop.
7315 (regsets_store_inferior_registers): Likewise.
7316
bdca27a2
YQ
73172014-11-28 Yao Qi <yao@codesourcery.com>
7318
7319 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7320 * config.in, configure: Re-generate.
7321 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7322 is defined.
7323
9c232dda
YQ
73242014-11-21 Yao Qi <yao@codesourcery.com>
7325
7326 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7327 (AC_CHECK_HEADERS): Remove malloc.h.
7328 * configure: Re-generated.
7329 * config.in: Re-generated.
7330 * server.h: Don't include alloca.h and malloc.h.
7331 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7332 Don't include malloc.h.
7333
43968415
JB
73342014-11-17 Joel Brobecker <brobecker@adacore.com>
7335
7336 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7337 corresponding ERRNO check in same block.
7338
40e91bc7
PA
73392014-11-12 Pedro Alves <palves@redhat.com>
7340
7341 * server.c (cont_thread): Update comment.
7342 (start_inferior, attach_inferior): No longer clear cont_thread.
7343 (handle_v_cont): No longer set cont_thread.
7344 (captured_main): Clear cont_thread each time a GDB connects.
7345
c2c118cf
PA
73462014-11-12 Pedro Alves <palves@redhat.com>
7347
7348 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7349 thread, and don't resume all threads if the Hc thread has exited.
7350
78708b7c
PA
73512014-11-12 Pedro Alves <palves@redhat.com>
7352
7353 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7354 the process group instead of to a specific LWP.
7355
a2abc7de
PA
73562014-10-15 Pedro Alves <palves@redhat.com>
7357
7358 PR server/17487
7359 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7360 parameter.
7361 (arm_set_thread_context): Delete.
7362 (the_low_target): Adjust.
7363 * win32-i386-low.c (debug_registers_changed)
7364 (debug_registers_used): Delete.
7365 (update_debug_registers_callback): New function.
7366 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7367 needing to update their debug registers.
7368 (win32_get_current_dr): New function.
7369 (x86_dr_low_get_addr, x86_dr_low_get_control)
7370 (x86_dr_low_get_status): Fetch the debug register from the thread
7371 record's context.
7372 (i386_initial_stuff): Adjust.
7373 (i386_get_thread_context): Remove current_event parameter. Don't
7374 clear debug_registers_changed nor copy DR values to
7375 debug_reg_state.
7376 (i386_set_thread_context): Delete.
7377 (i386_prepare_to_resume): New function.
7378 (i386_thread_added): Mark the thread as needing to update irs
7379 debug registers.
7380 (the_low_target): Remove i386_set_thread_context and install
7381 i386_prepare_to_resume.
7382 * win32-low.c (win32_get_thread_context): Adjust.
7383 (win32_set_thread_context): Use SetThreadContext
7384 directly.
7385 (win32_prepare_to_resume): New function.
7386 (win32_require_context): New function, factored out from ...
7387 (thread_rec): ... this.
7388 (continue_one_thread): Call win32_prepare_to_resume on each thread
7389 we're about to continue.
7390 (win32_resume): Call win32_prepare_to_resume on the event thread.
7391 * win32-low.h (struct win32_thread_info)
7392 <debug_registers_changed>: New field.
7393 (struct win32_target_ops): Change prototype of set_thread_context,
7394 delete set_thread_context and add prepare_to_resume.
7395 (win32_require_context): New declaration.
7396
a442d071
GB
73972014-10-08 Gary Benson <gbenson@redhat.com>
7398
7399 * server.h: Do not include common-exceptions.h.
7400
6f1947e8
GB
74012014-10-08 Gary Benson <gbenson@redhat.com>
7402
7403 * server.h: Do not include cleanups.h.
7404
63b434a4
JH
74052014-09-30 James Hogan <james.hogan@imgtec.com>
7406
7407 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7408 mips64-dsp-linux.c.
7409
c4d9ceb6
YQ
74102014-09-23 Yao Qi <yao@codesourcery.com>
7411
7412 * linux-low.c (lp_status_maybe_breakpoint): New function.
7413 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7414 (count_events_callback): Likewise.
7415 (select_event_lwp_callback): Likewise.
7416 (cancel_breakpoints_callback): Likewise.
7417
89a5711c
DB
74182014-09-19 Don Breazeal <donb@codesourcery.com>
7419
7420 * linux-low.c (handle_extended_wait): Call
7421 linux_ptrace_get_extended_event.
7422 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7423 linux_is_extended_waitstatus.
7424
bffc0964
JB
74252014-09-16 Joel Brobecker <brobecker@adacore.com>
7426
7427 * Makefile.in (CPPFLAGS): Define.
7428 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7429 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7430
0bfdf32f
GB
74312014-09-16 Gary Benson <gbenson@redhat.com>
7432
7433 * inferiors.h (current_inferior): Renamed as...
7434 (current_thread): New variable. All uses updated.
7435 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7436 (maybe_move_out_of_jump_pad): Likewise.
7437 (cancel_breakpoint): Likewise.
7438 (linux_low_filter_event): Likewise.
7439 (wait_for_sigstop): Likewise.
7440 (linux_resume_one_lwp): Likewise.
7441 (need_step_over_p): Likewise.
7442 (start_step_over): Likewise.
7443 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7444 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7445 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7446 and save_inferior as saved_thread.
7447 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7448 saved_thread.
7449 (regcache_invalidate_thread): Likewise.
7450 * remote-utils.c (prepare_resume_reply): Likewise.
7451 * thread-db.c (thread_db_get_tls_address): Likewise.
7452 (disable_thread_event_reporting): Likewise.
7453 (remove_thread_event_breakpoints): Likewise.
7454 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7455 as saved_thread.
7456 * target.h (set_desired_inferior): Renamed as...
7457 (set_desired_thread): New declaration. All uses updated.
7458 * server.c (myresume): Updated comment to reference thread instead
7459 of inferior.
7460 (handle_serial_event): Likewise.
7461 (handle_target_event): Likewise.
7462
361c8ade
GB
74632014-09-12 Tom Tromey <tromey@redhat.com>
7464 Gary Benson <gbenson@redhat.com>
7465
7466 * regcache.h: Include common-regcache.h.
7467 (regcache_read_pc): Don't declare.
7468 * regcache.c (get_thread_regcache_for_ptid): New function.
7469
bd9269f7
GB
74702014-09-11 Tom Tromey <tromey@redhat.com>
7471 Gary Benson <gbenson@redhat.com>
7472
7473 * symbol.c: New file.
7474 * Makefile.in (SFILES): Add symbol.c.
7475 (OBS): Add symbol.o.
7476
f8c1d06b
GB
74772014-09-11 Gary Benson <gbenson@redhat.com>
7478
7479 * target.c (target_stop_ptid, target_continue_ptid): New
7480 functions.
7481
721ec300
GB
74822014-09-11 Tom Tromey <tromey@redhat.com>
7483 Gary Benson <gbenson@redhat.com>
7484
7485 * target.h: Include target/target.h.
7486 * target.c (target_read_memory, target_read_uint32)
7487 (target_write_memory): New functions.
7488
c5e92cca
GB
74892014-09-11 Gary Benson <gbenson@redhat.com>
7490
7491 * server.h (debug_hw_points): Don't declare.
7492 * server.c (debug_hw_points): Don't define. Replace all uses
7493 with show_debug_regs.
7494 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7495 all uses with show_debug_regs.
7496
2e4bb98a
EBM
74972014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7498
7499 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7500 endianness into account.
7501 (ppc_supply_ptrace_register): Likewise.
7502
ac740bc7
JH
75032014-09-03 James Hogan <james.hogan@imgtec.com>
7504
7505 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7506 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7507
97ea6506
GB
75082014-09-03 Gary Benson <gbenson@redhat.com>
7509
7510 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7511 ALL_DEBUG_ADDRESS_REGISTERS.
7512
df7e5265
GB
75132014-09-02 Gary Benson <gbenson@redhat.com>
7514
7515 * i386-low.h: Renamed as...
7516 * x86-low.h: New file. All type, function and variable name
7517 prefixes changed from "i386_" to "x86_". All references updated.
7518 * i386-low.c: Renamed as...
7519 * x86-low.c: New file. All type, function and variable name
7520 prefixes changed from "i386_" to "x86_". All references updated.
7521
ed859da7
GB
75222014-09-02 Gary Benson <gbenson@redhat.com>
7523
7524 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7525 (x86_linux_new_thread): Likewise.
7526
860789c7
GB
75272014-08-29 Gary Benson <gbenson@redhat.com>
7528
7529 * server.h (setjmp.h): Do not include.
7530 (toplevel): Do not declare.
7531 (common-exceptions.h): Include.
7532 (cleanups.h): Likewise.
7533 * server.c (toplevel): Do not define.
7534 (exit_code): New static global.
7535 (detach_or_kill_for_exit_cleanup): New function.
7536 (main): New function. Original main renamed to...
7537 (captured_main): New function.
7538 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7539
ff55e1b5
GB
75402014-08-29 Gary Benson <gbenson@redhat.com>
7541
7542 * Makefile.in (SFILES): Add common/common-exceptions.c.
7543 (OBS): Add common-exceptions.o.
7544 (common-exceptions.o): New rule.
7545 * utils.c (prepare_to_throw_exception): New function.
7546
e9bcb658
GB
75472014-08-29 Gary Benson <gbenson@redhat.com>
7548
7549 * config.in: Regenerate.
7550 * configure: Likewise.
7551
e3180625
GB
75522014-08-29 Gary Benson <gbenson@redhat.com>
7553
7554 * Makefile.in (SFILES): Add common/cleanups.c.
7555 (OBS): cleanups.o.
7556 (cleanups.o): New rule.
7557
e3d6ba5d
GB
75582014-08-29 Gary Benson <gbenson@redhat.com>
7559
7560 * utils.c (internal_vwarning): New function.
7561
7096e886
GB
75622014-08-28 Gary Benson <gbenson@redhat.com>
7563
7564 * utils.h (fatal): Remove declaration.
7565 * utils.c (fatal): Remove function.
7566
14ce3192
GB
75672014-08-28 Gary Benson <gbenson@redhat.com>
7568
7569 * tracepoint.c (gdb_agent_init): Replace fatal with
7570 perror_with_name.
7571 (initialize_tracepoint): Likewise.
7572
50278d59
GB
75732014-08-28 Gary Benson <gbenson@redhat.com>
7574
7575 * remote-utils.c (remote_prepare): Replace fatal with error.
7576
aa96c426
GB
75772014-08-28 Gary Benson <gbenson@redhat.com>
7578
7579 * linux-low.c (linux_async): Replace fatal with warning.
7580 Tidy up and return.
7581 (linux_start_non_stop): Return -1 if linux_async failed.
7582
f7160e97
GB
75832014-08-28 Gary Benson <gbenson@redhat.com>
7584
7585 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7586 gdb_assert.
7587 (i386_dr_low_get_addr): Remove vague comment.
7588 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7589 gdb_assert.
7590
38e08fca
GB
75912014-08-28 Gary Benson <gbenson@redhat.com>
7592
7593 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7594 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7595 internal_error.
7596 (linux_resume_one_lwp): Likewise.
7597 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7598 gdb_assert.
7599 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7600 with internal_error.
7601 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7602 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7603 (find_register_by_name): Replace fatal with internal_error.
7604 (find_regno): Likewise.
7605 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7606 * thread-db.c (thread_db_create_event): Likewise.
7607 (thread_db_load_search): Likewise.
7608 (try_thread_db_load_1): Likewise.
7609 * tracepoint.c (get_jump_space_head): Replace fatal with
7610 internal_error.
7611 (claim_trampoline_space): Likewise.
7612 (have_fast_tracepoint_trampoline_buffer): Likewise.
7613 (cmd_qtstart): Likewise.
7614 (stop_tracing): Likewise.
7615 (fast_tracepoint_collecting): Likewise.
7616 (target_malloc): Likewise.
7617 (download_tracepoint): Likewise.
7618 (download_trace_state_variables): Replace check with gdb_assert.
7619 (upload_fast_traceframes): Replace fatal with internal_error.
7620
34abf635
GB
76212014-08-19 Tom Tromey <tromey@redhat.com>
7622 Gary Benson <gbenson@redhat.com>
7623
7624 * Makefile.in (SFILES): Add common/common-debug.c.
7625 (OBS): Add common-debug.o.
7626 (common-debug.o): New rule.
7627 * debug.h (debug_printf): Don't declare.
7628 * debug.c (debug_printf): Renamed and rewritten as...
7629 (debug_vprintf): New function.
7630
f6e94d78
GB
76312014-08-19 Gary Benson <gbenson@redhat.com>
7632
7633 * utils.h: Do not include print-utils.h.
7634
9239eeab
GB
76352014-08-19 Tom Tromey <tromey@redhat.com>
7636 Gary Benson <gbenson@redhat.com>
7637
7638 * server.h: Add static assertion.
7639 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7640
ef87c8bb
GB
76412014-08-19 Tom Tromey <tromey@redhat.com>
7642 Gary Benson <gbenson@redhat.com>
7643
7644 * Makefile.in (SFILES): Add common/errors.c.
7645 (OBS): Add errors.o.
7646 (IPA_OBS): Add errors-ipa.o.
7647 (errors.o): New rule.
7648 (errors-ipa.o): Likewise.
7649 * utils.h (perror_with_name, error, warning): Don't declare.
7650 * utils.c (warning): Renamed and rewritten as...
7651 (vwarning): New function.
7652 (error): Renamed and rewritten as...
7653 (verror): New function.
7654 (internal_error): Renamed and rewritten as...
7655 (internal_verror): New function.
7656
bb974a24
GB
76572014-08-07 Gary Benson <gbenson@redhat.com>
7658
7659 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7660 * configure: Regenerate.
7661 * config.in: Likewise.
7662 * server.h: Do not include errno.h.
7663 * event-loop.c: Likewise.
7664 * hostio-errno.c: Likewise.
7665 * linux-low.c: Likewise.
7666 * remote-utils.c: Likewise.
7667 * spu-low.c: Likewise.
7668 * utils.c: Likewise.
7669 * gdbreplay.c: Unconditionally include errno.h.
7670
6d3d12eb
GB
76712014-08-07 Gary Benson <gbenson@redhat.com>
7672
7673 * server.h: Do not include string.h.
7674 * event-loop.c: Likewise.
7675 * linux-low.c: Likewise.
7676 * regcache.c: Likewise.
7677 * remote-utils.c: Likewise.
7678 * spu-low.c: Likewise.
7679 * utils.c: Likewise.
7680
dccbb609
GB
76812014-08-07 Gary Benson <gbenson@redhat.com>
7682
7683 * server.h: Do not include gdb_assert.h.
7684
e76df0d0
GB
76852014-08-07 Gary Benson <gbenson@redhat.com>
7686
7687 * server.h: Do not include common-utils.h.
7688
4cb9c816
GB
76892014-08-07 Gary Benson <gbenson@redhat.com>
7690
7691 * server.h: Do not include ptid.h.
7692 * notif.h: Likewise.
7693
3995eeee
GB
76942014-08-07 Gary Benson <gbenson@redhat.com>
7695
7696 * server.h: Do not include gdb_locale.h.
7697
cb9f1a9b
GB
76982014-08-07 Gary Benson <gbenson@redhat.com>
7699
7700 * server.h: Do not include gdb/signals.h.
7701 * win32-low.c: Likewise.
7702
a5fceff8
GB
77032014-08-07 Gary Benson <gbenson@redhat.com>
7704
7705 * server.h: Do not include pathmax.h.
7706
b9391142
GB
77072014-08-07 Gary Benson <gbenson@redhat.com>
7708
7709 * server.h: Do not include libiberty.h.
7710 * linux-bfin-low.c: Likewise.
7711
0e443c87
GB
77122014-08-07 Gary Benson <gbenson@redhat.com>
7713
7714 * server.h: Do not include ansidecl.h.
7715
8ebb3f56
GB
77162014-08-07 Gary Benson <gbenson@redhat.com>
7717
7718 * linux-x86-low.c: Do not include stddef.h.
7719 * lynx-ppc-low.c: Likewise.
7720 * tracepoint.c: Likewise.
7721
8980bdf6
GB
77222014-08-07 Gary Benson <gbenson@redhat.com>
7723
7724 * server.h: Do not include stdarg.h.
7725 * nto-low.c: Likewise.
7726
d7096f71
GB
77272014-08-07 Gary Benson <gbenson@redhat.com>
7728
7729 * server.h: Do not include stdlib.h.
7730 * inferiors.c: Likewise.
7731 * linux-low.c: Likewise.
7732 * regcache.c: Likewise.
7733 * spu-low.c: Likewise.
7734 * tracepoint.c: Likewise.
7735 * utils.c: Likewise.
7736
d02f550d
GB
77372014-08-07 Gary Benson <gbenson@redhat.com>
7738
7739 * server.h: Do not include stdio.h.
7740 * linux-low.c: Likewise.
7741 * remote-utils.c: Likewise.
7742 * spu-low.c: Likewise.
7743 * utils.c: Likewise.
7744 * wincecompat.c: Likewise.
7745
87f6c4e3
GB
77462014-08-06 Gary Benson <gbenson@redhat.com>
7747
7748 * regcache.c (init_register_cache): Move conditionals inside if.
7749
7089dca4
GB
77502014-08-06 Gary Benson <gbenson@redhat.com>
7751
7752 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7753
462f517e
GB
77542014-07-31 Gary Benson <gbenson@redhat.com>
7755
7756 * ax.h: Do not include server.h.
7757 * gdbthread.h: Likewise.
7758 * lynx-low.h: Likewise.
7759 * notif.h: Likewise.
7760
976411d6
GB
77612014-07-30 Gary Benson <gbenson@redhat.com>
7762
7763 * server.h: Include common-defs.h.
7764 Do not include config.h or build-gnulib-gdbserver/config.h.
7765
d41f6d8e
GB
77662014-07-30 Gary Benson <gbenson@redhat.com>
7767
7768 * hostio-errno.c: Move server.h to top of includes list.
7769 * inferiors.c: Likewise.
7770 * linux-x86-low.c: Likewise.
7771 * notif.c: Include server.h.
7772
314c6a35
TT
77732014-07-24 Tom Tromey <tromey@redhat.com>
7774 Gary Benson <gbenson@redhat.com>
7775
7776 * server.h (CORE_ADDR): Now unsigned.
7777
69ff6be5
PA
77782014-07-16 Pedro Alves <palves@redhat.com>
7779
7780 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7781
ce9e3fe7
PA
77822014-07-15 Pedro Alves <palves@redhat.com>
7783
7784 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7785 copy.
7786
e76126e8
PA
77872014-07-11 Pedro Alves <palves@redhat.com>
7788
7789 * linux-low.c (kill_wait_lwp): New function, based on
7790 kill_one_lwp_callback, but use my_waitpid directly.
7791 (kill_one_lwp_callback, linux_kill): Use it.
7792
8e9db26e
PA
77932014-06-23 Pedro Alves <palves@redhat.com>
7794
7795 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7796 before setting DR0..DR3.
7797
698b3e08
GB
77982014-06-20 Gary Benson <gbenson@redhat.com>
7799
7800 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7801 * configure: Regenerated.
7802 * config.in: Likewise.
7803
125f8a3d
GB
78042014-06-20 Gary Benson <gbenson@redhat.com>
7805
7806 * Makefile.in (SFILES): Update locations for files moved
7807 from common to nat.
7808 (object file files): Reordered.
7809
42995dbd
GB
78102014-06-20 Gary Benson <gbenson@redhat.com>
7811
7812 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7813 (i386_dr_low_set_addr): Likewise.
7814 (i386_dr_low_get_addr): Likewise.
7815 (i386_dr_low_can_set_control): Likewise.
7816 (i386_dr_low_set_control): Likewise.
7817 (i386_dr_low_get_control): Likewise.
7818 (i386_dr_low_get_status): Likewise.
7819 (i386_get_debug_register_length): Likewise.
7820 * linux-x86-low.c (i386_dr_low_set_addr):
7821 Changed signature. Made static.
7822 (i386_dr_low_get_addr): Likewise.
7823 (i386_dr_low_set_control): Likewise.
7824 (i386_dr_low_get_control): Likewise.
7825 (i386_dr_low_get_status): Likewise.
7826 (i386_dr_low): New global variable.
7827 * win32-i386-low.c (i386_dr_low_set_addr):
7828 Changed signature. Made static.
7829 (i386_dr_low_get_addr): Likewise.
7830 (i386_dr_low_set_control): Likewise.
7831 (i386_dr_low_get_control): Likewise.
7832 (i386_dr_low_get_status): Likewise.
7833 (i386_dr_low): New global variable.
7834
e1d2394b
MS
78352014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7836
7837 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7838 * Makefile.in (AR, AR_FLAGS): Define.
7839 * configure: Regenerate.
7840
3a8ee006
GB
78412014-06-19 Gary Benson <gbenson@redhat.com>
7842
7843 * Makefile.in (i386-dregs.o): New rule.
7844 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7845 * i386-low.c (target.h): Remove include.
7846 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7847 (DR_CONTROL_SHIFT): Likewise.
7848 (DR_CONTROL_SIZE): Likewise.
7849 (DR_RW_EXECUTE): Likewise.
7850 (DR_RW_WRITE): Likewise.
7851 (DR_RW_READ): Likewise.
7852 (DR_RW_IORW): Likewise.
7853 (DR_LEN_1): Likewise.
7854 (DR_LEN_2): Likewise.
7855 (DR_LEN_4): Likewise.
7856 (DR_LEN_8): Likewise.
7857 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7858 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7859 (DR_ENABLE_SIZE): Likewise.
7860 (DR_LOCAL_SLOWDOWN): Likewise.
7861 (DR_GLOBAL_SLOWDOWN): Likewise.
7862 (DR_CONTROL_RESERVED): Likewise.
7863 (I386_DR_CONTROL_MASK): Likewise.
7864 (I386_DR_VACANT): Likewise.
7865 (I386_DR_LOCAL_ENABLE): Likewise.
7866 (I386_DR_GLOBAL_ENABLE): Likewise.
7867 (I386_DR_DISABLE): Likewise.
7868 (I386_DR_SET_RW_LEN): Likewise.
7869 (I386_DR_GET_RW_LEN): Likewise.
7870 (I386_DR_WATCH_HIT): Likewise.
7871 (i386_wp_op_t): Likewise.
7872 (i386_show_dr): Likewise.
7873 (i386_length_and_rw_bits): Likewise.
7874 (i386_insert_aligned_watchpoint): Likewise.
7875 (i386_remove_aligned_watchpoint): Likewise.
7876 (i386_handle_nonaligned_watchpoint): Likewise.
7877 i386_update_inferior_debug_regs(): Likewise.
7878 (i386_dr_insert_watchpoint): Likewise.
7879 (i386_dr_remove_watchpoint): Likewise.
7880 (i386_dr_region_ok_for_watchpoint): Likewise.
7881 (i386_dr_stopped_data_address): Likewise.
7882 (i386_dr_stopped_by_watchpoint): Likewise.
7883
8f26655c
GB
78842014-06-19 Gary Benson <gbenson@redhat.com>
7885
7886 * i386-low.c (i386_dr_show): Renamed to
7887 i386_show_dr and made static. All uses updated.
7888 (i386_dr_length_and_rw_bits): Renamed to
7889 i386_length_and_rw_bits and made static.
7890 All uses updated.
7891 (i386_dr_insert_aligned_watchpoint): Renamed to
7892 i386_insert_aligned_watchpoint and made static.
7893 All uses updated.
7894 (i386_dr_remove_aligned_watchpoint): Renamed to
7895 i386_remove_aligned_watchpoint and made static.
7896 All uses updated.
7897 (i386_dr_update_inferior_debug_regs): Renamed to
7898 i386_update_inferior_debug_regs and made static.
7899 All uses updated.
7900
b9228891
GB
79012014-06-18 Gary Benson <gbenson@redhat.com>
7902
5171def3
GB
7903 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7904 (i386_dr_low_can_set_control): Likewise.
7905 (i386_get_debug_register_length): Likewise.
7906 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7907 (i386_dr_low_can_set_control): Likewise.
7908 (i386_get_debug_register_length): Likewise.
7909
79102014-06-17 Gary Benson <gbenson@redhat.com>
7911
b9228891
GB
7912 * i386-low.h (i386-dregs.h): New include.
7913 (DR_FIRSTADDR): Now in i386-dregs.h.
7914 (DR_LASTADDR): Likewise.
7915 (DR_NADDR): Likewise.
7916 (DR_STATUS): Likewise.
7917 (DR_CONTROL): Likewise.
7918 (i386_debug_reg_state): Likewise.
7919 (i386_dr_insert_watchpoint): Likewise.
7920 (i386_dr_remove_watchpoint): Likewise.
7921 (i386_dr_region_ok_for_watchpoint): Likewise.
7922 (i386_dr_stopped_data_address): Likewise.
7923 (i386_dr_stopped_by_watchpoint): Likewise.
7924 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7925
4be83cc2
GB
79262014-06-18 Gary Benson <gbenson@redhat.com>
7927
7928 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7929 i386_dr_insert_watchpoint.
7930 (i386_low_remove_watchpoint): Renamed to
7931 i386_dr_remove_watchpoint.
7932 (i386_low_region_ok_for_watchpoint): Renamed to
7933 i386_dr_region_ok_for_watchpoint.
7934 (i386_low_stopped_data_address): Renamed to
7935 i386_dr_stopped_data_address.
7936 (i386_low_stopped_by_watchpoint): Renamed to
7937 i386_dr_stopped_by_watchpoint.
7938 * i386-low.c (i386_show_dr): Renamed to
7939 i386_dr_show and made nonstatic. All uses updated.
7940 (i386_length_and_rw_bits): Renamed to
7941 i386_dr_length_and_rw_bits and made nonstatic.
7942 All uses updated.
7943 (i386_insert_aligned_watchpoint): Renamed to
7944 i386_dr_insert_aligned_watchpoint and made nonstatic.
7945 All uses updated.
7946 (i386_remove_aligned_watchpoint): Renamed to
7947 i386_dr_remove_aligned_watchpoint and made nonstatic.
7948 All uses updated.
7949 (i386_update_inferior_debug_regs): Renamed to
7950 i386_dr_update_inferior_debug_regs and made nonstatic.
7951 All uses updated.
7952 (i386_low_insert_watchpoint): Renamed to
7953 i386_dr_insert_watchpoint. All uses updated.
7954 (i386_low_remove_watchpoint): Renamed to
7955 i386_dr_remove_watchpoint. All uses updated.
7956 (i386_low_region_ok_for_watchpoint): Renamed to
7957 i386_dr_region_ok_for_watchpoint. All uses updated.
7958 (i386_low_stopped_data_address): Renamed to
7959 i386_dr_stopped_data_address. All uses updated.
7960 (i386_low_stopped_by_watchpoint): Renamed to
7961 i386_dr_stopped_by_watchpoint. All uses updated.
7962
131aa0d4
GB
79632014-06-18 Gary Benson <gbenson@redhat.com>
7964
7965 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7966 (i386_dr_low_can_set_control): Likewise.
7967 (i386_insert_aligned_watchpoint): New check.
7968
d9305f7f
GB
79692014-06-18 Gary Benson <gbenson@redhat.com>
7970
7971 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7972 Renamed to state.
7973
e927c9fc
GB
79742014-06-18 Gary Benson <gbenson@redhat.com>
7975
7976 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7977 instead of fatal and error.
7978 (i386_handle_nonaligned_watchpoint): Likewise.
7979
1b6d4134
GB
79802014-06-18 Gary Benson <gbenson@redhat.com>
7981
7982 * i386-low.c (i386_get_debug_register_length): New macro.
7983 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7984 (i386_show_dr): Use debug_printf instead of fprintf. Use
7985 phex to format values.
7986
6e62758f
GB
79872014-06-18 Gary Benson <gbenson@redhat.com>
7988
7989 * i386-low.h: Comment changes.
7990 * i386-low.c: Likewise.
7991
fc6e2f03
GB
79922014-06-18 Gary Benson <gbenson@redhat.com>
7993
7994 * i386-low.c: Whitespace changes.
7995
f9d1eeed
TT
79962014-06-12 Tom Tromey <tromey@redhat.com>
7997
7998 * utils.c (freeargv): Remove.
7999
0b04e523
TT
80002014-06-12 Tom Tromey <tromey@redhat.com>
8001
8002 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8003 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8004 (parse_debug_format_options): Likewise.
8005 (gdbserver_usage): Likewise.
8006 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8007 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8008 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8009 against libiberty.
8010 ($(LIBGNU)): Depend on libiberty.
8011 (all-lib): Recurse into all subdirs.
8012 (install-only): Invoke "install" target in subdirs.
8013 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8014 targets.
8015 * configure: Rebuild.
8016 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8017 for vasprintf, vsnprintf, or gettimeofday.
8018 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8019 srv_tgtobj.
8020
270c9937
JB
80212014-06-05 Joel Brobecker <brobecker@adacore.com>
8022
8023 * development.sh: Delete.
8024 * Makefile.in (config.status): Adjust dependency on development.sh.
8025 * configure.ac: Adjust development.sh source call.
8026 * configure: Regenerate.
8027
0a261ed8
PA
80282014-06-02 Pedro Alves <palves@redhat.com>
8029
8030 * ax.c (gdb_free_agent_expr): New function.
8031 * ax.h (gdb_free_agent_expr): New declaration.
8032 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8033 list.
8034 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8035 static.
8036 (clear_breakpoint_conditions_and_commands): New function.
8037 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8038 (clear_breakpoint_conditions_and_commands): New declaration.
8039
e9dae05e
RR
80402014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8041
8042 * linux-aarch64-low.c (asm/ptrace.h): Include.
8043
5876f503
JK
80442014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8045
8046 Fix TLS access for -static -pthread.
8047 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8048 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8049 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8050
802e8e6d
PA
80512014-05-20 Pedro Alves <palves@redhat.com>
8052
8053 * linux-aarch64-low.c (aarch64_insert_point)
8054 (aarch64_remove_point): No longer check whether the type is
8055 supported here. Adjust to new interface.
8056 (the_low_target): Install aarch64_supports_z_point_type as
8057 supports_z_point_type method.
8058 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8059 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8060 instead of a Z packet char. Adjust.
8061 (arm_supports_z_point_type): New function.
8062 (arm_insert_point, arm_remove_point): Adjust to new interface.
8063 (the_low_target): Install arm_supports_z_point_type.
8064 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8065 (cris_insert_point, cris_remove_point): Adjust to new interface.
8066 Don't check whether the type is supported here.
8067 (the_low_target): Install cris_supports_z_point_type.
8068 * linux-low.c (linux_supports_z_point_type): New function.
8069 (linux_insert_point, linux_remove_point): Adjust to new interface.
8070 * linux-low.h (struct linux_target_ops) <insert_point,
8071 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8072 raw_breakpoint pointer parameter.
8073 <supports_z_point_type>: New method.
8074 * linux-mips-low.c (mips_supports_z_point_type): New function.
8075 (mips_insert_point, mips_remove_point): Adjust to new interface.
8076 Use mips_supports_z_point_type.
8077 (the_low_target): Install mips_supports_z_point_type.
8078 * linux-ppc-low.c (the_low_target): Install NULL as
8079 supports_z_point_type method.
8080 * linux-s390-low.c (the_low_target): Install NULL as
8081 supports_z_point_type method.
8082 * linux-sparc-low.c (the_low_target): Install NULL as
8083 supports_z_point_type method.
8084 * linux-x86-low.c (x86_supports_z_point_type): New function.
8085 (x86_insert_point): Adjust to new insert_point interface. Use
8086 insert_memory_breakpoint. Adjust to new
8087 i386_low_insert_watchpoint interface.
8088 (x86_remove_point): Adjust to remove_point interface. Use
8089 remove_memory_breakpoint. Adjust to new
8090 i386_low_remove_watchpoint interface.
8091 (the_low_target): Install x86_supports_z_point_type.
8092 * lynx-low.c (lynx_target_ops): Install NULL as
8093 supports_z_point_type callback.
8094 * nto-low.c (nto_supports_z_point_type): New.
8095 (nto_insert_point, nto_remove_point): Adjust to new interface.
8096 (nto_target_ops): Install nto_supports_z_point_type.
8097 * mem-break.c: Adjust intro comment.
8098 (struct raw_breakpoint) <raw_type, size>: New fields.
8099 <inserted>: Update comment.
8100 <shlib_disabled>: Delete field.
8101 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8102 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8103 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8104 (raw_bkpt_type_to_target_hw_bp_type): New function.
8105 (find_enabled_raw_code_breakpoint_at): New function.
8106 (find_raw_breakpoint_at): New type and size parameters. Use them.
8107 (insert_memory_breakpoint): New function, based off
8108 set_raw_breakpoint_at.
8109 (remove_memory_breakpoint): New function.
8110 (set_raw_breakpoint_at): Reimplement.
8111 (set_breakpoint): New, based on set_breakpoint_at.
8112 (set_breakpoint_at): Reimplement.
8113 (delete_raw_breakpoint): Go through the_target->remove_point
8114 instead of assuming memory breakpoints.
8115 (find_gdb_breakpoint_at): Delete.
8116 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8117 (find_gdb_breakpoint): New function.
8118 (set_gdb_breakpoint_at): Delete.
8119 (z_type_supported): New function.
8120 (set_gdb_breakpoint_1): New function, loosely based off
8121 set_gdb_breakpoint_at.
8122 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8123 (delete_gdb_breakpoint_at): Delete.
8124 (delete_gdb_breakpoint_1): New function, loosely based off
8125 delete_gdb_breakpoint_at.
8126 (delete_gdb_breakpoint): New function.
8127 (clear_gdb_breakpoint_conditions): Rename to ...
8128 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8129 breakpoint.
8130 (add_condition_to_breakpoint): Make static.
8131 (add_breakpoint_condition): Take a struct breakpoint pointer
8132 instead of an address. Adjust.
8133 (gdb_condition_true_at_breakpoint): Rename to ...
8134 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8135 z_type parameter.
8136 (gdb_condition_true_at_breakpoint): Reimplement.
8137 (add_breakpoint_commands): Take a struct breakpoint pointer
8138 instead of an address. Adjust.
8139 (gdb_no_commands_at_breakpoint): Rename to ...
8140 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8141 parameter. Return true if no breakpoint was found. Change debug
8142 output.
8143 (gdb_no_commands_at_breakpoint): Reimplement.
8144 (run_breakpoint_commands): Rename to ...
8145 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8146 and change return type to boolean.
8147 (run_breakpoint_commands): New function.
8148 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8149 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8150 breakpoint. Go through the_target->remove_point instead of
8151 assuming memory breakpoint.
8152 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8153 software and hardware breakpoints.
8154 (reinsert_raw_breakpoint): Go through the_target->insert_point
8155 instead of assuming memory breakpoint.
8156 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8157 software and hardware breakpoints.
8158 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8159 Check both software and hardware breakpoints.
8160 (validate_inserted_breakpoint): Assert the breakpoint is a
8161 software breakpoint. Set the inserted flag to -1 instead of
8162 setting shlib_disabled.
8163 (delete_disabled_breakpoints): Adjust.
8164 (validate_breakpoints): Only validate software breakpoints.
8165 Adjust to inserted flag change.
8166 (check_mem_read, check_mem_write): Skip breakpoint types other
8167 than software breakpoints. Adjust to inserted flag change.
8168 * mem-break.h (enum raw_bkpt_type): New enum.
8169 (raw_breakpoint, struct process_info): Forward declare.
8170 (Z_packet_to_target_hw_bp_type): Delete declaration.
8171 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8172 (set_gdb_breakpoint, delete_gdb_breakpoint)
8173 (clear_breakpoint_conditions): New declarations.
8174 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8175 (breakpoint_inserted_here): Update comment.
8176 (add_breakpoint_condition, add_breakpoint_commands): Replace
8177 address parameter with a breakpoint pointer parameter.
8178 (gdb_breakpoint_here): Update comment.
8179 (delete_gdb_breakpoint_at): Delete.
8180 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8181 * server.c (process_point_options): Take a struct breakpoint
8182 pointer instead of an address. Adjust.
8183 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8184 delete_gdb_breakpoint.
8185 * spu-low.c (spu_target_ops): Install NULL as
8186 supports_z_point_type method.
8187 * target.h: Include mem-break.h.
8188 (struct target_ops) <prepare_to_access_memory>: Update comment.
8189 <supports_z_point_type>: New field.
8190 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8191 instead of a char. Also take a raw breakpoint pointer.
8192 * win32-arm-low.c (the_low_target): Install NULL as
8193 supports_z_point_type.
8194 * win32-i386-low.c (i386_supports_z_point_type): New function.
8195 (i386_insert_point, i386_remove_point): Adjust to new interface.
8196 (the_low_target): Install i386_supports_z_point_type.
8197 * win32-low.c (win32_supports_z_point_type): New function.
8198 (win32_insert_point, win32_remove_point): Adjust to new interface.
8199 (win32_target_ops): Install win32_supports_z_point_type.
8200 * win32-low.h (struct win32_target_ops):
8201 <supports_z_point_type>: New method.
8202 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8203 instead of a char. Also take a raw breakpoint pointer.
8204
932539e3
PA
82052014-05-20 Pedro Alves <palves@redhat.com>
8206
8207 * mem-break.h: Include break-common.h.
8208 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8209 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8210 (Z_packet_to_target_hw_bp_type): New declaration.
8211 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8212 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8213 (Z_PACKET_ACCESS_WP): Delete macros.
8214 (Z_packet_to_hw_type): Delete function.
8215 * i386-low.h: Don't include break-common.h here.
8216 (Z_packet_to_hw_type): Delete declaration.
8217 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8218 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8219 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8220 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8221 * linux-aarch64-low.c: Don't include break-common.h here.
8222 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8223 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8224 (Z_packet_to_target_hw_bp_type): Delete function.
8225 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8226 function.
8227 (mips_insert_point, mips_remove_point): Use
8228 Z_packet_to_target_hw_bp_type.
8229
4ff0d3d8
PA
82302014-05-20 Pedro Alves <palves@redhat.com>
8231
8232 * linux-aarch64-low.c: Include break-common.h.
8233 (enum target_point_type): Delete.
8234 (Z_packet_to_point_type): Rename to ...
8235 (Z_packet_to_target_hw_bp_type): ... this, and return a
8236 target_hw_bp_type instead.
8237 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8238 instead of an enum target_point_type.
8239 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8240 breakpoint type.
8241 (aarch64_dr_state_insert_one_point)
8242 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8243 (aarch64_handle_aligned_watchpoint)
8244 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8245 Take an enum target_hw_bp_type instead of an enum
8246 target_point_type.
8247 (aarch64_supports_z_point_type): New function.
8248 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8249 use Z_packet_to_target_hw_bp_type.
8250
786dc519
JB
82512014-05-20 Joel Brobecker <brobecker@adacore.com>
8252
8253 * configure.ac: Only use -Werror by default when DEVELOPMENT
8254 is true.
8255 * configure: Regenerate.
8256
9e0aa64f
JK
82572014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8258
8259 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8260 * linux-x86-low.c (X86_64_USER_REGS): New.
8261 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8262
2b577b92
YQ
82632014-04-28 Yao Qi <yao@codesourcery.com>
8264
8265 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8266 name.
8267
94611da2
PA
82682014-04-25 Pedro Alves <palves@redhat.com>
8269
8270 PR server/16255
8271 * linux-low.c (linux_attach_fail_reason_string): New function.
8272 (linux_attach_lwp): Delete.
8273 (linux_attach_lwp_1): Rename to ...
8274 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8275 argument. Remove "initial" parameter. Return int instead of
8276 void. Don't error or warn here.
8277 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8278 failure to attach to the tgid. Call warning when failing to
8279 attach to an lwp.
8280 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8281 argument. Remove "initial" parameter. Return int instead of
8282 void. Don't error or warn here.
8283 (linux_attach_fail_reason_string): New declaration.
8284 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8285 interface change. Use linux_attach_fail_reason_string.
8286
01f9f808
MS
82872014-04-24 Michael Sturm <michael.sturm@mintel.com>
8288 Walfred Tedeschi <walfred.tedeschi@intel.com>
8289
8290 * Makefile.in: Added rules to handle new files
8291 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8292 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8293 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8294 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8295 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8296 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8297 x32-avx512-linux.o.
8298 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8299 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8300 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8301 i386/x32-avx512.xml.
8302 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8303 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8304 i386/x32-avx512-linux.xml.
8305 * i387-fp.c (num_avx512_k_registers): New constant for number
8306 of K registers.
8307 (num_avx512_zmmh_low_registers): New constant for number of
8308 lower ZMM registers (0-15).
8309 (num_avx512_zmmh_high_registers): New constant for number of
8310 higher ZMM registers (16-31).
8311 (num_avx512_ymmh_registers): New contant for number of higher
8312 YMM registers (ymm16-31 added by avx521 on x86_64).
8313 (num_avx512_xmm_registers): New constant for number of higher
8314 XMM registers (xmm16-31 added by AVX512 on x86_64).
8315 (struct i387_xsave): Add space for AVX512 registers.
8316 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8317 Add code to handle AVX512 registers.
8318 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8319 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8320 prototypei from generated file.
8321 (tdesc_amd64_avx512_linux): Likewise.
8322 (init_registers_x32_avx512_linux): Likewise.
8323 (tdesc_x32_avx512_linux): Likewise.
8324 (init_registers_i386_avx512_linux): Likewise.
8325 (tdesc_i386_avx512_linux): Likewise.
8326 (x86_64_regmap): Add AVX512 registers.
8327 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8328 mask.
8329 (initialize_low_arch): Add code to initialize AVX512 registers.
8330
51aa91f9
PA
83312014-04-23 Pedro Alves <palves@redhat.com>
8332
8333 * mem-break.c (find_gdb_breakpoint_at): Make static.
8334 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8335
a4165e94
PA
83362014-04-23 Pedro Alves <palves@redhat.com>
8337
8338 * i386-low.c: Don't include break-common.h here.
8339 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8340 prototype to take target_hw_bp_type as argument instead of a Z
8341 packet char.
8342 * i386-low.h: Include break-common.h here.
8343 (Z_packet_to_hw_type): Declare.
8344 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8345 prototypes.
8346 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8347 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8348 (x86_remove_point): Convert the packet number to a
8349 target_hw_bp_type before calling i386_low_remove_watchpoint.
8350 * win32-i386-low.c (i386_insert_point): Convert the packet number
8351 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8352 (i386_remove_point): Convert the packet number to a
8353 target_hw_bp_type before calling i386_low_remove_watchpoint.
8354
b8acf843
PA
83552014-04-23 Pedro Alves <palves@redhat.com>
8356
8357 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8358
d708bcd1
PA
83592014-04-10 Pedro Alves <palves@redhat.com>
8360
8361 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8362 Check if the condition or command is NULL before checking if the
8363 breakpoint is known. On success, return true.
8364 * mem-break.h (add_breakpoint_condition): Document return.
8365 (add_breakpoint_commands): Add describing comment.
8366 * server.c (skip_to_semicolon): New function.
8367 (process_point_options): Use it.
8368
2eec7d5b
PA
83692014-04-09 Pedro Alves <palves@redhat.com>
8370
8371 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8372 to lwpid_of.
8373
fa96cb38
PA
83742014-02-27 Pedro Alves <palves@redhat.com>
8375
8376 PR 12702
8377 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8378 macros.
8379 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8380 output.
8381 (last_thread_of_process_p): Take a PID argument instead of a
8382 thread pointer.
8383 (linux_wait_for_lwp): Delete.
8384 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8385 functions.
8386 (linux_low_filter_event): New function, party factored out from
8387 linux_wait_for_event.
8388 (linux_wait_for_event): Rename to ...
8389 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8390 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8391 sigsuspend. Check for zombie leaders.
8392 (linux_wait_for_event): Reimplement as wrapper around
8393 linux_wait_for_event_filtered.
8394 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8395 a normal or signal exit is seen, it's the whole process exiting.
8396 (wait_for_sigstop): No longer a for_each_inferior callback.
8397 Rewrite on top of linux_wait_for_event_filtered.
8398 (stop_all_lwps): Call wait_for_sigstop directly.
8399 * server.c (resume, handle_target_event): Handle
8400 TARGET_WAITKIND_NO_RESUMED.
8401
d763de10
JB
84022014-02-26 Joel Brobecker <brobecker@adacore.com>
8403
8404 * win32-low.c (psapi_get_dll_name,
8405 * win32_CreateToolhelp32Snapshot): Delete.
8406 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8407 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8408 Delete.
8409 (handle_load_dll): Add function description.
8410 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8411
850a0f76
JB
84122014-02-26 Joel Brobecker <brobecker@adacore.com>
8413
8414 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8415 Add comment.
8416 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8417 base address when calling win32_add_one_solib.
8418 (handle_load_dll): Delete local variable load_addr.
8419 Remove 0x1000 offset applied to DLL base address when calling
8420 win32_add_one_solib.
8421 (handle_unload_dll): Add comment.
8422
f25b3fc3
JB
84232014-02-26 Joel Brobecker <brobecker@adacore.com>
8424
8425 * win32-low.c (win32_add_all_dlls): Renames
8426 win32_ensure_ntdll_loaded. Rewrite function documentation.
8427 Adjust implementation to always load all DLLs.
8428 Add 0x1000 offset to DLL base address when calling
8429 win32_add_one_solib.
8430 (child_initialization_done): New static global.
8431 (do_initial_child_stuff): Set child_initialization_done to
8432 zero during child initialization, and 1 after. Replace call
8433 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8434 Add comment.
8435 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8436 (handle_unload_dll): Add function documentation.
8437 (get_child_debug_event): Ignore load and unload DLL events
8438 during child initialization.
8439
d86d4aaf
DE
84402014-02-20 Doug Evans <dje@google.com>
8441
3bc32da3 8442 Remove global all_lwps.
d86d4aaf
DE
8443 * inferiors.h (ptid_of): Move here from linux-low.h.
8444 (pid_of, lwpid_of): Ditto.
8445 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8446 parameter is a struct thread_info * now.
8447 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8448 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8449 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8450 directly.
8451 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8452 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8453 * linux-arm-low.c (update_registers_callback): Update, "entry"
8454 parameter is a struct thread_info * now.
8455 Fetch lwpid from current_inferior directly.
8456 (arm_insert_point): Pass &all_threads to find_inferior instead of
8457 &all_lwps.
8458 (arm_remove_point): Ditto.
8459 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8460 (arm_prepare_to_resume): Fetch pid from thread.
8461 (arm_read_description): Fetch lwpid from current_inferior directly.
8462 * linux-low.c (all_lwps): Delete.
8463 (delete_lwp): Delete call to remove_inferior.
8464 (handle_extended_wait): Fetch lwpid from thread.
8465 (add_lwp): Don't set lwp->entry.id. Remove call to
8466 add_inferior_to_list.
8467 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8468 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8469 (kill_one_lwp_callback): Ditto.
8470 (linux_kill): Don't dereference NULL pointer.
8471 Fetch ptid,lwpid from thread.
8472 (get_detach_signal): Fetch ptid from thread.
8473 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8474 Simplify call to regcache_invalidate_thread.
8475 (delete_lwp_callback): Update, "entry" parameter is a
8476 struct thread_info * now. Fetch pid from thread.
8477 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8478 (status_pending_p_callback): Update, "entry" parameter is a
8479 struct thread_info * now. Fetch ptid from thread.
8480 (find_lwp_pid): Update, "entry" parameter is a
8481 struct thread_info * now.
8482 (linux_wait_for_lwp): Fetch pid from thread.
8483 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8484 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8485 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8486 (dequeue_one_deferred_signal): Ditto.
8487 (cancel_breakpoint): Fetch ptid from current_inferior.
8488 (linux_wait_for_event): Pass &all_threads to find_inferior,
8489 not &all_lwps. Fetch ptid, lwpid from thread.
8490 (count_events_callback): Update, "entry" parameter is a
8491 struct thread_info * now.
8492 (select_singlestep_lwp_callback): Ditto.
8493 (select_event_lwp_callback): Ditto.
8494 (cancel_breakpoints_callback): Ditto.
8495 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8496 not &all_lwps.
8497 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8498 (unsuspend_one_lwp): Update, "entry" parameter is a
8499 struct thread_info * now.
8500 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8501 not &all_lwps.
8502 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8503 Fetch lwpid from thread, not lwp.
8504 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8505 Pass &all_threads to find_inferior, not &all_lwps.
8506 (send_sigstop): Fetch lwpid from thread, not lwp.
8507 (send_sigstop_callback): Update, "entry" parameter is a
8508 struct thread_info * now.
8509 (suspend_and_send_sigstop_callback): Ditto.
8510 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8511 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8512 struct thread_info * now.
8513 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8514 from thread, lwp.
8515 (lwp_running): Update, "entry" parameter is a
8516 struct thread_info * now.
8517 (stop_all_lwps): Fetch ptid from thread.
8518 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8519 (linux_resume_one_lwp): Fetch lwpid from thread.
8520 (linux_set_resume_request): Update, "entry" parameter is a
8521 struct thread_info * now. Fetch pid, lwpid from thread.
8522 (resume_status_pending_p): Update, "entry" parameter is a
8523 struct thread_info * now.
8524 (need_step_over_p): Ditto. Fetch lwpid from thread.
8525 (start_step_over): Fetch lwpid from thread.
8526 (linux_resume_one_thread): Update, "entry" parameter is a
8527 struct thread_info * now. Fetch lwpid from thread.
8528 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8529 (proceed_one_lwp): Update, "entry" parameter is a
8530 struct thread_info * now. Fetch lwpid from thread.
8531 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8532 struct thread_info * now.
8533 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8534 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8535 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8536 directly.
8537 (regsets_store_inferior_registers): Ditto.
8538 (fetch_register, store_register): Ditto.
8539 (linux_read_memory, linux_write_memory): Ditto.
8540 (linux_request_interrupt): Ditto.
8541 (linux_read_auxv): Ditto.
8542 (linux_xfer_siginfo): Ditto.
8543 (linux_qxfer_spu): Ditto.
8544 (linux_qxfer_libraries_svr4): Ditto.
8545 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8546 moved to inferiors.h.
8547 (get_lwp): Delete.
8548 (get_thread_lwp): Update.
8549 (struct lwp_info): Delete member "entry". Simplify comment for
8550 member "thread".
8551 (all_lwps): Delete.
8552 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8553 current_inferior directly.
8554 (update_watch_registers_callback): Update, "entry" parameter is a
8555 struct thread_info * now. Fetch pid from thread.
8556 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8557 (mips_insert_point): Fetch lwpid from current_inferior.
8558 Pass &all_threads to find_inferior, not &all_lwps.
8559 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8560 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8561 directly.
8562 (mips_stopped_data_address): Ditto.
8563 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8564 directly.
8565 * linux-tile-low.c (tile_arch_setup): Ditto.
8566 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8567 (update_debug_registers_callback): Update, "entry" parameter is a
8568 struct thread_info * now. Fetch pid from thread.
8569 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8570 Pass &all_threads to find_inferior, not &all_lwps.
8571 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8572 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8573 Pass &all_threads to find_inferior, not &all_lwps.
8574 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8575 (i386_dr_low_get_status): Ditto.
8576 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8577 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8578 (x86_linux_read_description): Ditto.
8579 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8580
3b8361aa
DE
85812014-02-20 Doug Evans <dje@google.com>
8582
8583 * inferiors.c (get_first_inferior): Fix buglet.
8584
f7667f0d
DE
85852014-02-19 Doug Evans <dje@google.com>
8586
8587 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8588 * inferiors.c (add_thread): Change result type to struct thread_info *.
8589 All callers updated.
8590 (add_lwp): Call add_thread here instead of in callers.
8591 All callers updated.
8592 * linux-low.h (get_lwp_thread): Rewrite.
8593 (struct lwp_info): New member "thread".
8594
b3312d80
DE
85952014-02-19 Doug Evans <dje@google.com>
8596
8597 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8598 All callers updated.
8599
ecc6f45c
DE
86002014-02-19 Doug Evans <dje@google.com>
8601
8602 * inferiors.c (add_thread): Fix whitespace.
8603
649ebbca
DE
86042014-02-19 Doug Evans <dje@google.com>
8605
8606 * dll.c (clear_dlls): Replace accessing list implemention details
8607 with API function.
8608 * gdbthread.h (get_first_thread): Declare.
8609 * inferiors.c (for_each_inferior_with_data): New function.
8610 (get_first_thread): New function.
8611 (find_thread_ptid): Simplify.
8612 (get_first_inferior): New function.
8613 (clear_list): Delete.
8614 (one_inferior_p): New function.
8615 (clear_inferior_list): New function.
8616 (clear_inferiors): Update.
8617 * inferiors.h (for_each_inferior_with_data): Declare.
8618 (clear_inferior_list): Declare.
8619 (one_inferior_p): Declare.
8620 (get_first_inferior): Declare.
8621 * linux-low.c (linux_wait_for_event): Replace accessing list
8622 implemention details with API function.
8623 * server.c (target_running): Ditto.
8624 (accumulate_file_name_length): New function.
8625 (emit_dll_description): New function.
8626 (handle_qxfer_libraries): Replace accessing list implemention
8627 details with API function.
8628 (handle_qxfer_threads_worker): New function.
8629 (handle_qxfer_threads_proper): Replace accessing list implemention
8630 details with API function.
8631 (handle_query): Ditto.
8632 (visit_actioned_threads_callback_ftype): New typedef.
8633 (visit_actioned_threads_data): New struct.
8634 (visit_actioned_threads): Rewrite to be find_inferior callback.
8635 (resume): Call find_inferior.
8636 (handle_status): Replace accessing list implemention
8637 details with API function.
8638 (process_serial_event): Replace accessing list implemention details
8639 with API function.
8640 * target.c (set_desired_inferior): Replace accessing list implemention
8641 details with API function.
8642 * tracepoint.c (same_process_p): New function.
8643 (gdb_agent_about_to_close): Replace accessing list implemention
8644 details with API function.
8645 * win32-low.c (child_delete_thread): Replace accessing list
8646 implemention details with API function.
8647 (match_dll_by_basename): New function.
8648 (dll_is_loaded_by_basename): New function.
8649 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8650 details call to dll_is_loaded_by_basename.
8651
80894984
DE
86522014-02-19 Doug Evans <dje@google.com>
8653
8654 * dll.h (struct dll_info): Add comment.
8655 * gdbthread.h (struct thread_info): Add comment.
8656 (current_ptid): Simplify.
8657 * inferiors.c (add_process): Update.
8658 (remove_process): Update.
8659 * inferiors.h (struct process_info): Rename member "head" to "entry".
8660 * linux-low.c (delete_lwp): Update.
8661 (add_lwp): Update.
8662 (last_thread_of_process_p): Update.
8663 (kill_one_lwp_callback, linux_kill): Update.
8664 (status_pending_p_callback): Update.
8665 (wait_for_sigstop): Update. Simplify read of ptid.
8666 (start_step_over): Update.
8667 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8668 (get_lwp_thread): Update.
8669 (struct lwp_info): Rename member "head" to "entry".
8670 * regcache.h (inferior_list_entry): Delete.
8671 * server.c (kill_inferior_callback): Update.
8672 (detach_or_kill_inferior_callback): Update.
8673 (print_started_pid): Update.
8674 (print_attached_pid): Update.
8675 (process_serial_event): Simplify read of ptid.
8676 * thread-db.c (thread_db_create_event): Update.
8677 (thread_db_get_tls_address): Update.
8678 * win32-low.c (current_inferior_ptid): Simplify.
8679
46917d26
TT
86802014-02-19 Tom Tromey <tromey@redhat.com>
8681
8682 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8683 argument.
8684 (target_supports_btrace): Update.
8685
0759a81e
YQ
86862014-02-14 Yao Qi <yao@codesourcery.com>
8687
8688 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8689 (rsp-low-ipa.o): New target.
8690
a7191e8b
TT
86912014-02-12 Tom Tromey <tromey@redhat.com>
8692
8693 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8694 convert_ascii_to_int.
8695 * regcache.c (registers_to_string): Likewise.
8696 * remote-utils.c (decode_M_packet): Likewise.
8697 * server.c (process_serial_event): Likewise.
8698
ff0e980e
TT
86992014-02-12 Tom Tromey <tromey@redhat.com>
8700
8701 * server.c (handle_query, handle_v_run): Use hex2bin, not
8702 unhexify.
8703 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8704
e9371aff
TT
87052014-02-12 Tom Tromey <tromey@redhat.com>
8706
8707 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8708 convert_int_to_ascii.
8709 * regcache.c (registers_to_string, collect_register_as_string):
8710 Likewise.
8711 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8712 Likewise.
8713 * server.c (process_serial_event): Likewise.
8714 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8715 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8716
971dc0b8
TT
87172014-02-12 Tom Tromey <tromey@redhat.com>
8718
8719 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8720 bin2hex, not hexify.
8721 * tracepoint.c (cmd_qtstatus): Likewise.
8722
0a822afb
TT
87232014-02-12 Tom Tromey <tromey@redhat.com>
8724
8725 * remote-utils.c (monitor_output): Pass explicit length to
8726 hexify.
8727
9c3d6531
TT
87282014-02-12 Tom Tromey <tromey@redhat.com>
8729
8730 * tracepoint.c: Include rsp-low.h.
8731 * server.c: Include rsp-low.h.
8732 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8733 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8734 declare.
8735 * remote-utils.c: Include rsp-low.h.
8736 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8737 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8738 (convert_int_to_ascii, convert_ascii_to_int): Move to
8739 common/rsp-low.c.
8740 * regcache.c: Include rsp-low.h.
8741 * ax.c: Include rsp-low.h.
8742 * Makefile.in (SFILES): Add common/rsp-low.c.
8743 (OBS): Add rsp-low.o.
8744 (rsp-low.o): New target.
8745
01fd3ea5
TT
87462014-02-12 Tom Tromey <tromey@redhat.com>
8747
8748 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8749 Include print-utils.h.
8750 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8751 (plongest, thirty_two, phex_nz): Remove.
8752 * Makefile.in (SFILES): Add common/print-utils.c.
8753 (OBS): Add print-utils.o.
8754 (print-utils-ipa.o): New target.
8755 (print-utils.o): New target.
8756 (IPA_OBJS): Add print-utils-ipa.o.
8757
e99dc820
TT
87582014-02-06 Tom Tromey <tromey@redhat.com>
8759
8760 * Makefile.in (SFILES): Fix indentation.
8761
ee1e2d4f
DE
87622014-02-05 Doug Evans <dje@google.com>
8763
8764 * linux-low.c (linux_wait_for_event): Improve comment.
8765 (linux_wait_1): Keep current_inferior in sync with event_child.
8766
f5a02773
DE
87672014-01-22 Doug Evans <dje@google.com>
8768
8769 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8770
87ce2a04
DE
87712014-01-22 Doug Evans <dje@google.com>
8772
8773 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8774 * configure: Regenerate.
8775 * config.in: Regenerate.
8776 * Makefile.in (SFILES): Add debug.c.
8777 (OBS): Add debug.o.
8778 * debug.c: New file.
8779 * debug.h: New file.
8780 * linux-aarch64-low.c (*): Update all debugging printfs to use
8781 debug_printf instead of fprintf.
8782 * linux-arm-low.c (*): Ditto.
8783 * linux-cris-low.c (*): Ditto.
8784 * linux-crisv32-low.c (*): Ditto.
8785 * linux-m32r-low.c (*): Ditto.
8786 * linux-sparc-low.c (*): Ditto.
8787 * linux-x86.c (*): Ditto.
8788 * linux-low.c (*): Ditto.
8789 (linux_wait_1): Add calls to debug_enter, debug_exit.
8790 (linux_wait): Remove redundant debugging printf.
8791 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8792 (linux_resume, unstop_all_lwps): Ditto.
8793 * mem-break.c (*): Update all debugging printfs to use
8794 debug_printf instead of fprintf.
8795 * remote-utils.c (*): Ditto.
8796 * thread-db.c (*): Ditto.
8797 * server.c #include <ctype.h>, "gdb_vecs.h".
8798 (debug_threads): Moved to debug.c.
8799 (*): Update all debugging printfs to use debug_printf instead of
8800 fprintf.
8801 (start_inferior): Replace call to fflush with call to debug_flush.
8802 (monitor_show_help): Mention set debug-format.
8803 (parse_debug_format_options): New function.
8804 (handle_monitor_command): Handle "monitor set debug-format".
8805 (gdbserver_usage): Mention --debug-format.
8806 (main): Parse --debug-format.
8807 * server.h (debug_threads): Declaration moved to debug.h.
8808 #include "debug.h".
8809 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8810 trace_debug_1 that uses debug_printf.
8811 (tracepoint_look_up_symbols): Update all debugging printfs to use
8812 debug_printf instead of fprintf.
8813
e671835b
BS
88142014-01-20 Baruch Siach <baruch@tkos.co.il>
8815
8816 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8817 sys/ptrace.h.
8818
b5737fa9
PA
88192014-01-17 Pedro Alves <palves@redhat.com>
8820
ea38d2a9 8821 PR build/16445
c7faa97a
PA
8822 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8823 defined after including gdb_proc_service.h.
b5737fa9 8824
40ed484e
DE
88252014-01-16 Doug Evans <dje@google.com>
8826
8827 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8828 (match_dll): Use it.
8829
969c39fb
MM
88302014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8831
8832 * target.h (target_ops) <read_btrace>: Change parameters and
8833 return type to allow error reporting.
8834 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8835 trace reading errors on.
8836 * linux-low.c (linux_low_read_btrace): Pass trace reading
8837 errors on.
8838 (linux_low_disable_btrace): New.
8839
ab7f45ba
DE
88402014-01-15 Doug Evans <dje@google.com>
8841
8842 * inferiors.c (thread_id_to_gdb_id): Delete.
8843 * inferiors.h (thread_id_to_gdb_id): Delete.
8844
66af0f44
EZ
88452014-01-13 Eli Zaretskii <eliz@gnu.org>
8846
8847 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8848 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8849 versions.
8850
9939e131
PA
88512014-01-08 Pedro Alves <palves@redhat.com>
8852
8853 * server.c (handle_status): Don't discard previous queued stop
8854 replies or thread's pending status here.
8855 (main) <disconnection>: Do it here instead.
8856
b7ea362b
PA
88572014-01-08 Pedro Alves <palves@redhat.com>
8858
8859 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8860 * server.c (visit_actioned_threads, handle_pending_status): New
8861 function.
8862 (handle_v_cont): Factor out parts to ...
8863 (resume): ... this new function. If in all-stop, and a thread
8864 being resumed has a pending status, report it without actually
8865 resuming.
8866 (myresume): Adjust to use the new 'resume' function.
8867 (clear_pending_status_callback, set_pending_status_callback)
8868 (find_status_pending_thread_callback): New functions.
8869 (handle_status): Handle the case of multiple threads having
8870 interesting statuses to report. Report threads' real last signal
8871 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8872 with an interesting thread to report the status for, instead of
8873 always reporting the status of the first thread.
8874
28498c42
JB
88752014-01-01 Joel Brobecker <brobecker@adacore.com>
8876
8877 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8878 * gdbreplay.c (gdbreplay_version): Likewise.
8879
f45c82da
YZ
88802013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8881
8882 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8883 iov.iov_len with the real length in use.
8884
379a5e2d
JB
88852013-12-13 Joel Brobecker <brobecker@adacore.com>
8886
8887 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8888 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8889 for all targets that use win32-low.c.
8890 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8891 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8892
4210d83e
PA
88932013-12-13 Pedro Alves <palves@redhat.com>
8894
8895 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8896 if equal to TARGET_WAITKIND_LOADED.
8897 * win32-low.c (cached_status): New static global.
8898 (win32_wait): Add declaration.
8899 (do_initial_child_stuff): Flush all initial pending debug events
8900 up to the initial breakpoint.
8901 (win32_wait): If CACHED_STATUS was set, return that instead
8902 of doing a real wait. Remove the code resuming the execution
8903 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8904 during the initial phase. Also remove the code changing
8905 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8906 TARGET_WAITKIND_STOPPED.
8907
e7f0d979
YQ
89082013-12-11 Yao Qi <yao@codesourcery.com>
8909
8910 * notif.c (handle_notif_ack): Return 0 if no notification
8911 matches.
8912
ebcf782c
DE
89132013-11-20 Doug Evans <dje@google.com>
8914
8915 * linux-low.c (linux_set_resume_request): Fix comment.
8916
20ad9378
DE
89172013-11-20 Doug Evans <dje@google.com>
8918
8919 * linux-low.c (resume_status_pending_p): Tweak comment.
8920
a196ebeb
WT
89212013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8922
8923 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8924 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8925 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8926 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8927 (srv_amd64_regobj): Add amd64-mpx.o.
8928 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8929 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8930 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8931 * i387-fp.c (num_pl_bnd_register) Added constant.
8932 (num_pl_bnd_cfg_registers) Added constant.
8933 (struct i387_xsave) Added reserved area and MPX fields.
8934 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8935 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8936 function.
8937 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8938 (init_registers_amd64_mpx_linux): Declare new function.
8939 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8940 (x86_64_regmap): Add MPX registers.
8941 (x86_linux_read_description): Add MPX case.
8942 (initialize_low_arch): Initialize MPX targets.
8943
0080a2f6
TT
89442013-11-18 Tom Tromey <tromey@redhat.com>
8945
8946 * configure: Rebuild.
8947 * configure.ac: Don't check for stdlib.h.
8948 * gdbreplay.c: Unconditionally include stdlib.h.
8949
2978b111
TT
89502013-11-18 Tom Tromey <tromey@redhat.com>
8951
8952 * config.in: Rebuild.
8953 * configure: Rebuild.
8954 * configure.ac: Don't use AC_HEADER_DIRENT.
8955
a3d08894
TT
89562013-11-18 Tom Tromey <tromey@redhat.com>
8957
8958 * server.h: Don't check HAVE_STRING_H.
8959 * gdbreplay.c: Don't check HAVE_STRING_H.
8960 * configure: Rebuild.
8961
0a5dd17d
TT
89622013-11-18 Tom Tromey <tromey@redhat.com>
8963
8964 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8965 LIBGNU.
8966
1bd2f0ba
TT
89672013-11-08 Tom Tromey <tromey@redhat.com>
8968
8969 * configure, config.in: Rebuild.
8970 * configure.ac: Remove unused configury.
8971
3266f10b
TT
89722013-11-08 Tom Tromey <tromey@redhat.com>
8973
8974 * acinclude.m4: Include common.m4, codeset.m4.
8975 * configure, config.in: Rebuild.
8976 * configure.ac: Use GDB_AC_COMMON.
8977
6682d959
AA
89782013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8979
8980 * linux-s390-low.c (HWCAP_S390_TE): New define.
8981 (s390_arch_setup): Consider the TE field in the HWCAP for
8982 determining 'have_regset_tdb'.
8983
fd0a4d76
SDJ
89842013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8985
8986 PR gdb/16014
8987 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8988 call to sizeof.
8989
1a3d890b
PA
89902013-10-02 Pedro Alves <palves@redhat.com>
8991
8992 * server.c (process_serial_event): Don't output "GDBserver
8993 exiting" if GDB is connected through stdio.
8994 * target.c (mywait): Likewise, be silent if GDB is connected
8995 through stdio.
8996
97ad4581
JB
89972013-10-01 Joel Brobecker <brobecker@adacore.com>
8998
8999 * lynx-low.c (lynx_add_threads_after_attach): New function.
9000 (lynx_attach): Remove call to add_thread. Add call to
9001 lynx_add_threads_after_attach instead.
9002
5b4e221c
MF
90032013-09-28 Mike Frysinger <vapier@gentoo.org>
9004
9005 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9006 * config.in, configure: Regenerated.
9007
ee47b2f8
YQ
90082013-09-18 Yao Qi <yao@codesourcery.com>
9009
9010 PR server/15959
9011 * server.c (start_inferior): Clear 'resume_info'.
9012
d6707650 90132013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9014
d6707650
JW
9015 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9016 for each register.
9017
9243dd0e 90182013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9019
9243dd0e
JW
9020 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9021 linux-tile-low.o to srv_tgtobj.
9022
c623a6ef
WN
90232013-09-16 Will Newton <will.newton@linaro.org>
9024
9025 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9026 out regs.
9027
fb71d39e
PA
90282013-09-06 Pedro Alves <palves@redhat.com>
9029
9030 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9031 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9032 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9033 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9034 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9035 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9036
8e7e9910
PA
90372013-09-06 Pedro Alves <palves@redhat.com>
9038
9039 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9040 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9041
7c3a12ca
PA
90422013-09-06 Pedro Alves <palves@redhat.com>
9043
9044 * linux-amd64-ipa.c: Include tracepoint.h.
9045 * linux-i386-ipa.c: Include tracepoint.h.
9046
8eb3d7b6
RW
90472013-09-06 Ricard Wanderlof <ricardw@axis.com>
9048
9049 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9050 (ps_get_thread_area): New function.
9051
eddddb9d
RW
90522013-09-06 Ricard Wanderlof <ricardw@axis.com>
9053
9054 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9055 (initialize_low_arch): Call init_registers_crisv32 rather than
9056 init_register_crisv32.
9057
533b0600
PA
90582013-09-05 Pedro Alves <palves@redhat.com>
9059
9060 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9061 to ...
9062 * hostio.h: ... this new file.
9063 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9064 win32-low.c: Include hostio.h.
9065
0ce3d3b5
PA
90662013-09-05 Pedro Alves <palves@redhat.com>
9067
9068 * server.h (gdb_client_data, handler_func, callback_handler_func)
9069 (delete_file_handler, add_file_handler, append_callback_event)
9070 (delete_callback_event, start_event_loop, initialize_event_loop):
9071 Move to event-loop.h and include it.
9072 * event-loop.h: New file.
9073
799cdc37
PA
90742013-09-05 Pedro Alves <palves@redhat.com>
9075
9076 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9077 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9078 (loaded_dll, unloaded_dll): Move to ...
9079 * dll.h: ... this new file.
9080 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9081
6a6bbd9d
PA
90822013-09-05 Pedro Alves <palves@redhat.com>
9083
9084 * server.h (current_process, get_thread_process, all_processes)
9085 (add_inferior_to_list, for_each_inferior, current_inferior)
9086 (remove_inferior, add_process, remove_process, find_process_pid)
9087 (have_started_inferiors_p, have_attached_inferiors_p)
9088 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9089 (clear_inferiors, find_inferior, find_inferior_id)
9090 (inferior_target_data, set_inferior_target_data)
9091 (inferior_regcache_data, set_inferior_regcache_data): Move to
9092 inferiors.h, and include it.
9093 * inferiors.h: New file.
9094
f699aaba
PA
90952013-09-05 Pedro Alves <palves@redhat.com>
9096
9097 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9098 Move ...
72f4393d 9099 * ax.h: ... here.
f699aaba 9100
c144c7a0
PA
91012013-09-05 Pedro Alves <palves@redhat.com>
9102
9103 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9104 tracepoint.h.
9105 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9106 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9107 (handle_tracepoint_general_set, handle_tracepoint_query)
9108 (tracepoint_finished_step, tracepoint_was_hit)
9109 (release_while_stepping_state_list, current_traceframe)
9110 (in_readonly_region, traceframe_read_mem)
9111 (fetch_traceframe_registers, traceframe_read_sdata)
9112 (traceframe_read_info, struct fast_tpoint_collect_status)
9113 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9114 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9115 (supply_fast_tracepoint_registers)
9116 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9117 (ipa_tdesc, claim_trampoline_space)
9118 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9119 (agent_mem_read, agent_get_trace_state_variable_value)
9120 (agent_set_trace_state_variable_value, agent_tsv_read)
9121 (agent_mem_read_string, get_raw_reg_func_addr)
9122 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9123 * tracepoint.h: ... this new file.
9124
ff42e6ab
PA
91252013-09-05 Pedro Alves <palves@redhat.com>
9126
9127 * server.h (perror_with_name, error, fatal, warning, paddress)
9128 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9129 include it.
9130 * utils.h: New file.
9131
541af0f4
PA
91322013-09-05 Pedro Alves <palves@redhat.com>
9133
9134 * server.h (remote_debug, noack_mode, transport_is_reliable)
9135 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9136 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9137 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9138 (write_enn, initialize_async_io, enable_async_io)
9139 (disable_async_io, check_remote_input_interrupt_request)
9140 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9141 (dead_thread_notify, prepare_resume_reply)
9142 (decode_address_to_semicolon, decode_address, decode_m_packet)
9143 (decode_M_packet, decode_X_packet, decode_xfer_write)
9144 (decode_search_memory_packet, unhexify, hexify)
9145 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9146 (look_up_one_symbol, relocate_instruction)
9147 (monitor_output): Move to remote-utils.h, and include it.
9148 * remote-utils.h: New file.
9149
eebdf26b
PA
91502013-09-05 Pedro Alves <palves@redhat.com>
9151
9152 * server.h (_): Delete.
9153
3aafd2ff
PA
91542013-09-02 Pedro Alves <palves@redhat.com>
9155
9156 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9157 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9158 allocated.
9159 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9160
cee83bcb
PM
91612013-09-02 Pierre Muller <muller@sourceware.org>
9162
9163 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9164 or WriteProcessMemory complete successfully and handle
9165 ERROR_PARTIAL_COPY error.
9166
9a13b2fa
PA
91672013-09-02 Pedro Alves <palves@redhat.com>
9168
9169 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9170 error instead of EIO.
9171
602e3198
JK
91722013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9173
9174 PR server/15604
9175 * linux-low.c: Include filestuff.h.
9176 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9177 * lynx-low.c: Include filestuff.h.
9178 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9179 * server.c: Include filestuff.h.
9180 (main): Call notice_open_fds.
9181 * spu-low.c: Include filestuff.h.
9182 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9183
96d7229d
LM
91842013-08-22 Luis Machado <lgustavo@codesourcery.com>
9185
9186 * Makefile.in: Explain why ../target and ../nat are not
9187 listed as include file search paths.
9188 (linux-waitpid.o): New object file rule.
9189 * configure.srv (srv_native_linux_obj): New variable.
9190 Replace all occurrences of linux native object files with
9191 $srv_native_linux_obj.
9192 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9193 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9194 (linux_enable_event_reporting): Remove declaration.
9195 (my_waitpid): Moved to common/linux-waitpid.c.
9196 (linux_wait_for_event): Pass ptid when calling
9197 linux_enable_event_reporting.
9198 (linux_supports_tracefork_flag): Remove.
9199 (linux_enable_event_reporting): Likewise.
9200 (linux_tracefork_grandchild): Remove.
9201 (STACK_SIZE): Moved to common/linux-ptrace.c.
9202 (linux_tracefork_child): Remove.
9203 (linux_test_for_tracefork): Remove.
9204 (linux_look_up_symbols): Call linux_supports_traceclone.
9205 (initialize_low): Remove call to linux_test_for_tracefork.
9206 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9207 common/linux-ptrace.h.
9208 (PTRACE_TYPE_ARG4): Likewise.
9209 Include linux-ptrace.h.
9210
32940073
PA
92112013-08-21 Pedro Alves <palves@redhat.com>
9212
9213 * config.in: Renegerate.
9214
33b60d58 92152013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9216
33b60d58
LM
9217 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9218 (SFILES): Remove $(srcdir)/common/target-common.c and
9219 add $(srcdir)/target/waitstatus.c.
9220 (OBS): Remove target-common.o and add waitstatus.o.
9221 (server_h): Remove $(srcdir)/../common/target-common.h and
9222 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9223 and $(srcdir)/../target/waitstatus.h.
9224 (target-common.o): Remove.
9225 (waitstatus.o): New target object file.
9226 * target.h: Do not include target-common.h and
9227 include target/resume.h, target/wait.h and
9228 target/waitstatus.h.
9229
b8e1b30e
LM
92302013-08-13 Luis Machado <lgustavo@codesourcery.com>
9231
9232 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9233 to PTRACE_TYPE_ARG3.
9234 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9235 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9236 PTRACE_TYPE_ARG4.
9237 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9238 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9239
7a60ad40
YQ
92402013-07-27 Jie Zhang <jie@codesourcery.com>
9241 Daniel Jacobowitz <dan@codesourcery.com>
9242 Yao Qi <yao@codesourcery.com>
9243
9244 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9245 (mips-linux-watch.o): New rule.
9246 (mips_linux_watch_h): New variable.
9247 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9248 srv_tgtobj.
9249 * linux-mips-low.c: Include mips-linux-watch.h.
9250 (struct arch_process_info, struct arch_lwp_info): New.
9251 (update_watch_registers_callback): New function.
9252 (mips_linux_new_process, mips_linux_new_thread) New functions.
9253 (mips_linux_prepare_to_resume, mips_insert_point): New
9254 functions.
9255 (mips_remove_point, mips_stopped_by_watchpoint): New
9256 functions.
9257 (rsp_bp_type_to_target_hw_bp_type): New function.
9258 (mips_stopped_data_address): New function.
9259 (the_low_target): Add watchpoint support functions.
9260
de6f69ad
YQ
92612013-07-27 Yao Qi <yao@codesourcery.com>
9262
9263 * i386-low.c: Include break-common.h.
9264 (enum target_hw_bp_type): Remove.
9265
3360c0bf
LM
92662013-07-24 Luis Machado <lgustavo@codesourcery.com>
9267
9268 * Makefile.in (SFILES): /common/target-common.c.
9269 (OBS): Add target-common.o.
9270 (server_h): Add $(srcdir)/../common/target-common.h.
9271 (target-common.o): New target.
9272 * server.c (queue_stop_reply_callback): Free
9273 status string after use.
9274 * target.c (target_waitstatus_to_string): Remove.
9275 * target.h: Include target-common.h.
9276 (resume_kind): Likewise.
9277 (target_waitkind): Likewise.
9278 (target_waitstatus): Likewise.
9279 (TARGET_WNOHANG): Likewise.
9280
bd885420
YQ
92812013-07-04 Yao Qi <yao@codesourcery.com>
9282
9283 * Makefile.in (host_alias): Use @host_noncanonical@.
9284 (target_alias): Use @target_noncanonical@.
9285 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9286 ACX_NONCANONICAL_HOST.
9287 * configure: Regenerated.
9288
9289 Revert:
9290 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9291
9292 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9293 * configure: Rebuild.
9294 * Makefile.in (version_host, version_target): Get from configure.
9295 (version.c): Use $(version_host) and $(version_target).
9296
17ef446e
PA
92972013-07-03 Pedro Alves <palves@redhat.com>
9298
9299 * Makefile.in (config.status): Depend on development.sh.
9300 * acinclude.m4: Include libmcheck.m4.
9301 * configure: Regenerate.
9302
7a9a7487
MG
93032013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9304
9305 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9306 attribute inside the parentheses.
9307 (winapi_DebugSetProcessKillOnExit): Ditto.
9308 (winapi_DebugBreakProcess): Ditto.
9309 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9310
49b64de6
MG
93112013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9312
9313 * notif.h (notif_event): Add a dummy member to avoid compiler
9314 errors.
9315
d5749ee7
PA
93162013-07-01 Pedro Alves <palves@redhat.com>
9317
9318 * hostio.c (HOSTIO_PATH_MAX): Define.
9319 (require_filename, handle_open, handle_unlink, handle_readlink):
9320 Use it.
9321
d8d2a3ee
PA
93222013-07-01 Pedro Alves <palves@redhat.com>
9323
9324 * server.h: Include "pathmax.h".
9325 * linux-low.c: Don't include sys/param.h.
9326 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9327 MAXPATHLEN.
9328 * win32-low.c: Don't include sys/param.h.
9329 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9330
bc7dea8d
PA
93312013-07-01 Pedro Alves <palves@redhat.com>
9332
9333 * event-loop.c: Don't check HAVE_UNISTD_H before including
9334 <unistd.h>.
9335 * gdbreplay.c: Likewise.
9336 * remote-utils.c: Likewise.
9337 * server.c: Likewise.
9338 * configure.ac: Don't check for unistd.h.
9339 * configure: Regenerate.
9340
d6c2da54
TT
93412013-06-28 Tom Tromey <tromey@redhat.com>
9342
9343 * Makefile.in (version.c): Use version.in, not
9344 common/version.in.
9345
257b6bec
MG
93462013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9347
9348 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9349 * configure: Rebuild.
9350 * Makefile.in (version_host, version_target): Get from configure.
9351 (version.c): Use $(version_host) and $(version_target).
9352
86ebe149
DK
93532013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9354
9355 Fix trace-status to output user name without trailing colon.
9356 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9357
f30aa5af
DK
93582013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9359
9360 Fix trace-status to output proper start-time and stop-time.
9361 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9362 output start time and stop time in hex as gdb expects.
9363
28a93511
YQ
93642013-06-26 Pedro Alves <pedro@codesourcery.com>
9365
9366 * tracepoint.c (build_traceframe_info_xml): Output trace state
9367 variables present in the trace buffer.
9368
01208463
TT
93692013-06-24 Tom Tromey <tromey@redhat.com>
9370
9371 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9372 create-version.sh.
9373 (version.o): Remove.
9374 * gdbreplay.c: Include version.h.
9375 (version, host_name): Don't declare.
9376 * server.h: Include version.h.
9377 (version, host_name): Don't declare.
9378
760256f9
PA
93792013-06-12 Pedro Alves <palves@redhat.com>
9380
9381 * linux-x86-low.c (linux_is_elf64): Delete global.
9382 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9383 with local linux_pid_exe_is_elf_64_file use.
9384
030031ee
PA
93852013-06-11 Pedro Alves <palves@redhat.com>
9386
9387 * linux-low.c (regset_disabled, disable_regset): New functions.
9388 (regsets_fetch_inferior_registers)
9389 (regsets_store_inferior_registers): Use them.
9390 (initialize_regsets_info); Don't allocate the disabled_regsets
9391 array here.
9392 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9393 comment.
9394
5da6eb0a
PA
93952013-06-11 Pedro Alves <palves@redhat.com>
9396
9397 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9398 xmalloc.
9399
7e5aaa09
PA
94002013-06-11 Pedro Alves <palves@redhat.com>
9401
9402 * linux-x86-low.c (initialize_low_arch): Call
9403 init_registers_x32_avx_linux.
9404
d878444c
JK
94052013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9406
9407 Fix compatibility with Android Bionic.
9408 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9409 it is not empty.
9410
3aee8918
PA
94112013-06-07 Pedro Alves <palves@redhat.com>
9412
5f2b57b5 9413 PR server/14823
3aee8918
PA
9414 * Makefile.in (OBS): Add tdesc.o.
9415 (IPA_OBJS): Add tdesc-ipa.o.
9416 (tdesc-ipa.o): New rule.
9417 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9418 interface.
9419 * linux-low.c (new_inferior): Delete.
9420 (disabled_regsets, num_regsets): Delete.
9421 (linux_add_process): Adjust to set the new per-process
9422 new_inferior flag.
9423 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9424 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9425 was a stop. When calling arch_setup, switch the current inferior
9426 to the thread that got an event.
9427 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9428 (regsets_fetch_inferior_registers)
9429 (regsets_store_inferior_registers): New regsets_info parameter.
9430 Adjust to use it.
9431 (linux_register_in_regsets): New regs_info parameter. Adjust to
9432 use it.
9433 (register_addr, fetch_register, store_register): New usrregs_info
9434 parameter. Adjust to use it.
9435 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9436 parameter regs_info. Adjust to use it.
9437 (linux_fetch_registers): Get the current inferior's regs_info, and
9438 adjust to use it.
9439 (linux_store_registers): Ditto.
9440 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9441 (initialize_low): Don't initialize the target_regsets here. Call
9442 initialize_low_arch.
9443 * linux-low.h (target_regsets): Delete declaration.
9444 (struct regsets_info): New.
9445 (struct usrregs_info): New.
9446 (struct regs_info): New.
9447 (struct process_info_private) <new_inferior>: New field.
9448 (struct linux_target_ops): Delete the num_regs, regmap, and
9449 regset_bitmap fields. New field regs_info.
9450 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9451 * i387-fp.c (num_xmm_registers): Delete.
9452 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9453 calls to new interface.
9454 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9455 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9456 Infer the number of xmm registers from the regcache's target
9457 description.
9458 * i387-fp.h (num_xmm_registers): Delete.
9459 * inferiors.c (add_thread): Don't install the thread's regcache
9460 here.
9461 * proc-service.c (gregset_info): Fetch the current inferior's
9462 regs_info. Adjust to use it.
9463 * regcache.c: Include tdesc.h.
9464 (register_bytes, reg_defs, num_registers)
9465 (gdbserver_expedite_regs): Delete.
9466 (get_thread_regcache): If the thread doesn't have a regcache yet,
9467 create one, instead of aborting gdbserver.
9468 (regcache_invalidate_one): Rename to ...
9469 (regcache_invalidate_thread): ... this.
9470 (regcache_invalidate_one): New.
9471 (regcache_invalidate): Only invalidate registers of the current
9472 process.
9473 (init_register_cache): Add target_desc parameter, and use it.
9474 (new_register_cache): Ditto. Assert the target description has a
9475 non zero registers_size.
9476 (regcache_cpy): Add assertions. Adjust.
9477 (realloc_register_cache, set_register_cache): Delete.
9478 (registers_to_string, registers_from_string): Adjust.
9479 (find_register_by_name, find_regno, find_register_by_number)
9480 (register_cache_size): Add target_desc parameter, and use it.
9481 (free_register_cache_thread, free_register_cache_thread_one)
9482 (regcache_release, register_cache_size): New.
9483 (register_size): Add target_desc parameter, and use it.
9484 (register_data, supply_register, supply_register_zeroed)
9485 (supply_regblock, supply_register_by_name, collect_register)
9486 (collect_register_as_string, collect_register_by_name): Adjust.
9487 * regcache.h (struct target_desc): Forward declare.
9488 (struct regcache) <tdesc>: New field.
9489 (init_register_cache, new_register_cache): Add target_desc
9490 parameter.
9491 (regcache_invalidate_thread): Declare.
9492 (regcache_invalidate_one): Delete declaration.
9493 (regcache_release): Declare.
9494 (find_register_by_number, register_cache_size, register_size)
9495 (find_regno): Add target_desc parameter.
9496 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9497 declarations.
9498 * remote-utils.c: Include tdesc.h.
9499 (outreg, prepare_resume_reply): Adjust.
9500 * server.c: Include tdesc.h.
9501 (gdbserver_xmltarget): Delete declaration.
9502 (get_features_xml, process_serial_event): Adjust.
9503 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9504 declare.
9505 (struct process_info) <tdesc>: New field.
9506 (ipa_tdesc): Declare.
9507 * tdesc.c: New file.
9508 * tdesc.h: New file.
9509 * tracepoint.c: Include tdesc.h.
9510 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9511 (get_context_regcache): Adjust to pass ipa_tdesc down.
9512 (do_action_at_tracepoint): Adjust to get the register cache size
9513 from the context regcache's description.
9514 (traceframe_walk_blocks): Adjust to get the register cache size
9515 from the current trace frame's description.
9516 (traceframe_get_pc): Adjust to get current trace frame's
9517 description and pass it down.
9518 (gdb_collect): Adjust to get the register cache size from the
9519 IPA's description.
9520 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9521 (gdbserver_xmltarget): Delete.
9522 (initialize_low_tracepoint): Set the ipa's target description.
9523 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9524 (initialize_low_tracepoint): Set the ipa's target description.
9525 * linux-x86-low.c: Include tdesc.h.
9526 [__x86_64__] (is_64bit_tdesc): New.
9527 (ps_get_thread_area, x86_get_thread_area): Use it.
9528 (i386_cannot_store_register): Rename to ...
9529 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9530 (i386_cannot_fetch_register): Rename to ...
9531 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9532 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9533 to new interface.
9534 (target_regsets): Rename to ...
9535 (x86_regsets): ... this.
9536 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9537 interface.
9538 (x86_siginfo_fixup): Use is_64bit_tdesc.
9539 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9540 (tdesc_x32_avx_linux, tdesc_x32_linux)
9541 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9542 Declare.
9543 (x86_linux_update_xmltarget): Delete.
9544 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9545 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9546 (AMD64_LINUX_USER64_CS): New.
9547 (x86_linux_read_description): New, based on
9548 x86_linux_update_xmltarget.
9549 (same_process_callback): New.
9550 (x86_arch_setup_process_callback): New.
9551 (x86_linux_update_xmltarget): New.
9552 (x86_regsets_info): New.
9553 (amd64_linux_regs_info): New.
9554 (i386_linux_usrregs_info): New.
9555 (i386_linux_regs_info): New.
9556 (x86_linux_regs_info): New.
9557 (x86_arch_setup): Reimplement.
9558 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9559 (x86_emit_ops): Ditto.
9560 (the_low_target): Adjust. Install x86_linux_regs_info,
9561 x86_cannot_fetch_register, and x86_cannot_store_register.
9562 (initialize_low_arch): New.
9563 * linux-ia64-low.c (tdesc_ia64): Declare.
9564 (ia64_fetch_register): Adjust.
9565 (ia64_usrregs_info, regs_info): New globals.
9566 (ia64_regs_info): New function.
9567 (the_low_target): Adjust.
9568 (initialize_low_arch): New function.
9569 * linux-sparc-low.c (tdesc_sparc64): Declare.
9570 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9571 Adjust.
9572 (sparc_arch_setup): New function.
9573 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9574 (the_low_target): Adjust.
9575 (initialize_low_arch): New function.
9576 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9577 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9578 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9579 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9580 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9581 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9582 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9583 (tdesc_powerpc_isa205_vsx64l): Declare.
9584 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9585 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9586 (ppc_set_pc, ppc_get_hwcap): Adjust.
9587 (ppc_usrregs_info): Forward declare.
9588 (!__powerpc64__) ppc_regmap_adjusted: New global.
9589 (ppc_arch_setup): Adjust to the current process'es target
9590 description.
9591 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9592 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9593 (ppc_store_evrregset): Adjust.
9594 (target_regsets): Rename to ...
9595 (ppc_regsets): ... this, and make static.
9596 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9597 (ppc_regs_info): New function.
9598 (the_low_target): Adjust.
9599 (initialize_low_arch): New function.
9600 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9601 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9602 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9603 (tdesc_s390x_linux64v2): Declare.
9604 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9605 (s390_fill_gregset, s390_store_last_break): Adjust.
9606 (target_regsets): Rename to ...
9607 (s390_regsets): ... this, and make static.
9608 (s390_get_pc, s390_set_pc): Adjust.
9609 (s390_get_hwcap): New target_desc parameter, and use it.
9610 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9611 (s390_arch_setup): Adjust to set the current process'es target
9612 description. Don't adjust the regmap.
9613 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9614 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9615 (regs_info_3264): New globals.
9616 (s390_regs_info): New function.
9617 (the_low_target): Adjust.
9618 (initialize_low_arch): New function.
9619 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9620 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9621 [__mips64] (init_registers_mips_linux)
9622 (init_registers_mips_dsp_linux): Delete defines.
9623 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9624 (have_dsp): New global.
9625 (mips_read_description): New, based on mips_arch_setup.
9626 (mips_arch_setup): Reimplement.
9627 (get_usrregs_info): New function.
9628 (mips_cannot_fetch_register, mips_cannot_store_register)
9629 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9630 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9631 (target_regsets): Rename to ...
9632 (mips_regsets): ... this, and make static.
9633 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9634 (dsp_regs_info, regs_info): New globals.
9635 (mips_regs_info): New function.
9636 (the_low_target): Adjust.
9637 (initialize_low_arch): New function.
9638 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9639 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9640 Declare.
9641 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9642 (arm_read_description): New, with bits factored from
9643 arm_arch_setup.
9644 (arm_arch_setup): Reimplement.
9645 (target_regsets): Rename to ...
9646 (arm_regsets): ... this, and make static.
9647 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9648 (arm_regs_info): New function.
9649 (the_low_target): Adjust.
9650 (initialize_low_arch): New function.
9651 * linux-m68k-low.c (tdesc_m68k): Declare.
9652 (target_regsets): Rename to ...
9653 (m68k_regsets): ... this, and make static.
9654 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9655 (m68k_regs_info): New function.
9656 (m68k_arch_setup): New function.
9657 (the_low_target): Adjust.
9658 (initialize_low_arch): New function.
9659 * linux-sh-low.c (tdesc_sharch): Declare.
9660 (target_regsets): Rename to ...
9661 (sh_regsets): ... this, and make static.
9662 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9663 (sh_regs_info, sh_arch_setup): New functions.
9664 (the_low_target): Adjust.
9665 (initialize_low_arch): New function.
9666 * linux-bfin-low.c (tdesc_bfin): Declare.
9667 (bfin_arch_setup): New function.
9668 (bfin_usrregs_info, regs_info): New globals.
9669 (bfin_regs_info): New function.
9670 (the_low_target): Adjust.
9671 (initialize_low_arch): New function.
9672 * linux-cris-low.c (tdesc_cris): Declare.
9673 (cris_arch_setup): New function.
9674 (cris_usrregs_info, regs_info): New globals.
9675 (cris_regs_info): New function.
9676 (the_low_target): Adjust.
9677 (initialize_low_arch): New function.
9678 * linux-cris-low.c (tdesc_crisv32): Declare.
9679 (cris_arch_setup): New function.
9680 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9681 (cris_regs_info): New function.
9682 (the_low_target): Adjust.
9683 (initialize_low_arch): New function.
9684 * linux-m32r-low.c (tdesc_m32r): Declare.
9685 (m32r_arch_setup): New function.
9686 (m32r_usrregs_info, regs_info): New globals.
9687 (m32r_regs_info): Adjust.
9688 (initialize_low_arch): New function.
9689 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9690 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9691 (tic6x_usrregs_info): Forward declare.
9692 (tic6x_read_description): New function, based on ...
9693 (tic6x_arch_setup): ... this. Reimplement.
9694 (target_regsets): Rename to ...
9695 (tic6x_regsets): ... this, and make static.
9696 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9697 (tic6x_regs_info): New function.
9698 (the_low_target): Adjust.
9699 (initialize_low_arch): New function.
9700 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9701 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9702 (target_regsets): Rename to ...
9703 (xtensa_regsets): ... this, and make static.
9704 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9705 globals.
9706 (xtensa_arch_setup, xtensa_regs_info): New functions.
9707 (the_low_target): Adjust.
9708 (initialize_low_arch): New function.
9709 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9710 (nios2_arch_setup): Set the current process'es tdesc.
9711 (target_regsets): Rename to ...
9712 (nios2_regsets): ... this.
9713 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9714 (nios2_regs_info): New function.
9715 (the_low_target): Adjust.
9716 (initialize_low_arch): New function.
a261b8f5
PA
9717 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9718 (aarch64_arch_setup): Set the current process'es tdesc.
9719 (target_regsets): Rename to ...
9720 (aarch64_regsets): ... this.
9721 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9722 (aarch64_regs_info): New function.
9723 (the_low_target): Adjust.
9724 (initialize_low_arch): New function.
3aee8918
PA
9725 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9726 globals.
9727 (target_regsets): Rename to ...
9728 (tile_regsets): ... this.
9729 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9730 (tile_regs_info): New function.
9731 (tile_arch_setup): Set the current process'es tdesc.
9732 (the_low_target): Adjust.
9733 (initialize_low_arch): New function.
9734 * spu-low.c (tdesc_spu): Declare.
9735 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9736 * win32-arm-low.c (tdesc_arm): Declare.
9737 (arm_arch_setup): New function.
9738 (the_low_target): Install arm_arch_setup instead of
9739 init_registers_arm.
9740 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9741 (init_windows_x86): Rename to ...
9742 (i386_arch_setup): ... this. Set `win32_tdesc'.
9743 (the_low_target): Adjust.
9744 * win32-low.c (win32_tdesc): New global.
9745 (child_add_thread): Don't create the thread cache here.
9746 (do_initial_child_stuff): Set the new process'es tdesc.
9747 * win32-low.h (struct target_desc): Forward declare.
9748 (win32_tdesc): Declare.
9749 * lynx-i386-low.c (tdesc_i386): Declare global.
9750 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9751 * lynx-low.c (lynx_tdesc): New global.
9752 (lynx_add_process): Set the new process'es tdesc.
9753 * lynx-low.h (struct target_desc): Forward declare.
9754 (lynx_tdesc): Declare global.
9755 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9756 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9757 * nto-low.c (nto_tdesc): New global.
9758 (do_attach): Set the new process'es tdesc.
9759 * nto-low.h (struct target_desc): Forward declare.
9760 (nto_tdesc): Declare.
9761 * nto-x86-low.c (tdesc_i386): Declare.
9762 (nto_x86_arch_setup): Set `nto_tdesc'.
9763
b1fbec62
GB
97642013-06-04 Gary Benson <gbenson@redhat.com>
9765
9766 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9767 to qSupported response when appropriate.
9768 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9769 with nonzero-length annex.
9770 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9771 arguments supplied in annex.
9772
d1ec4ce7
DE
97732013-05-31 Doug Evans <dje@google.com>
9774
ac44adcb 9775 PR server/15594
d1ec4ce7
DE
9776 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9777 64 bits in 64-cross-32 environment.
9778
9b25f2d3
PA
97792013-05-28 Pedro Alves <palves@redhat.com>
9780
9781 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9782 (aarch64-without-fpu.c): Delete rule.
9783 * configure.srv (aarch64*-*-linux*): Remove references to
9784 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9785 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9786 declaration.
9787
6740dc9c
PA
97882013-05-24 Pedro Alves <palves@redhat.com>
9789
9790 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9791 instead of strchr/decode_address. Error if the range isn't split
9792 with a ','. Don't assume there's be a ':' in the action.
9793
c2d6af84
PA
97942013-05-23 Yao Qi <yao@codesourcery.com>
9795 Pedro Alves <palves@redhat.com>
9796
9797 * linux-low.c (lwp_in_step_range): New function.
9798 (linux_wait_1): If the thread was range stepping and stopped
9799 outside the stepping range, report the stop to GDB. Otherwise,
9800 continue stepping. Add range stepping debug output.
9801 (linux_set_resume_request): Copy the step range from the resume
9802 request to the lwp.
9803 (linux_supports_range_stepping): New.
9804 (linux_target_ops) <supports_range_stepping>: Set to
9805 linux_supports_range_stepping.
9806 * linux-low.h (struct linux_target_ops)
9807 <supports_range_stepping>: New field.
9808 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9809 * linux-x86-low.c (x86_supports_range_stepping): New.
9810 (the_low_target) <supports_range_stepping>: Set to
9811 x86_supports_range_stepping.
9812 * server.c (handle_v_cont): Handle 'r' action.
9813 (handle_v_requests): Append ";r" if the target supports range
9814 stepping.
9815 * target.h (struct thread_resume) <step_range_start,
9816 step_range_end>: New fields.
9817 (struct target_ops) <supports_range_stepping>:
9818 New field.
9819 (target_supports_range_stepping): New macro.
9820
58794e1a
JB
98212013-05-17 Joel Brobecker <brobecker@adacore.com>
9822
9823 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9824 confusion in comment.
9825
d631c5a7
JB
98262013-05-17 Joel Brobecker <brobecker@adacore.com>
9827
9828 * lynx-low.c (struct process_info_private): New type.
9829 (lynx_add_process): New function.
9830 (lynx_create_inferior, lynx_attach): Replace calls to
9831 add_process by calls to lynx_add_process.
9832 (lynx_resume): If PTID is null, then try using
9833 current_process()->private->last_wait_event_ptid.
9834 Add comments.
9835 (lynx_clear_inferiors): Delete. The contents of that function
9836 has been inlined in lynx_mourn;
9837 (lynx_wait_1): Save the ptid in the process's private data.
9838 (lynx_mourn): Free the process' private data. Replace call
9839 to lynx_clear_inferiors by call to clear_inferiors.
9840
96f7a20f
YQ
98412013-05-17 Yao Qi <yao@codesourcery.com>
9842
9843 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9844 the right place.
9845
db0dfaa0
LM
98462013-05-16 Luis Machado <lgustavo@codesourcery.com>
9847
9848 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9849 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9850 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9851 PT_TEXT_END_ADDR guards. Update comments.
9852 (linux_target_op) <read_offsets>: Conditionally define to
9853 linux_read_offsets if the target is UCLIBC and if it defines
9854 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9855
68f5f838
SL
98562013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9857 Andrew Jenner <andrew@codesourcery.com>
9858
9859 * Makefile.in (SFILES): Add linux-nios2-low.c.
9860 (clean): Add action to delete nios2-linux.c.
9861 (nios2-linux.c): New rule.
9862 * configure.srv: Add nios2*-*-linux*.
9863 * linux-nios2-low.c: New.
9864
1ebff1fd
HAQ
98652013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9866
9867 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9868
f6150862
HZ
98692013-04-25 Hui Zhu <hui@codesourcery.com>
9870
9871 PR gdb/15186
f6150862
HZ
9872 * ax.c (ax_printf): Add fflush.
9873
614c279d
TT
98742013-04-22 Tom Tromey <tromey@redhat.com>
9875
9876 * Makefile.in (SFILES): Add filestuff.c.
9877 (OBS): Add filestuff.o.
9878 (filestuff.o): New target.
9879 * config.in, configure: Rebuild.
9880 * configure.ac: Check for fdwalk, pipe2.
9881
7d4e5717
PA
98822013-04-17 Pedro Alves <palves@redhat.com>
9883
9884 * configure.ac (USE_THREAD_DB): Delete variable.
9885 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9886 Don't AC_SUBST USE_THREAD_DB.
9887 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9888 * config.in, configure: Regenerate.
9889
d5c93e41
PA
98902013-04-16 Pedro Alves <palves@redhat.com>
9891
9892 * linux-low.h (struct lwp_info) <thread_known>: Move under
9893 the USE_THREAD_DB #ifdef.
9894
04f5fe89
PA
98952013-04-16 Pedro Alves <palves@redhat.com>
9896
9897 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9898 (linux-low.o): Delete rule.
9899 * linux-low.h: Always include "gdb_thread_db.h" instead of
9900 conditionally including thread_db.h.
9901 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9902 HAVE_THREAD_DB_H.
9903
480b27bf
JK
99042013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9905
9906 * Makefile.in (install-only): Fix make install regression.
9907
43662968
JK
99082013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9909
9910 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9911 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9912 installation.
9913 * gdbserver.1: Remove.
9914
3e74e146
PA
99152013-03-22 Pedro Alves <palves@redhat.com>
9916
9917 * linux-low.c (handle_extended_wait): Don't call
9918 linux_enable_event_reporting.
9919
a8347a2a
TT
99202013-03-15 Tony Theodore <tonyt@logyst.com>
9921
9922 PR build/9098:
9923 * Makefile.in (SHELL): Use @SHELL@.
9924
eeb56fa7
SDJ
99252013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9926
9927 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9928 compiler warning.
9929
4fa7e2ff
JB
99302013-03-13 Joel Brobecker <brobecker@adacore.com>
9931
9932 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9933 Remove extraneous NULL element.
9934
8ddb1965
YQ
99352013-03-13 Yao Qi <yao@codesourcery.com>
9936
9937 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9938 'V' block in trace frame.
9939
9accd112
MM
99402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9941
9942 * target.h (struct target_ops): Add btrace ops.
9943 (target_supports_btrace): New macro.
9944 (target_enable_btrace): New macro.
9945 (target_disable_btrace): New macro.
9946 (target_read_btrace): New macro.
9947 * gdbthread.h (struct thread_info): Add btrace field.
9948 * server.c: Include btrace-common.h.
9949 (handle_btrace_general_set): New function.
9950 (handle_btrace_enable): New function.
9951 (handle_btrace_disable): New function.
9952 (handle_general_set): Call handle_btrace_general_set.
9953 (handle_qxfer_btrace): New function.
9954 (struct qxfer qxfer_packets[]): Add btrace entry.
9955 * inferiors.c (remove_thread): Disable btrace.
9956 * linux-low: Include linux-btrace.h.
9957 (linux_low_enable_btrace): New function.
9958 (linux_low_read_btrace): New function.
9959 (linux_target_ops): Add btrace ops.
9960 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9961 Add srv_linux_btrace=yes.
9962 (x86_64-*-linux*): Add linux-btrace.o.
9963 Add srv_linux_btrace=yes.
9964 * configure.ac: Define HAVE_LINUX_BTRACE.
9965 * config.in: Regenerated.
9966 * configure: Regenerated.
9967
5cc22e4c
MM
99682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9969
9970 * server.c (handle_qxfer): Preserve error message if -3 is
9971 returned.
9972 (qxfer): Document the -3 return value.
9973
7c97f91e
MM
99742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9975
9976 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9977 (linux_btrace_h): New variable.
9978 (linux-btrace.o): New rule.
9979
be9a119c 99802013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9981 Hafiz Abid Qadeer <abidh@codesourcery.com>
9982
9983 * tracepoint.c (trace_buffer_size): New global.
9984 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9985 (init_trace_buffer): Change to one-argument function. Allocate
9986 trace buffer memory.
9987 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9988 handle QTBuffer:size packet.
9989 (cmd_bigqtbuffer_size): New function.
9990 (initialize_tracepoint): Call init_trace_buffer with
9991 DEFAULT_TRACE_BUFFER_SIZE.
9992 * server.c (handle_query): Add QTBuffer:size in the
9993 supported packets.
9994
e64f7499
YQ
99952013-03-07 Yao Qi <yao@codesourcery.com>
9996
9997 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9998 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9999 of -1.
10000 (cmd_qtsp): Adjust condition. Do post increment.
10001 Set cur_action and cur_step_action back to 0.
10002
f0ae6fc3
PA
100032013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10004
10005 PR server/15236
10006 * linux-low.c (linux_write_memory): Return early success if LEN is
10007 zero.
10008
b5b0b0af
CV
100092013-03-05 Corinna Vinschen <vinschen@redhat.de>
10010
334ad4a8 10011 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10012
589bc927
TT
100132013-02-28 Tom Tromey <tromey@redhat.com>
10014
10015 * configure.ac: Invoke AC_SYS_LARGEFILE.
10016 * configure, config.in: Rebuild.
10017
dfe07582
CV
100182013-02-28 Corinna Vinschen <vinschen@redhat.com>
10019
10020 * win32-low.c: Throughout, fix format strings and casts of
10021 printf-like functions to avoid type related warnings on all
10022 platforms.
10023 (get_child_debug_event): Print dwDebugEventCode as hex since
10024 that's how it's usually documented.
10025
736cd585
YQ
100262013-02-28 Yao Qi <yao@codesourcery.com>
10027
10028 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10029 pulongest.
10030
e1f58301
JW
100312013-02-27 Jiong Wang <jiwang@tilera.com>
10032
10033 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10034 (reg-tilegx32.c): New rule.
10035 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10036 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10037 different register info initializer according to elf class.
10038 (init_registers_tilgx32): New function. The tilegx32 register info
10039 initializer.
10040 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10041 (tile_store_gregset): Likewise.
10042
d171ca78
YQ
100432013-02-27 Yao Qi <yao@codesourcery.com>
10044
10045 * server.c (process_point_options): Print debug message when
10046 debug_threads is true.
10047
282bbdf3
YQ
100482013-02-26 Yao Qi <yao@codesourcery.com>
10049
10050 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10051
aca22551
PA
100522013-02-19 Pedro Alves <palves@redhat.com>
10053 Kai Tietz <ktietz@redhat.com>
10054
10055 PR gdb/15161
10056
10057 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10058 instead of strtoul to extract address from packet.
10059 (process_serial_event) <'z'>: Likewise.
10060
4f3cee1c
YQ
100612013-02-18 Yao Qi <yao@codesourcery.com>
10062
10063 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10064
8e1d55a3
PA
100652013-02-14 Pedro Alves <palves@redhat.com>
10066
10067 Plug memory leak.
10068
10069 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10070 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10071
458820da
PA
100722013-02-14 Pedro Alves <palves@redhat.com>
10073
10074 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10075
baea0dae
PA
100762013-02-14 Pedro Alves <palves@redhat.com>
10077
10078 * tracepoint.c (save_string): Delete.
10079 (add_tracepoint_action): Use savestring instead of save_string.
10080
0b1afbb3
PA
100812013-02-12 Pedro Alves <palves@redhat.com>
10082
10083 * linux-xtensa-low.c: Ditto.
10084 * xtensa-xtregs.c: Ditto.
10085
8a4ac37e
PA
100862013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10087
10088 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10089 thread_db.
10090
148de6bb
MS
100912013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10092
10093 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10094 aarch64_num_wp_regs and aarch64_num_bp_regs to
10095 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10096
55fac6e0
MS
100972013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10098
10099 * linux-aarch64-low.c (ps_get_thread_area): Replace
10100 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10101
176eb98c
MS
101022013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10103 Marcus Shawcroft <marcus.shawcroft@arm.com>
10104 Nigel Stephens <nigel.stephens@arm.com>
10105 Yufeng Zhang <yufeng.zhang@arm.com>
10106
10107 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10108 (aarch64.c, aarch64-without-fpu.c): New targets.
10109 * configure.srv (aarch64*-*-linux*): New.
10110 * linux-aarch64-low.c: New file.
10111
56f7af9c
MS
101122013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10113
43aaf8b6 10114 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10115 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10116 (dequeue_one_deferred_signal, linux_resume_one_thread)
10117 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10118 (linux_tracefork_grandchild, linux_test_for_tracefork)
10119 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10120 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10121 where the argument is 0.
10122
60f662b0
YQ
101232013-01-25 Yao Qi <yao@codesourcery.com>
10124
10125 * event-loop.c: Include "queue.h".
10126 (gdb_event_p): New typedef.
10127 (struct gdb_event) <next_event>: Remove.
10128 (event_queue): Change to QUEUE(gdb_event_p).
10129 (async_queue_event): Remove.
10130 (gdb_event_xfree): New.
10131 (initialize_event_loop): New.
10132 (process_event): Use API from QUEUE.
10133 (wait_for_event): Likewise.
10134 * server.c (main): Call initialize_event_loop.
10135 * server.h (initialize_event_loop): Declare.
10136
5ae4861a
YQ
101372013-01-18 Yao Qi <yao@codesourcery.com>
10138
10139 * ax.h (struct eval_agent_expr_context): New.
10140 (gdb_eval_agent_expr): Update declaration.
10141 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10142 TFRAME. Add new argument CTX.
10143 * server.h (struct eval_agent_expr_context): Declare.
10144 (agent_mem_read, agent_tsv_read): Update declaration.
10145 (agent_mem_read_string): Likewise.
10146 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10147 (add_traceframe_block): Add new argument TPOINT.
10148 Increase TPOINT->traceframe_usage.
10149 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10150 eval_tracepoint_agent_expr.
10151 (condition_true_at_tracepoint): Likewise.
10152 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10153 (agent_mem_read_string, agent_tsv_read): Likewise.
10154
85e00e85
YQ
101552013-01-16 Yao Qi <yao@codesourcery.com>
10156
10157 * linux-low.c (linux_resume_one_lwp): Don't check
10158 'lwp->bp_reinsert != 0'.
10159
4039cf45
JB
101602013-01-07 Joel Brobecker <brobecker@adacore.com>
10161 Pedro Alves <palves@redhat.com>
10162
10163 * lynx-low.c (ptrace_request_to_str): Define a temporary
10164 macro and use it to simplify this function's implementation.
10165
9044dee2
JB
101662013-01-07 Joel Brobecker <brobecker@adacore.com>
10167
10168 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10169 sets errno.
10170
e6352c8f
JB
101712013-01-07 Joel Brobecker <brobecker@adacore.com>
10172
10173 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10174
50681a27
JB
101752013-01-07 Joel Brobecker <brobecker@adacore.com>
10176
10177 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10178
3f6e77ef
JB
101792013-01-07 Joel Brobecker <brobecker@adacore.com>
10180
10181 * lynx-low.c (lynx_resume): Use the resume_info parameter
10182 to determine the ptid for the lynx_ptrace call, unless
10183 it is equal to minus_one_ptid, in which case we use the
10184 ptid of the current_inferior.
10185 (lynx_wait_1): After having received a thread create/exit
10186 event, resume the inferior's execution using the signaling
10187 thread's ptid, rather than the old ptid.
10188
7fda33ae
JB
101892013-01-07 Joel Brobecker <brobecker@adacore.com>
10190
10191 * lynx-low.c (lynx_resume): Delete variable ret.
10192
b9786c74
JB
101932013-01-01 Joel Brobecker <brobecker@adacore.com>
10194
10195 * gdbreplay.c (gdbreplay_version): Update copyright year.
10196 * server.c (gdbserver_version): Likewise.
10197
8b93d60f
JB
101982012-12-17 Joel Brobecker <brobecker@adacore.com>
10199
10200 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10201 new thread.
10202
037335a7
JB
102032012-12-17 Joel Brobecker <brobecker@adacore.com>
10204
10205 * lynx-low.c (ptrace_request_to_str): Add handling for
10206 PTRACE_GETTRACESIG.
10207
52d4cbd8
JB
102082012-12-17 Joel Brobecker <brobecker@adacore.com>
10209
10210 * lynx-low.c (lynx_attach): Delete variable new_process.
10211
ab8f6ca9
JB
102122012-12-17 Joel Brobecker <brobecker@adacore.com>
10213
10214 * lynx-low.c (lynx_create_inferior): Delete variable
10215 new_process.
10216
78cbc024
JB
102172012-12-17 Joel Brobecker <brobecker@adacore.com>
10218
10219 * lynx-low.c (ptrace_request_to_str): Do not handle
10220 PTRACE_GETTHREADLIST if this macro does not exist.
10221
14a00470
YQ
102222012-12-15 Yao Qi <yao@codesourcery.com>
10223
10224 * Makefile.in (OBS): Add notif.o.
10225 * notif.c, notif.h: New.
10226 * server.c: Include "notif.h".
10227 (struct vstop_notif) <next>: Remove.
10228 <base>: New field.
10229 (queue_stop_reply): Update.
10230 (push_event, send_next_stop_reply): Remove.
10231 (discard_queued_stop_replies): Update.
10232 (notif_stop): New variable.
10233 (handle_v_stopped): Remove.
10234 (handle_v_requests): Don't call handle_v_stopped. Call
10235 handle_ack_notif instead.
10236 (queue_stop_reply_callback): Call notif_event_enque instead
10237 of queue_stop_reply.
10238 (handle_status): Don't call send_next_stop_reply, call
10239 notif_write_event instead.
10240 (kill_inferior_callback): Likewise.
10241 (detach_or_kill_inferior_callback): Likewise.
10242 (main): Call initialize_notif.
10243 (process_serial_event): Call QUEUE_is_empty.
10244 (handle_target_event): Call notif_push instead of push event.
10245 * server.h (push_event): Remove declaration.
10246
61c125b9
TT
102472012-12-10 Tom Tromey <tromey@redhat.com>
10248
10249 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10250 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10251 macros.
10252 (.c.o): Rewrite.
10253 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10254 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10255 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10256 (amd64-linux-ipa.o, ax.o): Rewrite.
10257 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10258 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10259 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10260 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10261 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10262 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10263 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10264 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10265 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10266 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10267 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10268 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10269 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10270 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10271 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10272 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10273 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10274 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10275 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10276 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10277 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10278 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10279 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10280 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10281 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10282 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10283 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10284 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10285 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10286 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10287 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10288 (reg-tilegx.o): Remove.
10289 (all_object_files): New macro.
10290 Include .deps files.
10291 * aclocal.m4, configure: Rebuild.
10292 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10293 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10294 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10295
e90e9ad9
TT
102962012-12-05 Tom Tromey <tromey@redhat.com>
10297
10298 PR gdb/14917:
10299 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10300
02d403bf 103012012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10302
10303 * configure.ac: Check for linux/perf_event.h.
10304 * config.in: Regenerated.
10305 * configure: Regenerated.
10306
0270a750
PA
103072012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10308
10309 * hostio.c (handle_readlink): Decrease buffer size
10310 parameter passed to readlink by one byte.
10311
8c29b58e
YQ
103122012-11-26 Yao Qi <yao@codesourcery.com>
10313
10314 * configure.ac (build_warnings): Append '-Wempty-body'.
10315 * configure: Regenerated.
10316 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10317 body.
10318
8bdce1ff
PM
103192012-11-15 Pierre Muller <muller@sourceware.org>
10320
10321 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10322 * config.in: Regenerate.
10323 * configure: Regenerate.
10324 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10325 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10326 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10327 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10328 header.
10329 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10330 instead of <sys/wait.h> header.
10331 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10332
02d403bf 103332012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10334
10335 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10336 (various make rules): Remove -DGDBSERVER
10337
fbd5db48
YQ
103382012-11-09 Yao Qi <yao@codesourcery.com>
10339
10340 * spu-low.c (current_ptid): Move it to ..
10341 * gdbthread.h: ... here. New.
10342 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10343 * server.c (myresume, process_serial_event): Likewise.
10344 * thread-db.c (thread_db_find_new_threads): Likewise.
10345 * tracepoint.c (run_inferior_command): Likewise.
10346
b3dc46ff
AB
103472012-10-01 Andrew Burgess <aburgess@broadcom.com>
10348
10349 * server.c (handle_search_memory_1): Include access length in
10350 warning message.
10351
07c04788
HPN
103522012-09-05 Michael Brandt <michael.brandt@axis.com>
10353
10354 * linux-crisv32-low.c: Fix compile errors.
10355
918d227b
YQ
103562012-09-04 Yao Qi <yao@codesourcery.com>
10357
10358 * tracepoint.c (cmd_qtsv): Adjust debug message.
10359 Don't check CUR_TPOINT.
10360
18c1b81a
YQ
103612012-08-28 Yao Qi <yao@codesourcery.com>
10362
10363 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10364 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10365 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10366 Remove declarations of xmalloc, xreallloc, xstrdup and
10367 freeargv.
10368 * Makefile.in (libiberty_h): New.
10369 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10370 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10371
dc82f37b
YQ
103722012-08-23 Yao Qi <yao@codesourcery.com>
10373
10374 * server.h: Remove declaration of 'xsnprintf'.
10375
406b1477
KS
103762012-08-22 Keith Seitz <keiths@redhat.com>
10377
10378 * server.h: Include build-gnulib-gbserver/config.h.
10379 * gdbreplay.c: Likewise.
10380
e6712ff1
DE
103812012-08-08 Doug Evans <dje@google.com>
10382
10383 * Makefile.in (SFILES): Add gdb_vecs.c.
10384 (OBS): Add gdb_vecs.o.
10385 (gdb_vecs_h, host_defs_h): New variables.
10386 (thread-db.o): Add $(gdb_vecs_h) dependency.
10387 (gdb_vecs.o): New rule.
10388 * thread-db.c: #include "gdb_vecs.h".
10389 (thread_db_load_search): Use a vector to iterate over path elements.
10390 Handle text appearing after "$pdir".
10391
10392 * configure.ac: Add check for strstr.
10393 * config.in: Regenerate.
10394 * configure: Regenerate.
10395
7c3270ae
UW
103962012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10397
10398 * hostio.c (handle_pread): If pread fails, fall back to attempting
10399 lseek/read.
10400 (handle_pwrite): Likewise for pwrite.
10401
b62e2b27
UW
104022012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10403
10404 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10405 between unsupported TYPE and unimplementable ADDR/LEN combination.
10406 (arm_insert_point): Act on new return value.
10407
78a99e91
PA
104082012-07-31 Pedro Alves <palves@redhat.com>
10409
10410 * server.c (process_point_options): Only skip tokens if we find
10411 one that is unrecognized. Don't treat 'X' specially while
10412 skipping unrecognized tokens.
10413
fcf303ab
UW
104142012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10415
10416 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10417 to 4-byte-align HW breakpoint addresses for Thumb.
10418
7255706c
YQ
104192012-07-27 Yao Qi <yao@codesourcery.com>
10420
10421 PR remote/14161.
10422
10423 * server.h: Declare gdb_agent_about_to_close.
10424 * target.c (kill_inferior): Include "agent.h".
10425 New. Send command 'kill'.
10426 * target.h (kill_inferior): Removed macro.
10427 * tracepoint.c (gdb_agent_about_to_close): New.
10428 (gdb_agent_helper_thread): Handle command 'close'.
10429 Wait endlessly until the inferior stops.
10430 Install gdb_agent_remove_socket to atexit hook.
10431 (agent_socket_name): New static variable.
10432 (gdb_agent_socket_init): Replace local variable 'name' with
10433 'agent_socket_name'.
10434 (gdb_agent_remove_socket): New.
10435
5a3f286f
YQ
104362012-07-27 Yao Qi <yao@codesourcery.com>
10437
10438 * server.c (process_point_options): Stop at 'X' when parsing.
10439
961bd387
ME
104402012-07-19 Michael Eager <eager@eagercon.com>
10441
a261b8f5 10442 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10443 to hw_execute.
10444 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10445 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10446 hardware breakpoint.
10447
aa7c7447
JK
104482012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10449
10450 * gdbserver/linux-low.c (initialize_low): Call
10451 linux_ptrace_init_warnings.
10452
7f216e7c
DE
104532012-07-02 Doug Evans <dje@google.com>
10454
10455 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10456 pointer to int.
10457
d3ce09f5
SS
104582012-07-02 Stan Shebs <stan@codesourcery.com>
10459
10460 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10461 (ax.o): Add it to build rule.
10462 (ax-ipa.o): Ditto.
10463 (OBS): Add format.o.
10464 (IPA_OBS): Add format.o.
10465 * server.c (handle_query): Claim support for breakpoint commands.
10466 (process_point_options): Add command case.
10467 (process_serial_event): Leave running if there are printfs in
10468 effect.
10469 * mem-break.h (any_persistent_commands): Declare.
10470 (add_breakpoint_commands): Declare.
10471 (gdb_no_commands_at_breakpoint): Declare.
10472 (run_breakpoint_commands): Declare.
10473 * mem-break.c (struct point_command_list): New struct.
10474 (struct breakpoint): New field command_list.
10475 (any_persistent_commands): New function.
10476 (add_commands_to_breakpoint): New function.
10477 (add_breakpoint_commands): New function.
10478 (gdb_no_commands_at_breakpoint): New function.
10479 (run_breakpoint_commands): New function.
10480 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10481 locally.
10482 * ax.c: Include format.h.
10483 (ax_printf): New function.
10484 (gdb_eval_agent_expr): Add printf opcode.
10485
2f8f6aed
YQ
104862012-06-13 Yao Qi <yao@codesourcery.com>
10487
10488 * server.c (start_inferior): Remove duplicated writes to fields
10489 'last_resume_kind' and 'last_status' of 'current_inferior'.
10490
0c9070b3
YQ
104912012-06-12 Yao Qi <yao@codesourcery.com>
10492 Pedro Alves <palves@redhat.com>
10493
10494 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10495 comment.
10496 * server.c (handle_v_cont): Extend comment.
10497
c52daf70
YQ
104982012-06-11 Yao Qi <yao@codesourcery.com>
10499
10500 * linux-low.c (linux_attach): Add 'static'.
10501
d38bbb0a
YQ
105022012-06-06 Yao Qi <yao@codesourcery.com>
10503
10504 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10505
89dc0afd
JK
105062012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10507
10508 Fix gcc -flto compilation warning.
10509 * server.c (main): Make variable multi_mode and attach volatile.
10510
75f62ce7
TJB
105112012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10512
10513 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10514 if the platform doesn't know about it.
10515
65f479b6
PA
105162012-05-30 Jeff Kenton <jkenton@tilera.com>
10517
10518 * Makefile.in (SFILES): Add linux-tile-low.c.
10519 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10520 * configure.srv: Handle tilegx-*-linux*.
10521 * linux-tile-low.c: New file.
10522
0c5bf5a9
JK
105232012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10524
10525 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10526
a493e3e2
PA
105272012-05-24 Pedro Alves <palves@redhat.com>
10528
10529 PR gdb/7205
10530
43aaf8b6 10531 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10532
2ea28649
PA
105332012-05-24 Pedro Alves <palves@redhat.com>
10534
10535 PR gdb/7205
10536
10537 Replace target_signal with gdb_signal throughout.
10538
8d409d16
MR
105392012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10540
10541 * linux-low.c (linux_store_registers): Avoid the copying sequence
10542 when no data has been retrieved by ptrace.
10543
23512c01
MGD
105442012-05-22 Will Deacon <will.deacon@arm.com>
10545
10546 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10547 Include asm/ptrace.h.
10548 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10549 already defined.
10550
4934b29e
MR
105512012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10552
10553 * linux-low.c (linux_store_registers): Don't re-retrieve data
10554 with ptrace that has already been obtained from /proc. Always
10555 copy any data retrieved with ptrace to the buffer supplied.
10556
bde24c0a
PA
105572012-05-11 Yao Qi <yao@codesourcery.com>
10558 Pedro Alves <palves@redhat.com>
10559
10560 * linux-low.c (enum stopping_threads_kind): New.
10561 (stopping_threads): Change type to `enum stopping_threads_kind'.
10562 (handle_extended_wait): If stopping and suspending threads, leave
10563 the new_lwp suspended too.
10564 (linux_wait_for_event): Adjust.
10565 (stop_all_lwps): Set `stopping_threads' to
10566 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10567 whether we're suspending threads or just stopping them. Assert no
10568 recursion happens.
10569
623b6bdf
YQ
105702012-04-29 Yao Qi <yao@codesourcery.com>
10571
10572 * server.h: Move some code to ...
10573 * gdbthread.h: ... here. New.
10574 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10575 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10576 (nto-low.o, win32-low.o): Likewise.
10577 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10578 * regcache.c, remote-utils.c, server.c: Likewise.
10579 * target.c, tracepoint.c, win32-low.c: Likewise.
10580
f15f9948
TJB
105812012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10582
10583 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10584 (PTRACE_ARG4_TYPE): Likewise.
10585 (PTRACE_XFER_TYPE): Likewise.
10586 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10587 ptrace to PTRACE_ARG3_TYPE.
10588 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10589 (PTRACE_ARG4_TYPE): Likewise.
10590 (PTRACE_XFER_TYPE): Likewise.
10591 (linux_detach_one_lwp): Cast fourth argument of
10592 ptrace to long then PTRACE_ARG4_TYPE.
10593 (regsets_fetch_inferior_registers): Cast third argument of
10594 ptrace to long then PTRACE_ARG3_TYPE.
10595 (regsets_store_inferior_registers): Likewise.
10596
38ea300a
PA
105972012-04-20 Pedro Alves <palves@redhat.com>
10598
10599 * configure: Regenerate.
10600
c971b7fa
PA
106012012-04-19 Pedro Alves <palves@redhat.com>
10602
43aaf8b6 10603 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10604 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10605 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10606 (all, install-only, uninstall, clean-info, all-lib, clean): No
10607 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10608 (maintainer-clean realclean distclean): Use subdir_do.
10609 (subdir_do): New.
10610 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10611 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10612 * acinclude.m4: Include acx_configure_dir.m4.
10613 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10614 calls. Call AC_PROG_RANLIB. Configure gnulib using
10615 ACX_CONFIGURE_DIR.
10616 (GNULIB): New.
10617 (GNULIB_STDINT_H): Adjust.
10618 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10619 * gdbreplay.c: Include build-gnulib/config.h.
10620 * server.h: Likewise.
10621 * aclocal.m4: Regenerate.
10622 * config.in: Regenerate.
10623 * configure: Regenerate.
c971b7fa 10624
809277f8
PA
106252012-04-19 Pedro Alves <palves@redhat.com>
10626
10627 * Makefile.in (LIBGNU, INCGNU): Adjust.
10628 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10629 (all, install-only, uninstall, clean-info, all-lib, clean)
10630 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10631 * configure.ac: Adjust AC_OUTPUT output.
10632 * aclocal.m4: Regenerate.
10633 * configure: Regenerate.
10634
fd9bb8b8
PA
106352012-04-19 Pedro Alves <palves@redhat.com>
10636
10637 * Makefile.in (generated_files): New.
10638 (server_h): Remove the explicit dependency on config.h, and depend
10639 on $generated_files.
10640
1c298c66
PA
106412012-04-19 Pedro Alves <palves@redhat.com>
10642
10643 * Makefile.in (INCGNU): Add -Ignulib.
10644
57c4b50b
PA
106452012-04-19 Pedro Alves <palves@redhat.com>
10646
10647 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10648 (INCGNU): ... this, and spell out -I here.
10649 (GNULIB_LIB): Rename to ...
10650 (LIBGNU): ... this.
10651 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10652
1030e047
PA
106532012-04-19 Pedro Alves <palves@redhat.com>
10654
10655 * config.in: Regenerate.
10656
447d4319
PA
106572012-04-19 Pedro Alves <palves@redhat.com>
10658
10659 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10660 * server.h (memmem): Remove declaration.
10661 * config.in: Regenerate.
10662 * configure: Regenerate.
10663
aad9eab9
YQ
106642012-04-19 Yao Qi <yao@codesourcery.com>
10665
10666 * Makefile.in (SFILES): Add common/vec.c.
10667 (OBS): Add vec.o.
10668 (vec.o): New rule.
10669
3e10640f
YQ
106702012-04-19 Yao Qi <yao@codesourcery.com>
10671
10672 * remote-utils.c (prepare_resume_reply): Replace with macro
10673 target_core_of_thread.
10674 * server.c (handle_qxfer_threads_proper): Likewise.
10675 * target.h (traget_core_of_thread): New macro.
10676
71622373
PA
106772012-04-18 Pedro Alves <palves@redhat.com>
10678
10679 * aclocal.m4: Regenerate.
10680 * configure: Regenerate.
10681
80d26939
YQ
106822012-04-16 Yao Qi <yao@codesourcery.com>
10683
10684 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10685 duplicated on address.
10686
42476b70
YQ
106872012-04-16 Yao Qi <yao@codesourcery.com>
10688
10689 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10690 (struct tracepoint_action_ops) <send>: New field.
10691 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10692 (agent_expr_send, x_tracepoint_action_send): New.
10693 (l_tracepoint_action_send): New.
10694 (cmd_qtdp): Download and install tracepoint
10695 according to `use_agent'.
10696 (run_inferior_command): Add one more parameter `len'.
10697 Update callers.
10698 (tracepoint_send_agent): New.
10699 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10700
7bc83639
YQ
107012012-04-16 Yao Qi <yao@codesourcery.com>
10702
10703 * tracepoint.c (download_tracepoints): Moved to ...
10704 (cmd_qtstart): ... here.
10705
5f18041e
YQ
107062012-04-14 Yao Qi <yao@codesourcery.com>
10707
10708 * tracepoint.c: Include inttypes.h.
10709 (struct collect_memory_action): Use sized types.
10710 (struct tracepoint): Likewise.
10711 (cmd_qtdp, stop_tracing): Update print specifiers.
10712 (cmd_qtp, response_tracepoint): Likewise.
10713 (collect_data_at_tracepoint): Likewise.
10714 (collect_data_at_step): Likewise.
10715
55a8c076
YQ
107162012-04-14 Yao Qi <yao@codesourcery.com>
10717
10718 Import gnulib module inttypes.
10719 * aclocal.m4, config.in, configure: Regenerated.
10720
dc750257
YQ
107212012-04-14 Yao Qi <yao@codesourcery.com>
10722
10723 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10724 Makefile and config.status at last.
10725
0ab5faf9
YQ
107262012-04-13 Yao Qi <yao@codesourcery.com>
10727
10728 * tracepoint.c: Include stdint.h unconditionally.
10729
18f5fd81
TJB
107302012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10731
10732 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10733 on BFD_HAVE_SYS_PROCFS_TYPE.
10734 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10735 * configure: Regenerate.
10736 * config.in: Likewise.
10737
4d47af5c
L
107382012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10739
10740 * Makefile.in (clean): Also remove x32.c x32-linux.c
10741 x32-avx.c x32-avx-linux.c.
10742 (x32.o): New target.
10743 (x32.c): Likewise.
10744 (x32-linux.o): Likewise.
10745 (x32-linux.c): Likewise.
10746 (x32-avx.o): Likewise.
10747 (x32-avx.c): Likewise.
10748 (x32-avx-linux.o): Likewise.
10749 (x32-avx-linux.c): Likewise.
10750
10751 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10752 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10753 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10754 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10755 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10756 i386/x32-avx-linux.xml.
10757
10758 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10759 (init_registers_x32_avx_linux): Likwise.
10760 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10761 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10762
ecedbe58
PA
107632012-04-13 Pedro Alves <palves@redhat.com>
10764
10765 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10766 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10767 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10768 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10769 the sub-make.
10770
c92b5177
L
107712012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10772
10773 * linux-x86-low.c (compat_x32_clock_t): New.
10774 (compat_x32_siginfo_t): Likewise.
10775 (compat_x32_siginfo_from_siginfo): Likewise.
10776 (siginfo_from_compat_x32_siginfo): Likewise.
10777 (linux_is_elf64): Likewise.
10778 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10779 and siginfo_from_compat_x32_siginfo for x32.
10780 (x86_arch_setup): Set linux_is_elf64.
10781
214d508e
L
107822012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10783
10784 PR gdb/13969
10785 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10786 e_machine field.
10787 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10788 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10789 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10790 compatible with process.
10791
c9a1864a
YQ
107922012-04-12 Yao Qi <yao@codesourcery.com>
10793
10794 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10795 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10796 (install-only, install-info, clean): Handle sub dir gnulib.
10797 (all-lib, am--refresh): New targets.
10798 (memmem.o): Remove target.
10799 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10800 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10801 (AC_REPLACE_FUNCS): Remove memmem.
10802 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10803 (AC_OUTPUT): Generate Makefile in gnulib/.
10804 * aclocal.m4, config.in, configure: Regenerated.
10805
367ba2c2
MR
108062012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10807
10808 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10809
9d236627
PA
108102012-04-05 Pedro Alves <palves@redhat.com>
10811
10812 -Werror=strict-aliasing
10813
10814 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10815 pointer.
10816
111217b3
PA
108172012-04-04 Pedro Alves <palves@redhat.com>
10818
10819 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10820 (sparc_store_gregset_from_stack, sparc_store_gregset)
10821 (sparc_breakpoint_at): Fix formatting.
10822
8365dcf5
TJB
108232012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10824
10825 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10826 are available.
10827 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10828 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10829 * config.in: Regenerate.
10830 * configure: Likewise.
10831
689cc2ae
PA
108322012-03-29 Pedro Alves <palves@redhat.com>
10833
10834 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10835 Correct ptrace arguments.
10836
c14dfd32
PA
108372012-03-28 Pedro Alves <palves@redhat.com>
10838
10839 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10840 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10841 (IA64_FR1_REGNUM): New defines.
10842 (ia64_fetch_register): New.
10843 (the_low_target): Install it.
10844 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10845 field.
10846 * linux-low.c (linux_fetch_registers): Try the
10847 the_low_target.fetch_register hook first.
10848
10849 * linux-arm-low.c (the_low_target): Adjust.
10850 * linux-bfin-low.c (the_low_target): Adjust.
10851 * linux-cris-low.c (the_low_target): Adjust.
10852 * linux-crisv32-low.c (the_low_target): Adjust.
10853 * linux-m32r-low.c (the_low_target): Adjust.
10854 * linux-m68k-low.c (the_low_target): Adjust.
10855 * linux-mips-low.c (the_low_target): Adjust.
10856 * linux-ppc-low.c (the_low_target): Adjust.
10857 * linux-s390-low.c (the_low_target): Adjust.
10858 * linux-sh-low.c (the_low_target): Adjust.
10859 * linux-sparc-low.c (the_low_target): Adjust.
10860 * linux-tic6x-low.c (the_low_target): Adjust.
10861 * linux-x86-low.c (the_low_target): Adjust.
10862 * linux-xtensa-low.c (the_low_target): Adjust.
10863
63c88e13
PA
108642012-03-26 Pedro Alves <palves@redhat.com>
10865
10866 * server.c (handle_qxfer_libraries): Don't bail early if
10867 the_target->qxfer_libraries_svr4 is not NULL.
10868
fb723180
PA
108692012-03-26 Pedro Alves <palves@redhat.com>
10870
10871 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10872
0afae3cf
PA
108732012-03-23 Pedro Alves <palves@redhat.com>
10874
10875 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10876 "library-list-svr4" element's start tag when the the DSO list is
10877 empty.
10878
485f1ee4
PA
108792012-03-23 Pedro Alves <palves@redhat.com>
10880
10881 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10882 a variable whose type size is the same as the inferior's pointer
10883 size.
10884
a5362b9a
TS
108852012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10886
10887 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10888 struct siginfo.
10889 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10890 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10891 * linux-low.h: Include <signal.h>.
10892 (struct siginfo): Remove forward declaration.
10893 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10894 struct siginfo.
10895
d226c142
MF
108962012-03-21 Mike Frysinger <vapier@gentoo.org>
10897
10898 * .gitignore: Ignore more files.
10899
122f36ef
PA
109002012-03-19 Pedro Alves <palves@redhat.com>
10901 Jan Kratochvil <jan.kratochvil@redhat.com>
10902
10903 * server.c (cont_thread, general_thread): Add describing comments.
10904 (start_inferior): Clear `cont_thread'.
10905 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10906 of a process.
10907
fc3e5175
YQ
109082012-03-15 Yao Qi <yao@codesourcery.com>
10909
10910 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10911 handling to ...
10912 (cmd_qtdp): ... here.
10913
8d0d92cd
YQ
109142012-03-15 Yao Qi <yao@codesourcery.com>
10915
10916 * tracepoint.c (struct tracepoint_action_ops): New.
10917 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10918 (m_tracepoint_action_download): New.
10919 (r_tracepoint_action_download): New.
10920 (x_tracepoint_action_download): New.
10921 (l_tracepoint_action_download): New.
10922 (add_tracepoint_action): Install `action->ops' according type.
10923 (download_tracepoint_1): Move code `download' function pointer
10924 of various tracepoint_action_ops.
10925
87b0bb13
JK
109262012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10927
10928 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10929 linux_ptrace_attach_warnings.
10930
5f572dec
JK
109312012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10932
10933 * Makefile.in (linux-ptrace.o): New.
10934 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10935 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10936 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10937 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10938 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10939 of these targets.
10940 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10941
f4647387
YQ
109422012-03-08 Yao Qi <yao@codesourcery.com>
10943 Pedro Alves <palves@redhat.com>
10944
10945 Fix PR server/13392.
10946 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10947 offset of JMP insn.
10948 * tracepoint.c (remove_tracepoint): New.
10949 (cmd_qtdp): Call remove_tracepoint when failed to install.
10950
9b224c5e
PA
109512012-03-07 Pedro Alves <palves@redhat.com>
10952
10953 * linux-low.c (get_detach_signal): New.
10954 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10955 Pass on pending signals to PTRACE_DETACH. Check the result of the
10956 ptrace call.
10957 * server.c (program_signals, program_signals_p): New.
10958 (handle_general_set): Handle QProgramSignals.
10959 * server.h (program_signals, program_signals_p): Declare.
10960
e237a7e2
JK
109612012-03-05 Pedro Alves <palves@redhat.com>
10962 Jan Kratochvil <jan.kratochvil@redhat.com>
10963
10964 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10965 New comment why.
10966
5808517f
YQ
109672012-03-03 Yao Qi <yao@codesourcery.com>
10968
10969 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10970 agent_look_up_symbols.
10971
58b4daa5
YQ
109722012-03-03 Yao Qi <yao@codesourcery.com>
10973
10974 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10975 (linux-x86-low.o): Likewise.
10976 * server.h: Remove in_process_agent_loaded.
10977 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10978 common/agent.c.
10979 Update callers.
10980
8ffcbaaf
YQ
109812012-03-03 Yao Qi <yao@codesourcery.com>
10982
10983 * tracepoint.c (gdb_agent_capability): New global.
10984 (in_process_agent_loaded_ust): Renamed to
10985 `in_process_agent_supports_ust'.
10986 Update callers.
10987 (in_process_agent_supports_ust): Call agent_capability_check.
10988 (clear_installed_tracepoints): Assert that agent supports
10989 agent.
10990
d1feda86
YQ
109912012-03-03 Yao Qi <yao@codesourcery.com>
10992
10993 * linux-low.c (linux_supports_agent): New.
10994 (linux_target_ops): Initialize field `supports_agent' with
10995 linux_supports_agent.
10996 * target.h (struct target_ops) <supports_agent>: New.
10997 (target_supports_agent): New macro.
10998 * server.c (handle_general_set): Handle packet 'QAgent'.
10999 (handle_query): Send `QAgent+'.
11000 * Makefile.in (server.o): Depends on agent.h.
11001
2fa291ac
YQ
110022012-03-03 Yao Qi <yao@codesourcery.com>
11003
11004 * Makefile.in (OBS): Add agent.o.
11005 Add new rule for agent.o.
11006 Track dependence of tracepoint.c on agent.h.
11007 * tracepoint.c (run_inferior_command_1):
11008 (run_inferior_command): Call agent_run_command.
11009 (gdb_ust_connect_sync_socket): Deleted. Move it to
11010 common/agent.c.
11011 (resume_thread, stop_thread): Likewise.
11012 (gdb_ust_socket_init): Renamed to ...
11013 (gdb_agent_socket_init): ... New.
11014 (gdb_ust_thread): Renamed to ...
11015 (gdb_agent_helper_thread): ... New.
11016 (gdb_ust_init): Move some code to ...
11017 (gdb_agent_init): ... here. New.
11018 [HAVE_UST]: Call gdb_ust_init.
11019 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11020 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11021 * config.in, configure: Regenerated.
11022
05044653
PA
110232012-03-02 Pedro Alves <palves@redhat.com>
11024
11025 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11026 * linux-low.c (struct simple_pid_list): New.
11027 (stopped_pids): New a struct simple_pid_list pointer.
11028 (add_to_pid_list, pull_pid_from_list): New.
11029 (handle_extended_wait): Don't assume the first signal new children
11030 report is SIGSTOP. Adjust call to pull_pid_from_list.
11031 (linux_wait_for_lwp): Adjust.
11032
8d00225b
YQ
110332012-03-02 Yao Qi <yao@codesourcery.com>
11034
11035 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11036 debug log.
11037
19560ba5
YQ
110382012-03-02 Yao Qi <yao@codesourcery.com>
11039
11040 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11041 `stop_pc' and `tpoint'. Update caller.
11042
1faeff08
MR
110432012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11044
11045 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11046 * linux-low.c (use_linux_regsets): New macro.
11047 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11048 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11049 (linux_register_in_regsets): New function.
11050 (usr_fetch_inferior_registers): Skip registers covered by
11051 regsets.
11052 (usr_store_inferior_registers): Likewise.
11053 (usr_fetch_inferior_registers): New macro.
11054 (usr_store_inferior_registers): Likewise.
11055 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11056 (linux_store_registers): Likewise.
11057 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11058 prototype.
11059 (init_registers_mips64_dsp_linux): Likewise.
11060 (init_registers_mips_linux): New macro.
11061 (init_registers_mips_dsp_linux): Likewise.
11062 (mips_dsp_num_regs): Likewise.
11063 (DSP_BASE, DSP_CONTROL): New fallback macros.
11064 (mips_base_regs): New macro.
11065 (mips_regmap): Use it. Fix the size.
11066 (mips_dsp_regmap): New variable.
11067 (mips_dsp_regset_bitmap): Likewise.
11068 (mips_arch_setup): New function.
11069 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11070 than mips_regmap.
11071 (mips_cannot_store_register): Likewise.
11072 (the_low_target): Update .arch_setup, .num_regs and .regmap
11073 initializers. Add .regset_bitmap initializer.
11074 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11075 initializer.
11076 * linux-bfin-low.c (the_low_target): Likewise.
11077 * linux-cris-low.c (the_low_target): Likewise.
11078 * linux-crisv32-low.c (the_low_target): Likewise.
11079 * linux-ia64-low.c (the_low_target): Likewise.
11080 * linux-m32r-low.c (the_low_target): Likewise.
11081 * linux-m68k-low.c (the_low_target): Likewise.
11082 * linux-ppc-low.c (the_low_target): Likewise.
11083 * linux-s390-low.c (the_low_target): Likewise.
11084 * linux-sh-low.c (the_low_target): Likewise.
11085 * linux-sparc-low.c (the_low_target): Likewise.
11086 * linux-tic6x-low.c (the_low_target): Likewise.
11087 * linux-x86-low.c (the_low_target): Likewise.
11088 * linux-xtensa-low.c (the_low_target): Likewise.
11089 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11090 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11091 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11092 srv_xmlfiles.
11093 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11094 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11095
c03e6ccc
YQ
110962012-02-29 Yao Qi <yao@codesourcery.com>
11097 Pedro Alves <palves@redhat.com>
11098
11099 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11100 `step_over_finished' is true.
11101
644cebc9
PA
111022012-02-27 Pedro Alves <palves@redhat.com>
11103
11104 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11105 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11106
c14d7ab2
PA
111072012-02-27 Pedro Alves <palves@redhat.com>
11108
11109 PR server/9684
11110 * linux-low.c (pid_is_stopped): New.
11111 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11112
412c89dd
LM
111132012-02-25 Luis Machado <lgustavo@codesourcery.com>
11114
11115 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11116 of conditions.
11117
b745defe
MR
111182012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11119
11120 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11121
9f3a5c85
LM
111222012-02-24 Luis Machado <lgustavo@codesourcery>
11123
11124 * server.c (handle_query): Advertise support for target-side
11125 breakpoint condition evaluation.
11126 (process_point_options): New function.
11127 (process_serial_event): When inserting a breakpoint, check for
11128 a target-side condition that should be evaluated.
11129
11130 * mem-break.c: Include regcache.h and ax.h.
11131 (point_cond_list_t): New data structure.
11132 (breakpoint) <cond_list>: New field.
11133 (find_gdb_breakpoint_at): Make non-static.
11134 (delete_gdb_breakpoint_at): Clear any target-side
11135 conditions.
11136 (clear_gdb_breakpoint_conditions): New function.
11137 (add_condition_to_breakpoint): Likewise.
11138 (add_breakpoint_condition): Likewise.
11139 (gdb_condition_true_at_breakpoint): Likewise.
11140 (gdb_breakpoint_here): Return result directly instead
11141 of going through a local variable.
11142
11143 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11144 (clear_gdb_breakpoint_conditions): Likewise.
11145 (add_breakpoint_condition): Likewise.
11146 (gdb_condition_true_at_breakpoint): Likewise.
11147
11148 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11149 (need_step_over_p): Take target-side breakpoint condition into
11150 consideration.
11151
5e1dc496
LM
111522012-02-24 Luis Machado <lgustavo@codesourcery>
11153
11154 * server.h: Include tracepoint.h.
11155 (agent_mem_read, agent_get_trace_state_variable_value,
11156 agent_set_trace_state_variable_value,
11157 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11158 get_set_tsv_func_addr): New prototypes.
11159
11160 * ax.h: New include file.
11161 * ax.c: New source file.
11162
11163 * tracepoint.c: Include ax.h.
11164 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11165 agent_expr, eval_result_type): Move to ax.h.
11166 (parse_agent_expr): Rename to ...
11167 (gdb_parse_agent_expr): ... this, make it non-static and move
11168 to ax.h.
11169 (unparse_agent_expr) Rename to ...
11170 (gdb_unparse_agent_expr): ... this, make it non-static and move
11171 to ax.h.
11172 (eval_agent_expr): Rename to ...
11173 (eval_tracepoint_agent_expr): ... this.
11174 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11175 forward declarations.
11176 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11177 (agent_get_trace_state_variable_value): New function.
11178 (agent_set_trace_state_variable_value): New function.
11179 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11180 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11181 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11182 (condition_true_at_tracepoint): Likewise.
11183 (parse_agent_expr): Rename to ...
11184 (gdb_parse_agent_expr): ... this and move to ax.c.
11185 (unparse_agent_expr): Rename to ...
11186 (gdb_unparse_agent_expr): ... this and move to ax.c.
11187 (gdb_agent_op_name): Move to ax.c.
11188 (eval_agent_expr): Rename to ...
11189 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11190 and move to ax.c.
11191 (eval_tracepoint_agent_expr): New function.
11192 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11193 non-static.
5e1dc496
LM
11194 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11195 ax.c.
11196 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11197 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11198 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11199 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11200 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11201 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11202 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11203 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11204 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11205 (compile_bytecodes): Remove forward declaration.
11206 (is_goto_target): Move to ax.c.
11207 (compile_bytecodes): Move to ax.c and call
11208 agent_get_trace_state_variable_value (...) and
11209 agent_set_trace_state_variable_value (...).
11210
11211 * Makefile.in: Update ax.c and IPA dependencies.
11212
277e4e52
PA
112132012-02-24 Pedro Alves <palves@redhat.com>
11214
11215 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11216 (cmd_bigqtbuffer_circular): ... this. Only handle
11217 'QTBuffer:circular:'.
11218 (handle_tracepoint_general_set): Adjust.
11219
bf4c19f7
YQ
112202012-02-16 Yao Qi <yao@codesourcery.com>
11221
11222 * inferiors.c: Move code to ...
11223 * dll.c: .... here. New.
11224 * server.h: Declare clear_dlls.
11225 * Makefile.in (SFILES): Add dll.c.
11226 (OBS): Add dll.o
11227 (dll.o): New rule.
11228
d73f2619
YQ
112292012-02-11 Yao Qi <yao@codesourcery.com>
11230
11231 * server.c: (handle_monitor_command): Add a new parameter
11232 `own_buf'.
11233 (handle_query): Update caller.
11234
f8255c2a
JB
112352012-02-09 Joel Brobecker <brobecker@adacore.com>
11236
11237 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11238 * configure, config.in: Regenerate.
11239 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11240 is not defined.
11241
da84f473
PA
112422012-02-02 Pedro Alves <palves@redhat.com>
11243
11244 Try SIGKILL first, then PTRACE_KILL.
11245 * linux-low.c (linux_kill_one_lwp): New.
11246 (linux_kill_one_lwp): Rename to ...
11247 (kill_one_lwp_callback): ... this. Use the new
11248 linux_kill_one_lwp.
11249
e886a173
PA
112502012-02-02 Pedro Alves <palves@redhat.com>
11251
11252 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11253 inferior.
11254
be07f1a2
PA
112552012-01-27 Pedro Alves <palves@redhat.com>
11256
11257 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11258 (elf_64_file_p): Make static.
11259 (linux_pid_exe_is_elf_64_file): New.
11260 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11261 Delete declarations.
11262 (linux_pid_exe_is_elf_64_file): Declare.
11263 * linux-x86-low.c (x86_arch_setup): Use
11264 linux_pid_exe_is_elf_64_file.
11265
d8301ad1
JK
112662012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11267
11268 * linux-low.c (linux_wait_for_event_1): Rename to ...
11269 (linux_wait_for_event): ... here and merge it with former
11270 linux_wait_for_event - new variable wait_ptid, use it.
11271 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11272
01b17894
PA
112732012-01-23 Pedro Alves <palves@redhat.com>
11274
11275 * server.c (main): Avoid yet another case of infinite loop while
11276 detaching/killing after a longjmp.
11277
e825046f
JK
112782012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11279
11280 Code cleanup.
11281 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11282
b9e7b9c3
UW
112832012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11284
11285 * hostio.c (handle_readlink): New function.
11286 (handle_vFile): Call it to handle "vFile:readlink" packets.
11287
901f9912
UW
112882012-01-20 Pedro Alves <palves@redhat.com>
11289 Ulrich Weigand <ulrich.weigand@linaro.org>
11290
11291 * server.c (handle_v_requests): Only support vAttach and vRun to
11292 start multiple processes when in extended protocol mode.
11293
fc1ab1a0
PA
112942012-01-17 Pedro Alves <palves@redhat.com>
11295
11296 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11297 memalign plus mprotect to allocate the scratch buffer.
11298
7d5d4e98
PA
112992012-01-13 Pedro Alves <palves@redhat.com>
11300
11301 * server.c (attach_inferior): Clear `cont_thread'.
11302
f128d5e9
PA
113032012-01-13 Pedro Alves <palves@redhat.com>
11304
11305 * server.c (main): Avoid infinite loop while detaching/killing
11306 after a longjmp.
11307
06db92f0
DE
113082012-01-09 Doug Evans <dje@google.com>
11309
11310 * server.c (start_inferior): Set last_ptid in --wrapper case.
11311
32d92999
YQ
113122012-01-06 Yao Qi <yao@codesourcery.com>
11313
11314 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11315 defined.
11316 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11317
5e0a92a9
YQ
113182012-01-04 Yao Qi <yao@codesourcery.com>
11319
11320 * tracepoint.c (cmd_qtdp): Print debug message
11321 for static tracepoint.
11322
ae639e8c
YQ
113232012-01-04 Yao Qi <yao@codesourcery.com>
11324
11325 * tracepoint.c (trace_vdebug): Differentiate debug message
11326 between gdbserver and IPA.
11327
f72429c5
YQ
113282012-01-03 Yao Qi <yao@codesourcery.com>
11329
11330 * tracepoint.c (tracepoint_was_hit): Don't collect for
11331 static tracepoint.
11332
12c3e59c
JB
113332012-01-02 Joel Brobecker <brobecker@adacore.com>
11334
11335 * terminal.h: Reformat copyright header.
11336
67827812
JB
113372012-01-02 Joel Brobecker <brobecker@adacore.com>
11338
11339 * server.c (gdbserver_version): Update copyright year.
11340 * gdbreplay.c (gdbreplay_version): Likewise.
11341
3e52c33d
JK
113422011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11343
11344 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11345
11346 Revert:
11347 2011-12-18 Hui Zhu <teawater@gmail.com>
11348 * linux-low.c (linux_create_inferior): Save return value to ret.
11349
66f1260e
HZ
113502011-12-18 Hui Zhu <teawater@gmail.com>
11351
11352 * linux-low.c (linux_create_inferior): Save return value to ret.
11353
e77616d7
DE
113542011-12-16 Doug Evans <dje@google.com>
11355
e7b06c57
DE
11356 * linux-low.c (linux_create_inferior): If stdio connection,
11357 redirect stdin from /dev/null, stdout to stderr.
11358 * remote-utils.c (remote_is_stdio): New static global.
11359 (remote_connection_is_stdio): New function.
11360 (remote_prepare): Handle stdio connection.
11361 (remote_open): Ditto.
11362 (remote_close): Don't close stdin for stdio connections.
11363 (read_prim,write_prim): New functions. Replace all calls to
11364 read/write to these.
11365 * server.c (main): Watch for "-" argument. Move call to
11366 remote_prepare before start_inferior.
11367 * server.h (STDIO_CONNECTION_NAME): New macro.
11368 (remote_connection_is_stdio): Declare.
11369
e77616d7
DE
11370 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11371 in debugging output.
11372
82067193
YQ
113732011-12-15 Yao Qi <yao@codesourcery.com>
11374
11375 * tracepoint.c: Include sys/syscall.h.
11376 (gdb_ust_thread): Remove preprocessor conditional.
11377
82bfbe7e
PA
113782011-12-14 Pedro Alves <pedro@codesourcery.com>
11379
11380 * linux-low.c (linux_detach_one_lwp): Call
11381 the_low_target.prepare_to_resume before detaching.
11382
712c6575
YQ
113832011-12-14 Yao Qi <yao@codesourcery.com>
11384
11385 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11386 of write.
11387
d54d1edf
YQ
113882011-12-14 Yao Qi <yao@codesourcery.com>
11389
11390 * i386-low.c (i386_low_stopped_data_address): Initialize local
11391 variable `control'.
11392
6210a125
PA
113932011-12-13 Pedro Alves <pedro@codesourcery.com>
11394
11395 PR remote/13492
11396
11397 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11398 DR_CONTROL unless necessary. Extend comments.
11399 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11400 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11401
2ece8244
YQ
114022011-12-13 Yao Qi <yao@codesourcery.com>
11403
11404 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11405 macros.
11406 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11407
784867a5
JK
114082011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11409
11410 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11411 Print new debug message for such case.
11412
6bf36717
JK
114132011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11414
11415 Fix overlapping memcpy.
11416 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11417 the read_inferior_memory transfer.
11418 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11419 write_inferior_memory transfer.
11420 (set_fast_tracepoint_jump): New variable buf. Use it for the
11421 read_inferior_memory and write_inferior_memory transfers.
11422 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11423 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11424 Use it for the write_inferior_memory transfer.
11425 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11426 buffers.
11427
50275556
MR
114282011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11429
11430 * linux-low.c (fetch_register, store_register): Make code
11431 consistent, fix formatting.
11432
7325beb4
MR
114332011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11434
11435 * linux-low.c (usr_store_inferior_registers): Factor out code
11436 to handle individual registers into...
11437 (store_register): ... this new function.
11438
c642a434
UW
114392011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11440
11441 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11442 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11443 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11444 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11445 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11446 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11447 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11448 (srv_xmlfiles): Add new XML files.
11449
11450 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11451 and <sys/uio.h>.
11452 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11453 (init_registers_s390_linux32v1): Add prototype.
11454 (init_registers_s390_linux32v2): Likewise.
11455 (init_registers_s390_linux64v1): Likewise.
11456 (init_registers_s390_linux64v2): Likewise.
11457 (init_registers_s390x_linux64v1): Likewise.
11458 (init_registers_s390x_linux64v2): Likewise.
11459 (s390_num_regs): Increment to 52.
11460 (s390_regmap): Add orig_r2 register.
11461 (s390_num_regs_3264): Increment to 68.
11462 (s390_regmap_3264): Add orig_r2 register.
11463 (s390_collect_ptrace_register): Handle orig_r2 register.
11464 (s390_supply_ptrace_register): Likewise.
11465 (s390_fill_last_break): New function.
11466 (s390_store_last_break): Likewise.
11467 (s390_fill_system_call): New function.
11468 (s390_store_system_call): Likewise.
11469 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11470 register sets.
11471 (s390_check_regset): New function.
11472 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11473 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11474 Update target_regsets for available register sets.
11475
2268b414
JK
114762011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11477 Jan Kratochvil <jan.kratochvil@redhat.com>
11478
11479 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11480 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11481 New.
11482 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11483 * linux-low.h (struct process_info_private): New member r_debug.
11484 * server.c (handle_qxfer_libraries): Call
11485 the_target->qxfer_libraries_svr4.
11486 (handle_qxfer_libraries_svr4): New function.
11487 (qxfer_packets): New entry "libraries-svr4".
11488 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11489 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11490 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11491 PACKET_qXfer_libraries_svr4.
11492
d6db1fab
UW
114932011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11494
11495 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11496 PSW address/mask between 8-byte and 16-byte formats.
11497 (s390_supply_ptrace_register): Likewise.
11498 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11499 basic addressing mode bit.
11500
242f5f1c
SS
115012011-11-24 Stan Shebs <stan@codesourcery.com>
11502
11503 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11504
f196051f
SS
115052011-11-17 Stan Shebs <stan@codesourcery.com>
11506
11507 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11508 (tracing_start_time): New global.
11509 (tracing_stop_time): New global.
11510 (tracing_user_name): New global.
11511 (tracing_notes): New global.
11512 (tracing_stop_note): New global.
11513 (cmd_qtstart): Set traceframe_usage, start_time.
11514 (stop_tracing): Set stop_time.
11515 (cmd_qtstatus): Report additional status.
11516 (cmd_qtp): New function.
11517 (handle_tracepoint_query): Call it.
11518 (cmd_qtnotes): New function.
11519 (handle_tracepoint_general_set): Call it.
11520 (get_timestamp): Rename from tsv_get_timestamp.
11521
405f8e94
SS
115222011-11-14 Stan Shebs <stan@codesourcery.com>
11523 Kwok Cheung Yeung <kcy@codesourcery.com>
11524
11525 * linux-x86-low.c (small_jump_insn): New.
11526 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11527 trampoline and error message, build a trampoline and issue a small
11528 jump instruction to it.
11529 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11530 trampoline and error message.
11531 (x86_get_min_fast_tracepoint_insn_len): New.
11532 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11533 * linux-low.h (struct linux_target_ops): Add arguments to
11534 install_fast_tracepoint_jump_pad operation, add new operation.
11535 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11536 arguments.
11537 (linux_get_min_fast_tracepoint_insn_len): New function.
11538 (linux_target_op): Add new operation.
11539 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11540 (gdb_trampoline_buffer_end): Ditto.
11541 (gdb_trampoline_buffer_error): Ditto.
11542 (struct ipa_sym_addresses): Add fields for new IPA variables.
11543 (symbol_list): Add entries for new IPA variables.
11544 (struct tracepoint): Add fields to hold the address range of the
11545 trampoline used by the tracepoint.
11546 (trampoline_buffer_head): New static variable.
11547 (trampoline_buffer_tail): Ditto.
11548 (claim_trampoline_space): New function.
11549 (have_fast_tracepoint_trampoline_buffer): New function.
11550 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11551 structure.
11552 (install_fast_tracepoint): Ditto, also add error buffer argument.
11553 (cmd_qtminftpilen): New function.
11554 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11555 (fast_tracepoint_from_trampoline_address): New function.
11556 (fast_tracepoint_collecting): Handle trampoline as part of jump
11557 pad space.
11558 (set_trampoline_buffer_space): New function.
11559 (initialize_tracepoint): Initialize new IPA variables.
11560 * target.h (struct target_ops): Add arguments to
11561 install_fast_tracepoint_jump_pad operation, add new
11562 get_min_fast_tracepoint_insn_len operation.
11563 (target_get_min_fast_tracepoint_insn_len): New.
11564 (install_fast_tracepoint_jump_pad): Add arguments.
11565 * server.h (IPA_BUFSIZ): Define.
11566 * linux-i386-ipa.c: Include extra header files.
11567 (initialize_fast_tracepoint_trampoline_buffer): New function.
11568 (initialize_low_tracepoint): Call it.
11569 * server.h (set_trampoline_buffer_space): Declare.
11570 (claim_trampoline_space): Ditto.
11571 (have_fast_tracepoint_trampoline_buffer): Ditto.
11572
1e4d1764
YQ
115732011-11-14 Yao Qi <yao@codesourcery.com>
11574
11575 * server.c (handle_query): Handle InstallInTrace for qSupported.
11576 * tracepoint.c (add_tracepoint): Sort list.
11577 (install_tracepoint, download_tracepoint): New.
11578 (cmd_qtdp): Call them to install and download tracepoints.
11579 (sort_tracepoints): Removed.
11580 (cmd_qtstart): Update.
11581
5c73ff4e
YQ
115822011-11-14 Yao Qi <yao@codesourcery.com>
11583
11584 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11585 * mem-break.h: Declare.
11586 * tracepoint.c (cmd_qtstart): Move some code to ...
11587 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11588 New.
11589 (download_tracepoints): Move some code to ...
11590 (download_tracepoint_1): ... here. New.
11591
86a30030
YQ
115922011-11-08 Yao Qi <yao@codesourcery.com>
11593
11594 * remote-utils.c (relocate_instruction): A comment fix.
11595
8d26e50c
JB
115962011-11-07 Joel Brobecker <brobecker@adacore.com>
11597
11598 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11599 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11600 dr_status_mirror and dr_control_mirror from debug_reg_state.
11601 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11602 (i386_initial_stuff): Remove use of deleted globals.
11603 (i386_get_thread_context, i386_set_thread_context,
11604 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11605 from debug_reg_state.
11606
a59306a3
YQ
116072011-11-05 Yao Qi <yao@codesourcery.com>
11608
11609 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11610 address as TPOINT's.
11611
3065dfb6
SS
116122011-11-02 Stan Shebs <stan@codesourcery.com>
11613
11614 * tracepoint.c (agent_mem_read_string): New function.
11615 (eval_agent_expr): Call it for tracenz.
11616 * server.c (handle_query): Report support for tracenz.
11617
fd0d8c7c
YQ
116182011-11-02 Yao Qi <yao@codesourcery.com>
11619
11620 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11621
609086b1
YQ
116222011-11-02 Yao Qi <yao@codesourcery.com>
11623
11624 * target.h: Fix a typo in comment.
11625
b9fd1791
PA
116262011-10-31 Pedro Alves <pedro@codesourcery.com>
11627
11628 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11629 clobber the breakpoints' shadows with fast tracepoint jumps.
11630 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11631 * target.c (write_inferior_memory): Also pass MYADDR down to
11632 check_mem_write.
11633
03583c20
UW
116342011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11635
11636 * configure.ac: Check support for personality routine.
11637 * configure: Regenerate.
11638 * config.in: Likewise.
11639 * linux-low.c: Include <sys/personality.h>.
11640 Define ADDR_NO_RANDOMIZE if necessary.
11641 (linux_create_inferior): Disable address space randomization when
11642 forking inferior, if requested.
11643 (linux_supports_disable_randomization): New function.
11644 (linux_target_ops): Install it.
11645 * server.h (disable_randomization): Declare.
11646 * server.c (disable_randomization): New global variable.
11647 (handle_general_set): Handle QDisableRandomization.
11648 (handle_query): Likewise for qSupported.
11649 (main): Support --disable-randomization and --no-disable-randomization
11650 command line arguments.
11651 * target.h (struct target_ops): Add supports_disable_randomization.
11652 (target_supports_disable_randomization): New macro.
11653
723b724b
MF
116542011-09-29 Mike Frysinger <vapier@gentoo.org>
11655
11656 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11657 ifdef check.
11658 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11659 [!PT_GETDSBT] (target_loadmap): New definition.
11660 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11661 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11662 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11663 and PT_GETDSBT to LINUX_LOADMAP.
11664 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11665 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11666
55329a5c 116672011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11668
11669 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11670 (arm_linux_hwbp_cap): New static variable.
11671 (arm_linux_get_hwbp_cap): Replace by ...
11672 (arm_linux_init_hwbp_cap): ... this new function.
11673 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11674 (arm_linux_get_hw_watchpoint_count): Likewise.
11675 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11676 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11677 (arm_prepare_to_resume): Use perror_with_name instead of error.
11678
55329a5c 116792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11680
11681 * linux-arm-low.c: Include <signal.h>.
11682 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11683 (struct arm_linux_hwbp_cap): New data type.
11684 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11685 (struct arm_linux_hw_breakpoint): New data type.
11686 (MAX_BPTS, MAX_WPTS): Define.
11687 (struct arch_process_info, struct arch_lwp_info): New data types.
11688 (arm_linux_get_hwbp_cap): New function.
11689 (arm_linux_get_hw_breakpoint_count): Likewise.
11690 (arm_linux_get_hw_watchpoint_count): Likewise.
11691 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11692 (arm_hwbp_control_initialize): Likewise.
11693 (arm_hwbp_control_is_enabled): Likewise.
11694 (arm_hwbp_control_is_initialized): Likewise.
11695 (arm_hwbp_control_disable): Likewise.
11696 (arm_linux_hw_breakpoint_equal): Likewise.
11697 (arm_linux_hw_point_initialize): Likewise.
11698 (struct update_registers_data): New data structure.
11699 (update_registers_callback: New function.
11700 (arm_insert_point): Likewise.
11701 (arm_remove_point): Likewise.
11702 (arm_stopped_by_watchpoint): Likewise.
11703 (arm_stopped_data_address): Likewise.
11704 (arm_new_process): Likewise.
11705 (arm_new_thread): Likewise.
11706 (arm_prepare_to_resume): Likewise.
11707 (the_low_target): Register arm_insert_point, arm_remove_point,
11708 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11709 arm_new_thread, and arm_prepare_to_resume.
11710
6b9801d4
SS
117112011-09-15 Stan Shebs <stan@codesourcery.com>
11712
11713 * server.h (struct emit_ops): Add compare-goto fields.
11714 * tracepoint.c (gdb_agent_op_sizes): New table.
11715 (emit_eq_goto): New function.
11716 (emit_ne_goto): New function.
11717 (emit_lt_goto): New function.
11718 (emit_le_goto): New function.
11719 (emit_gt_goto): New function.
11720 (emit_ge_goto): New function.
11721 (is_goto_target): New function.
11722 (compile_bytecodes): Recognize special cases of compare-goto
11723 combinations and call specialized emitters for them.
11724 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11725 (amd64_emit_ne_goto): New function.
11726 (amd64_emit_lt_goto): New function.
11727 (amd64_emit_le_goto): New function.
11728 (amd64_emit_gt_goto): New function.
11729 (amd64_emit_ge_goto): New function.
11730 (amd64_emit_ops): Add the new functions.
11731 (i386_emit_eq_goto): New function.
11732 (i386_emit_ne_goto): New function.
11733 (i386_emit_lt_goto): New function.
11734 (i386_emit_le_goto): New function.
11735 (i386_emit_gt_goto): New function.
11736 (i386_emit_ge_goto): New function.
11737 (i386_emit_ops): Add the new functions.
11738
bf15cbda
SS
117392011-09-08 Stan Shebs <stan@codesourcery.com>
11740
11741 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11742 (i386_emit_epilogue): Restore %ebx.
11743
943ca1dd
JZ
117442011-08-31 Jie Zhang <jzhang918@gmail.com>
11745
11746 * server.c (step_thread): Remove definition.
11747 (process_serial_event): Don't handle Hs.
11748 * server.h (step_thread): Remove declaration.
11749 * target.c (set_desired_inferior): Remove use of step_thread.
11750
e3deef73
LM
117512011-08-24 Luis Machado <lgustavo@codesourcery.com>
11752
11753 * linux-low.c: Include linux-procfs.h.
11754 (linux_attach_lwp_1): Update comments.
11755 (linux_attach): Scan for existing threads when attaching to a
11756 process that is the tgid.
11757 * Makefile.in: Update dependencies.
11758
13da1c97
LM
117592011-08-24 Luis Machado <lgustavo@codesourcery.com>
11760
11761 * configure.srv: Add linux-procfs.o dependencies.
11762
881127c9
YQ
117632011-08-14 Yao Qi <yao@codesourcery.com>
11764
11765 * target.h (struct target_ops): Fix indent.
11766 * win32-low.c (win32_target_ops): Fix comment.
11767
58dbd541
YQ
117682011-08-14 Andrew Jenner <andrew@codesourcery.com>
11769 Yao Qi <yao@codesourcery.com>
11770
11771 * Makefile.in (clean): Remove tic6x-*.c files.
11772 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11773 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11774 (tic6x-c64xp-linux.c): Likewise.
11775 * configure.srv: Add support for tic6x-*-uclinux.
11776 * linux-tic6x-low.c: New.
11777 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11778
78d85199
YQ
117792011-08-14 Andrew Stubbs <ams@codesourcery.com>
11780 Yao Qi <yao@codesourcery.com>
11781
11782 * target.h (struct target_ops): Add read_loadmap.
11783 * linux-low.c (struct target_loadseg): New type.
11784 (struct target_loadmap): New type.
11785 (linux_read_loadmap): New function.
11786 (linux_target_ops): Add linux_read_loadmap.
11787 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11788 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11789 to NULL.
78d85199 11790
a959a88d
EZ
117912011-08-05 Eli Zaretskii <eliz@gnu.org>
11792
11793 * win32-low.c: Include <stdint.h>.
11794
1ced966e
PA
117952011-07-22 Pedro Alves <pedro@codesourcery.com>
11796
11797 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11798 to the inferior here.
11799 (i386_remove_aligned_watchpoint): Ditto.
11800 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11801 fit part of the watchpoint in the debug registers.
11802 (i386_update_inferior_debug_regs): New.
11803 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11804 registers, and only update the inferior on success.
11805 (i386_low_remove_watchpoint): Ditto.
11806
d26e3629
KY
118072011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11808
11809 * linux-low.c (compare_ints, unique, list_threads, show_process,
11810 linux_core_of_thread): Delete.
11811 (linux_target_ops): Change linux_core_of_thread to
11812 linux_common_core_of_thread.
11813 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11814 * utils.c (malloc_failure): Change type of argument.
11815 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11816 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11817 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11818 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11819 (IPA_OBJS): Add common-utils-ipa.o.
11820 (ptid_h, linux_osdata_h): New macros.
11821 (server_h): Add common/common-utils.h, common/xml-utils.h,
11822 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11823 common/ptid.h.
11824 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11825 ptid.o, buffer.o): New rules.
11826 (linux-low.o): Add common/linux-osdata.h as a dependency.
11827 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11828 * configure.ac: Add AC_HEADER_DIRENT check.
11829 * config.in: Regenerate.
11830 * configure: Regenerate.
11831 * remote-utils.c (xml_escape_text): Delete.
11832 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11833 buffer_xml_printf): Move to common/buffer.c.
11834 * server.c (main): Remove call to initialize_inferiors.
11835 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11836 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11837 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11838 internal_error, gdb_assert, gdb_assert_fail): Delete.
11839 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11840 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11841 common/buffer.h.
11842 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11843 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11844 initialize_inferiors): Delete.
11845
2275a1a7
PA
118462011-07-20 Pedro Alves <pedro@codesourcery.com>
11847
11848 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11849 symbol error.
11850
0a5b1e09
PA
118512011-05-31 Pedro Alves <pedro@codesourcery.com>
11852
11853 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11854 assertion.
11855 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11856
6938fd34
YQ
118572011-05-26 Yao Qi <yao@codesourcery.com>
11858
11859 * Makefile.in (thread-db.o): Track dependence to
11860 common/gdb_thread_db.h.
11861 * thread-db.c: include gdb_thread_db.h from right place.
11862
b481f9e0
TT
118632011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11864
11865 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11866 __FILE__ and __LINE__ to internal_error.
11867
98a5dd13
DE
118682011-05-13 Doug Evans <dje@google.com>
11869
11870 * thread-db.c (try_thread_db_load_from_sdir): New function.
11871 (try_thread_db_load_from_dir): New function.
11872 (thread_db_load_search): Handle $sdir, ignore $pdir.
11873 Remove trying of system directories if search of
11874 libthread-db-search-path fails, that is now done via $sdir.
11875
d248b706
KY
118762011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11877
11878 * server.c (handle_query): Add EnableDisableTracepoints to the list
11879 of supported features.
43aaf8b6 11880 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11881 tracepoints.
43aaf8b6
PA
11882 (cmd_qtenable_disable): New.
11883 (cmd_qtstart): Install tracepoints even if disabled.
11884 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11885 receiving a QTEnable or QTDisable packet.
11886 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11887 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11888 tracepoints.
11889 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11890
84e578fb
DE
118912011-05-10 Doug Evans <dje@google.com>
11892
11893 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11894
71f55dd8
DE
118952011-05-04 Doug Evans <dje@google.com>
11896
11897 * linux-low.c (linux_join): Skip process lookup.
11898 * spu-low.c (spu_join): Ditto.
11899 * server.c (join_inferiors_callback): Delete.
11900 (process_serial_event): For 'D' packet (detach) call join_inferior
11901 directly.
11902
4d393d60
JM
119032011-05-04 Joseph Myers <joseph@codesourcery.com>
11904
11905 * README: Don't mention xscale*-*-linux*.
11906 * configure.srv (xscale*-*-linux*): Don't handle target.
11907
b00ad6ff
NF
119082011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11909
11910 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11911 casting pointers.
11912 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11913 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11914 (i386_emit_void_call_2): Likewise.
11915
af96c192
YQ
119162011-04-26 Yao Qi <yao@codesourcery.com>
11917
43aaf8b6
PA
11918 * linux-low.c: Move common macros to linux-ptrace.h.
11919 Include linux-ptrace.h.
af96c192
YQ
11920 * Makefile.in (linux_ptrace_h): New.
11921 (linux-low.o): Depends on linux-ptrace.h.
11922
03f2bd59
JK
119232011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11924
11925 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11926 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11927 (remote_prepare): New function with most of the TCP code from ...
11928 (remote_open): ... here. Detect PORT here unconditionally. Move also
11929 setting transport_is_reliable.
11930 * server.c (run_once): New variable.
11931 (gdbserver_usage): Document it.
11932 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11933 the first run if RUN_ONCE.
11934 * server.h (run_once, remote_prepare): New declarations.
11935
7a9dd1b2
TT
119362011-04-19 Tom Tromey <tromey@redhat.com>
11937
11938 * win32-low.c (handle_load_dll): Remove duplicate "the".
11939
81239425
PM
119402011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11941
11942 Remove support for old Cygwin 1.5 versions.
11943 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11944 function to avoid warning.
11945 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11946 warning.
11947
9e0627f1
PM
119482011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11949
11950 * gdbserver/server.h (Macro _): Define it if not available.
11951
588eebee
MS
119522011-03-14 Michael Snyder <msnyder@vmware.com>
11953
348af9f7 11954 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11955
43f70d4c
JB
119562011-03-10 Joel Brobecker <brobecker@adacore.com>
11957
11958 * Makefile.in (maintainer-clean realclean distclean): Remove
11959 "make ... subdir_do" command.
11960
348af9f7
MS
119612011-03-10 Michael Snyder <msnyder@vmware.com>
11962
11963 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11964
11965 * server.c (handle_v_run): Free alloced buffer on early return.
11966
e637a4f5
YQ
119672011-03-09 Yao Qi <yao@codesourcery.com>
11968
11969 Revert:
11970 2011-03-04 Yao Qi <yao@codesourcery.com>
11971
11972 * Makefile.in: Remove GNU make feature --directory.
11973
11974 2011-03-05 Yao Qi <yao@codesourcery.com>
11975
11976 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11977 (subdir_do): New make target. Copied from gdb/Makefile.
11978 (maintainer-clean, realclean, distclean, clean): Call corresponding
11979 make targets in common/Makefile.
11980
11981 2011-02-11 Yao Qi <yao@codesourcery.com>
11982
11983 * configure.ac: Call AC_PROG_RANLIB.
11984 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11985 * configure: Regenerate.
11986
e6edda56
JK
119872011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11988
11989 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11990
e5141119
JB
119912011-03-06 Yao Qi <yao@codesourcery.com>
11992
11993 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11994
64794aa4
JB
119952011-03-05 Yao Qi <yao@codesourcery.com>
11996
11997 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11998 (subdir_do): New make target. Copied from gdb/Makefile.
11999 (maintainer-clean, realclean, distclean, clean): Call corresponding
12000 make targets in common/Makefile.
12001
7a762829
YQ
120022011-03-04 Yao Qi <yao@codesourcery.com>
12003
12004 * Makefile.in: Remove GNU make feature --directory.
12005
348af9f7
MS
120062011-03-04 Michael Snyder <msnyder@vmware.com>
12007
12008 * server.c (queue_stop_reply): Call xmalloc not malloc.
12009
120102011-03-02 Michael Snyder <msnyder@vmware.com>
12011
12012 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12013
9f72fee2
MS
120142011-02-28 Michael Snyder <msnyder@vmware.com>
12015
588eebee
MS
12016 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12017 (cmd_qtframe): Ditto.
12018 (cmd_qtbuffer): Ditto.
12019 (cmd_bigqtbuffer): Ditto.
12020
9f72fee2
MS
12021 * utils.c (decimal2str): Initialize 'width' to nine, then
12022 don't mess with it.
12023
8040bd49
UW
120242011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12025
12026 * hostio.c (require_data): Free *data, not data.
12027
7e52cbd0
JK
120282011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12029
12030 * hostio.c (require_data): Use free, not xfree.
12031
9130f83e
MS
120322011-02-27 Michael Snyder <msnyder@vmware.com>
12033
4b812f4e
MS
12034 * server.c (handle_query): Discard unused value.
12035
9130f83e
MS
12036 * hostio.c (require_data): Free malloc memory before returning
12037 error.
12038
69d37113
MS
120392011-02-26 Michael Snyder <msnyder@vmware.com>
12040
12041 * linux-low.c (list_threads): Call closedir for dirent.
12042
35f5825a
MS
120432011-02-27 Michael Snyder <msnyder@vmware.com>
12044
2a589cef
MS
12045 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12046 a case statement falls through.
12047
0adea5f7
MS
12048 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12049
35f5825a
MS
12050 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12051 in comparison.
12052
238f1c74
MS
120532011-02-26 Michael Snyder <msnyder@vmware.com>
12054
12055 * utils.c (decimal2str): Eliminate dead code and dead param.
12056 (pulongest): Drop dead param from call to decimal2str.
12057 (plongest): Ditto.
12058
633ff500
JB
120592011-02-24 Joel Brobecker <brobecker@adacore.com>
12060
12061 Revert the following patch (not approved yet):
12062 2011-02-21 Hui Zhu <teawater@gmail.com>
12063 * tracepoint.c (tp_printf): New function.
12064 (eval_agent_expr): Handle gdb_agent_op_printf.
12065
f9c6ff72
HZ
120662011-02-21 Hui Zhu <teawater@gmail.com>
12067
12068 * tracepoint.c (tp_printf): New function.
12069 (eval_agent_expr): Handle gdb_agent_op_printf.
12070
94d5e490
TT
120712011-02-18 Tom Tromey <tromey@redhat.com>
12072
12073 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12074 (tracepoint.o): Likewise.
12075 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12076 (gdb_agent_op_names): Likewise.
12077
c7f96d2b
TT
120782011-02-18 Tom Tromey <tromey@redhat.com>
12079
12080 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12081 gdb_agent_op_rot>: New constants.
12082 (gdb_agent_op_names): Add pick and roll.
12083 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12084 cases.
12085
0feedb2c
JK
120862011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12087
12088 * aclocal.m4: Regenerated with aclocal-1.11.1.
12089
b3b9301e
PA
120902011-02-14 Pedro Alves <pedro@codesourcery.com>
12091
12092 * server.c (handle_qxfer_traceframe_info): New.
12093 (qxfer_packets): Register "traceframe-info".
12094 (handle_query): Report support for qXfer:traceframe-info:read+.
12095 * tracepoint.c (match_blocktype): New.
12096 (traceframe_find_block_type): Rename to ...
12097 (traceframe_walk_blocks): ... this. Add callback filter argument,
12098 and use it.
12099 (traceframe_find_block_type): New, reimplemented on top of
12100 traceframe_walk_blocks.
12101 (build_traceframe_info_xml): New.
12102 (traceframe_read_info): New.
12103 * server.h (traceframe_read_info): Declare.
12104
4f3e6fb7
YQ
121052011-02-11 Yao Qi <yao@codesourcery.com>
12106
12107 * configure.ac: Call AC_PROG_RANLIB.
12108 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12109 * configure: Regenerate.
12110
764880b7
PA
121112011-02-07 Pedro Alves <pedro@codesourcery.com>
12112
12113 * server.c (gdb_read_memory): Change return semantics to allow
12114 partial transfers.
12115 (handle_search_memory_1): Adjust.
12116 (process_serial_event) <'m' packet>: Handle partial transfers.
12117 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12118
1c79eb8a
PA
121192011-01-28 Pedro Alves <pedro@codesourcery.com>
12120
12121 * regcache.c (init_register_cache): Initialize
12122 regcache->register_status.
12123 (free_register_cache): Release regcache->register_status.
12124 (regcache_cpy): Copy register_status.
12125 (registers_to_string): Print 'x's for unavailable registers.
12126 (supply_register): Mark the register's status valid or
12127 unavailable, depending on whether a buffer was passed in or not.
12128 (supply_register_zeroed): New.
12129 (supply_regblock): Mark the registers' status valid or
12130 unavailable, depending on whether a buffer was passed in or not.
12131 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12132 (struct regcache): New `register_status' field.
12133 (supply_register_zeroed): Declare.
12134 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12135 supply_register_zeroed, rather than passing a NULL buffer to
12136 supply_register.
12137 * tracepoint.c (fetch_traceframe_registers): Update comment.
12138
85724a0e
PA
121392011-01-28 Pedro Alves <pedro@codesourcery.com>
12140
12141 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12142 buffer explicit.
12143
d08aafef
PA
121442011-01-25 Pedro Alves <pedro@codesourcery.com>
12145
12146 * server.h (decode_xfer_write): Change prototype.
12147 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12148 and don't extract the annex here.
12149 * server.c (decode_xfer_read): Remove `annex' parameter,
12150 and don't extract the annex here.
12151 (decode_xfer): New.
12152 (struct qxfer): New.
12153 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12154 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12155 (handle_qxfer_statictrace): New functions, abstracted out from
12156 handle_query, and made to use the struct qxfer interface.
12157 (handle_threads_qxfer_proper): Rename to ...
12158 (handle_qxfer_threads_proper): ... this.
12159 (handle_threads_qxfer): Rename to ...
12160 (handle_qxfer_threads): ... this. Adjust.
12161 (qxfer_packets): New array.
12162 (handle_qxfer): New function.
12163 (handle_query): Use handle_qxfer.
12164
493e2a69
MS
121652011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12166
12167 * gdbreplay.c: Shorten lines of >= 80 columns.
12168 * linux-low.c: Ditto.
12169 * linux-ppc-low.c: Ditto.
12170 * linux-s390-low.c: Ditto.
12171 * linux-sparc-low.c: Ditto.
12172 * linux-x86-low.c: Ditto.
12173 * linux-xtensa-low.c: Ditto.
12174 * mem-break.c: Ditto.
12175 * nto-low.c: Ditto.
12176 * regcache.h: Ditto.
12177 * remote-utils.c: Ditto.
12178 * server.c: Ditto.
12179 * server.h: Ditto.
12180 * thread-db.c: Ditto.
12181 * tracepoint.c: Ditto.
12182 * utils.c: Ditto.
12183 * win32-low.h: Ditto.
12184
44944448
JB
121852011-01-05 Joel Brobecker <brobecker@adacore.com>
12186
12187 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12188 update.
12189
71ce852c
JB
121902011-01-01 Joel Brobecker <brobecker@adacore.com>
12191
12192 * server.c (gdbserver_version): Update copyright year in version
12193 output.
12194 * gdbreplay.c (gdbreplay_version): Ditto.
12195
eb826dc6
MF
121962010-12-29 Jie Zhang <jie.zhang@analog.com>
12197
12198 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12199 * linux-bfin-low.c: New file.
12200 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12201 PT_DATA_ADDR for BFIN targets.
12202 * Makefile.in (SFILES): Add linux-bfin-low.c.
12203 (clean): Remove reg-bfin.c.
12204 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12205 * README: Mention supported Blackfin targets.
12206
39ab222a
MF
122072010-12-23 Mike Frysinger <vapier@gentoo.org>
12208
12209 * .gitignore: New file.
12210
a1f2ce7d
MF
122112010-11-16 Mike Frysinger <vapier@gentoo.org>
12212
12213 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12214
f474844c
JZ
122152010-10-22 Jie Zhang <jie@codesourcery.com>
12216
12217 * Makefile.in: Add FLAGS_TO_PASS variable.
12218 (install): Remove dependency of install-only and recursively
12219 invoke make for install-only.
12220
f1048712
DE
122212010-10-04 Doug Evans <dje@google.com>
12222
12223 * Makefile.in (uninstall): Use $(DESTDIR).
12224
b53a1623
PA
122252010-09-24 Pedro Alves <pedro@codesourcery.com>
12226
e6ee044d
PA
12227 PR gdb/11842
12228
b53a1623
PA
12229 * linux-x86-low.c (compat_siginfo_from_siginfo)
12230 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12231 si_code is < 0. Check for si_code == SI_TIMER before checking for
12232 si_code < 0.
12233
fa1bd1e4
JB
122342010-09-13 Joel Brobecker <brobecker@adacore.com>
12235
12236 * lynx-i386-low.c: New file.
12237 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12238
47fac8f8
JB
122392010-09-13 Joel Brobecker <brobecker@adacore.com>
12240
12241 * lynx-low.c (ptrace_request_to_str): Remove handling for
12242 request values that have been removed in LynxOS 5.x.
12243
1adfc54d
JB
122442010-09-13 Joel Brobecker <brobecker@adacore.com>
12245
12246 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12247 <ptrace.h>
12248
c2a66c29
NS
122492010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12250
12251 * configure.ac: Add --enable-inprocess-agent option.
12252 * configure: Rebuilt.
12253
32fcada3
YQ
122542010-09-06 Yao Qi <yao@codesourcery.com>
12255
12256 * linux-low.c (linux_kill): Remove unused variable.
12257 (linux_stabilize_threads): Likewise.
12258 * server.c (start_inferior): Likewise.
12259 (queue_stop_reply_callback): Likewise.
12260 * tracepoint.c (do_action_at_tracepoint): Likewise.
12261
0cccb683
YQ
122622010-09-06 Yao Qi <yao@codesourcery.com>
12263
12264 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12265 on return.
12266
423ec54c
JK
122672010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12268
12269 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12270
12ac6819
PA
122712010-09-06 Pedro Alves <pedro@codesourcery.com>
12272
12273 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12274 "$(IPA_DEPFILES)".
12275
8ed54b31
JB
122762010-09-01 Joel Brobecker <brobecker@adacore.com>
12277
12278 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12279 gdbserver/lynx-ppc-low.c: New files.
12280 * Makefile.in (lynx_low_h): New variable.
12281 (lynx-low.o, lynx-ppc-low.o): New rules.
12282 * configure.ac: On LynxOS, link with -lnetinet.
12283 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12284 * configure: regenerate.
12285
bb0116a4
JB
122862010-09-01 Joel Brobecker <brobecker@adacore.com>
12287
12288 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12289 * configure.ac: Add check for vasprintf and vsnprintf.
12290 * configure, config.in: Regenerate.
12291 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12292
a778ab81 122932010-09-01 Joel Brobecker <brobecker@adacore.com>
12294
12295 * gdbreplay.c: Move include of alloca.h up, next to include of
12296 malloc.h.
12297 * server.h: Add include of malloc.h.
12298 * mem-break.c: Remove include of malloc.h.
12299 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12300
8b034a19 123012010-09-01 Joel Brobecker <brobecker@adacore.com>
12302
12303 * Makefile.in (memmem.o): Build with -Wno-error.
12304
123052010-09-01 Joel Brobecker <brobecker@adacore.com>
12306
12307 * utils.c (xsnprintf): Make non-static.
12308 * server.h: Add xsnprintf declaration.
12309 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12310 replace calls to snprintf by calls to xsnprintf throughout.
12311
123122010-09-01 Joel Brobecker <brobecker@adacore.com>
12313
12314 * configure.ac: Add configure check for alloca.
12315 * configure, config.in: Regenerate.
12316 * server.h: Include alloca.h if it exists.
12317 * gdbreplay.c: Include alloca.h if it exists.
12318
1a981360
PA
123192010-08-28 Pedro Alves <pedro@codesourcery.com>
12320
12321 * linux-low.c (__SIGRTMIN): Define if not already defined.
12322 (linux_create_inferior): Check for __ANDROID__ rather than
12323 __SIGRTMIN.
12324 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12325 are already deferred.
12326 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12327 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12328 stopped and already has a pending signal to report.
12329 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12330 a pending signal to report or is moving out of a jump pad.
12331 (linux_init_signals): Check for __ANDROID__ rather than
12332 __SIGRTMIN.
12333
b4d51a55
PA
123342010-08-28 Pedro Alves <pedro@codesourcery.com>
12335
12336 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12337 debug_threads check. Avoid a linear search when not doing debug
12338 output.
12339
ec48365d
PA
123402010-08-27 Pedro Alves <pedro@codesourcery.com>
12341
12342 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12343 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12344 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12345 (process_event): Change local fd's type to gdb_fildes_t.
12346 (create_file_handler): Adjust prototype.
12347 (delete_file_handler): Adjust prototype.
12348 (handle_file_event): Adjust prototype. Use pfildes.
12349 (create_file_event): Adjsut prototype.
12350 * remote-utils.c (remote_desc, listen_desc): Change type to
12351 gdb_fildes_t.
12352 * server.h: New gdb_fildes_t typedef.
12353 [USE_WIN32API]: Include winsock2.h.
12354 (delete_file_handler, add_file_handler): Adjust prototypes.
12355 (pfildes): Declare.
12356 * utils.c (pfildes): New.
12357
854d88f0
PA
123582010-08-27 Pedro Alves <pedro@codesourcery.com>
12359
12360 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12361 * configure: Regenerate.
12362
0146f85b
PA
123632010-08-27 Pedro Alves <pedro@codesourcery.com>
12364
12365 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12366 (linux_done_accessing_memory): ... this.
12367 (linux_target_ops): Adjust.
12368 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12369 * nto-low.c (nto_target_ops): Adjust comment.
12370 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12371 * spu-low.c (spu_target_ops): Adjust comment.
12372 * target.h (target_ops): Rename unprepare_to_access_memory field
12373 to done_accessing_memory.
12374 (unprepare_to_access_memory): Rename to ...
12375 (done_accessing_memory): ... this.
12376
90d74c30
PA
123772010-08-26 Pedro Alves <pedro@codesourcery.com>
12378
12379 * linux-low.c (linux_prepare_to_access_memory): New.
12380 (linux_unprepare_to_access_memory): New.
12381 (linux_target_ops): Install them.
12382 * server.c (read_memory): Rename to ...
12383 (gdb_read_memory): ... this. Use
12384 prepare_to_access_memory/prepare_to_access_memory.
12385 (write_memory): Rename to ...
12386 (gdb_write_memory): ... this. Use
12387 prepare_to_access_memory/prepare_to_access_memory.
12388 (handle_search_memory_1): Adjust.
12389 (process_serial_event): Adjust.
12390 * target.h (struct target_ops): New fields
12391 prepare_to_access_memory and unprepare_to_access_memory.
12392 (prepare_to_access_memory, unprepare_to_access_memory): New.
12393 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12394 prepare_to_access_memory/prepare_to_access_memory.
12395 * nto-low.c (nto_target_ops): Adjust.
12396 * spu-low.c (spu_target_ops): Adjust.
12397 * win32-low.c (win32_target_ops): Adjust.
12398
fd467969
PA
123992010-08-26 Pedro Alves <pedro@codesourcery.com>
12400
12401 * Makefile.in (WARN_CFLAGS): Get it from configure.
12402 (WERROR_CFLAGS): New.
12403 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12404 * configure.ac: Introduce --enable-werror, which adds -Werror to
12405 the compiler command line. Enabled by default. Disable with
12406 --disable-werror. Add -Wdeclaration-after-statement
12407 Wpointer-arith and -Wformat-nonliteral to warning flags.
12408 * configure: Regenerate.
12409
331e2f5f
PA
124102010-08-26 Pedro Alves <pedro@codesourcery.com>
12411
12412 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12413
e581f2b4
PA
124142010-08-26 Pedro Alves <pedro@codesourcery.com>
12415
12416 * gdbreplay.c (remote_error): New.
12417 (gdbchar): New.
12418 (expect): Use gdbchar. Check for error reading from GDB.
12419 Clarify sync error output.
12420 (play): Check for errors writing to GDB.
12421 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12422 * remote-utils.c (getpkt): Check for errors writing to the remote
12423 descriptor.
12424
3c11dd79
PA
124252010-08-25 Pedro Alves <pedro@codesourcery.com>
12426
12427 * linux-low.c (linux_wait_1): Move non-debugging code out of
12428 `debug_threads' control.
12429
d20a8ad9
PA
124302010-08-25 Pedro Alves <pedro@codesourcery.com>
12431
12432 * linux-low.c (linux_wait_1): Don't set last_status here.
12433 * server.c (push_event, queue_stop_reply_callback): Assert we're
12434 not pushing a TARGET_WAITKIND_IGNORE event.
12435 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12436 (myresume, handle_target_event): Set the thread's last_resume_kind
12437 and last_status from the target returned status.
12438
964e4306
PA
124392010-08-25 Pedro Alves <pedro@codesourcery.com>
12440
12441 PR threads/10729
12442
12443 * linux-x86-low.c (update_debug_registers_callback): New.
12444 (i386_dr_low_set_addr): Use it.
12445 (i386_dr_low_get_addr): New.
12446 (i386_dr_low_set_control): Use update_debug_registers_callback.
12447 (i386_dr_low_get_control): New.
12448 (i386_dr_low_get_status): Adjust.
12449 * linux-low.c (linux_stop_lwp): New.
12450 * linux-low.h (linux_stop_lwp): Declare.
12451
12452 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12453 argument instead of a i386_debug_reg_state.
12454 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12455 a i386_debug_reg_state.
12456 (i386_insert_aligned_watchpoint): Adjust.
12457 (i386_remove_aligned_watchpoint): Adjust.
12458 (i386_low_stopped_data_address): Read the debug registers from the
12459 inferior instead of from the mirrors.
12460 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12461 (i386_dr_low_get_addr): Declare.
12462 (i386_dr_low_get_control): Declare.
12463 (i386_dr_low_get_status): Change prototype.
12464
12465 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12466 (i386_dr_low_get_addr): New.
12467 (i386_dr_low_get_control): New.
12468 (i386_dr_low_get_status): Adjust prototype. Return
12469 dr_status_mirror.
12470 (i386_initial_stuff): Clear dr_status_mirror and
12471 dr_control_mirror.
12472 (i386_get_thread_context): Adjust.
12473 (i386_set_thread_context): Adjust.
12474 (i386_thread_added): Adjust.
12475
5f21a75b
PA
124762010-08-24 Pedro Alves <pedro@codesourcery.com>
12477
12478 * linux-low.h (linux_thread_area): Delete declaration.
12479
3e4c1235
TS
124802010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12481
12482 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12483 after its termination.
12484
1971b033
PA
124852010-08-09 Pedro Alves <pedro@codesourcery.com>
12486
12487 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12488 (gdb_wants_all_stopped): Delete.
12489 (linux_wait_1): Don't call them.
12490 * server.c (handle_v_cont): Tag all threads as want-stopped.
12491 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12492 stopped as "client-wants-stopped".
12493
310444ac
PA
124942010-07-31 Pedro Alves <pedro@codesourcery.com>
12495
12496 * Makefile.in (signals_h): New.
12497 (server_h): Depend on it.
12498 (server.o): Don't depend on $(signals_def).
12499 (signals.o): Depend on $(signals_def).
12500
a19cae16
JK
125012010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12502
12503 * Makefile.in (signals_def): New.
12504 (server_h): Append include/gdb/signals.h and signals_def.
12505 (server.o): Append signals_def.
12506
30d50328
JK
125072010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12508
12509 * server.c (handle_target_event): Use target_signal_to_host for
12510 resume_info.sig initialization.
12511 * target.h (struct thread_resume) <sig>: New comment.
12512
5c3216e2
OS
125132010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12514
c6f46ca0
OS
12515 * server.c (handle_query): strcpy() the returned string from paddress()
12516 instead of sprintf().
5c3216e2
OS
12517 * utils.c (paddress): Return phex_nz().
12518
6bd31874
JB
125192010-07-07 Joel Brobecker <brobecker@adacore.com>
12520
12521 * server.c (handle_v_cont): Call mourn_inferior if process
12522 just exited.
12523 (myresume): Likewise.
12524
0fb4aa4b
PA
125252010-07-01 Pedro Alves <pedro@codesourcery.com>
12526
12527 Static tracepoints, and integration with UST.
12528
12529 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12530 * mem-break.c (uninsert_all_breakpoints)
12531 (reinsert_all_breakpoints): New.
12532 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12533 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12534 (gdb_agent_ust_loaded, helper_thread_id)
12535 (gdb_agent_helper_thread_id): New macros.
12536 (struct ipa_sym_addresses): Add addr_ust_loaded,
12537 addr_helper_thread_id, addr_cmd_buf.
12538 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12539 (in_process_agent_loaded_ust): New.
12540 (write_e_ust_not_loaded): New.
12541 (maybe_write_ipa_ust_not_loaded): New.
12542 (struct collect_static_trace_data_action): New.
12543 (enum tracepoint_type) <static_tracepoint>: New.
12544 (struct tracepoint) <handle>: Mention static tracepoints.
12545 (struct static_tracepoint_ctx): New.
12546 (CMD_BUF_SIZE): New.
12547 (add_tracepoint_action): Handle static tracepoint actions.
12548 (unprobe_marker_at): New.
12549 (clear_installed_tracepoints): Handle static tracepoints.
12550 (cmd_qtdp): Handle static tracepoints.
12551 (probe_marker_at): New.
12552 (cmd_qtstart): Handle static tracepoints.
12553 (response_tracepoint): Handle static tracepoints.
12554 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12555 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12556 (get_context_regcache): Handle static tracepoints.
12557 (do_action_at_tracepoint): Handle static tracepoint actions.
12558 (traceframe_find_block_type): Handle static trace data blocks.
12559 (traceframe_read_sdata): New.
12560 (download_tracepoints): Download static tracepoint actions.
12561 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12562 (GDB_PROBE_NAME): New.
12563 (ust_ops): New.
12564 (GET_UST_SYM): New.
12565 (USTF): New.
12566 (dlsym_ust): New.
12567 (ust_marker_to_static_tracepoint): New.
12568 (gdb_probe): New.
12569 (collect_ust_data_at_tracepoint): New.
12570 (gdb_ust_probe): New.
12571 (UNIX_PATH_MAX, SOCK_DIR): New.
12572 (gdb_ust_connect_sync_socket): New.
12573 (resume_thread, stop_thread): New.
12574 (run_inferior_command): New.
12575 (init_named_socket): New.
12576 (gdb_ust_socket_init): New.
12577 (cstr_to_hexstr): New.
12578 (next_st): New.
12579 (first_marker, next_marker): New.
12580 (response_ust_marker): New.
12581 (cmd_qtfstm, cmd_qtsstm): New.
12582 (unprobe_marker_at, probe_marker_at): New.
12583 (cmd_qtstmat, gdb_ust_thread): New.
12584 (gdb_ust_init): New.
12585 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12586 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12587 (ST_REGENTRY): New.
12588 (x86_64_st_collect_regmap): New.
12589 (X86_64_NUM_ST_COLLECT_GREGS): New.
12590 (AMD64_RIP_REGNUM): New.
12591 (supply_static_tracepoint_registers): New.
12592 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12593 (ST_REGENTRY): New.
12594 (i386_st_collect_regmap): New.
12595 (i386_NUM_ST_COLLECT_GREGS): New.
12596 (supply_static_tracepoint_registers): New.
12597 * server.c (handle_query): Handle qXfer:statictrace:read.
12598 <qSupported>: Report support for StaticTracepoints, and
12599 qXfer:statictrace:read features.
12600 * server.h (traceframe_read_sdata)
12601 (supply_static_tracepoint_registers): Declare.
12602 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12603 (unpack_varlen_hex): Include in IPA build.
12604 * Makefile.in (ustlibs, ustinc): New.
12605 (IPA_OBJS): Add remote-utils-ipa.o.
12606 ($(IPA_LIB)): Link -ldl and -lpthread.
12607 (UST_CFLAGS): New.
12608 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12609 * config.in, configure: Regenerate.
12610
9e4344e5
PA
126112010-06-20 Ian Lance Taylor <iant@google.com>
12612 Pedro Alves <pedro@codesourcery.com>
12613
12614 * linux-x86-low.c (always_true): Delete.
12615 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12616 trying to fool the compiler with always_true.
12617
c6beb2cb
PA
126182010-06-20 Pedro Alves <pedro@codesourcery.com>
12619
12620 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12621 conditions in gdbserver.
12622
d2ed6730
UW
126232010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12624
12625 * spu-low.c (spu_read_memory): Wrap around local store limit.
12626 (spu_write_memory): Likewise.
12627
4e29fb54
PA
126282010-06-15 Pedro Alves <pedro@codesourcery.com>
12629
12630 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12631 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12632 LONGEST uses.
12633 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12634 uses.
12635 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12636 uses with LONGEST uses.
12637
6a271cae
PA
126382010-06-14 Stan Shebs <stan@codesourcery.com>
12639 Pedro Alves <pedro@codesourcery.com>
12640
12641 Bytecode compiler.
12642
12643 * linux-x86-low.c: Include limits.h.
12644 (add_insns): New.
12645 (always_true): New.
12646 (EMIT_ASM): New.
12647 (EMIT_ASM32): New.
12648 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12649 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12650 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12651 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12652 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12653 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12654 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12655 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12656 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12657 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12658 (amd64_emit_void_call_2): New.
12659 (amd64_emit_ops): New.
12660 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12661 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12662 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12663 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12664 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12665 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12666 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12667 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12668 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12669 (i386_emit_stack_adjust, i386_emit_int_call_1)
12670 (i386_emit_void_call_2): New.
12671 (i386_emit_ops): New.
12672 (x86_emit_ops): New.
12673 (the_low_target): Install x86_emit_ops.
12674 * server.h (struct emit_ops): New.
12675 (get_raw_reg_func_addr): Declare.
12676 (current_insn_ptr, emit_error): Declare.
12677 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12678 (set_trace_state_variable_value): New defines.
12679 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12680 addr_get_trace_state_variable_value and
12681 addr_set_trace_state_variable_value.
12682 (symbol_list): New fields for get_raw_reg,
12683 get_trace_state_variable_value and set_trace_state_variable_value.
12684 (condfn): New typedef.
12685 (struct tracepoint): New field `compiled_cond'.
12686 (do_action_at_tracepoint): Clear compiled_cond.
12687 (get_trace_state_variable_value, set_trace_state_variable_value):
12688 Export in the IPA.
12689 (condition_true_at_tracepoint): If there's a compiled condition,
12690 run that.
12691 (current_insn_ptr, emit_error): New globals.
12692 (struct bytecode_address): New.
12693 (get_raw_reg_func_addr): New.
12694 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12695 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12696 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12697 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12698 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12699 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12700 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12701 (compile_tracepoint_condition, compile_bytecodes): New.
12702 * target.h (emit_ops): Forward declare.
12703 (struct target_ops): New field emit_ops.
12704 (target_emit_ops): New.
12705 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12706 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12707 * linux-low.c (linux_emit_ops): New.
12708 (linux_target_ops): Install it.
12709 * linux-low.h (struct linux_target_ops): New field emit_ops.
12710
92b72907
UW
127112010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12712
12713 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12714 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12715
fa593d66
PA
127162010-06-01 Pedro Alves <pedro@codesourcery.com>
12717 Stan Shebs <stan@codesourcery.com>
12718
12719 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12720 (all): Depend on $(extra_libraries).
12721 (install-only): Install the IPA.
12722 (IPA_OBJS, IPA_LIB): New.
12723 (clean): Remove the IPA lib.
12724 (IPAGENT_CFLAGS): New.
12725 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12726 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12727 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12728 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12729 * configure.ac: Check for atomic builtins support in the compiler.
12730 (IPA_DEPFILES, extra_libraries): Define.
12731 * configure.srv (ipa_obj): Add description.
12732 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12733 (i[34567]86-*-linux*): Set ipa_obj.
12734 (x86_64-*-linux*): Set ipa_obj.
12735 * linux-low.c (stabilizing_threads): New.
12736 (supports_fast_tracepoints): New.
12737 (linux_detach): Stabilize threads before detaching.
12738 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12739 the lwp is either not stabilizing, or is moving out of a jump pad.
12740 (linux_fast_tracepoint_collecting): New.
12741 (maybe_move_out_of_jump_pad): New.
12742 (enqueue_one_deferred_signal): New.
12743 (dequeue_one_deferred_signal): New.
12744 (linux_wait_for_event_1): If moving out of a jump pad, defer
12745 pending signals to later.
12746 (linux_stabilize_threads): New.
12747 (linux_wait_1): Check if threads need moving out of jump pads, and
12748 do it if so.
12749 (stuck_in_jump_pad_callback): New.
12750 (move_out_of_jump_pad_callback): New.
12751 (lwp_running): New.
12752 (linux_resume_one_lwp): Handle moving out of jump pads.
12753 (linux_set_resume_request): Dequeue deferred signals.
12754 (need_step_over_p): Also step over fast tracepoint jumps.
12755 (start_step_over): Also uninsert fast tracepoint jumps.
12756 (finish_step_over): Also reinsert fast tracepoint jumps.
12757 (linux_install_fast_tracepoint_jump): New.
12758 (linux_target_ops): Install linux_stabilize_threads and
12759 linux_install_fast_tracepoint_jump_pad.
12760 * linux-low.h (linux_target_ops) <get_thread_area,
12761 install_fast_tracepoint_jump_pad>: New fields.
12762 (struct lwp_info) <collecting_fast_tracepoint,
12763 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12764 (linux_get_thread_area): Declare.
12765 * linux-x86-low.c (jump_insn): New.
12766 (x86_get_thread_area): New.
12767 (append_insns): New.
12768 (push_opcode): New.
12769 (amd64_install_fast_tracepoint_jump_pad): New.
12770 (i386_install_fast_tracepoint_jump_pad): New.
12771 (x86_install_fast_tracepoint_jump_pad): New.
12772 (the_low_target): Install x86_get_thread_area and
12773 x86_install_fast_tracepoint_jump_pad.
12774 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12775 (struct fast_tracepoint_jump): New.
12776 (fast_tracepoint_jump_insn): New.
12777 (fast_tracepoint_jump_shadow): New.
12778 (find_fast_tracepoint_jump_at): New.
12779 (fast_tracepoint_jump_here): New.
12780 (delete_fast_tracepoint_jump): New.
12781 (set_fast_tracepoint_jump): New.
12782 (uninsert_fast_tracepoint_jumps_at): New.
12783 (reinsert_fast_tracepoint_jumps_at): New.
12784 (set_breakpoint_at): Use write_inferior_memory.
12785 (uninsert_raw_breakpoint): Use write_inferior_memory.
12786 (check_mem_read): Mask out fast tracepoint jumps.
12787 (check_mem_write): Mask out fast tracepoint jumps.
12788 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12789 (set_fast_tracepoint_jump): Declare.
12790 (delete_fast_tracepoint_jump)
12791 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12792 (reinsert_fast_tracepoint_jumps_at): Declare.
12793 * regcache.c: Don't compile many functions when building the
12794 in-process agent library.
12795 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12796 the register buffer in the heap.
12797 (free_register_cache): If the register buffer isn't owned by the
12798 regcache, don't free it.
12799 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12800 pre-existing register caches.
12801 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12802 type.
12803 (convert_ascii_to_int): : Constify `from' parameter type.
12804 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12805 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12806 the needed buffer in-place.
12807 (relocate_instruction): New.
12808 * server.c (handle_query) <qSymbols>: If the target supports
12809 tracepoints, give it a chance of looking up symbols. Report
12810 support for fast tracepoints.
12811 (handle_status): Stabilize threads.
12812 (process_serial_event): Adjust.
12813 * server.h (struct fast_tracepoint_jump): Forward declare.
12814 (struct process_info) <fast_tracepoint_jumps>: New field.
12815 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12816 (decode_X_packet, decode_M_packet): Adjust.
12817 (relocate_instruction): Declare.
12818 (in_process_agent_loaded): Declare.
12819 (tracepoint_look_up_symbols): Declare.
12820 (struct fast_tpoint_collect_status): Declare.
12821 (fast_tracepoint_collecting): Declare.
12822 (force_unlock_trace_buffer): Declare.
12823 (handle_tracepoint_bkpts): Declare.
12824 (initialize_low_tracepoint)
12825 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12826 * target.h (struct target_ops) <stabilize_threads,
12827 install_fast_tracepoint_jump_pad>: New fields.
12828 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12829 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12830 [HAVE_STDINT_H]: Include stdint.h.
12831 (trace_debug_1): Rename to ...
12832 (trace_vdebug): ... this.
12833 (trace_debug): Rename to ...
12834 (trace_debug_1): ... this. Add `level' parameter.
12835 (trace_debug): New.
12836 (ATTR_USED, ATTR_NOINLINE): New.
12837 (IP_AGENT_EXPORT): New.
12838 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12839 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12840 (about_to_request_buffer_space, trace_buffer_is_full)
12841 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12842 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12843 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12844 (traceframe_write_count, traceframes_created)
12845 (trace_state_variables)
12846 New renaming defines.
12847 (struct ipa_sym_addresses): New.
12848 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12849 (symbol_list): New.
12850 (ipa_sym_addrs): New.
12851 (all_tracepoint_symbols_looked_up): New.
12852 (in_process_agent_loaded): New.
12853 (write_e_ipa_not_loaded): New.
12854 (maybe_write_ipa_not_loaded): New.
12855 (tracepoint_look_up_symbols): New.
12856 (debug_threads) [IN_PROCESS_AGENT]: New.
12857 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12858 (UNKNOWN_SIDE_EFFECTS): New.
12859 (stop_tracing): New.
12860 (flush_trace_buffer): New.
12861 (stop_tracing_bkpt): New.
12862 (flush_trace_buffer_bkpt): New.
12863 (read_inferior_integer): New.
12864 (read_inferior_uinteger): New.
12865 (read_inferior_data_pointer): New.
12866 (write_inferior_data_pointer): New.
12867 (write_inferior_integer): New.
12868 (write_inferior_uinteger): New.
12869 (struct collect_static_trace_data_action): Delete.
12870 (enum tracepoint_type): New.
12871 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12872 <actions_str, step_actions, step_actions_str>: Only include in
12873 GDBserver.
fa593d66
PA
12874 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12875 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12876 (tracepoints): Use IP_AGENT_EXPORT.
12877 (last_tracepoint): Don't include in the IPA.
12878 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12879 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12880 (alloced_trace_state_variables): New.
12881 (trace_state_variables): Use IP_AGENT_EXPORT.
12882 (traceframe_t): Delete unused variable.
12883 (circular_trace_buffer): Don't include in the IPA.
12884 (trace_buffer_start): Delete.
12885 (struct trace_buffer_control): New.
12886 (trace_buffer_free): Delete.
12887 (struct ipa_trace_buffer_control): New.
12888 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12889 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12890 New.
12891 (trace_buffer_ctrl): New.
12892 (TRACE_BUFFER_CTRL_CURR): New.
12893 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12894 Reimplement as macros.
12895 (trace_buffer_wrap): Delete.
12896 (traceframe_write_count, traceframe_read_count)
12897 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12898 (struct tracepoint_hit_ctx) <type>: New field.
12899 (struct fast_tracepoint_ctx): New.
12900 (memory_barrier): New.
12901 (cmpxchg): New.
12902 (record_tracepoint_error): Update atomically in the IPA.
12903 (clear_inferior_trace_buffer): New.
12904 (about_to_request_buffer_space): New.
12905 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12906 updating the same buffer.
12907 (add_tracepoint): Default the tracepoint's type to trap
12908 tracepoint, and orig_size to -1.
12909 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12910 internal variables.
12911 (create_trace_state_variable): New parameter `gdb'. Handle it.
12912 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12913 (cmd_qtdp): Handle fast tracepoints.
12914 (cmd_qtdv): Adjust.
12915 (max_jump_pad_size): New.
12916 (gdb_jump_pad_head): New.
12917 (get_jump_space_head): New.
12918 (claim_jump_space): New.
12919 (sort_tracepoints): New.
12920 (MAX_JUMP_SIZE): New.
12921 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12922 IPA.
12923 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12924 support. Upload fast traceframes, and delete internal IPA
12925 breakpoints.
12926 (stop_tracing_handler): New.
12927 (flush_trace_buffer_handler): New.
12928 (cmd_qtstop): Upload fast tracepoints.
12929 (response_tracepoint): Handle fast tracepoints.
12930 (tracepoint_finished_step): Upload fast traceframes. Set the
12931 tracepoint hit context's tracepoint type.
12932 (handle_tracepoint_bkpts): New.
12933 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12934 type. Add comment about fast tracepoints.
12935 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12936 non-existing action_str field.
12937 (get_context_regcache): Handle fast tracepoints.
12938 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12939 to the regcache.
12940 (fast_tracepoint_from_jump_pad_address): New.
12941 (fast_tracepoint_from_ipa_tpoint_address): New.
12942 (collecting_t): New.
12943 (force_unlock_trace_buffer): New.
12944 (fast_tracepoint_collecting): New.
12945 (collecting): New.
12946 (gdb_collect): New.
12947 (write_inferior_data_ptr): New.
12948 (target_tp_heap): New.
12949 (target_malloc): New.
12950 (download_agent_expr): New.
12951 (UALIGN): New.
12952 (download_tracepoints): New.
12953 (download_trace_state_variables): New.
12954 (upload_fast_traceframes): New.
12955 (IPA_FIRST_TRACEFRAME): New.
12956 (IPA_NEXT_TRACEFRAME_1): New.
12957 (IPA_NEXT_TRACEFRAME): New.
12958 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12959 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12960 (gdb_jump_pad_buffer_end): New.
12961 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12962 (initialize_tracepoint): Adjust.
12963 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12964 buffer. Initialize the low module.
12965 * utils.c (PREFIX, TOOLNAME): New.
12966 (malloc_failure): Use PREFIX.
12967 (error): In the IPA, an error causes an exit.
12968 (fatal, warning): Use PREFIX.
12969 (internal_error): Use TOOLNAME.
12970 (NUMCELLS): Increase to 10.
12971 * configure, config.in: Regenerate.
12972
d149dd1d
PA
129732010-06-01 Pedro Alves <pedro@codesourcery.com>
12974
12975 * server.c (handle_query) <qSupported>: Do two passes over the
12976 qSupported string to avoid nesting strtok.
12977
f6528abd
JK
129782010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12979
12980 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12981 (CDEPS): New.
12982 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12983 -Wl,--dynamic-list.
12984 * configure: Regenerate.
12985 * proc-service.list: New.
12986
ca2a87a0
JK
129872010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12988
12989 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12990 New comment.
12991
363a6e9f
OS
129922010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12993
12994 * gdbreplay.c (remote_open): Check error return from socket() call by
12995 its equality to -1 not by it being negative.
12996 * remote-utils.c (remote_open): Likewise.
12997
d23b6cb1
PA
129982010-05-23 Pedro Alves <pedro@codesourcery.com>
12999
13000 * config.h: Regenerate.
13001
28d3cf85
MK
130022010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13003
13004 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13005 doesn't provide PTRACE_GET_THREAD_AREA.
13006
fea36a59
MK
130072010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13008
13009 * linux-m68k-low.c: Include <asm/ptrace.h>
13010 (ps_get_thread_area): Implement.
13011
24b066ba
DE
130122010-05-03 Doug Evans <dje@google.com>
13013
13014 * event-loop.c (struct callback_event): New struct.
13015 (callback_list): New global.
13016 (append_callback_event, delete_callback_event): New functions.
13017 (process_callback): New function.
13018 (start_event_loop): Call it.
13019 * remote-utils.c (NOT_SCHEDULED): Define.
13020 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13021 moved out of readchar.
13022 (readchar): Rewrite. Call reschedule before returning.
13023 (reset_readchar): New function.
13024 (remote_close): Call it.
13025 (process_remaining, reschedule): New functions.
13026 * server.h (callback_handler_func): New typedef.
13027 (append_callback_event, delete_callback_event): Declare.
13028
9836d6ea
PA
130292010-05-03 Pedro Alves <pedro@codesourcery.com>
13030
13031 * proc-service.c (ps_pglobal_lookup): Use
13032 thread_db_look_up_one_symbol.
13033 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13034 parameter. Use it instead of all_symbols_looked_up.
13035 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13036 field.
13037 (all_symbols_looked_up): Don't declare.
13038 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13039 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13040 field.
13041 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13042 Set all_symbols_looked_up here.
13043 (thread_db_look_up_one_symbol): New.
13044 (thread_db_get_tls_address): Adjust.
13045 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13046 thread_db object on the heap, and tentatively set it in the
13047 process structure.
13048 (thread_db_init): Don't set all_symbols_looked_up here.
13049 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13050
7984d532
PA
130512010-05-03 Pedro Alves <pedro@codesourcery.com>
13052
13053 * linux-low.c (linux_kill, linux_detach): Adjust.
13054 (status_pending_p_callback): Remove redundant statement. Check
13055 for !TARGET_WAITIKIND_IGNORE, instead of
13056 TARGET_WAITKIND_STOPPED.
13057 (handle_tracepoints): Make sure LWP is locked. Adjust.
13058 (linux_wait_for_event_1): Adjust.
13059 (linux_cancel_breakpoints): New.
13060 (unsuspend_one_lwp): New.
13061 (unsuspend_all_lwps): New.
13062 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13063 (send_sigstop_callback): Change return type to int, add new
13064 `except' parameter and handle it.
13065 (suspend_and_send_sigstop_callback): New.
13066 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13067 pass them down. If SUSPEND, also increment the lwp's suspend
13068 count.
13069 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13070 (need_step_over_p): Don't consider suspended LWPs.
13071 (start_step_over): Adjust.
13072 (proceed_one_lwp): Change return type to int, add new `except'
13073 parameter and handle it.
13074 (unsuspend_and_proceed_one_lwp): New.
13075 (proceed_all_lwps): Use find_inferior instead of
13076 for_each_inferior.
13077 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13078 also decrement the suspend count of LWPs. Pass `except' down,
13079 instead of hacking its suspend count.
13080 (linux_pause_all): Add `freeze' parameter. Adjust.
13081 (linux_unpause_all): New.
13082 (linux_target_ops): Install linux_unpause_all.
13083 * server.c (handle_status): Adjust.
13084 * target.h (struct target_ops): New fields `unpause_all' and
13085 `cancel_breakpoints'. Add new parameter to `pause_all'.
13086 (pause_all): Add new `freeze' parameter.
13087 (unpause_all): New.
13088 (cancel_breakpoints): New.
13089 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13090 cancel breakpoints.
13091 (cmd_qtstart): Pause threads.
13092 (stop_tracing): Pause threads, and cancel breakpoints.
13093 * win32-low.c (win32_target_ops): Adjust.
13094
e471f25b
PA
130952010-05-03 Pedro Alves <pedro@codesourcery.com>
13096
13097 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13098 the inferior right away from here...
13099 (linux_wait_1): ... to here, and adjust to check the thread's
13100 last_resume_kind instead of the lwp's step or stop_expected flags.
13101
1915ef4f
PA
131022010-05-02 Pedro Alves <pedro@codesourcery.com>
13103
13104 * README: Use consistent `GDB' and `GDBserver' spellings.
13105
f9e39928
PA
131062010-05-02 Pedro Alves <pedro@codesourcery.com>
13107
13108 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13109 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13110 (linux_detach_one_lwp): Assume the lwp is stopped.
13111 (any_thread_of): Delete.
13112 (linux_detach): Stop all lwps here. Don't blindly delete all
13113 breakpoints.
13114 (delete_lwp_callback): New.
13115 (linux_mourn): Delete all lwps of the process that is gone.
13116 (linux_wait_1): Don't delete the last lwp of the process here.
13117 * mem-break.h (mark_breakpoints_out): Declare.
13118 * mem-break.c (mark_breakpoints_out): New.
13119 (free_all_breakpoints): Use it.
13120 * server.c (handle_target_event): If the process is gone, mark
13121 breakpoints out.
13122 * thread-db.c (struct thread_db) <create_bp>: New field.
13123 (thread_db_enable_reporting): Fix prototype. Store a thread event
13124 breakpoint reference in the thread_db struct.
13125 (thread_db_load_search): Clear the thread_db object.
13126 (try_thread_db_load_1): Ditto.
13127 (switch_to_process): New.
13128 (disable_thread_event_reporting): Use it.
13129 (remove_thread_event_breakpoints): New.
13130 (thread_db_detach, thread_db_mourn): Use it.
13131
1e7fc18c
PA
131322010-05-01 Pedro Alves <pedro@codesourcery.com>
13133
13134 * linux-low.c (linux_enable_event_reporting): New.
13135 (linux_wait_for_event_1, handle_extended_wait): Use it.
13136
02fc4de7
PA
131372010-04-30 Pedro Alves <pedro@codesourcery.com>
13138
13139 * linux-low.c (linux_kill_one_lwp, linux_kill)
13140 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13141 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13142 SIGSTOP even if the LWP is stopped.
13143 (send_sigstop_callback): New.
13144 (stop_all_lwps): Use send_sigstop_callback instead.
13145 (linux_resume_one_thread): Adjust.
13146 (proceed_one_lwp): Still proceed an LWP that the client has
13147 requested to stop, if we haven't reported it as stopped yet. Make
13148 sure that LWPs the client want stopped, have a pending SIGSTOP.
13149
bc3b5632
DE
131502010-04-26 Doug Evans <dje@google.com>
13151
ae1ada35
DE
13152 * server.c (handle_general_set): Make static.
13153
bc3b5632
DE
13154 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13155 Print received char after testing for error/eof instead of before.
13156 (input_interrupt): Tweak comment.
13157
65730243
DE
131582010-04-23 Doug Evans <dje@google.com>
13159
13160 * server.c (start_inferior): Print inferior argv if --debug.
13161
a8ae7dc0
AR
131622010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13163
13164 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13165 * nto-x86-low.c: Include server.h
13166
1c07cc19
PM
131672010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13168
13169 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13170 be consistent with other sources of this directory.
13171 (init_registers_amd64): Correct name of source file of this function
13172 in the comment.
13173
e0a61e09
PM
131742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13175
13176 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13177 64-bit executables.
13178
54709339
PM
131792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13180
13181 * win32-i386-low.c: Add 64-bit support.
13182 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13183 (init_registers_amd64): Declare.
13184 (mappings): Add 64-bit version of array.
13185 (init_windows_x86): New function.
13186 (the_low_target): Change init_arch field to init_windows_x86.
13187
e8f0053d
PM
131882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13189
13190 * win32-low.c: Adapt to support also 64-bit architecture.
13191 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13192 (get_image_name): Use SIZE_T type for local variable `done'.
13193 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13194 (toolhelp_get_dll_name): Idem.
13195 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13196 Use uintptr_t typecast to avoid warning.
13197 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13198 (handle_exception): Use phex_nz to avoid warning.
13199 (win32_wait): Remove unused local variable `process'.
13200
c481e77e
PM
132012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13202
13203 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13204 `amd64-avx.o'.
13205
12ea4b69
PM
132062010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13207
13208 * configure.ac: Use `ws2_32' library for srv_mingw.
13209 * configure: Regenerate.
13210 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13211 * remote-utils.c: Likewise.
13212
f6d1620c
L
132132010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13214
13215 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13216 if __x86_64__ is defined.
13217
8e642873
PM
132182010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13219
13220 * configure: Regenerate.
13221
711e434b
PM
132222010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13223
13224 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13225 * target.h (target_ops): New get_tib_address field.
13226 * win32-low.h (win32_thread_info): Add thread_local_base field.
13227 * win32-low.c (child_add_thread): Add tlb argument.
13228 Set thread_local_base field to TLB.
13229 (get_child_debug_event): Adapt to child_add_thread change.
13230 (win32_get_tib_address): New function.
13231 (win32_target_ops): Set get_tib_address field to
13232 win32_get_tib_address.
13233 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13234
505106cd
PA
132352010-04-12 Pedro Alves <pedro@codesourcery.com>
13236
505106cd
PA
13237 * linux-low.c (linux_mourn): Also remove the process.
13238 * server.c (handle_target_event): Don't remove the process here.
13239 * nto-low.c (nto_mourn): New.
13240 (nto_target_ops): Install it.
13241 * spu-low.c (spu_mourn): New.
13242 (spu_target_ops): Install it.
13243 * win32-low.c (win32_mourn): New.
13244 (win32_target_ops): Install it.
13245
e8470a06
PA
132462010-04-12 Pedro Alves <pedro@codesourcery.com>
13247
13248 * server.h (buffer_xml_printf): Remove redundant `;'.
13249
45ba0d02
PA
132502010-04-12 Pedro Alves <pedro@codesourcery.com>
13251
13252 * regcache.c (set_register_cache): Invalidate regcaches before
13253 changing the register cache layout.
13254 (regcache_invalidate_one): Allow a NULL regcache.
13255 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13256 regcaches before changing the register cache layout or the target
13257 regsets.
13258
59e04013
L
132592010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13260
13261 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13262 variable warning on Linux/x86-64.
13263
8336d594
PA
132642010-04-11 Pedro Alves <pedro@codesourcery.com>
13265
13266 GDBserver disconnected tracing support.
13267
13268 * linux-low.c (linux_remove_process): Delete.
13269 (add_lwp): Don't set last_resume_kind here.
13270 (linux_kill): Use `mourn'.
13271 (linux_detach): Use `thread_db_detach', and `mourn'.
13272 (linux_mourn): New.
13273 (linux_attach_lwp_1): Adjust comment.
13274 (linux_attach): last_resume_kind moved the thread_info; adjust.
13275 (status_pending_p_callback): Adjust.
13276 (linux_wait_for_event_1): Adjust.
13277 (count_events_callback, select_singlestep_lwp_callback)
13278 (select_event_lwp_callback, cancel_breakpoints_callback)
13279 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13280 (proceed_one_lwp): Adjust.
13281 (linux_async): Add debug output.
13282 (linux_thread_stopped): New.
13283 (linux_pause_all): New.
13284 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13285 linux_pause_all.
13286 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13287 (thread_db_free): Delete declaration.
13288 (thread_db_detach, thread_db_mourn): Declare.
13289 * thread-db.c (thread_db_init): Use thread_db_mourn.
13290 (thread_db_free): Delete, split in two.
13291 (disable_thread_event_reporting): New.
13292 (thread_db_detach): New.
13293 (thread_db_mourn): New.
13294
13295 * server.h (struct thread_info) <last_resume_kind>: New field.
13296 <attached>: Add comment.
13297 <gdb_detached>: New field.
13298 (handler_func): Change return type to int.
13299 (handle_serial_event, handle_target_event): Ditto.
13300 (gdb_connected): Declare.
13301 (tracing): Delete.
13302 (disconnected_tracing): Declare.
13303 (stop_tracing): Declare.
13304
13305 * server.c (handle_query) <qSupported>: Report support for
13306 disconnected tracing.
13307 (queue_stop_reply_callback): Account for running threads.
13308 (gdb_wants_thread_stopped): New.
13309 (gdb_wants_all_threads_stopped): New.
13310 (gdb_reattached_process): New.
13311 (handle_status): Clear the `gdb_detached' flag of all processes.
13312 In all-stop, stop all threads.
13313 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13314 (process_serial_event): If the remote connection breaks, or if an
13315 exit was forced with "monitor exit", force an event loop exit.
13316 Handle disconnected tracing on detach.
13317 (handle_serial_event): Adjust.
13318 (handle_target_event): If GDB isn't connected, forward events back
13319 to the inferior, unless the last process exited, in which case,
13320 exit gdbserver. Adjust interface.
13321
13322 * remote-utils.c (remote_open): Don't block in accept. Instead
13323 register an event loop source on the listen socket file
13324 descriptor. Refactor bits into ...
13325 (listen_desc): ... this new global.
13326 (gdb_connected): ... this new function.
13327 (enable_async_notification): ... this new function.
13328 (handle_accept_event): ... this new function.
13329 (remote_close): Clear remote_desc.
13330
13331 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13332
13333 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13334 New fields.
13335 (mourn_inferior): Define.
13336 (target_process_qsupported): Avoid the dangling else problem.
13337 (thread_stopped): Define.
13338 (pause_all): Define.
13339 (target_waitstatus_to_string): Declare.
13340 * target.c (target_waitstatus_to_string): New.
13341
13342 * tracepoint.c (tracing): Make extern.
13343 (disconnected_tracing): New.
13344 (stop_tracing): Make extern. Handle tracing stops due to GDB
13345 disconnecting.
13346 (cmd_qtdisconnected): New.
13347 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13348 (handle_tracepoint_general_set): Handle QTDisconnected.
13349
13350 * event-loop.c (event_handler_func): Change return type to int.
13351 (process_event): Bail out if the event handler wants the event
13352 loop to stop.
13353 (handle_file_event): Ditto.
13354 (start_event_loop): Bail out if the event handler wants the event
13355 loop to stop.
13356
13357 * nto-low.c (nto_target_ops): Adjust.
13358 * spu-low.c (spu_wait): Don't remove the process here.
13359 (spu_target_ops): Adjust.
13360 * win32-low.c (win32_wait): Don't remove the process here.
13361 (win32_target_ops): Adjust.
13362
5d267c4c
PA
133632010-04-11 Pedro Alves <pedro@codesourcery.com>
13364
13365 * regcache.c (realloc_register_cache): Invalidate inferior's
13366 regcache before recreating it.
13367
623ccd72
PA
133682010-04-09 Pedro Alves <pedro@codesourcery.com>
13369
13370 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13371
219f2f23
PA
133722010-04-09 Stan Shebs <stan@codesourcery.com>
13373 Pedro Alves <pedro@codesourcery.com>
13374
13375 * server.h (LONGEST): New.
13376 (struct thread_info) <while_stepping>: New field.
13377 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13378 Declare.
13379 (initialize_tracepoint, handle_tracepoint_general_set)
13380 (handle_tracepoint_query, tracepoint_finished_step)
13381 (tracepoint_was_hit, release_while_stepping_state_list):
13382 (current_traceframe): Declare.
13383 * server.c (handle_general_set): Handle tracepoint packets.
13384 (read_memory): New.
13385 (write_memory): New.
13386 (handle_search_memory_1): Use read_memory.
13387 (handle_query): Report support for conditional tracepoints, trace
13388 state variables, and tracepoint sources. Handle tracepoint
13389 queries.
13390 (main): Initialize the tracepoints module.
13391 (process_serial_event): Handle traceframe reads/writes.
13392
13393 * linux-low.c (handle_tracepoints): New.
13394 (linux_wait_1): Call it.
13395 (linux_resume_one_lwp): Handle while-stepping.
13396 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13397 (linux_target_ops): Install them.
13398 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13399 New field.
13400 * linux-x86-low.c (x86_supports_tracepoints): New.
13401 (the_low_target). Install it.
13402
13403 * mem-break.h (delete_breakpoint): Declare.
13404 * mem-break.c (delete_breakpoint): Make external.
13405
13406 * target.h (struct target_ops): Add `supports_tracepoints',
13407 `read_pc', and `write_pc' fields.
13408 (target_supports_tracepoints): Define.
13409 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13410 (phex_nz): New.
13411
13412 * regcache.h (struct regcache) <registers_owned>: New field.
13413 (init_register_cache, regcache_cpy): Declare.
13414 (regcache_read_pc, regcache_write_pc): Declare.
13415 (register_cache_size): Declare.
13416 (supply_regblock): Declare.
13417 * regcache.c (init_register_cache): New.
13418 (new_register_cache): Use it.
13419 (regcache_cpy): New.
13420 (register_cache_size): New.
13421 (supply_regblock): New.
13422 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13423
219f2f23
PA
13424 * tracepoint.c: New.
13425
13426 * Makefile.in (OBS): Add tracepoint.o.
13427 (tracepoint.o): New rule.
13428
3a13a53b
L
134292010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13430
13431 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13432 (i386-mmx.o): New.
13433 (i386-mmx.c): Likewise.
13434 (i386-mmx-linux.o): Likewise.
13435 (i386-mmx-linux.c): Likewise.
13436
13437 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13438 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13439 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13440 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13441
13442 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13443 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13444 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13445
1570b33e
L
134462010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13447
13448 * Makefile.in (clean): Updated.
13449 (i386-avx.o): New.
13450 (i386-avx.c): Likewise.
13451 (i386-avx-linux.o): Likewise.
13452 (i386-avx-linux.c): Likewise.
13453 (amd64-avx.o): Likewise.
13454 (amd64-avx.c): Likewise.
13455 (amd64-avx-linux.o): Likewise.
13456 (amd64-avx-linux.c): Likewise.
13457
13458 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13459 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13460 (srv_amd64_regobj): Add amd64-avx.o.
13461 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13462 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13463 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13464 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13465 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13466 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13467 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13468
13469 * i387-fp.c: Include "i386-xstate.h".
13470 (i387_xsave): New.
13471 (i387_cache_to_xsave): Likewise.
13472 (i387_xsave_to_cache): Likewise.
13473 (x86_xcr0): Likewise.
13474
13475 * i387-fp.h (i387_cache_to_xsave): Likewise.
13476 (i387_xsave_to_cache): Likewise.
13477 (x86_xcr0): Likewise.
13478
13479 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13480 * linux-crisv32-low.c (target_regsets): Likewise.
13481 * linux-m68k-low.c (target_regsets): Likewise.
13482 * linux-mips-low.c (target_regsets): Likewise.
13483 * linux-ppc-low.c (target_regsets): Likewise.
13484 * linux-s390-low.c (target_regsets): Likewise.
13485 * linux-sh-low.c (target_regsets): Likewise.
13486 * linux-sparc-low.c (target_regsets): Likewise.
13487 * linux-xtensa-low.c (target_regsets): Likewise.
13488
13489 * linux-low.c: Include <sys/uio.h>.
13490 (regsets_fetch_inferior_registers): Support nt_type.
13491 (regsets_store_inferior_registers): Likewise.
13492 (linux_process_qsupported): New.
13493 (linux_target_ops): Add linux_process_qsupported.
13494
13495 * linux-low.h (regset_info): Add nt_type.
13496 (linux_target_ops): Add process_qsupported.
13497
13498 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13499 and <sys/uio.h>.
13500 (init_registers_i386_avx_linux): New.
13501 (init_registers_amd64_avx_linux): Likewise.
13502 (xmltarget_i386_linux_no_xml): Likewise.
13503 (xmltarget_amd64_linux_no_xml): Likewise.
13504 (PTRACE_GETREGSET): Likewise.
13505 (PTRACE_SETREGSET): Likewise.
13506 (x86_fill_xstateregset): Likewise.
13507 (x86_store_xstateregset): Likewise.
13508 (use_xml): Likewise.
13509 (x86_linux_update_xmltarget): Likewise.
13510 (x86_linux_process_qsupported): Likewise.
13511 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13512 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13513 init_registers_i386_linux here. Call
13514 x86_linux_update_xmltarget.
13515 (the_low_target): Add x86_linux_process_qsupported.
13516
13517 * server.c (handle_query): Call target_process_qsupported.
13518
13519 * target.h (target_ops): Add process_qsupported.
13520 (target_process_qsupported): New.
13521
fc7238bb
PA
135222010-04-03 Pedro Alves <pedro@codesourcery.com>
13523
13524 * inferiors.c (add_thread): Set last_status kind to
13525 TARGET_WAITKIND_IGNORE.
13526 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13527 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13528 (linux_wait_1): Move `thread' local definition to block that uses
13529 it. Don't NULL initialize `event_child'.
13530 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13531 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13532 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13533
bdabb078
PA
135342010-04-01 Pedro Alves <pedro@codesourcery.com>
13535
13536 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13537 an extended waitstatus, or by a watchpoint.
13538 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13539 thread was stepping or has been stopped by a watchpoint.
13540
d3bbe7a0
PA
135412010-04-01 Pedro Alves <pedro@codesourcery.com>
13542
13543 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13544 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13545 of another, then delete the previous, and validate all
13546 breakpoints.
13547 (validate_inserted_breakpoint): New.
13548 (delete_disabled_breakpoints): New.
13549 (validate_breakpoints): New.
13550 (check_mem_read): Validate breakpoints before trusting their
13551 shadow. Delete disabled breakpoints.
13552 (check_mem_write): Validate breakpoints before trusting they
13553 should be inserted. Delete disabled breakpoints.
13554 * mem-break.h (validate_breakpoints):
13555 * server.c (handle_query): Validate breakpoints when we see a
13556 qSymbol query.
13557
8b07ae33
PA
135582010-04-01 Pedro Alves <pedro@codesourcery.com>
13559
13560 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13561 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13562 if we could tell there's a GDB breakpoint at stop_pc.
13563 (need_step_over_p): Don't do a step over if we find a GDB
13564 breakpoint at the resume PC.
13565
13566 * mem-break.c (struct raw_breakpoint): New.
13567 (enum bkpt_type): New type `gdb_breakpoint'.
13568 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13569 fields. New field `raw'.
13570 (find_raw_breakpoint_at): New.
13571 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13572 breakpoint instead.
13573 (set_breakpoint_at): Adjust.
13574 (delete_raw_breakpoint): New.
13575 (release_breakpoint): New.
13576 (delete_breakpoint): Rename to...
13577 (delete_breakpoint_1): ... this. Add proc parameter. Use
13578 release_breakpoint. Return ENOENT.
13579 (delete_breakpoint): Reimplement.
13580 (find_breakpoint_at): Delete.
13581 (find_gdb_breakpoint_at): New.
13582 (delete_breakpoint_at): Delete.
13583 (set_gdb_breakpoint_at): New.
13584 (delete_gdb_breakpoint_at): New.
13585 (gdb_breakpoint_here): New.
13586 (set_reinsert_breakpoint): Use release_breakpoint.
13587 (uninsert_breakpoint): Rename to ...
13588 (uninsert_raw_breakpoint): ... this.
13589 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13590 (reinsert_raw_breakpoint): Change parameter type to
13591 raw_breakpoint.
13592 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13593 instead.
13594 (check_breakpoints): Adjust. Use release_breakpoint.
13595 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13596 (breakpoint_inserted_here): Ditto.
13597 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13598 Don't trust the breakpoint's shadow if it is not inserted.
13599 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13600 (delete_all_breakpoints): Adjust.
13601 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13602 use delete_breakpoint_1.
13603
13604 * mem-break.h (breakpoints_supported): Delete declaration.
13605 (set_gdb_breakpoint_at): Declare.
13606 (gdb_breakpoint_here): Declare.
13607 (delete_breakpoint_at): Delete.
13608 (delete_gdb_breakpoint_at): Declare.
13609
13610 * server.h (struct raw_breakpoint): Forward declare.
13611 (struct process_info): New field `raw_breakpoints'.
13612
13613 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13614 breakpoints.
13615
6bf5e0ba
PA
136162010-03-24 Pedro Alves <pedro@codesourcery.com>
13617
13618 * linux-low.c (status_pending_p_callback): Fix comment.
13619 (linux_wait_for_event_1): Move most of the internal breakpoint
13620 handling from here...
13621 (linux_wait_1): ... to here.
13622 (count_events_callback): New.
13623 (select_singlestep_lwp_callback): New.
13624 (select_event_lwp_callback): New.
13625 (cancel_breakpoints_callback): New.
13626 (select_event_lwp): New.
13627 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13628 priority to all LWPs that have had events that should be reported
13629 to the client. Cancel breakpoints when about to reporting the
13630 event to the client, not while stopping lwps. No longer cancel
13631 finished single-steps here.
13632 (cancel_finished_single_step): Delete.
13633 (cancel_finished_single_steps): Delete.
13634
414a389f
PA
136352010-03-24 Pedro Alves <pedro@codesourcery.com>
13636
13637 * mem-break.c (enum bkpt_type): New.
13638 (struct breakpoint): New field `type'.
13639 (set_breakpoint_at): Change return type to struct breakpoint
13640 pointer. Set type to `other_breakpoint' by default.
13641 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13642 in the breakpoint list.
13643 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13644 (reinsert_breakpoint): Rename to ...
13645 (reinsert_raw_breakpoint): ... this.
13646 (reinsert_breakpoints_at): Adjust.
13647 * mem-break.h (struct breakpoint): Declare.
13648 (set_breakpoint_at): Change return type to struct breakpoint
13649 pointer.
13650
2280c721
PA
136512010-03-24 Pedro Alves <pedro@codesourcery.com>
13652
13653 * server.c (handle_query): Assign, not compare.
13654
d50171e4
PA
136552010-03-24 Pedro Alves <pedro@codesourcery.com>
13656
13657 Teach linux gdbserver to step-over-breakpoints.
13658
13659 * linux-low.c (can_hardware_single_step): New.
13660 (supports_breakpoints): New.
13661 (handle_extended_wait): If stopping threads, read the stop pc of
13662 the new cloned LWP.
13663 (get_pc): New.
13664 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13665 low target doesn't support retrieving the PC.
13666 (add_lwp): Set last_resume_kind to resume_continue.
13667 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13668 (linux_attach): Don't clear stop_expected. Set the lwp's
13669 last_resume_kind to resume_stop.
13670 (linux_detach_one_lwp): Don't check for removed breakpoints.
13671 (check_removed_breakpoint): Delete.
13672 (status_pending_p): Rename to ...
13673 (status_pending_p_callback): ... this. Don't check for removed
13674 breakpoints. Don't consider threads that are stopped from GDB's
13675 perspective.
13676 (linux_wait_for_lwp): Always read the stop_pc here.
13677 (cancel_breakpoint): New.
13678 (step_over_bkpt): New global.
13679 (linux_wait_for_event_1): Implement stepping over breakpoints.
13680 (gdb_wants_lwp_stopped): New.
13681 (gdb_wants_all_stopped): New.
13682 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13683 single-step traps here. Store the thread's last reported target
13684 wait status.
13685 (send_sigstop): Don't clear stop_expected. Always set it,
13686 instead.
13687 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13688 (cancel_finished_single_step): New.
13689 (cancel_finished_single_steps): New.
13690 (wait_for_sigstop): Don't cancel finished single-step traps here.
13691 (linux_resume_one_lwp): Don't check for removed breakpoints.
13692 Don't set `step' on non-hardware step archs.
13693 (linux_set_resume_request): Ignore resume_stop requests if already
13694 stopping or stopped. Set the lwp's last_resume_kind.
13695 (resume_status_pending_p): Don't check for removed breakpoints.
13696 (need_step_over_p): New.
13697 (start_step_over): New.
13698 (finish_step_over): New.
13699 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13700 requests. Clear the thread's last reported target waitstatus.
13701 Don't use the `suspended' flag. Don't consider pending breakpoints.
13702 (linux_resume): Start a step-over if necessary.
13703 (proceed_one_lwp): New.
13704 (proceed_all_lwps): New.
13705 (unstop_all_lwps): New.
13706 * linux-low.h (struct lwp_info): Rewrite comment for the
13707 `suspended' flag. Add the `stop_pc' field. Delete the
13708 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13709 Add `'last_resume_kind' and `need_step_over' fields.
13710 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13711 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13712 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13713 (set_raw_breakpoint_at): New.
13714 (set_breakpoint_at): Rewrite to use it.
13715 (reinsert_breakpoint_handler): Delete.
13716 (set_reinsert_breakpoint): New.
13717 (reinsert_breakpoint_by_bp): Delete.
13718 (delete_reinsert_breakpoints): New.
13719 (uninsert_breakpoint): Rewrite.
13720 (uninsert_breakpoints_at): New.
13721 (reinsert_breakpoint): Rewrite.
13722 (reinsert_breakpoints_at): New.
13723 (check_breakpoints): Rewrite.
13724 (breakpoint_here): New.
13725 (breakpoint_inserted_here): New.
13726 (check_mem_read): Adjust.
13727 * mem-break.h (breakpoints_supported, breakpoint_here)
13728 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13729 (reinsert_breakpoint_by_bp): Delete declaration.
13730 (delete_reinsert_breakpoints): Declare.
13731 (reinsert_breakpoint): Delete declaration.
13732 (reinsert_breakpoints_at): Declare.
13733 (uninsert_breakpoint): Delete declaration.
13734 (uninsert_breakpoints_at): Declare.
13735 (check_breakpoints): Adjust prototype.
13736 * server.h: Adjust include order.
13737 (struct thread_info): Declare here. Add a `last_status' field.
13738
30ba68cb
MS
137392010-03-23 Michael Snyder <msnyder@vmware.com>
13740
13741 * server.c (crc32): New function.
13742 (handle_query): Add handling for 'qCRC:' request.
13743
b9a881c2
PA
137442010-03-23 Pedro Alves <pedro@codesourcery.com>
13745
13746 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13747 lwp had been stopped by a watchpoint.
13748
e92d13d5
PA
137492010-03-16 Pedro Alves <pedro@codesourcery.com>
13750
13751 * server.h (internal_error): Declare.
13752 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13753 * utils.c (internal_error): New function.
13754
64daa791
AS
137552010-03-15 Andreas Schwab <schwab@redhat.com>
13756
13757 * configure.srv: Fix typo setting srv_regobj.
13758
f52cd8cd
PA
137592010-03-15 Pedro Alves <pedro@codesourcery.com>
13760
13761 * linux-low.c (fetch_register): Avoid passing a non string literal
13762 format to `error'.
13763 (usr_store_inferior_registers): Ditto.
13764
93ae6fdc
PA
137652010-03-14 Pedro Alves <pedro@codesourcery.com>
13766
13767 * linux-low.c (linux_write_memory): Bail out early if peeking
13768 memory failed.
13769
c3adc08c
PA
137702010-03-14 Pedro Alves <pedro@codesourcery.com>
13771
13772 * linux-low.h (struct lwp_info): New fields
13773 `stopped_by_watchpoint' and `stopped_data_address'.
13774 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13775 here, and cache them in the lwp object.
13776 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13777 directly.
13778 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13779 field.
13780 (linux_stopped_by_watchpoint): Rewrite.
13781 (linux_stopped_data_address): Rewrite.
13782
bce522a2
PA
137832010-03-06 Simo Melenius <simo.melenius@iki.fi>
13784
13785 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13786 switching the current inferior, not before.
13787
90884b2b
L
137882010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13789
13790 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13791 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13792 i386-linux.c and amd64-linux.c.
13793 (reg-i386.o): Removed.
13794 (reg-i386.c): Likewise.
13795 (reg-i386-linux.o): Likewise.
13796 (reg-i386-linux.c): Likewise.
13797 (reg-x86-64.o): Likewise.
13798 (reg-x86-64.c): Likewise.
13799 (reg-x86-64-linux.o): Likewise.
13800 (reg-x86-64-linux.c): Likewise.
13801 (i386.o): New.
13802 (i386.c): Likewise.
13803 (i386-linux.o): Likewise.
13804 (i386-linux.c): Likewise.
13805 (amd64.o): Likewise.
13806 (amd64.c): Likewise.
13807 (amd64-linux.o): Likewise.
13808 (amd64-linux.c): Likewise.
13809
13810 * configure.srv (srv_i386_regobj): New.
13811 (srv_i386_linux_regobj): Likewise.
13812 (srv_amd64_regobj): Likewise.
13813 (srv_amd64_linux_regobj): Likewise.
13814 (srv_i386_32bit_xmlfiles): Likewise.
13815 (srv_i386_64bit_xmlfiles): Likewise.
13816 (srv_i386_xmlfiles): Likewise.
13817 (srv_amd64_xmlfiles): Likewise.
13818 (srv_i386_linux_xmlfiles): Likewise.
13819 (srv_amd64_linux_xmlfiles): Likewise.
13820 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13821 srv_xmlfiles to $srv_i386_xmlfiles.
13822 (i[34567]86-*-mingw32ce*): Likewise.
13823 (i[34567]86-*-mingw*): Likewise.
13824 (i[34567]86-*-nto*): Likewise.
13825 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13826 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13827 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13828 (x86_64-*-linux*): Likewise.
13829
13830 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13831 (init_registers_amd64_linux): New.
13832 (x86_arch_setup): Replace init_registers_x86_64_linux with
13833 init_registers_amd64_linux.
13834
193f13e6
MK
138352010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13836
13837 * configure.ac: Check for libdl. If it is not available link against
13838 static libthread_db.
13839 * configure: Regenerate.
13840
85d721b8
PA
138412010-02-22 Pedro Alves <pedro@codesourcery.com>
13842
13843 PR9605
13844
13845 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13846 handing a read watchpoint.
13847 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13848
6076632b
DE
138492010-02-12 Doug Evans <dje@google.com>
13850
13851 * linux-low.c (linux_supports_tracefork_flag): Document.
13852 (linux_look_up_symbols): Add comment.
13853
3327ccf7
L
138542010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13855
13856 * regcache.c (supply_register): Clear regcache if buf is NULL.
13857
0718675c 138582010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13859 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13860
13861 * inferiors.c (find_inferior): Add function documentation.
13862 (unloaded_dll): Handle the case where the unloaded dll has not
13863 been previously registered in the dll list.
13864
177321bd
DJ
138652010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13866
13867 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13868 (thumb2_breakpoint): New.
13869 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13870
2b009048
DJ
138712010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13872
13873 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13874 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13875 breakpoints.
13876
3be029c7
PA
138772010-01-21 Pedro Alves <pedro@codesourcery.com>
13878
13879 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13880
18f5de3b
JK
138812010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13882
13883 * linux-s390-low.c (s390_collect_ptrace_register)
13884 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13885
3743bb4f
DE
138862010-01-21 Doug Evans <dje@google.com>
13887
14ce3065
DE
13888 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13889 (PTRACE_ARG4_TYPE): New macro.
13890 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13891 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13892 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13893 (usr_store_inferior_registers): Ditto.
13894 (linux_read_memory, linux_write_memory): Ditto.
13895 (linux_test_for_tracefork): Ditto.
13896
3743bb4f
DE
13897 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13898 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13899
8b315be5
PA
139002010-01-21 Pedro Alves <pedro@codesourcery.com>
13901
13902 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13903 target.
13904
85492558
PA
139052010-01-21 Pedro Alves <pedro@codesourcery.com>
13906
13907 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13908 prototype to take a regcache. Adjust.
13909
442ea881
PA
139102010-01-20 Pedro Alves <pedro@codesourcery.com>
13911
13912 * regcache.h (struct thread_info): Forward declare.
13913 (struct regcache): New.
13914 (new_register_cache): Adjust prototype.
13915 (get_thread_regcache): Declare.
13916 (free_register_cache): Adjust prototype.
13917 (registers_to_string, registers_from_string): Ditto.
13918 (supply_register, supply_register_by_name, collect_register)
13919 (collect_register_as_string, collect_register_by_name): Ditto.
13920 * regcache.c (struct inferior_regcache_data): Delete.
13921 (get_regcache): Rename to ...
13922 (get_thread_regcache): ... this. Adjust. Switch inferior before
13923 fetching registers.
13924 (regcache_invalidate_one): Adjust.
13925 (regcache_invalidate): Fix prototype.
13926 (new_register_cache): Return the new register cache.
13927 (free_register_cache): Change prototype.
13928 (realloc_register_cache): Adjust.
13929 (registers_to_string): Change prototype to take a regcache. Adjust.
13930 (registers_from_string): Ditto.
13931 (register_data): Ditto.
13932 (supply_register): Ditto.
13933 (supply_register_by_name): Ditto.
13934 (collect_register): Ditto.
13935 (collect_register_as_string): Ditto.
13936 (collect_register_by_name): Ditto.
13937 * server.c (process_serial_event): Adjust.
13938 * linux-low.h (regset_fill_func, regset_store_func): Change
13939 prototype.
13940 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13941 Change prototype.
13942 * linux-low.c (get_stop_pc): Adjust.
13943 (check_removed_breakpoint): Adjust.
13944 (linux_wait_for_event): Adjust.
13945 (linux_resume_one_lwp): Adjust.
13946 (fetch_register): Add regcache parameter. Adjust.
13947 (usr_store_inferior_registers): Ditto.
13948 (regsets_fetch_inferior_registers): Ditto.
13949 (regsets_store_inferior_registers): Ditto.
13950 (linux_fetch_registers, linux_store_registers): Ditto.
13951 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13952 regcache. Adjust.
43aaf8b6
PA
13953 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13954 Ditto.
442ea881
PA
13955 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13956 prototype to take a regcache.
13957 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13958 * remote-utils.c (convert_ascii_to_int, outreg)
13959 (prepare_resume_reply): Change prototype to take a regcache.
13960 Adjust.
13961 * target.h (struct target_ops) <fetch_registers, store_registers>:
13962 Change prototype to take a regcache.
13963 (fetch_inferior_registers, store_inferior_registers): Change
13964 prototype to take a regcache. Adjust.
13965 * proc-service.c (ps_lgetregs): Adjust.
13966 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13967 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13968 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13969 take a regcache. Adjust.
13970 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13971 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13972 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13973 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13974 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13975 (cris_cannot_fetch_register):
13976 (cris_breakpoint_at): Change prototype to take a regcache.
13977 Adjust.
13978 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13979 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13980 to take a regcache. Adjust.
13981 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13982 Adjust.
13983 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13984 take a regcache. Adjust.
13985 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13986 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13987 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13988 * linux-mips-low.c (mips_get_pc):
13989 (mips_set_pc): Change prototype to take a regcache. Adjust.
13990 (mips_reinsert_addr): Adjust.
13991 (mips_collect_register): Change prototype to take a regcache.
13992 Adjust.
13993 (mips_supply_register):
13994 (mips_collect_register_32bit, mips_supply_register_32bit)
13995 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13996 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13997 * linux-ppc-low.c (ppc_supply_ptrace_register)
13998 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13999 (parse_spufs_run): Adjust.
14000 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14001 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14002 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14003 take a regcache. Adjust.
14004 * linux-s390-low.c (s390_collect_ptrace_register)
14005 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14006 (s390_set_pc): Change prototype to take a regcache. Adjust.
14007 (s390_arch_setup): Adjust.
14008 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14009 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14010 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14011 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14012 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14013 regcache. Adjust.
14014 (sparc_breakpoint_at): Adjust.
14015 * linux-xtensa-low.c (xtensa_fill_gregset):
14016 (xtensa_store_gregset):
14017 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14018 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14019 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14020 prototype to take a regcache. Adjust.
14021 * win32-arm-low.c (arm_fetch_inferior_register)
14022 (arm_store_inferior_register): Change prototype to take a
14023 regcache. Adjust.
14024 * win32-i386-low.c (i386_fetch_inferior_register)
14025 (i386_store_inferior_register): Change prototype to take a
14026 regcache. Adjust.
14027 * win32-low.c (child_fetch_inferior_registers)
14028 (child_store_inferior_registers): Change prototype to take a
14029 regcache. Adjust.
14030 (win32_wait): Adjust.
14031 (win32_fetch_inferior_registers): Change prototype to take a
14032 regcache. Adjust.
14033 (win32_store_inferior_registers): Adjust.
14034 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14035 store_inferior_register>: Change prototype to take a regcache.
14036
60c3d7b0
DE
140372010-01-20 Doug Evans <dje@google.com>
14038
14039 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14040 #ifdef.
14041 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14042 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14043
dc146f7c
VP
140442010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14045
14046 * linux-low.c (linux_core_of_thread): New.
14047 (compare_ints, show_process, list_threads): New.
14048 (linux_qxfer_osdata): Report threads and cores.
14049 (linux_target_op): Register linux_core_of_thread.
14050 * remote-utils.c (prepare_resume_reply): Report the core.
14051 (buffer_xml_printf): Support %d specifier.
14052 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14053 New.
14054 (handle_query): Handle qXfer:threads. Announce availability
14055 thereof.
14056 * target.h (struct target_ops): New field core_of_thread.
14057
7803799a
UW
140582010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14059
14060 * Makefile.in (clean): Remove new generated files.
14061 (reg-s390.o, reg-s390.c): Remove rules.
14062 (reg-s390x.o, reg-s390x.c): Likewise.
14063 (s390-linux32.o, s390-linux32.c): Add rules.
14064 (s390-linux64.o, s390-linux64.c): Likewise.
14065 (s390x-linux64.o, s390x-linux64.c): Likewise.
14066 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14067 * linux-s390-low.c: Include <elf.h>.
14068 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14069 (init_registers_s390): Remove prototype.
14070 (init_registers_s390x): Likewise.
14071 (init_registers_s390_linux32): Add prototype.
14072 (init_registers_s390_linux64): Likewise.
14073 (init_registers_s390x_linux64): Likewise.
14074 (s390_num_regs_3264): New define.
14075 (s390_regmap_3264): New global variable.
14076 (s390_cannot_fetch_register): Remove obsolete check.
14077 (s390_cannot_store_register): Likewise.
14078 (s390_collect_ptrace_register): Handle upper/lower register halves.
14079 (s390_supply_ptrace_register): Likewise.
14080 (s390_fill_gregset): Update to register number changes.
14081 (s390_get_hwcap): New routine.
14082 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14083 Install appropriate regmap and register set.
14084
6e7ffa39
JB
140852010-01-01 Joel Brobecker <brobecker@adacore.com>
14086
14087 * server.c (gdbserver_version): Update copyright year to 2010.
14088 * gdbreplay.c (gdbreplay_version): Likewise.
14089
957f3f49
DE
140902009-12-28 Doug Evans <dje@google.com>
14091
14092 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14093 elf/external.h. Include <elf.h> instead but only if necessary.
14094
ca5c370d
PA
140952009-12-28 Pedro Alves <pedro@codesourcery.com>
14096
14097 * linux-low.c (linux_remove_process): Remove `detaching'
14098 parameter. Don't release/detach from thread_db here.
14099 (linux_kill): Release/detach from thread_db here, ...
14100 (linux_detach): ... and here, before actually detaching.
14101 (linux_wait_1): ... and here, when a process exits.
14102 * thread-db.c (any_thread_of): New.
14103 (thread_db_free): Switch the current inferior to a thread of the
14104 passed in process.
14105
4ee62156
DE
141062009-12-21 Doug Evans <dje@google.com>
14107
d90e6a88
DE
14108 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14109
c5f62d5f
DE
14110 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14111 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14112 warning ifndef __NR_tkill. Move setting of errno there too.
14113 Delete unnecessary resetting of errno after syscall.
14114 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14115
10e86dd7
DE
14116 * configure.ac: Check for dladdr.
14117 * config.in: Regenerate.
14118 * configure: Regenerate.
14119 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14120 (try_thread_db_load): Update.
14121
4ee62156
DE
14122 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14123
00f515da
DE
141242009-12-18 Doug Evans <dje@google.com>
14125
e9464885
DE
14126 * event-loop.c: Include unistd.h if it exists.
14127
07d4f67e
DE
14128 * linux-low.c (my_waitpid): Move definition away from being in
14129 between linux_tracefork_child/linux_test_for_tracefork.
14130
00f515da
DE
14131 * gdb_proc_service.h (psaddr_t): Fix type.
14132 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14133 signature to match glibc.
14134
1de1badb
DE
141352009-12-16 Doug Evans <dje@google.com>
14136
14137 * linux-low.c (linux_read_memory): Fix argument to read.
14138
aeeb81d1
PA
141392009-11-26 Pedro Alves <pedro@codesourcery.com>
14140
14141 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14142 events, don't leave current_inferior pointing at null.
14143
10357975
PA
141442009-11-26 Pedro Alves <pedro@codesourcery.com>
14145
14146 * win32-low.c (LOG): Delete.
14147 (OUTMSG): Output to stderr.
14148 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14149 on compile time LOG macro.
14150 (win32_wait): Fix debug output.
14151
cf6e3471
PA
141522009-11-26 Pedro Alves <pedro@codesourcery.com>
14153
14154 * win32-low.c (win32_add_one_solib): If the dll name is
14155 "ntdll.dll", prepend the system directory to the dll path.
14156
0c85e18e
MK
141572009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14160
9ac544ce 141612009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14162 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14163
14164 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14165 * configure.ac: Check for __mcoldfire__ and set
14166 gdb_cv_m68k_is_coldfire.
14167 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14168 reg-cf.o and reg-m68k.o.
14169 * configure: Regenerated.
14170
fd7dd3e6
PA
141712009-11-16 Pedro Alves <pedro@codesourcery.com>
14172
14173 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14174 Pass it to thread_db_free.
14175 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14176 proper `detaching' argument to linux_remove_process.
14177 * linux-low.h (thread_db_free): Add `detaching' parameter.
14178 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14179 to thread_db_free.
14180 (thread_db_free): Add `detaching' parameter. Only
14181 call td_ta_clear_event if detaching from process.
14182
75aa492e
MK
141832009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14184
14185 * thread-db.c (thread_db_free): Fix typo.
14186
21e1bee4
PP
141872009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14188
14189 PR gdb/10838
14190 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14191
8838b45e
NS
141922009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14193
14194 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14195 with an i686 compiler.
14196 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14197 needed.
14198 * configure: Rebuilt.
14199
8a35fb51
SL
142002009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14201
14202 PR gdb/10783
14203
14204 * server.c (handle_search_memory_1): Correct read_addr initialization
14205 in loop for searching subsequent chunks.
14206
96f15937
PP
142072009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14208
14209 * configure.ac: New --with-libthread-db option.
14210 * thread-db.c: Allow direct dependence on libthread_db.
14211 (thread_db_free): Adjust.
14212 * config.in: Regenerate.
14213 * configure: Likewise.
889bf7c5 14214
5f7d1694
PP
142152009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14216
14217 PR gdb/10757
14218 * thread-db.c (attach_thread): New function.
14219 (maybe_attach_thread): Return success/failure.
14220 (find_new_threads_callback): Adjust.
889bf7c5
PA
14221 (thread_db_find_new_threads): Loop until no new threads.
14222
88e3b899
PA
142232009-10-13 Pedro Alves <pedro@codesourcery.com>
14224
14225 * proc-service.c (ps_lgetregs): Formatting.
14226
cdbfd419
PP
142272009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14228
14229 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14230 * configure.ac: Adjust.
14231 * linux-low.h (struct process_info_private): Move members to struct
14232 thread_db.
14233 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14234 * linux-low.c (linux_remove_process): Adjust.
14235 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14236 * server.c (handle_query): Move code ...
14237 (handle_monitor_command): ... here. New function.
14238 * target.h (struct target_ops): New member.
14239 * thread-db.c (struct thread_db): New.
14240 (libthread_db_search_path): New variable.
14241 (thread_db_create_event, thread_db_enable_reporting)
14242 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14243 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14244 (try_thread_db_load_1, dladdr_to_soname): New functions.
14245 (try_thread_db_load, thread_db_load_search): New functions.
14246 (thread_db_init): Search for libthread_db.
14247 (thread_db_free): New function.
14248 (thread_db_handle_monitor_command): Likewise.
14249 * config.in: Regenerate.
14250 * configure: Regenerate.
889bf7c5 14251
4168d2d6
UW
142522009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14253
14254 * spu-low.c (spu_kill): Wait for inferior to terminate.
14255 Call clear_inferiors.
14256 (spu_detach): Call clear_inferiors.
14257
81ecdfbb
RW
142582009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14259
14260 * aclocal.m4: Regenerate.
14261 * config.in: Likewise.
14262 * configure: Likewise.
14263
0b9ff2c0
UW
142642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14265
14266 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14267 (parse_spufs_run): New function.
14268 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14269 (ppc_breakpoint_at): Handle SPU breakpoints.
14270
efcbbd14
UW
142712009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14272
14273 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14274 (SPUFS_MAGIC): Define.
14275 (spu_enumerate_spu_ids): New function.
14276 (linux_qxfer_spu): New function.
14277 (linux_target_ops): Install linux_qxfer_spu.
14278
f4d9bade
UW
142792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14280
14281 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14282 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14283 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14284 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14285 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14286 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14287 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14288 (init_registers_powerpc_cell32l): Add prototype.
14289 (init_registers_powerpc_cell64l): Likewise.
14290 (ppc_arch_setup): Detect Cell/B.E. architecture.
14291
96e946ca
RW
142922009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14293
14294 * Makefile.in (datarootdir): New variable.
14295
58d6951d
DJ
142962009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14297
14298 * linux-low.c (linux_write_memory): Update debugging output.
14299 * Makefile.in (clean): Add new descriptions.
14300 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14301 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14302 * configure.srv: Add new files for arm*-*-linux*.
14303 * linux-arm-low.c: Add new declarations.
14304 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14305 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14306 (HWCAP_VFPv3D16): New.
14307 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14308 instead of __IWMMXT__.
14309 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14310 (arm_arch_setup): New.
14311 (target_regsets): Remove #ifdef. Add VFP regset.
14312 (the_low_target): Use arm_arch_setup.
14313
12b42a12
DJ
143142009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14315
14316 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14317 the main thread again.
14318
ac8c974e
AR
143192009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14320
14321 Adding Neutrino gdbserver.
14322 * configure: Regenerated.
14323 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14324 * configure.srv (i[34567]86-*-nto*): New target.
14325 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14326 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14327 (nto_comctrl) [__QNX__]: New function.
14328 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14329
4424e0c3 143302009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14331
14332 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14333 srv_tgtobj.
14334
912cf4ba
PA
143352009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14336 Pedro Alves <pedro@codesourcery.com>
14337
14338 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14339 don't support CONTEXT_EXTENDED_REGISTERS.
14340 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14341 (the_low_target): Install them.
14342 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14343 failing with ERROR_PIPE_NOT_CONNECTED.
14344
aa5ca48f
DE
143452009-06-30 Doug Evans <dje@google.com>
14346 Pierre Muller <muller@ics.u-strasbg.fr>
14347
14348 Add h/w watchpoint support to x86-linux, win32-i386.
14349 * Makefile.in (SFILES): Add i386-low.c
14350 (i386_low_h): Define.
14351 (i386-low.o): Add dependencies.
14352 (linux-x86-low.o): Add i386-low.h dependency.
14353 (win32-i386-low.o): Ditto.
14354 * i386-low.c: New file.
14355 * i386-low.h: New file.
14356 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14357 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14358 * linux-low.c (linux_add_process): Initialize arch_private.
14359 (linux_remove_process): Free arch_private.
14360 (add_lwp): Initialize arch_private.
14361 (delete_lwp): Free arch_private.
14362 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14363 provided.
14364 * linux-low.h (process_info_private): New member arch_private.
14365 (lwp_info): New member arch_private.
14366 (linux_target_ops): New members new_process, new_thread,
14367 prepare_to_resume.
14368 (ptid_of): New macro.
14369 * linux-x86-low.c: Include stddef.h, i386-low.h.
14370 (arch_process_info): New struct.
14371 (arch_lwp_info): New struct.
14372 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14373 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14374 (i386_dr_low_get_status): New function.
14375 (x86_insert_point, x86_remove_point): New functions.
14376 (x86_stopped_by_watchpoint): New function.
14377 (x86_stopped_data_address): New function.
14378 (x86_linux_new_process, x86_linux_new_thread): New functions.
14379 (x86_linux_prepare_to_resume): New function.
14380 (the_low_target): Add entries for insert_point, remove_point,
14381 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14382 prepare_to_resume.
14383 * server.c (debug_hw_points): New global.
14384 (monitor_show_help): Document set debug-hw-points.
14385 (handle_query): Process "set debug-hw-points".
14386 * server.h (debug_hw_points): Declare.
14387 (paddress): Declare.
14388 * utils.c (NUMCELLS, CELLSIZE): New macros.
14389 (get_sell, xsnprintf, paddress): New functions.
14390 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14391 remove_point, stopped_by_watchpoint, stopped_data_address.
14392 * win32-i386-low.c: Include i386-low.h.
14393 (debug_reg_state): Replaces dr.
14394 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14395 (i386_dr_low_get_status): New function.
14396 (i386_insert_point, i386_remove_point): New functions.
14397 (i386_stopped_by_watchpoint): New function.
14398 (i386_stopped_data_address): New function.
14399 (i386_initial_stuff): Update.
14400 (get_thread_context,set_thread_context,i386_thread_added): Update.
14401 (the_low_target): Add entries for insert_point,
14402 remove_point, stopped_by_watchpoint, stopped_data_address.
14403 * win32-low.c (win32_insert_watchpoint): New function.
14404 (win32_remove_watchpoint): New function.
14405 (win32_stopped_by_watchpoint): New function.
14406 (win32_stopped_data_address): New function.
14407 (win32_target_ops): Add entries for insert_watchpoint,
14408 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14409 * win32-low.h (win32_target_ops): New members insert_point,
14410 remove_point, stopped_by_watchpoint, stopped_data_address.
14411
d993e290
PA
144122009-06-25 Pedro Alves <pedro@codesourcery.com>
14413
14414 * server.c (process_serial_event): Re-return unsupported, not
14415 error, if the type isn't recognized. Re-allow supporting only
14416 insert or remove packets. Also call require_running for
14417 breakpoints. Add missing break statement to default case. Tidy.
14418 * target.h (struct target_ops): Rename insert_watchpoint to
14419 insert_point, and remove_watchpoint to remove_point.
14420
14421 * linux-low.h (struct linux_target_ops): Likewise.
14422 * linux-low.c (linux_insert_watchpoint): Rename to ...
14423 (linux_insert_point): ... this. Adjust.
14424 (linux_remove_watchpoint): Rename to ...
14425 (linux_remove_point): ... this. Adjust.
14426 (linux_target_ops): Adjust.
14427 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14428 (cris_insert_point): ... this.
14429 (cris_remove_watchpoint): Rename to ...
14430 (cris_remove_point): ... this.
14431 (the_low_target): Adjust.
14432
0f54c268
PM
144332009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14434
14435 * server.c (handle_v_kill): Pass signal_pid to
14436 kill_inferior if multi_process is zero.
14437
c6314022
AR
144382009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14439
14440 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14441 * target.h (target_ops): Comment for *_watchpoint to make it clear
14442 the functions can get types '0' and '1'.
14443
4463ce24
AR
144442009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14445
14446 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14447 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14448 * regcache.c (get_regcache): Likewise.
14449 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14450 * win32-low.c (child_fetch_inferior_registers): Remove check for
14451 regno 0.
14452
cf8fd78b
PA
144532009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14454 Pedro Alves <pedro@codesourcery.com>
14455
14456 * target.h (struct target_ops) <supports_multi_process>: New
14457 callback.
14458 (target_supports_multi_process): New.
14459 * server.c (handle_query): Even if GDB reports support, only
14460 enable multi-process if the target also supports it. Report
14461 multi-process support only if the target backend supports it.
14462 * linux-low.c (linux_supports_multi_process): New function.
14463 (linux_target_ops): Install it as target_supports_multi_process
14464 callback.
14465
47c0c975
DE
144662009-05-24 Doug Evans <dje@google.com>
14467
e09875d4
DE
14468 Global renaming of find_thread_pid to find_thread_ptid.
14469 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14470 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14471 All callers updated.
14472
e27d73f6
DE
14473 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14474 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14475 directly.
14476
47c0c975
DE
14477 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14478 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14479 (linux_resume_one_lwp): Ditto.
14480
2acc282a
DE
144812009-05-23 Doug Evans <dje@google.com>
14482
14483 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14484 from struct inferior_list_entry * to struct lwp_info *.
14485 All callers updated.
14486
9f1036c1
DE
144872009-05-13 Doug Evans <dje@google.com>
14488
14489 * linux-x86-low.c: Don't include assert.h.
14490 (x86_siginfo_fixup): Use fatal, not assert.
14491 (x86_arch_setup): Fix comment.
14492
d0722149
DE
144932009-05-12 Doug Evans <dje@google.com>
14494
14495 Biarch support for i386/amd64 gdbserver.
14496 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14497 Add linux-x86-low.c.
14498 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14499 (linux-x86-low.o): Add.
14500 * linux-x86-64-low.c: Delete.
14501 * linux-i386-low.c: Delete.
14502 * linux-x86-low.c: New file.
14503 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14504 linux-x86-low.o.
14505 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14506 linux-x86-low.o.
14507 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14508 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14509 (linux_child_pid_to_exec_file): New function.
14510 (elf_64_header_p, elf_64_file_p): New functions.
14511 (siginfo_fixup): New function.
14512 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14513 give target a chance to convert layout.
14514 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14515 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14516
fdeb2a12
DE
145172009-05-07 Doug Evans <dje@google.com>
14518
14519 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14520 (regsets_store_inferior_registers): Ditto.
14521
a6dbe5df
PA
145222009-05-06 Pedro Alves <pedro@codesourcery.com>
14523
14524 PR server/10048
14525
14526 * linux-low.c (must_set_ptrace_flags): Delete.
14527 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14528 of the global.
14529 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14530 `lwp->must_set_ptrace_flags' instead.
ba42693b 14531 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14532 (linux_wait_1): ... not here.
14533
5091eb23
DE
145342009-04-30 Doug Evans <dje@google.com>
14535
9f767825
DE
14536 * inferiors.c (started_inferior_callback): New function.
14537 (attached_inferior_callback): New function.
14538 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14539 * server.c (print_started_pid, print_attached_pid): New functions.
14540 (detach_or_kill_for_exit): New function.
14541 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14542 * server.h (have_started_inferiors_p): Declare.
14543 (have_attached_inferiors_p): Declare.
14544
5091eb23
DE
14545 * inferiors.c (remove_process): Fix memory leak, free process.
14546 * linux-low.c (linux_remove_process): New function.
14547 (linux_kill): Call it instead of remove_process.
14548 (linux_detach, linux_wait_1): Ditto.
14549
155c8968
PA
145502009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14551
14552 * configure.srv: Add x86 Windows CE target.
14553
7fe519cb
UW
145542009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14555
14556 * inferiors.c (get_thread_process): Make global.
14557 * server.h (get_thread_process): Add prototype.
14558 * thread-db.c (find_one_thread): Use get_thread_process
14559 instead of current_process.
14560 (thread_db_get_tls_address): Do not crash if called when
14561 thread layer is not yet initialized.
14562
5472f405
UW
145632009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14564
14565 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14566 * spu-low.c (current_tid): Rename to ...
14567 (current_ptid): ... this.
14568 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14569 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14570 ptid_get_lwp (current_ptid) instead of current_tid.
14571 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14572 instead of current_tid. Use find_process_pid to verify pid
14573 argument is valid. Pass proper argument to remove_process.
14574 (spu_thread_alive): Compare current_ptid instead of current_tid.
14575 (spu_resume): Likewise.
14576
55ac2b99
PA
145772009-04-02 Pedro Alves <pedro@codesourcery.com>
14578
14579 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14580 variable.
14581
95954743
PA
145822009-04-01 Pedro Alves <pedro@codesourcery.com>
14583
14584 Implement the multiprocess extensions, and add linux multiprocess
14585 support.
14586
14587 * server.h (ULONGEST): Declare.
14588 (struct ptid, ptid_t): New.
14589 (minus_one_ptid, null_ptid): Declare.
14590 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14591 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14592 (struct inferior_list_entry): Change `id' type from unsigned from
14593 to ptid_t.
14594 (struct sym_cache, struct breakpoint, struct
14595 process_info_private): Forward declare.
14596 (struct process_info): Declare.
14597 (current_process): Declare.
14598 (all_processes): Declare.
14599 (initialize_inferiors): Declare.
14600 (add_thread): Adjust to use ptid_t.
14601 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14602 (add_process, remove_process, find_thread_pid): Declare.
14603 (find_inferior_id): Adjust to use ptid_t.
14604 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14605 (multi_process): Declare.
14606 (push_event): Adjust to use ptid_t.
14607 (read_ptid, write_ptid): Declare.
14608 (prepare_resume_reply): Adjust to use ptid_t.
14609 (clear_symbol_cache): Declare.
14610 * inferiors.c (all_processes): New.
14611 (null_ptid, minus_one_ptid): New.
14612 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14613 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14614 (add_thread): Change unsigned long to ptid. Remove gdb_id
14615 parameter. Adjust.
14616 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14617 (gdb_id_to_thread): Rename to ...
14618 (find_thread_pid): ... this. Change unsigned long to ptid.
14619 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14620 (loaded_dll, pull_pid_from_list): Adjust.
14621 (add_process, remove_process, find_process_pid)
14622 (get_thread_process, current_process, initialize_inferiors): New.
14623 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14624 (struct target_waitstatus) <related_pid>: Ditto.
14625 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14626 return type to int.
14627 (struct target_ops) <join>: Add `pid' argument.
14628 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14629 (struct target_ops) <wait>: Add `ptid' field. Change return type
14630 to ptid.
14631 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14632 (mywait): Add `ptid' argument. Change return type to ptid_t.
14633 (target_pid_to_str): Declare.
14634 * target.c (set_desired_inferior): Adjust to use ptids.
14635 (mywait): Add new `ptid' argument. Adjust.
14636 (target_pid_to_str): New.
14637 * mem-break.h (free_all_breakpoints): Declare.
14638 * mem-break.c (breakpoints): Delelete.
14639 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14640 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14641 to use per-process breakpoint list.
14642 (free_all_breakpoints): New.
14643 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14644 (symbol_cache, all_symbols_looked_up): Delete.
14645 (hexchars): New.
14646 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14647 read_ptid): New.
14648 (prepare_resume_reply): Change ptid argument's type from unsigned
14649 long to ptid_t. Adjust. Implement W;process and X;process.
14650 (free_sym_cache, clear_symbol_cache): New.
14651 (look_up_one_symbol): Adjust to per-process symbol cache. *
14652 * server.c (cont_thread, general_thread, step_thread): Change type
14653 to ptid_t.
14654 (attached): Delete.
14655 (multi_process): New.
14656 (last_ptid): Change type to ptid_t.
14657 (struct vstop_notif) <ptid>: Change type to ptid_t.
14658 (queue_stop_reply, push_event): Change `ptid' argument's type to
14659 ptid_t.
14660 (discard_queued_stop_replies): Add `pid' argument.
14661 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14662 changes. Don't reference the `attached' global.
14663 (attach_inferior): Adjust to mywait interface changes.
14664 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14665 features. Handle and report "multiprocess+". Handle
14666 "qAttached:PID".
14667 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14668 changes.
14669 (handle_v_kill): New.
14670 (handle_v_stopped): Adjust to use target_pid_to_str.
14671 (handle_v_requests): Allow multiple attaches and runs when
14672 multiprocess extensions are in effect. Handle "vKill".
14673 (myresume): Adjust to use ptids.
14674 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14675 (handle_status): Adjust to discard_queued_stop_replies interface
14676 change.
14677 (first_thread_of, kill_inferior_callback)
14678 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14679 (main): Call initialize_inferiors. Adjust to use ptids, killing
14680 and detaching from all inferiors. Handle multiprocess packet
14681 variants.
14682 * linux-low.h: Include gdb_proc_service.h.
14683 (struct process_info_private): New.
14684 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14685 <lwpid_of>: Use ptid_get_lwp.
14686 (get_lwp_thread): Adjust.
14687 (struct lwp_info): Add `dead' member.
14688 (find_lwp_pid): Declare.
14689 * linux-low.c (thread_db_active): Delete.
14690 (new_inferior): Adjust comment.
14691 (inferior_pid): Delete.
14692 (linux_add_process): New.
14693 (handle_extended_wait): Adjust.
14694 (add_lwp): Change unsigned long to ptid.
14695 (linux_create_inferior): Add process to processes table. Adjust
14696 to use ptids. Don't set new_inferior here.
14697 (linux_attach_lwp): Rename to ...
14698 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14699 it. Adjust to use ptids.
14700 (linux_attach_lwp): New.
14701 (linux_attach): Add process to processes table. Don't set
14702 new_inferior here.
14703 (struct counter): New.
14704 (second_thread_of_pid_p, last_thread_of_process_p): New.
14705 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14706 multiple processes.
14707 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14708 processes. Remove process from process table.
14709 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14710 to multiple processes.
14711 (any_thread_of): New.
14712 (linux_detach): Add `pid' argument, and handle it. Remove process
14713 from processes table.
14714 (linux_join): Add `pid' argument. Handle it.
14715 (linux_thread_alive): Change unsighed long argument to ptid_t.
14716 Consider dead lwps as not being alive.
14717 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14718 threads we're not interested in.
14719 (same_lwp, find_lwp_pid): New.
14720 (linux_wait_for_lwp): Change `pid' argument's type from int to
14721 ptid_t. Adjust.
14722 (linux_wait_for_event): Rename to ...
14723 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14724 from int to ptid_t. Adjust.
14725 (linux_wait_for_event): New.
14726 (linux_wait_1): Add `ptid' argument. Change return type to
14727 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14728 that exit from the process table.
14729 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14730 Adjust.
14731 (mark_lwp_dead): New.
14732 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14733 stopping all threads, mark its main lwp as dead.
14734 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14735 ptids.
14736 (fetch_register, usr_store_inferior_registers)
14737 (regsets_fetch_inferior_registers)
14738 (regsets_store_inferior_registers, linux_read_memory)
14739 (linux_write_memory): Inline `inferior_pid'.
14740 (linux_look_up_symbols): Adjust to use per-process
14741 `thread_db_active'.
14742 (linux_request_interrupt): Adjust to use ptids.
14743 (linux_read_auxv): Inline `inferior_pid'.
14744 (initialize_low): Don't reference thread_db_active.
14745 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14746 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14747 (ps_getpid): Return the pid of the current inferior.
14748 * thread-db.c (proc_handle, thread_agent): Delete.
14749 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14750 per-process data.
14751 (find_one_thread): Change argument type to ptid_t. Adjust to
14752 per-process data.
14753 (maybe_attach_thread): Adjust to per-process data and ptids.
14754 (thread_db_find_new_threads): Ditto.
14755 (thread_db_init): Ditto.
14756 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14757 processes table. Adjust to use ptids.
14758 (spu_kill, spu_detach): Adjust interface. Remove process from
14759 processes table.
14760 (spu_join, spu_thread_alive): Adjust interface.
14761 (spu_wait): Adjust interface. Remove process from processes
14762 table. Adjust to use ptids.
14763 * win32-low.c (current_inferior_tid): Delete.
14764 (current_inferior_ptid): New.
14765 (debug_event_ptid): New.
14766 (thread_rec): Take a ptid. Adjust.
14767 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14768 (child_delete_thread): Ditto.
14769 (do_initial_child_stuff): Add `attached' argument. Add process to
14770 processes table.
14771 (child_fetch_inferior_registers, child_store_inferior_registers):
14772 Adjust.
14773 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14774 (win32_attach): Pass 1 to do_initial_child_stuff.
14775 (win32_kill): Adjust interface. Remove process from processes
14776 table.
14777 (win32_detach): Ditto.
14778 (win32_join): Adjust interface.
14779 (win32_thread_alive): Take a ptid.
14780 (win32_resume): Adjust to use ptids.
14781 (get_child_debug_event): Ditto.
14782 (win32_wait): Adjust interface. Remove exiting process from
14783 processes table.
14784
bd99dc85
PA
147852009-04-01 Pedro Alves <pedro@codesourcery.com>
14786
14787 Non-stop mode support.
14788
14789 * server.h (non_stop): Declare.
14790 (gdb_client_data, handler_func): Declare.
14791 (delete_file_handler, add_file_handler, start_event_loop):
14792 Declare.
14793 (handle_serial_event, handle_target_event, push_event)
14794 (putpkt_notif): Declare.
14795 * target.h (enum resume_kind): New.
14796 (struct thread_resume): Replace `step' field by `kind' field.
14797 (TARGET_WNOHANG): Define.
14798 (struct target_ops) <wait>: Add `options' argument.
14799 <supports_non_stop, async, start_non_stop>: New fields.
14800 (target_supports_non_stop, target_async): New.
14801 (start_non_stop): Declare.
14802 (mywait): Add `options' argument.
14803 * target.c (mywait): Add `options' argument. Print child exit
14804 notifications here.
14805 (start_non_stop): New.
14806 * server.c (non_stop, own_buf, mem_buf): New globals.
14807 (struct vstop_notif): New.
14808 (notif_queue): New global.
14809 (queue_stop_reply, push_event, discard_queued_stop_replies)
14810 (send_next_stop_reply): New.
14811 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14812 interface changes.
14813 (attach_inferior): In non-stop mode, don't wait for the target
14814 here.
14815 (handle_general_set): Handle QNonStop.
14816 (handle_query): When handling qC, return the current general
14817 thread, instead of the first thread of the list.
14818 (handle_query): If the backend supports non-stop mode, include
14819 QNonStop+ in the qSupported query response.
14820 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14821 and non-stop mode.
14822 (handle_v_attach, handle_v_run): Handle non-stop mode.
14823 (handle_v_stopped): New.
14824 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14825 (myresume): Adjust to use resume_kind. Handle non-stop.
14826 (queue_stop_reply_callback): New.
14827 (handle_status): Handle non-stop mode.
14828 (main): Clear non_stop flag on reconnection. Use the event-loop.
14829 Refactor serial protocol handling from here ...
14830 (process_serial_event): ... to this new function. When GDB
14831 selects any thread, select one here. In non-stop mode, wait until
14832 GDB acks all pending events before exiting.
14833 (handle_serial_event, handle_target_event): New.
14834 * remote-utils.c (remote_open): Install remote_desc in the event
14835 loop.
14836 (remote_close): Remove remote_desc from the event loop.
14837 (putpkt_binary): Rename to...
14838 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14839 (putpkt_binary): New as wrapper around putpkt_binary_1.
14840 (putpkt_notif): New.
14841 (prepare_resume_reply): In non-stop mode, don't change the
14842 general_thread.
14843 * event-loop.c: New.
14844 * Makefile.in (OBJ): Add event-loop.o.
14845 (event-loop.o): New rule.
14846
14847 * linux-low.h (pid_of): Moved here.
14848 (lwpid_of): New.
14849 (get_lwp_thread): Use lwpid_of.
14850 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14851 * linux-low.c (pid_of): Delete.
14852 (inferior_pid): Use lwpid_of.
14853 (linux_event_pipe): New.
14854 (target_is_async_p): New.
14855 (delete_lwp): New.
14856 (handle_extended_wait): Use lwpid_of.
14857 (add_lwp): Don't set lwpid field.
14858 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14859 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14860 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14861 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14862 first. Adjust to linux_wait_for_event interface changes. Use
14863 lwpid_of.
14864 (linux_detach): Don't delete the main lwp here.
14865 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14866 (status_pending_p): Don't consider explicitly suspended lwps.
14867 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14868 pointer. Add OPTIONS argument. Change return type to int. Use
14869 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14870 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14871 pointer. Add status pointer argument. Return a pid instead of a
14872 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14873 changes. In non-stop mode, don't switch to a random thread.
14874 (linux_wait): Rename to...
14875 (linux_wait_1): ... this. Add target_options argument, and handle
14876 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14877 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14878 clean exit and signal exit code. Don't stop all threads in
14879 non-stop mode. In all-stop mode, only stop all threads when
14880 reporting a stop to GDB. Handle explicit thread stop requests.
14881 (async_file_flush, async_file_mark): New.
14882 (linux_wait): New.
14883 (send_sigstop): Use lwpid_of.
14884 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14885 interface changes. In non-stop mode, don't switch to a random
14886 thread.
14887 (linux_resume_one_lwp): Use lwpid_of.
14888 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14889 (linux_resume_one_thread): ... this. Handle resume_stop. In
14890 non-stop mode, don't look for pending flag in all threads.
14891 (resume_status_pending_p): Don't consider explicitly suspended
14892 threads.
14893 (my_waitpid): Reimplement. Emulate __WALL.
14894 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14895 Use lwpid_of.
14896 (sigchld_handler, linux_supports_non_stop, linux_async)
14897 (linux_start_non_stop): New.
14898 (linux_target_ops): Register linux_supports_non_stop, linux_async
14899 and linux_start_non_stop.
14900 (initialize_low): Install SIGCHLD handler.
14901 * thread-db.c (thread_db_create_event, find_one_thread)
14902 (thread_db_get_tls_address): Use lwpid_of.
14903 * win32-low.c (win32_detach): Adjust to use resume_kind.
14904 (win32_wait): Add `options' argument.
14905 * spu-low.c (spu_resume): Adjust to use resume_kind.
14906 (spu_wait): Add `options' argument.
14907
5b1c542e
PA
149082009-04-01 Pedro Alves <pedro@codesourcery.com>
14909
14910 Decouple target code from remote protocol.
14911
14912 * target.h (enum target_waitkind): New.
14913 (struct target_waitstatus): New.
14914 (struct target_ops) <wait>: Return an unsigned long. Take a
14915 target_waitstatus pointer instead of a char pointer.
14916 (mywait): Likewise.
14917 * target.c (mywait): Change prototype to return an unsigned long.
14918 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14919 * server.h (thread_from_wait, old_thread_from_wait): Delete
14920 declarations.
14921 (prepare_resume_reply): Change prototype to take a
14922 target_waitstatus.
14923 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14924 (last_status, last_ptid): New.
14925 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14926 pid instead of a signal.
14927 (attach_inferior): Remove "status" and "signal" parameters.
14928 Adjust.
14929 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14930 not as an address.
14931 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14932 (handle_v_requests, myresume): Remove "status" and "signal"
14933 parameters. Adjust.
14934 (handle_status): New.
14935 (main): Delete local `status'. Adjust.
14936 * remote-utils.c: Include target.h.
14937 (prepare_resume_reply): Change prototype to take a
14938 target_waitstatus. Adjust.
14939
14940 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14941 interface.
14942 * spu-low.c (spu_wait): Adjust.
14943 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14944 Delete.
14945 (win32_wait): Adjust.
14946
2bd7c093
PA
149472009-04-01 Pedro Alves <pedro@codesourcery.com>
14948
14949 * target.h (struct thread_resume): Delete leave_stopped member.
14950 (struct target_ops): Add a `n' argument to the `resume' callback.
14951 * server.c (start_inferior): Adjust.
14952 (handle_v_cont, myresume): Adjust.
14953 * linux-low.c (check_removed_breakpoint): Adjust to resume
14954 interface change, and to removed leave_stopped field.
14955 (resume_ptr): Delete.
14956 (struct thread_resume_array): New.
14957 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14958 resume interface change.
14959 (linux_continue_one_thread, linux_queue_one_thread)
14960 (resume_status_pending_p): Check if the resume field is NULL
14961 instead of checking the leave_stopped member.
14962 (linux_resume): Adjust to the target resume interface change.
14963 * spu-low.c (spu_resume): Adjust to the target resume interface
14964 change.
14965 * win32-low.c (win32_detach, win32_resume): Ditto.
14966
c35fafde
PA
149672009-04-01 Pedro Alves <pedro@codesourcery.com>
14968
14969 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14970 flag.
14971 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14972 pending.
14973 (linux_continue_one_thread): Only preserve the stepping flag if
14974 there's a pending breakpoint.
14975
0a59d50b
PA
149762009-03-31 Pedro Alves <pedro@codesourcery.com>
14977
14978 * server.c (main): After the inferior having exited, call
14979 remote_close before exiting gdbserver.
14980
f04c6d38
TJB
149812009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14982
14983 Fix size of FPSCR in Power 7 processors.
14984 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14985 (PPC_FEATURE_HAS_DFP): New #define.
14986 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14987 size of the FPSCR.
14988
78e5cee6
PA
149892009-03-23 Pedro Alves <pedro@codesourcery.com>
14990
14991 * server.c (handle_query) Whitespace and formatting.
14992
1b3f6016
PA
149932009-03-22 Pedro Alves <pedro@codesourcery.com>
14994
14995 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14996 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14997 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14998 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14999 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15000 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15001 Makefile.in, configure.ac: Fix whitespace throughout.
15002 * configure: Regenerate.
15003
a07b2135
PA
150042009-03-22 Pedro Alves <pedro@codesourcery.com>
15005
15006 * inferiors.c (find_inferior): Make it safe for the callback
15007 function to delete the currently iterated inferior.
15008
67cc2626
PA
150092009-03-22 Pedro Alves <pedro@codesourcery.com>
15010
15011 * Makefile.in (linuw_low_h): Move higher.
15012 (thread-db.o): Depend on $(linux_low_h).
15013
54a0b537
PA
150142009-03-17 Pedro Alves <pedro@codesourcery.com>
15015
15016 Rename "process" to "lwp" throughout.
15017
15018 * linux-low.c (all_processes): Rename to...
15019 (all_lwps): ... this.
15020 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15021 (add_process): Rename to ...
15022 (add_lwp): ... this. Adjust.
15023 (linux_create_inferior): Adjust.
15024 (linux_attach_lwp): Adjust.
15025 (linux_attach): Adjust.
15026 (linux_kill_one_process): Rename to ...
15027 (linux_kill_one_lwp): ... this. Adjust.
15028 (linux_kill): Adjust.
15029 (linux_detach_one_process): Rename to ...
15030 (linux_detach_one_lwp): ... this. Adjust.
15031 (linux_detach): Adjust.
15032 (check_removed_breakpoint): Adjust.
15033 (status_pending_p): Adjust.
15034 (linux_wait_for_process): Rename to ...
15035 (linux_wait_for_lwp): ... this. Adjust.
15036 (linux_wait_for_event): Adjust.
15037 (send_sigstop): Adjust.
15038 (wait_for_sigstop): Adjust.
15039 (stop_all_processes): Rename to ...
15040 (stop_all_lwps): ... this.
15041 (linux_resume_one_process): Rename to ...
15042 (linux_resume_one_lwp): ... this. Adjust.
15043 (linux_set_resume_request, linux_continue_one_thread)
15044 (linux_queue_one_thread, resume_status_pending_p)
15045 (usr_store_inferior_registers, regsets_store_inferior_registers)
15046 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15047 Adjust.
15048 * linux-low.h (get_process): Rename to ...
15049 (get_lwp): ... this. Adjust.
15050 (get_thread_process): Rename to ...
15051 (get_thread_lwp): ... this. Adjust.
15052 (get_process_thread): Rename to ...
15053 (get_lwp_thread): ... this. Adjust.
15054 (struct process_info): Rename to ...
15055 (struct lwp_info): ... this.
15056 (all_processes): Rename to ...
15057 (all_lwps): ... this.
15058 * proc-service.c (ps_lgetregs): Adjust.
15059 * thread-db.c (thread_db_create_event, find_one_thread)
15060 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15061
0b16c5cf
PA
150622009-03-14 Pedro Alves <pedro@codesourcery.com>
15063
15064 * server.c (handle_query): Handle "qAttached".
15065
32de4b9d
NS
150662009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15067
15068 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15069 GPLv3, update license URL.
15070
2aecd87f
DE
150712009-03-01 Doug Evans <dje@google.com>
15072
93efd302 15073 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15074 (server_h): Add gdb_signals.h.
15075 (signals.o): Update.
15076 * server.h (target_signal_from_host,target_signal_to_host_p)
15077 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15078
86b1f9c5
PM
150792009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15080
15081 * remote-utils.c (getpkt): Also generate remote-debug
15082 information if noack_mode is set.
15083
4aa995e1
PA
150842009-02-06 Pedro Alves <pedro@codesourcery.com>
15085
15086 * server.c (handle_query): Report qXfer:siginfo:read and
15087 qXfer:siginfo:write as supported and handle them.
15088 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15089 * linux-low.c (linux_xfer_siginfo): New.
15090 (linux_target_ops): Set it.
15091
62709adf
PA
150922009-01-26 Pedro Alves <pedro@codesourcery.com>
15093
15094 * server.c (gdbserver_usage): Mention --remote-debug.
15095 (main): Accept '--remote-debug' switch.
15096
aef93bd7
DE
150972009-01-18 Doug Evans <dje@google.com>
15098
15099 * regcache.c (new_register_cache): No need to check result of xcalloc.
15100 * server.c (handle_search_memory): Back out calls to xmalloc,
15101 result is checked and error is returned to user upon failure.
15102 (handle_query): Ditto. Add more checks for result of malloc.
15103 (handle_v_cont): Check result of malloc, report error back to
15104 user upon failure.
15105 (handle_v_run): Ditto. Call freeargv.
15106 * server.h (freeargv): Declare.
15107 * utils.c (freeargv): New fn.
15108
54363045
DE
151092009-01-15 Doug Evans <dje@google.com>
15110
f626972c
DE
15111 * gdbreplay.c (perror_with_name): Make arg const char *.
15112 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15113 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15114 * utils.c (perror_with_name): Make arg const char *.
54363045 15115
18aae699
PA
151162009-01-14 Pedro Alves <pedro@codesourcery.com>
15117
15118 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15119 when handling a EXIT_PROCESS_DEBUG_EVENT.
15120
ff703abe
JB
151212009-01-06 Joel Brobecker <brobecker@adacore.com>
15122
15123 * gdbreplay.c (gdbreplay_version): Update copyright year.
15124 * server.c (gdbserver_version): Likewise.
15125
f21cc1a2 151262009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15127
15128 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15129 (handle_extended_wait): Improve comment.
0e21c1ec 15130
bca929d3
DE
151312008-12-13 Doug Evans <dje@google.com>
15132
15133 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15134 * server.h (ATTR_MALLOC): New macro.
15135 (xmalloc,xcalloc,xstrdup): Declare.
15136 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15137 * inferiors.c: Ditto.
15138 * linux-low.c: Ditto.
15139 * mem-break.c: Ditto.
15140 * regcache.c: Ditto.
15141 * remote-utils.c: Ditto.
15142 * server.c: Ditto.
15143 * target.c: Ditto.
15144 * win32-low.c: Ditto.
15145
97438e3f
DE
151462008-12-12 Doug Evans <dje@google.com>
15147
896c7fbb
DE
15148 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15149 in debugging printf.
15150
97438e3f
DE
15151 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15152
e3b886f8
DE
151532008-12-09 Doug Evans <dje@google.com>
15154
15155 * linux-low.h (struct process_info): Delete member tid, unused.
15156 * thread-db.c (find_one_thread): Update.
15157 (maybe_attach_thread): Update.
15158
07e059b5
VP
151592008-12-02 Pedro Alves <pedro@codesourcery.com>
15160
889bf7c5
PA
15161 * target.h (struct target_ops): Add qxfer_osdata member.
15162 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15163 and dirent.h.
15164 (linux_qxfer_osdata): New functions.
15165 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15166 callback.
15167 * server.c (handle_query): Handle "qXfer:osdata:read:".
15168 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15169 (buffer_xml_printf): New functions.
15170 * server.h (struct buffer): New.
15171 (buffer_grow_str, buffer_grow_str0): New macros.
15172 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15173 (buffer_xml_printf): Declare.
07e059b5 15174
4cab47ab
DE
151752008-11-24 Doug Evans <dje@google.com>
15176
15177 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15178
f142445f
DJ
151792008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15180
15181 * server.c (handle_v_run): Always use the supplied argument list.
15182
d0107bb6 151832008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15184
d0107bb6
BW
15185 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15186 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15187
2c4ad781
TJB
151882008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15189
15190 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15191 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15192 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15193 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15194 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15195 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15196 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15197 XML target descriptions.
15198 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15199 when inferior is running on an ISA 2.05 or later processor. Add
15200 special case to return offset for full 64-bit slot of FPSCR when
15201 in 32-bits.
15202
dfb64f85
DJ
152032008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15204
15205 * Makefile.in (SFILES, clean): Added sparc64 files.
15206 (reg-sparc64.o, reg-sparc64.c): New.
15207 * configure.srv (sparc*-*-linux*): New configuration.
15208 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15209 syscall arguments for SPARC.
15210 (regsets_store_inferior_registers): Likewise.
15211 * linux-sparc-low.c: New file.
15212
66b6e1dd
DE
152132008-10-21 Doug Evans <dje@google.com>
15214
15215 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15216 (READLINE_DIR,READLINE_DEP): Delete.
15217 (INTERNAL_CFLAGS): Update.
15218 (LINTFLAGS): Update.
15219
9b710a42
PA
152202008-10-10 Pedro Alves <pedro@codesourcery.com>
15221
15222 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15223 whole argv from the last run, not just argv[0].
15224
5822d809
PA
152252008-09-08 Pedro Alves <pedro@codesourcery.com>
15226
15227 * regcache.c (new_register_cache): Return NULL if the register
15228 cache size isn't known yet.
15229 (free_register_cache): Avoid dereferencing a NULL regcache.
15230
74aac56f
DJ
152312008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15232
15233 * configure.srv: Merge MIPS and MIPS64.
15234
400b20f5
MR
152352008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15236
15237 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15238
677c5bb1
LM
152392008-08-18 Luis Machado <luisgpm@br.ibm.com>
15240
15241 * Makefile.in: Add required vsx dependencies.
15242
15243 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15244 Declare init_registers_powerpc_vsx32l.
15245 Declare init_registers_powerpc_vsx64l.
15246 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15247 (ppc_arch_setup): Check for VSX in hwcap.
15248 (ppc_fill_vsxregset): New function.
15249 (ppc_store_vsxregset): New function.
15250 Add new VSX entry in regset_info target_regsets.
15251
15252 * configure.srv: Add new VSX dependencies.
15253
a6f3e723
SL
152542008-08-12 Pedro Alves <pedro@codesourcery.com>
15255
15256 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15257 (remote_open): Set or clear transport_is_reliable.
15258 (putpkt_binary): Don't expect acks in noack mode.
15259 (getpkt): Don't send ack/nac in noack mode.
15260 * server.c (handle_general_set): Handle QStartNoAckMode.
15261 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15262 qSupported.
15263 (main): Reset noack_mode on every connection.
15264 * server.h (noack_mode): Declare.
15265
a417dc56
RW
152662008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15267
15268 * Makefile.in (GDBREPLAY_OBS): New variable.
15269 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15270
3221518c
UW
152712008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15272 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15275 (usr_store_inferior_registers): Likewise.
15276 (regsets_store_inferior_registers): Likewise.
15277
ec56be1b
PA
152782008-07-31 Rolf Jansen <rj@surtec.com>
15279 Pedro Alves <pedro@codesourcery.com>
15280
15281 * configure.ac: Check for memmem declaration.
15282 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15283 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15284 (disable_packet_qfThreadInfo): Unconditionally compile.
15285 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15286 * configure, config.in: Regenerate.
15287
2fe5e3ff
DE
152882008-07-28 Doug Kwan <dougkwan@google.com>
15289
15290 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15291 (linux_write_memory): Remove declaration of errno.
15292
836acd6d
UW
152932008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15294
15295 * linux-low.c (handle_extended_wait): Do not use "status"
15296 variable uninitialized.
15297
aeba519e
PA
152982008-07-07 Pedro Alves <pedro@codesourcery.com>
15299
15300 * server.c (handle_v_attach): Inhibit reporting dll changes.
15301
db42f210
PA
153022008-06-27 Pedro Alves <pedro@codesourcery.com>
15303
15304 * remote-utils.c (prepare_resume_reply): If requested, don't
15305 output "thread:TID" in the T stop reply.
15306
15307 * server.c (disable_packet_vCont, disable_packet_Tthread)
15308 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15309 (handle_query): If requested, disable support for qC, qfThreadInfo
15310 and qsThreadInfo.
15311 (handle_v_requests): If requested, disable support for vCont.
15312 (gdbserver_show_disableable): New.
15313 (main): Handle --disable-packet and --disable-packet=LIST.
15314
15315 * server.h (disable_packet_vCont, disable_packet_Tthread)
15316 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15317
8e4c5421
CD
153182008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15319
15320 * server.c (gdbserver_usage): Mention --version.
15321
6e23a804
DJ
153222008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15323
15324 * Makefile.in (gdbreplay.o): New rule.
15325
90aa6a40
JM
153262008-06-06 Joseph Myers <joseph@codesourcery.com>
15327
15328 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15329 message, not gdbserver.
15330
c16158bc 153312008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15332 Nathan Sidwell <nathan@codesourcery.com>
15333 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15334
15335 * acinclude.m4: Include ../../config/acx.m4.
15336 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15337 * configure, config.in: Regenerate.
15338 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15339 * server.c (gdbserver_version): Print PKGVERSION.
15340 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15341 (main): Adjust gdbserver_usage calls.
15342 * gdbreplay.c (version, host_name): Add declarations.
15343 (gdbreplay_version, gdbreplay_usage): New.
15344 (main): Accept --version and --help options.
15345
aeb75bf5
DJ
153462008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15347
15348 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15349 (arm_breakpoint_at): Handle Thumb.
15350 (the_low_target): Add comment.
15351
76b233dd
UW
153522008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15353
15354 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15355
08388c79
DE
153562008-05-09 Doug Evans <dje@google.com>
15357
a3c83fae
DE
15358 * server.h (decode_search_memory_packet): Declare.
15359 * remote-utils.c (decode_search_memory_packet): New fn.
15360 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15361 (handle_search_memory): New fn.
15362 (handle_query): Process qSearch:memory packets.
15363
bb9c3d36
UW
153642008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15365
15366 * regcache.c (registers_length): Remove.
15367 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15368 full register packet.
15369 * regcache.h (registers_length): Remove prototype.
15370 * server.h (PBUFSIZ): Define to 16384.
15371
7284e1be
UW
153722008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15373
15374 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15375 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15376 powerpc-64l.o, and powerpc-altivec64l.o.
15377 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15378 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15379 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15380 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15381 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15382 to srv_xmlfiles.
15383
15384 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15385 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15386 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15387 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15388 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15389 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15390 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15391 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15392 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15393 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15394 (clean): Update.
15395
15396 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15397 (init_registers_powerpc_32l): ... this new prototype.
15398 (init_registers_powerpc_32): Remove, replace by ...
15399 (init_registers_powerpc_altivec32l): ... this new prototype.
15400 (init_registers_powerpc_e500): Remove, replace by ...
15401 (init_registers_powerpc_e500l): ... this new prototype.
15402 (init_registers_ppc64): Remove, replace by ...
15403 (init_registers_powerpc_64l): ... this new prototype.
15404 (init_registers_powerpc_64): Remove, replace by ...
15405 (init_registers_powerpc_altivec64l): ... this new prototype.
15406 (ppc_num_regs): Set to 73.
15407 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15408 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15409 (ppc_cannot_store_register): Handle orig_r3 and trap.
15410 (ppc_arch_setup): Update init_registers_... calls.
15411 (ppc_fill_gregset): Handle orig_r3 and trap.
15412
15413 * inferiors.c (clear_inferiors): Reset current_inferior.
15414
fdc59709
PB
154152008-04-23 Paolo Bonzini <bonzini@gnu.org>
15416
889bf7c5
PA
15417 * acinclude.m4: Add override.m4.
15418 * configure: Regenerate.
fdc59709 15419
c9b2f845
UW
154202008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15421
15422 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15423 initial call to init_register_ppc64.
15424
550512b8
UW
154252008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15426
43aaf8b6
PA
15427 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15428 single powerpc*-*-linux* case.
550512b8
UW
15429 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15430
b6430ec3
UW
154312008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15432
15433 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15434 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15435 from reg_xmlfiles.
15436 * linux-ppc-low.c: Include <elf.h>.
15437 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15438 (ppc_hwcap): New global variable.
15439 (ppc_regmap): Remove __SPE__ #ifdef sections.
15440 (ppc_regmap_e500): New global variable.
15441 (ppc_cannot_store_register): Update __SPE__ special case.
15442 (ppc_get_hwcap): New function.
15443 (ppc_arch_setup): Use it to determine whether inferior supports
15444 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15445 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15446 Do not access registers if target does not support AltiVec.
15447 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15448 Do not access registers if target does not support SPE.
15449 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15450
52fa2412
UW
154512008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15452
15453 * linux-low.c (disabled_regsets, num_regsets): New.
15454 (use_regsets_p): Delete.
15455 (linux_wait_for_process): Clear disabled_regsets.
15456 (regsets_fetch_inferior_registers): Check and set it.
15457 (regsets_store_inferior_registers): Likewise.
15458 (linux_fetch_registers, linux_store_registers): Do not use
15459 use_regsets_p.
15460 (initialize_low): Allocate disabled_regsets.
15461
e28b3332
DJ
154622008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15463
15464 * Makefile.in (LIBOBJS): New.
15465 (OBS): Use LIBOBJS.
15466 (memmem.o): New rule.
15467 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15468 * configure: Regenerated.
15469
4536995d
UW
154702008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15471
15472 * server.c (handle_query): Never return "unsupported" for
15473 qXfer:features:read queries.
15474
221c031f
UW
154752008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15476
15477 * server.c (get_features_xml): Fix inverted condition.
15478 (handle_query): Always support qXfer:feature:read.
15479
ccd213ac
DJ
154802008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15481
15482 * server.c (wrapper_argv): New.
15483 (start_inferior): Handle wrapper_argv. If set, expect an extra
15484 trap.
15485 (gdbserver_usage): Document --wrapper.
15486 (main): Parse --wrapper.
15487
6fe305f7
UW
154882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15489
15490 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15491 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15492 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15493 (ppc_set_pc): Likewise.
15494 (ppc_arch_setup): New function.
15495 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15496 of collect_register.
889bf7c5 15497 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15498
5b0a002e
UW
154992008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15500
15501 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15502 instead of linux-ppc64-low.o.
15503 * linux-ppc64-low.c: Remove file.
15504 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15505 (linux-ppc64-low.o): Remove rule.
15506
15507 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15508 (init_registers_powerpc_64): Likewise.
15509 (ppc_regmap): Conditionally define depending on __powerpc64__.
15510 (ppc_cannot_store_register): Do not special-case "fpscr" when
15511 compiled on __powerpc64__.
15512 (ppc_collect_ptrace_register): New function.
15513 (ppc_supply_ptrace_register): New function.
15514 (ppc_breakpoint): Change type to "unsigned int".
15515 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15516 (the_low_target): Conditionally provide initializers for the
889bf7c5 15517 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15518 collect_ptrace_register and supply_ptrace_register members.
15519
9b4b61c8
UW
155202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15521
15522 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15523 * server.c (gdbserver_xmltarget): Define.
15524 (get_features_xml): Use it to replace "target.xml" and arch_string.
15525
15526 * configure.srv: Remove srv_xmltarget. Add XML files that were
15527 mentioned there to srv_xmlfiles instead. Remove conditional tests
15528 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15529 srv_xmlfiles and srv_regobj to include all possible choices.
15530 * configure.ac (srv_xmltarget): Remove.
15531 (srv_xmlfiles): Do not add "target.xml".
15532 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15533 checks for supplementary target information.
15534 * configure: Regenerate.
15535 * Makefile.in (XML_TARGET): Remove.
15536 (target.xml): Remove rule.
15537 (clean): Do not clean up target.xml.
15538 (.PRECIOUS): Do not mention target.xml.
15539
15540 * target.h (struct target_ops): Remove arch_string member.
15541 * linux-low.c (linux_arch_string): Remove.
15542 (linux_target_ops): Remove arch_string initializer.
15543 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15544 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15545 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15546 * spu-low.c (spu_arch_string): Remove.
15547 (spu_target_ops): Remove arch_string initializer.
15548 * win32-low.c (win32_arch_string): Remove.
15549 (win32_target_ops): Remove arch_string initializer.
15550 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15551 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15552 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15553
ee1a7ae4
UW
155542008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15555
15556 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15557 by collect_ptrace_register and supply_ptrace_register hooks.
15558 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15559 instead of checking for the_low_target.left_pad_xfer.
15560 (usr_store_inferior_registers): Use collect_ptrace_register callback
15561 instead of checking for the_low_target.left_pad_xfer.
15562
15563 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15564 (s390_supply_ptrace_register): Likewise.
15565 (s390_fill_gregset): Call s390_collect_ptrace_register.
15566 (the_low_target): Update.
15567
15568 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15569 (ppc_supply_ptrace_register): Likewise.
15570 (the_low_target): Update.
15571
15572 * linux-i386-low.c (the_low_target): Update.
15573 * linux-x86-64-low.c (the_low_target): Update.
15574
d61ddec4
UW
155752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15576
15577 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15578 reg-s390.o and reg-s390x.o.
15579
15580 * linux-low.c (new_inferior): New global variable.
15581 (linux_create_inferior, linux_attach): Set it.
15582 (linux_wait_for_process): Call the_low_target.arch_setup after the
15583 target has stopped for the first time.
15584 (initialize_low): Do not call the_low_target.arch_setup.
15585
15586 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15587 (s390_set_pc): Likewise.
15588 (s390_arch_setup): New function.
15589 (the_low_target): Use s390_arch_setup as arch_setup routine.
15590
15591 * regcache.c (realloc_register_cache): New function.
15592 (set_register_cache): Call it for each existing regcache.
15593
d05b4ac3
UW
155942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15595
15596 * server.h (init_registers): Remove prototype.
15597
15598 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15599 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15600 instead of init_registers ().
15601 * linux-arm-low.c (init_registers_arm): Add prototype.
15602 (init_registers_arm_with_iwmmxt): Likewise.
15603 (the_low_target): Add initializer for arch_setup field.
15604 * linux-cris-low.c (init_registers_cris): Add prototype.
15605 (the_low_target): Add initializer for arch_setup field.
15606 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15607 (the_low_target): Add initializer for arch_setup field.
15608 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15609 (the_low_target): Add initializer for arch_setup field.
15610 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15611 (the_low_target): Add initializer for arch_setup field.
15612 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15613 (the_low_target): Add initializer for arch_setup field.
15614 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15615 (the_low_target): Add initializer for arch_setup field.
15616 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15617 (init_registers_mips64_linux): Likewise.
15618 (the_low_target): Add initializer for arch_setup field.
15619 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15620 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15621 (the_low_target): Add initializer for arch_setup field.
15622 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15623 (init_registers_powerpc_64): Likewise.
15624 (the_low_target): Add initializer for arch_setup field.
15625 * linux-s390-low.c (init_registers_s390): Add prototype.
15626 (init_registers_s390x): Likewise.
15627 (the_low_target): Add initializer for arch_setup field.
15628 * linux-sh-low.c (init_registers_sh): Add prototype.
15629 (the_low_target): Add initializer for arch_setup field.
15630 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15631 (the_low_target): Add initializer for arch_setup field.
15632 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15633 (the_low_target): Add initializer for arch_setup field.
15634
15635 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15636 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15637 instead of init_registers ().
15638 * win32-arm-low.c (init_registers_arm): Add prototype.
15639 (the_low_target): Add initializer for arch_setup field.
15640 * win32-i386-low.c (init_registers_i386): Add prototype.
15641 (the_low_target): Add initializer for arch_setup field.
15642
15643 * spu-low.c (init_registers_spu): Add prototype.
15644 (initialize_low): Call initialie_registers_spu () instead of
15645 initialize_registers ().
15646
fd96d250
PA
156472008-02-19 Pedro Alves <pedro@codesourcery.com>
15648
15649 * server.c (handle_v_requests): When handling the vRun and vAttach
15650 packets, if already debugging a process, don't kill it. Return an
15651 error instead.
15652
d41b6bb4
DJ
156532008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15654
15655 * server.c (handle_query): Correct length check.
15656
5ac588cf
PA
156572008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15658
15659 * win32-low.c (do_initial_child_stuff): Add process handle
15660 parameter. Set current_process_handle and current_process_id from the
15661 parameters. Clear globals.
15662 (win32_create_inferior): Don't set current_process_handle and
15663 current_process_id here. Instead pass them on the call to
15664 do_initial_child_stuff.
15665 (win32_attach): Likewise.
15666 (win32_clear_inferiors): New.
15667 (win32_kill): Don't close the current process handle or the
15668 current thread handle here. Instead call win32_clear_inferiors.
15669 (win32_detach): Don't open a new handle to the process. Call
15670 win32_clear_inferiors.
15671 (win32_join): Don't rely on current_process_handle; open a new
15672 handle using the process id.
15673 (win32_wait): Call win32_clear_inferiors when the inferior process
15674 has exited.
15675
ecd7ecbc
DJ
156762008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15677
15678 * server.c (monitor_show_help): Add "exit".
15679
1525d545
MG
156802008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15681
ecd7ecbc 15682 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15683 (clean): Add reg-xtensa.c.
15684 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15685 * configure.srv (xtensa*-*-linux*) New target.
15686 * linux-xtensa-low.c: New.
15687 * xtensa-xtregs.c: New.
1525d545 15688
59a016f0
PA
156892008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15690
15691 * hostio.c: Don't include errno.h.
15692 (errno_to_fileio_errno): Move to hostio-errno.
15693 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15694 error number outputting to the target->hostio_last_error callback.
15695 (hostio_packet_error): Use FILEIO_EINVAL directly.
15696 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15697 calls to hostio_error.
15698 * hostio-errno.c: New.
15699 * server.h (hostio_last_error_from_errno): Declare.
15700 * target.h (target_ops): Add hostio_last_error member.
15701 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15702 as hostio_last_error handler.
889bf7c5 15703 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15704 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15705 (wince_hostio_last_error): New functions.
15706 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15707 as hostio_last_error handler.
15708 (win32_target_ops) [!_WIN32_WCE]: Register
15709 hostio_last_error_from_errno as hostio_last_error handler.
15710 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15711 (hostio-errno.o): New rule.
15712 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15713 * configure.srv (srv_hostio_err_objs): New variable. Default to
15714 hostio-errno.o.
15715 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15716 * configure: Regenerate.
15717
2d717e4f
DJ
157182008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15719
15720 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15721 (linux_kill, linux_detach): Clean up the process list.
15722 * remote-utils.c (remote_open): Improve port number parsing.
15723 (putpkt_binary, input_interrupt): Only send interrupts if the target
15724 is running.
15725 * server.c (extended_protocol): Make static.
15726 (attached): Define earlier.
15727 (exit_requested, response_needed, program_argv): New variables.
15728 (target_running): New.
15729 (start_inferior): Clear attached here.
15730 (attach_inferior): Set attached here.
15731 (require_running): Define.
15732 (handle_query): Use require_running and target_running. Implement
15733 "monitor exit".
15734 (handle_v_attach, handle_v_run): New.
15735 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15736 (gdbserver_usage): Update.
15737 (main): Redo argument parsing. Handle --debug and --multi. Handle
15738 --attach along with other options or after the port. Save
15739 program_argv. Support no initial program. Resynchronize
15740 communication with GDB after an error. Handle "monitor exit".
15741 Use require_running and target_running. Always allow the extended
15742 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15743 restart in extended mode.
15744 * README: Refer to the GDB manual. Update --attach usage.
15745
7407e2de
AS
157462007-12-20 Andreas Schwab <schwab@suse.de>
15747
15748 * linux-low.c (STACK_SIZE): Define.
15749 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15750 (linux_test_for_tracefork): Likewise.
15751
b65d95c5
DJ
157522007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * linux-low.c (linux_wait_for_event): Update messages. Do not
15755 reinsert auto-delete breakpoints.
15756 * mem-break.c (struct breakpoint): Change return type of handler to
15757 int.
15758 (set_breakpoint_at): Update handler type.
15759 (reinsert_breakpoint_handler): Return 1 instead of calling
15760 delete_breakpoint.
15761 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15762 setting a new one.
15763 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15764 * mem-break.h (set_breakpoint_at): Update handler type.
15765 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15766 * win32-low.c (auto_delete_breakpoint): New.
15767 (get_child_debug_event): Use it.
15768
4e799345
DJ
157692007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15770
15771 * configure.ac: Check for pread and pwrite.
15772 * hostio.c (handle_pread): Fall back to lseek and read.
15773 (handle_pwrite): Fall back to lseek and write.
15774 * config.in, configure: Regenerated.
15775
27524b67
DJ
157762007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15777
15778 * server.c (myresume): Add own_buf argument.
15779 (main): Update calls.
15780
a20d5e98
DJ
157812007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15782
15783 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15784 * remote-utils.c (remote_open): Do not call disable_async_io.
15785 (block_async_io): Delete.
15786 (unblock_async_io): Make static.
15787 (initialize_async_io): New.
15788 * server.c (handle_v_cont): Handle async I/O here.
15789 (myresume): Likewise. Move other common resume tasks here...
15790 (main): ... from here. Call initialize_async_io. Disable async
15791 I/O before the main loop.
15792 * server.h (initialize_async_io): Declare.
15793 (block_async_io, unblock_async_io): Delete prototypes.
15794 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15795
b79d787e
DJ
157962007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15797
15798 * remote-utils.c (readchar): Allow binary data in received messages.
15799
d97903b2
PA
158002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15801
15802 * win32-low.c (attaching): New global.
15803 (win32_create_inferior): Clear the `attaching' global.
15804 (win32_attach): Set the `attaching' global.
15805 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15806 attaching. Only set a breakpoint at the entry point if not
15807 attaching.
15808
311de423
PA
158092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15810
15811 * server.c (main): Don't report dll events on the initial
15812 connection on attaches.
15813
6c2d16d2
PA
158142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15815
15816 * server.c (main): Relax numerical bases supported for the pid of
15817 the --attach command line argument.
15818
5ca906e6
PA
158192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15820
15821 * win32-low.c (win32_attach): Call OpenProcess before
15822 DebugActiveProcess, not after. Add last error output to error
15823 call.
15824
9c6c8194
PA
158252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15826
15827 * win32-low.c (win32_get_thread_context)
15828 (win32_set_thread_context): New functions.
15829 (thread_rec): Use win32_get_thread_context.
15830 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15831 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15832 field.
15833
4d5d1aaa
PA
158342007-12-03 Leo Zayas
15835 Pedro Alves <pedro_alves@portugalmail.pt>
15836
15837 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15838 global variables.
15839 (child_add_thread): Minor cleanup.
15840 (child_continue): Resume artificially suspended threads before
15841 calling ContinueDebugEvent.
15842 (suspend_one_thread): New.
15843 (fake_breakpoint_event): New.
15844 (get_child_debug_event): Change return type to int. Check here if
15845 gdb sent an interrupt request. If a soft interrupt was requested,
15846 fake a breakpoint event. Return 0 if there is no event to handle,
15847 and 1 otherwise.
15848 (win32_wait): Don't check here if gdb sent an interrupt request.
15849 Ensure there is a valid event to handle.
15850 (win32_request_interrupt): Add soft interruption method as last
15851 resort.
15852
c436e841
PA
158532007-12-03 Leo Zayas
15854 Pedro Alves <pedro_alves@portugalmail.pt>
15855
15856 * win32-low.h (win32_thread_info): Add descriptions to the
15857 structure members. Replace `suspend_count' counter by a
15858 `suspended' flag.
15859 * win32-low.c (thread_rec): Update condition of when to get the
15860 context from the inferior. Rely on ContextFlags being set if it
15861 has already been retrieved. Only suspend the inferior thread if
15862 we haven't already. Warn if that fails.
15863 (continue_one_thread): s/suspend_count/suspended/. Only call
15864 ResumeThread once. Warn if that fails.
15865
e7b5fa67
PA
158662007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15867
15868 * win32-low.c (win32_wait): Don't read from the inferior when it
15869 has already exited.
15870
a385171d
PA
158712007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15872
15873 * Makefile.in (win32_low_h): New variable.
15874 (win32-low.o): Add dependency on $(win32_low_h).
15875 (win32-arm-low.o, win32-i386-low.o): New rules.
15876
f80c84b3
DJ
158772007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15878
15879 * hostio.c: Correct copyright year.
15880
a6b151f1
DJ
158812007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15882
15883 * Makefile.in (OBS): Add hostio.o.
15884 (hostio.o): New rule.
15885 * server.h (handle_vFile): Declare.
15886 * hostio.c: New file.
15887 * server.c (handle_v_requests): Take packet_len and new_packet_len
15888 for binary packets. Call handle_vFile.
15889 (main): Update call to handle_v_requests.
15890
f9387fc3
DJ
158912007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15892
15893 * linux-low.c: Include <sched.h>.
15894
51c2684e
DJ
158952007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15896
15897 * linux-low.c (linux_tracefork_grandchild): New.
15898 (linux_tracefork_child): Use clone.
15899 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15900
75f83163
JB
159012007-10-31 Joel Brobecker <brobecker@adacore.com>
15902
15903 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15904
da5898ce
DJ
159052007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15906
15907 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15908
24a09b5f
DJ
159092007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15910
15911 * inferiors.c (change_inferior_id): Delete.
15912 (add_pid_to_list, pull_pid_from_list): New.
15913 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15914 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15915 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15916 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15917 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15918 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15919 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15920 (using_threads): Always set to 1.
15921 (handle_extended_wait): New.
15922 (add_process): Do not set TID.
15923 (linux_create_inferior): Set must_set_ptrace_flags.
15924 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15925 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15926 (linux_thread_alive): Rename TID argument to LWPID.
15927 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15928 (linux_wait_for_event): Do not use TID or check using_threads. Update
15929 call to dead_thread_notify. Call handle_extended_wait.
15930 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15931 (send_sigstop): Delete sigstop_sent.
15932 (wait_for_sigstop): Avoid TID.
15933 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15934 (linux_test_for_tracefork): New.
15935 (linux_lookup_signals): Use thread_db_active and
15936 linux_supports_tracefork_flag.
15937 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15938 * linux-low.h (get_process_thread): Avoid TID.
15939 (struct process_ifo): Move thread_known and tid to the end. Remove
15940 sigstop_sent.
15941 (linux_attach_lwp, thread_db_init): Update prototypes.
15942 * server.h (change_inferior_id): Delete prototype.
15943 (add_pid_to_list, pull_pid_from_list): New prototypes.
15944 * thread-db.c (thread_db_use_events): New.
15945 (find_first_thread): Rename to...
15946 (find_one_thread): ...this. Update callers and messages. Do not
15947 call fatal. Check thread_db_use_events. Do not call
15948 change_inferior_id or new_thread_notify.
15949 (maybe_attach_thread): Update. Do not call new_thread_notify.
15950 (thread_db_init): Set thread_db_use_events. Check use_events.
15951 * utils.c (fatal, warning): Correct message prefix.
15952
30ed0a8f
DJ
159532007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15954
15955 * Makefile.in (clean): Remove new files.
15956 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15957 (powerpc-64.o, powerpc-64.c): New rules.
15958 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15959 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15960 with SPE.
15961 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15962 SPE targets.
15963 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15964 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15965 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15966 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15967 (target_regsets): Add AltiVec and SPE register sets.
15968 * configure.ac: Check for AltiVec and SPE.
15969 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15970 (ppc_fill_vrregset, ppc_store_vrregset): New.
15971 (target_regsets): Add AltiVec register set.
15972 * configure: Regenerated.
15973
fd462a61
DJ
159742007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15975
15976 * linux-low.c (O_LARGEFILE): Define.
15977 (linux_read_memory): Use /proc/PID/mem.
15978 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15979 * configure, config.in: Regenerated.
15980
69f223ed
DJ
159812007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15982
15983 * linux-low.c (linux_wait_for_event): Do not pass signals while
15984 single-stepping.
15985
aec18585
PA
159862007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15987
15988 * win32-low.c (create_process): New.
15989 (win32_create_inferior): Use create_process instead of
15990 CreateProcess. If create_process failed retry appending an ".exe"
15991 suffix. Store the GetLastError result immediatelly after
15992 create_process calls and use it on the call to error.
15993
34d86ddd
PA
159942007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15995
15996 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15997
5a0e3bd0
JB
159982007-08-23 Joel Brobecker <brobecker@adacore.com>
15999
16000 * configure.ac: Switch license to GPLv3.
16001
f88c79e6
MS
160022007-08-01 Michael Snyder <msnyder@access-company.com>
16003
16004 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16005
6b3d9b83
PA
160062007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16007
16008 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16009 typedef.
16010 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16011 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16012 CloseToolhelp32Snapshot.
16013 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16014 CloseToolhelp32Snapshot.
16015
c588c53c
MS
160162007-07-27 Michael Snyder <michael.snyder@access-company.com>
16017
16018 * server.c (main): Check for inferior exit before main loop.
16019
aa0403d9
PA
160202007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16021
16022 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16023 instead of on tmp_desc.
16024
255e7678
DJ
160252007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16026 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16029 (add_thread): Minor cleanups.
16030 (clear_inferiors): Move lower in the file. Clear the DLL
16031 list.
16032 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16033 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16034 (xml_escape_text): New.
16035 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16036 for qSupported.
16037 (handle_v_cont): Report errors.
16038 (gdbserver_version): Update.
16039 (main): Correct size of own_buf. Do not report initial DLL events.
16040 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16041 (unloaded_dll, xml_escape_text): New.
16042 * win32-low.c (enum target_waitkind): Update comments.
16043 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16044 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16045 (win32_EnumProcessModules, win32_GetModuleInformation)
16046 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16047 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16048 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16049 (win32_Module32First, win32_Module32Next, load_toolhelp)
16050 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16051 (get_child_debug_event): Handle DLL events.
16052 (win32_wait): Likewise.
16053
0d37add9
DJ
160542007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16055
16056 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16057 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16058
45e2715e
PA
160592007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16060
16061 * win32-low.c (handle_output_debug_string): Ignore event if not
16062 waiting.
16063
c5674cf1
PA
160642007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16065
16066 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16067
2bbe3cc1
DJ
160682007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16069
16070 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16071
ae13219e
DJ
160722007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16073
16074 * inferiors.c (change_inferior_id): Add comment.
16075 * linux-low.c (check_removed_breakpoint): Add an early
16076 prototype. Improve debug output.
16077 (linux_attach): Doc update.
16078 (linux_detach_one_process, linux_detach): Clean up before releasing
16079 each process.
16080 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16081 * linux-low.h (struct process_info): Doc improvement.
16082 * mem-break.c (delete_all_breakpoints): New.
16083 * mem-break.h (delete_all_breakpoints): New prototype.
16084 * thread-db.c (find_first_thread): New.
16085 (thread_db_create_event): Call it instead of
16086 thread_db_find_new_threads. Clean up unused variables.
16087 (maybe_attach_thread): Remove first thread handling.
16088 (thread_db_find_new_threads): Use find_first_thread.
16089 (thread_db_get_tls_address): Likewise.
16090
4105de34
DJ
160912007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16092
16093 * thread-db.c (thread_db_find_new_threads): Add prototype.
16094 (thread_db_create_event): Check for the main thread before adding
16095 a new thread.
16096 (maybe_attach_thread): Only enable event reporting if TID == 0.
16097 (thread_db_get_tls_address): Check for new threads.
16098
2b876972
DJ
160992007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16100
16101 * linux-low.c (linux_create_inferior): Try execv before execvp.
16102 * spu-low.c (spu_create_inferior): Likewise.
16103
7a245884
DJ
161042007-06-13 Mike Frysinger <vapier@gentoo.org>
16105
16106 * linux-low.c (linux_create_inferior): Change execv to execvp.
16107 * spu-low.c (spu_create_inferior): Likewies.
16108
117ce543
DJ
161092007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16110
16111 * Makefile.in (clean): Clean new files instead of deleted ones.
16112 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16113 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16114 rules.
16115 * configure.srv: Specify XML files and new regformats for MIPS and
16116 MIPS64 GNU/Linux.
16117 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16118 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16119 an entry for the restart register.
16120 (mips_cannot_fetch_register, mips_cannot_store_register)
16121 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16122 register names to match the XML descriptions.
16123 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16124 restart register instead of $0.
16125
0e7f50da
UW
161262007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16127 Markus Deuling <deuling@de.ibm.com>
16128
16129 * remote-utils.c (decode_xfer_write): New function.
16130 * server.h (decode_xfer_write): Add prototype.
16131 * server.c (handle_query): Add PACKET_LEN argument. Support
16132 qXfer:spu:read and qXfer:spu:write packets.
16133 (main): Pass packet_len to handle_query.
16134 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16135 * target.h (target_ops): Add qxfer_spu.
16136
374c1d38
UW
161372007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16138
16139 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16140 accessing non-seekable spufs files.
16141
bb63802a
UW
161422007-05-16 Markus Deuling <deuling@de.ibm.com>
16143
889bf7c5 16144 * server.c (handle_query): Add reply for qC packet.
bb63802a 16145
7390519e
PA
161462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16147 Leo Zayas <lerele@champenstudios@com>
16148
16149 * server.h (check_remote_input_interrupt_request): New function.
16150 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16151 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16152 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16153 (check_remote_input_interrupt_request): New function.
16154 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16155 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16156 winapi_GenerateConsoleCtrlEvent): New typedefs.
16157 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16158 to 250 ms.
16159 (win32_wait): Check for remote interrupt request
16160 with check_remote_input_interrupt_request.
16161 (win32_request_interrupt): New function.
16162 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16163
34b34921
PA
161642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16165
16166 * win32-low.c (debug_registers_changed,
16167 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16168 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16169 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16170 (thread_rec): Get context using the low target.
16171 (child_add_thread): Call thread_added on the low target,
16172 which does the same thing.
16173 (regptr): Delete.
16174 (do_initial_child_stuff): Remove debug registers references.
16175 Set context using the low target. Resume threads after
16176 setting the contexts.
16177 (child_continue): Remove dead variable. Remove debug
16178 registers references.
16179 (child_fetch_inferior_registers): Go through the low target.
16180 (do_child_store_inferior_registers): Remove.
16181 (child_store_inferior_registers): Go through the low target.
16182 (win32_resume): Remove debug registers references.
16183 Set context using the low target.
16184 (handle_exception): Change return type to void. Don't record
16185 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16186 first chance exception.
889bf7c5 16187 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16188 goto loop. Always return after waiting for debug event.
16189 (win32_wait): Convert to switch statement. Handle spurious
16190 events.
16191
16192 * win32-i386-low.c (debug_registers_changed,
16193 debug_registers_used): New.
16194 (initial_stuff): Rename to ...
16195 (i386_initial_stuff): ... this. Clear debug registers
16196 state variables.
16197 (store_debug_registers): Delete.
16198 (i386_get_thread_context): New.
16199 (load_debug_registers): Delete.
16200 (i386_set_thread_context): New.
16201 (i386_thread_added): New.
16202 (single_step): Rename to ...
16203 (i386_single_step): ... this.
16204 (do_fetch_inferior_registers): Rename to ...
16205 (i386_fetch_inferior_register): ... this.
16206 (i386_store_inferior_register): New.
16207 (the_low_target): Adapt to new interface.
16208
16209 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16210 (arm_get_thread_context): New.
16211 (arm_set_thread_context): New.
16212 (regptr): New.
16213 (do_fetch_inferior_registers): Rename to ...
16214 (arm_fetch_inferior_register): ... this.
16215 (arm_store_inferior_register): New.
16216 (arm_wince_breakpoint): Reimplement as unsigned long.
16217 (arm_wince_breakpoint_len): Define.
16218 (the_low_target): Adapt to new interface.
16219
16220 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16221 load_debug_registers. Add get_thread_context, set_thread_context,
16222 thread_added and store_inferior_register. Rename
16223 fetch_inferior_registers to fetch_inferior_register.
16224 (regptr): Remove declaration.
16225
dd6953e1
PA
162262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16227
16228 * linux-low.c (linux_detach): Change return type to int. Return 0.
16229 * spu-low.c (spu_detach): Likewise.
16230
444d6139
PA
162312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16232
16233 * target.h (target_ops): Change return type of detach to int.
16234 Add join.
16235 (join_inferior): New.
16236 * server.c (main): Don't skip detach support on mingw32.
16237 If the inferior doesn't support detaching return error.
16238 Call join_inferior instead of using waitpid.
16239 * linux-low.c (linux_join): New.
16240 (linux_target_op): Add linux_join.
16241 * spu-low.c (spu_join): New.
16242 (spu_target_ops): Add spu_join.
16243 * win32-low.c (win32_detach): Adapt to new interface.
16244 Reopen current_process_handle before detaching. Issue a child
16245 resume before detaching.
16246 (win32_join): New.
16247 (win32_target_op): Add win32_join.
16248
1d5315fe
PA
162492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16250
16251 * win32-low.c (win32-attach): Fix return value.
16252 * target.h (target_ops): Describe ATTACH return values.
16253
bf914831
PA
162542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16255
16256 * win32-low.c (GETPROCADDRESS): Define.
16257 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16258 (winapi_DebugSetProcessKillOnExit): Likewise.
16259 (win32_create_inferior): Force usage of ansi CreateProcessA.
16260 (win32_attach): Use GETPROCADDRESS.
16261 (win32_detach): Likewise.
16262
f72f3e60
PA
162632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16264
16265 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16266
ed50f18f
PA
162672007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16268
16269 * win32-low.c: Commit leftover changes from 2007-03-29.
16270
0c2ead7e
DJ
162712007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16272
16273 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16274 fields short instead of int. Add explicit padding.
16275 (i387_cache_to_fsave): Remove unnecessary casts.
16276 (i387_fsave_to_cache): Doc fix.
16277 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16278
73725ff3
DJ
162792007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16280
16281 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16282 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16283
d99f33d8
PA
162842007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16285
16286 * configure.srv (arm*-*-mingw32ce*): Move near the other
16287 arm targets.
16288
68070c10
PA
162892007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16290
2482afc6 16291 * configure.ac: Add errno checking.
68070c10
PA
16292 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16293 sys/file.h and malloc.h.
16294 (AC_CHECK_DECLS): Add perror.
16295 (srv_mingwce): Handle.
2482afc6 16296 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16297 win32-i386-low.o to srv_tgtobj.
16298 (i[34567]86-*-mingw*): Likewise.
16299 (arm*-*-mingw32ce*): Add case.
16300 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16301 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16302 [__MINGW32CE__] (strerror): New function.
16303 [__MINGW32CE__] (errno): Define to GetLastError.
16304 [__MINGW32CE__] (COUNTOF): New macro.
16305 (remote_open): Remove extra close call.
16306 * mem-break.c (delete_breakpoint_at): New function.
16307 * mem-break.h (delete_breakpoint_at): Declare.
16308 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16309 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16310 [USE_WIN32API] (read, write): Add char* casts.
16311 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16312 * server.h: Include wincecompat.h on Windows CE.
16313 [HAVE_ERRNO_H]: Check.
16314 (perror): Declare if not declared.
16315 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16316 (perror_with_name): Remove errno declaration.
16317 * wincecompat.h: New.
16318 * wincecompat.c: New.
16319 * win32-low.h: New.
16320 * win32-arm-low.c: New.
16321 * win32-i386-low.c: New.
16322 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16323 (OUTMSG2): Make it safe.
16324 (_T): New macro.
16325 (COUNTOF): New macro.
16326 (NUM_REGS): Get it from the low target.
16327 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16328 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16329 (thread_rec): Let low target handle debug registers.
16330 (child_add_thread): Likewise.
16331 (child_init_thread_list): Likewise.
16332 (continue_one_thread): Likewise.
16333 (regptr): New.
16334 (do_child_fetch_inferior_registers): Move to ...
16335 * win32-i386-low.c: ... here, and rename to ...
16336 (do_fetch_inferior_registers): ... this.
889bf7c5 16337 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16338 Go through the low target.
16339 (do_child_store_inferior_registers): Use regptr.
16340 (strwinerror): New function.
16341 (win32_create_inferior): Handle Windows CE.
16342 Use strwinerror instead of strerror on Windows error
16343 codes. Add program to the error output.
16344 Don't close the main thread handle on Windows CE.
16345 (win32_attach): Use coredll.dll on Windows CE.
16346 (win32_kill): Close current process and current
16347 thread handles.
16348 (win32_detach): Use coredll.dll on Windows CE.
16349 (win32_resume): Let low target handle debug registers, and
16350 step request.
16351 (handle_exception): Add/Remove initial breakpoint. Avoid
16352 non-existant WSTOPSIG on Windows CE.
16353 (win32_read_inferior_memory): Cast to remove warning.
16354 (win32_arch_string): Go through the low target.
16355 (initialize_low): Call set_breakpoint_data with the low
16356 target's breakpoint.
16357 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16358 FOP_REGNUM, mappings): Move to ...
16359 * win32-i386-low.c: ... here.
16360 * win32-low.c (win32_thread_info): Move to ...
16361 * win32-low.h: ... here.
16362 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16363 win32-arm-low.c and wincecompat.c.
16364 (all:): Add $EXEEXT.
16365 (install-only:): Likewise.
16366 (gdbserver:): Likewise.
16367 (gdbreplay:): Likewise.
16368 * config.in: Regenerate.
16369 * configure: Regenerate.
16370
41093d81
PA
163712007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16372
16373 * win32-low.c: Rename typedef thread_info to
16374 win32_thread_info throughout.
16375
544afa54
PA
163762007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16377
16378 * win32-i386-low.c: Rename to ...
16379 * win32-low.c: ... this.
16380 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16381 * Makefile.in: Likewise.
16382
bce7165d
PA
163832007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16384
16385 * remote-utils.c (monitor_output): Constify msg parameter.
16386 * server.h (monitor_output): Likewise.
16387 * win32-i386-low.c (handle_output_debug_string): New.
16388 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16389 handle_output_debug_string.
16390 (get_child_debug_event): Likewise.
16391
506c7aa0
DJ
163922007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16393
16394 * server.c (main): Correct strtoul check.
16395
42c81e2a
DJ
163962007-03-27 Jon Ringle <jon@ringle.org>
16397
16398 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16399
9453113a
DJ
164002007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16401
16402 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16403
64a69107
DJ
164042007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16405
16406 * terminal.h: Check HAVE_SGTTY_H.
16407
164082007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16409
16410 * remote-utils.c (remote_open): Print out the assigned port number.
16411
c74d0ad8
DJ
164122007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16413
16414 * remote-utils.c (monitor_output): New function.
16415 * server.c (debug_threads): Define here.
16416 (monitor_show_help): New function.
16417 (handle_query): Handle qRcmd.
16418 (main): Do not handle 'd' packet.
16419 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16420 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16421 of debug_threads.
16422
de7c3b4a
PA
164232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16424
16425 * Makefile.in (EXEEXT): New.
16426 (clean): Use $(EXEEXT).
16427
ef57601b
PA
164282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16429
16430 * target.h (target_ops): Rename send_signal to request_interrupt,
16431 and remove enum target_signal parameter.
16432 * linux-low.c (linux_request_interrupt): Rename from
16433 linux_send_signal, and always send SIGINT.
16434 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16435 and always send SIGINT.
16436 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16437 of send_signal.
16438 (input_interrupt): Likewise.
16439
820f2bda
PA
164402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16441
16442 * server.c (get_features_xml): Check if target implemented
16443 arch_string.
16444 * win32-i386-low.c (win32_arch_string): New.
16445 (win32_target_ops): Add win32_arch_string as arch_string member.
16446
ab39bf24
UW
164472007-02-22 Markus Deuling <deuling@de.ibm.com>
16448
16449 * spu-low.c (spu_arch_string): New.
16450 (spu_target_ops): Add spu_arch_string.
16451
61ff6e04
DJ
164522007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16453
16454 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16455 * configure.ac: Do not check for terminal.h.
16456 * configure, config.in: Regenerated.
16457
fb1e4ffc
DJ
164582007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16459
16460 * Makefile.in (OBS): Add $(XML_BUILTIN).
16461 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16462 (clean): Update.
16463 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16464 (arm-with-iwmmxt.c): New.
16465 * config.in, configure: Regenerate.
16466 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16467 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16468 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16469 (arm*-*-linux*): Add iWMMXt and regset support.
16470 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16471 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16472 (arm_store_wmmxregset, target_regsets): New.
16473 * server.c (get_features_xml): Take annex argument. Check builtin
16474 XML documents.
16475 (handle_query): Handle multiple annexes.
16476
0f48aa01
DJ
164772007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * remote-utils.c [USE_WIN32API] (read, write): Define.
16480 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16481 write.
16482
23181151
DJ
164832007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16484
16485 * linux-i386-low.c (the_low_target): Set arch_string.
16486 * linux-x86-64-low.c (the_low_target): Likewise.
16487 * linux-low.c (linux_arch_string): New.
16488 (linux_target_ops): Add it.
16489 * linux-low.h (struct linux_target_ops): Add arch_string.
16490 * server.c (write_qxfer_response): Use const void * for DATA.
16491 (get_features_xml): New.
16492 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16493 * target.h (struct target_ops): Add arch_string method.
16494
9d606399
DJ
164952007-01-03 Denis Pilat <denis.pilat@st.com>
16496 Daniel Jacobowitz <dan@codesourcery.com>
16497
16498 * linux-low.c (linux_kill): Handle being called with no threads.
16499 * win32-i386-low.c (win32_kill): Likewise.
16500 (get_child_debug_event): Clear current_process_handle.
16501
165022006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16503 Daniel Jacobowitz <dan@codesourcery.com>
16504
16505 * remote-utils.c (remote_open): Check the type of specified
16506 serial port devices before opening them.
16507 * server.c (main): Kill the inferior if an error occurs during
16508 the first remote_open.
16509
a5e13d24
DJ
165102006-12-05 Markus Deuling <deuling@de.ibm.com>
16511
16512 * README: Update supported targets.
16513
186947f7
DJ
165142006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16515
16516 * Makefile.in (clean): Remove reg-mips64.c.
16517 (reg-mips64.c, reg-mips64.o): New rules.
16518 * configure.srv: Handle mips64. Include regset support for mips.
16519 * linux-mips-low.c (union mips_register): New.
16520 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16521 (mips_breakpoint, mips_breakpoint_at): Use int.
16522 (mips_collect_register, mips_supply_register)
16523 (mips_collect_register_32bit, mips_supply_register_32bit)
16524 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16525 (mips_store_fpregset, target_regsets): New.
16526 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16527
a13e2c95
UW
165282006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16529
16530 * configure.srv: Add target "spu*-*-*".
16531 * Makefile.in (clean): Remove reg-spu.c.
16532 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16533 * spu-low.c: New file.
16534
cb7283db
DJ
165352006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16536
16537 * configure.ac: Correct td_thr_tls_get_addr test.
16538 * configure: Regenerated.
16539
89be2091
DJ
165402006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16541
16542 * linux-low.c (linux_wait_for_event): Reformat. Use the
16543 pass_signals array.
16544 * remote-utils.c (decode_address_to_semicolon): New.
16545 * server.c (pass_signals, handle_general_set): New.
16546 (handle_query): Mention QPassSignals for qSupported.
16547 (main): Call handle_general_set.
16548 * server.h (pass_signals, decode_address_to_semicolon): New.
16549
000ef4f0
DJ
165502006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16551
16552 * server.c (handle_query): Correct error handling for read_auxv.
16553
b7149293
UW
165542005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16555
16556 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16557 and srv_linux_thread_db to yes.
16558 * linux-s390-low.c (s390_fill_gregset): New function.
16559 (target_regsets): Define data structure.
16560
dae5f5cf
DJ
165612006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16562
16563 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16564 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16565 * config.in, configure: Regenerated.
16566 * inferiors.c (gdb_id_to_thread): New function.
16567 (gdb_id_to_thread_id): Use it.
16568 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16569 * linux-low.h (struct process_info): Add th member.
16570 (thread_db_get_tls_address): New prototype.
16571 * remote-utils.c (decode_address): Make non-static.
16572 * server.c (handle_query): Handle qGetTLSAddr.
16573 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16574 * target.h (struct target_ops): Add get_tls_address.
16575 * thread-db.c (maybe_attach_thread): Save the thread handle.
16576 (thread_db_get_tls_address): New.
16577
32ca6d61
DJ
165782006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16579
16580 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16581 (linux_resume_one_process): Take a siginfo_t *. Update all
16582 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16583 (struct pending_signals): Add a siginfo_t.
16584 (linux_wait_for_process): Always set last_status.
16585 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16586 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16587 * linux-low.h (struct process_info): Add last_status.
16588
5ffff7c1
DJ
165892006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16590
16591 * remote-utils.c (try_rle): New function.
16592 (putpkt_binary): Use it.
16593
8695c747
DJ
165942006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16595
16596 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16597 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16598 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16599 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16600 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16601 point registers.
16602
290fadea
RS
166032006-08-08 Richard Sandiford <richard@codesourcery.com>
16604
16605 * server.c (terminal_fd): New variable.
16606 (old_foreground_pgrp): Likewise.
16607 (restore_old_foreground_pgrp): New function.
16608 (start_inferior): Record the terminal file descriptor in terminal_fd
16609 and its original foreground group in old_foreground_pgrp. Register
16610 restore_old_foreground_pgrp with atexit().
16611
9f2e1e63
DJ
166122006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16613
16614 * server.c (handle_query): Correct qPart to qXfer.
16615
b80864fb
DJ
166162006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16617
16618 * configure.ac: Check for more headers which are missing on
16619 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16620 * configure.srv: Add Cygwin and mingw32.
16621 * remote-utils.c: Don't include headers unconditionally which
16622 are missing on mingw32. Include <winsock.h> for mingw32.
16623 (remote_open): Adjust for mingw32 support. Flush
16624 standard error after writing to it.
16625 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16626 (unblock_async_io, enable_async_io, disable_async_io)
16627 (readchar, getpkt): Update for Winsock support.
16628 (prepare_resume_reply): Expect a protocol signal number.
16629 * server.c: Disable <sys/wait.h> on mingw32.
16630 (start_inferior): Adjust for mingw32 support. Flush
16631 standard error after writing to it.
16632 (attach_inferior): Likewise. Use protocol signal
16633 numbers.
16634 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16635 and names.
16636 * win32-i386-low.c: New file.
16637 * Makefile.in (XM_CLIBS): Set.
16638 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16639 (win32-i386-low.o): New dependency rule.
16640 * linux-low.c (linux_wait): Use target signal numbers.
16641 * target.h (struct target_ops): Doc fix.
16642 * server.h (target_signal_to_name): New prototype.
16643 * gdbreplay.c: Don't include headers unconditionally which
16644 are missing on mingw32. Include <winsock.h> for mingw32.
16645 (remote_close, remote_open): Adjust for Winsock support.
16646 * configure, config.in: Regenerated.
16647
0876f84a
DJ
166482006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16649
16650 * server.c (decode_xfer_read, write_qxfer_response): New.
16651 (handle_query): Take a packet length argument. Handle
16652 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16653 the qSupported response.
16654 (main): Update call to handle_query.
16655
01f9e8fa
DJ
166562006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16659 (putpkt_binary): Renamed from putpkt and adjusted for binary
16660 data.
16661 (putpkt): New wrapper for putpkt_binary.
16662 (readchar): Don't mask off the high bit.
16663 (decode_X_packet): New function.
16664 * server.c (main): Call putpkt_binary if a handler sets the packet
16665 length. Save the length of the incoming packet. Handle 'X'.
16666 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16667
be2a5f71
DJ
166682006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16669
16670 * server.c (handle_query): Handle qSupported.
16671
ea025f5f
DJ
166722006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16673
16674 * remote-utils.c (all_symbols_looked_up): New variable.
16675 (look_up_one_symbol): Check it.
16676 * server.h (look_up_one_symbol): New declaration.
16677 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16678
9308fc88
DJ
166792006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16680
16681 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16682 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16683 (PTRACE_GET_THREAD_AREA): Define.
16684 (ps_get_thread_area): New function.
16685
52fb6437
NS
166862006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16687
16688 * configure.srv (m68k*-*-uclinux*): New target.
16689 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16690 (linux_resume_one_process): Remove extraneous cast.
16691 (linux_read_offsets): New.
16692 (linux_target_op): Add linux_read_offsets on mmuless systems.
16693 * server.c (handle_query): Add qOffsets logic.
16694 * target.h (struct target_ops): Add read_offsets.
16695
21b0f40c
DJ
166962006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16697
16698 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16699 (PTRACE_GET_THREAD_AREA): Define.
16700 (ps_get_thread_area): New function.
16701 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16702 (linux-x86-64-low.o): Update.
16703
0050a760
DJ
167042006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16705
16706 * configure.ac: Remove checks for prfpregset_t.
16707 * gdb_proc_service.h: New file.
16708 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16709 new "gdb_proc_service.h".
16710 * proc-service.c: Likewise.
16711 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16712 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16713 * Makefile.in (gdb_proc_service_h): Updated.
16714 * configure, config.in: Regenerated.
16715
b92a518e
DJ
167162006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16717
16718 * remote-utils.c (prepare_resume_reply): Move declaration
16719 of gdb_id_from_wait to the top of the block.
16720
545587ee
DJ
167212006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16722
16723 * linux-low.c (regsets_store_inferior_registers): Read the regset
16724 from the target before filling it.
16725
9db87ebd
DJ
167262006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16727
16728 * server.c (attach_inferior): Return SIGTRAP for a successful
16729 attach.
16730
dd24457d
DJ
167312006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16732
16733 * Makefile.in (OBS): Add version.o.
16734 (STAGESTUFF): Delete.
16735 (version.o): Add dependencies.
16736 (version.c): Replace rule.
16737 (clean): Remove version.c.
16738 * server.c (gdbserver_version): New.
16739 (gdbserver_usage): Use printf.
16740 (main): Handle --version and --help.
16741 * server.h (version, host_name): Add declarations.
16742
6f0f660e
EZ
167432005-12-23 Eli Zaretskii <eliz@gnu.org>
16744
889bf7c5
PA
16745 * linux-arm-low.c:
16746 * linux-arm-low.c:
16747 * inferiors.c:
16748 * i387-fp.h:
16749 * i387-fp.c:
16750 * gdbreplay.c:
16751 * regcache.c:
16752 * proc-service.c:
16753 * mem-break.h:
16754 * mem-break.c:
16755 * linux-x86-64-low.c:
16756 * linux-sh-low.c:
16757 * linux-s390-low.c:
16758 * linux-ppc64-low.c:
16759 * linux-ppc-low.c:
16760 * linux-mips-low.c:
16761 * linux-m68k-low.c:
16762 * linux-m32r-low.c:
16763 * linux-low.h:
16764 * linux-low.c:
16765 * linux-ia64-low.c:
16766 * linux-i386-low.c:
16767 * linux-crisv32-low.c:
16768 * thread-db.c:
16769 * terminal.h:
16770 * target.h:
16771 * target.c:
16772 * server.h:
16773 * server.c:
16774 * remote-utils.c:
16775 * regcache.h:
16776 * utils.c:
16777 * Makefile.in:
16778 * configure.ac:
6f0f660e
EZ
16779 * gdbserver.1: Add (C) after Copyright. Update the FSF
16780 address.
16781
9d1fb177
DJ
167822005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16783
16784 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16785 (arm_breakpoint_at): Recognize both breakpoints.
16786 (the_low_target): Use the correct breakpoint instruction.
16787
011a70c2
DJ
167882005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16789
16790 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16791 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16792 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16793 (the_low_target): Update.
16794
7fb85e41
AS
167952005-10-25 Andreas Schwab <schwab@suse.de>
16796
16797 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16798
16799 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16800 (ia64_num_regs): Reduce to 462.
16801
3db0444b
DJ
168022005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16803
16804 * acinclude.m4: Correct quoting.
16805 * aclocal.m4: Regenerated.
16806
16807 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16808 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16809 (thread_db_init): Call thread_db_err_str.
16810 * configure.ac: Check for TD_VERSION.
16811 * config.in, configure: Regenerated.
16812
bee0189a
DJ
168132005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16814
16815 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16816
e9d25b98
DJ
168172005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16818
16819 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16820 is not available. Define HAVE_PTRACE_GETREGS if it is.
16821 * config.in, configure: Regenerated.
16822 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16823 * linux-i386-low.c, linux-m68k-low.c: Update to use
16824 HAVE_PTRACE_GETREGS.
16825 * linux-low.c (regsets_fetch_inferior_registers)
16826 (regsets_store_inferior_registers): Only return 0 if we processed
16827 GENERAL_REGS.
16828 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16829 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16830
a06660f7
DJ
168312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16832
16833 * inferiors.c (struct thread_info): Add gdb_id.
16834 (add_thread): Add gdb_id argument.
16835 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16836 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16837 calls to add_thread.
16838 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16839 * server.c (handle_query): Use thread_to_gdb_id.
16840 (handle_v_cont, main): Use gdb_id_to_thread_id.
16841 * server.h (add_thread): Update prototype.
16842 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16843 prototypes.
16844
5a1f5858
DJ
168452005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16846
16847 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16848 left-padded registers.
16849 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16850 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16851
e122f1f5
SE
168522005-07-01 Steve Ellcey <sje@cup.hp.com>
16853
16854 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16855 * configure: Regenerate.
16856 * config.in: Regenerate.
16857 * server.h (NEED_DECLARATION_STRERROR):
16858 Replace with !HAVE_DECL_STRERROR.
16859
d592fa2f
DJ
168602005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16861
16862 * linux-low.c (linux_wait, linux_send_signal): Don't test
16863 an unsigned long variable for > 0 if it could be MAX_ULONG.
16864 * server.c (myresume): Likewise.
16865 * target.c (set_desired_inferior): Likewise.
16866
ccbd4912
MK
168672005-06-13 Mark Kettenis <kettenis@gnu.org>
16868
16869 * configure.ac: Simplify and improve check for socklen_t.
16870 * configure, config.in: Regenerate.
16871
f450004a
DJ
168722005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16873
16874 * acconfig.h: Remove.
16875 * configure.ac: Add a test for socklen_t. Use three-argument
16876 AC_DEFINE throughout.
16877 * config.in: Regenerated using autoheader 2.59.
16878 * configure: Regenerated.
16879
16880 * gdbreplay.c (socklen_t): Provide a default.
16881 (remote_open): Use socklen_t.
16882 * remote-utils.c (socklen_t): Provide a default.
16883 (remote_open): Use socklen_t.
16884 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16885 unsigned char.
16886
16887 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16888 char for buffers.
16889 * linux-low.c (linux_read_memory, linux_write_memory)
16890 (linux_read_auxv): Likewise.
16891 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16892 (check_mem_write): Likewise.
16893 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16894 Likewise.
16895 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16896 (registers_from_string, register_data): Likewise.
16897 * server.c (handle_query, main): Likewise.
16898 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16899 (decode_M_packet): Likewise.
16900 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16901 * target.h (struct target_ops): Update read_memory, write_memory,
16902 and read_auxv.
16903 (read_inferior_memory, write_inferior_memory): Update.
16904 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16905 to unsigned char *.
16906 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16907 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16908 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16909 linux-s390-low.c, linux-sh-low.c: Update for changes in
16910 read_inferior_memory and the_low_target->breakpoint.
16911
eee84df1
DJ
169122005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16913
16914 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16915 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16916 * configure.srv: Add powerpc64-*-linux*.
16917 * linux-ppc64-low.c: New file.
16918
45b134e5
OF
169192005-05-23 Orjan Friberg <orjanf@axis.com>
16920
16921 * linux-cris-low.c: New file with support for CRIS.
16922 * linux-crisv32-low.c: Ditto for CRISv32.
16923 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16924 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16925 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16926 reg-crisv32.o, and reg-crisv32.c to make rules.
16927 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16928 recognized targets.
16929
48d93c75
UW
169302005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16931
16932 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16933 of sizeof (PTRACE_XFER_TYPE).
16934 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16935
e013ee27
OF
169362005-05-12 Orjan Friberg <orjanf@axis.com>
16937
889bf7c5 16938 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16939 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16940 pointers for hardware watchpoint support.
16941 * linux-low.h (struct linux_target_ops): Ditto.
16942 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16943 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16944 to linux_target_ops.
16945 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16946 reply packet.
16947 * server.c (main): Recognize 'Z' and 'z' packets.
16948
b0ded00b
UW
169492005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16950
16951 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16952 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16953 (the_low_target): Add new members.
16954
8643e2ad
DJ
169552005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16956
16957 * proc-service.c (ps_lgetregs): Search all_processes instead of
16958 all_threads.
16959
fc620387
DJ
169602005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16961
16962 * server.c (start_inferior): Change return type to int.
16963 (attach_inferior): Change sigptr to int *.
16964 (handle_v_cont, handle_v_requests): Change signal to int *.
16965 (main): Change signal to int.
16966
169672005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16968
16969 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16970 * configure.srv: Add m32r*-*-linux*.
16971 * linux-m32r-low.c: New file.
16972
e0e76420
DJ
169732005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16974
16975 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16976
a1928bad
DJ
169772005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16978
16979 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16980 Take unsigned long arguments for PIDs.
16981 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16982 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16983 (wait_for_sigstop, linux_resume_one_process)
16984 (regsets_fetch_inferior_registers, linux_send_signal)
16985 (linux_read_auxv): Likewise. Update the types of variables holding
16986 PIDs. Update format string specifiers.
16987 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16988 * remote-utils.c (prepare_resume_reply): Likewise.
16989 * server.c (cont_thread, general_thread, step_thread)
16990 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16991 unsigned long.
16992 (handle_query): Update format specifiers.
16993 (handle_v_cont, main): Use strtoul for thread IDs.
16994 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16995 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16996 (general_thread, step_thread, thread_from_wait)
16997 (old_thread_from_wait): Update.
16998 * target.h (struct thread_resume): Use unsigned long for THREAD.
16999 (struct target_ops): Use unsigned long for arguments to attach and
17000 thread_alive.
17001
dcdb98d2
DJ
170022005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17003
17004 * acinclude.m4: Include bfd/bfd.m4 directly.
17005 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17006 <agriffis@toolchain.org>.
17007 * aclocal.m4, configure: Regenerated.
17008
bec39cab
AC
170092005-01-07 Andrew Cagney <cagney@gnu.org>
17010
17011 * configure.ac: Rename configure.in, require autoconf 2.59.
17012 * configure: Re-generate.
17013
434c4c77
DJ
170142004-12-08 Daniel Jacobowitz <dan@debian.org>
17015
17016 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17017 LIBS when finished.
17018 * aclocal.m4: Regenerated.
17019 * configure: Regenerated.
17020
db1d3e1b
AS
170212004-11-21 Andreas Schwab <schwab@suse.de>
17022
17023 * linux-m68k-low.c (m68k_num_gregs): Define.
17024 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17025 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17026 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17027 (m68k_breakpoint_at): New. Add to the_low_target.
17028
17029 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17030 srv_linux_thread_db to yes.
17031
43360365
JB
170322004-10-20 Joel Brobecker <brobecker@gnat.com>
17033
17034 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17035 (ARCH_SET_FS): Likewise.
17036 (ARCH_GET_FS): Likewise.
17037 (ARCH_GET_GS): Likewise.
17038
fd500816
DJ
170392004-10-16 Daniel Jacobowitz <dan@debian.org>
17040
17041 * linux-i386-low.c (ps_get_thread_area): New.
17042 * linux-x86-64-low.c (ps_get_thread_area): New.
17043 * linux-low.c: Include <sys/syscall.h>.
17044 (linux_kill_one_process): Don't kill the first thread here.
17045 (linux_kill): Kill the first thread here.
17046 (kill_lwp): New function.
17047 (send_sigstop, linux_send_signal): Use it.
17048 * proc-service.c: Clean up #ifdefs.
17049 (fpregset_info): Delete.
17050 (ps_lgetregs): Update and enable implementation.
17051 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17052 implementations.
17053 * remote-utils.c (struct sym_cache, symbol_cache): New.
17054 (input_interrupt): Print a clearer message.
17055 (async_io_enabled): New variable.
17056 (enable_async_io, disable_async_io): Use it. Update comments.
17057 (look_up_one_symbol): Use the symbol cache.
17058 * thread-db.c (thread_db_look_up_symbols): New function.
17059 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17060
f6de3c42
DJ
170612004-10-16 Daniel Jacobowitz <dan@debian.org>
17062
17063 * configure.in: Test for -rdynamic.
17064 * configure: Regenerated.
17065 * Makefile (INTERNAL_LDFLAGS): New.
17066 (gdbserver, gdbreplay): Use it.
17067
2c0fc042
AC
170682004-09-02 Andrew Cagney <cagney@gnu.org>
17069
17070 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17071
075b3282
DJ
170722004-03-23 Daniel Jacobowitz <drow@mvista.com>
17073
17074 * linux-low.c (linux_wait): Clear all_processes list also.
17075
fa6a77dc
DJ
170762004-03-12 Daniel Jacobowitz <drow@mvista.com>
17077
17078 * linux-low.c: Include <errno.h>. Remove extern declaration of
17079 errno.
17080
6d782a97
DJ
170812004-03-12 Daniel Jacobowitz <drow@mvista.com>
17082
17083 * gdbreplay.c, server.h, utils.c: Update copyright years.
17084
3a7fb99b
DJ
170852004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17086
17087 * server.c (main): Print child status or termination signal from
17088 variable 'signal', not 'sig'.
17089
c3e735a6
DJ
170902004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17091
17092 * linux-low.c (linux_read_memory): Change return type to
17093 int. Check for and return error from ptrace().
17094 * target.c (read_inferior_memory): Change return type to int. Pass
17095 back return status from the_target->read_memory().
17096 * target.h (struct target_ops): Adapt *read_memory() prototype.
17097 Update comment.
17098 (read_inferior_memory): Adapt prototype.
17099 * server.c (main): Return an error packet if
17100 read_inferior_memory() returns an error.
17101
a59d1c82
DJ
171022004-03-04 Daniel Jacobowitz <drow@mvista.com>
17103
17104 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17105 Unify with other clean targets.
17106
dc3f8883
DJ
171072004-02-29 Daniel Jacobowitz <drow@mvista.com>
17108
17109 * server.c (handle_v_cont): Call set_desired_inferior.
17110
89a208da
DJ
171112004-02-29 Daniel Jacobowitz <drow@mvista.com>
17112
17113 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17114
62ea82f5
DJ
171152004-02-29 Daniel Jacobowitz <drow@mvista.com>
17116
17117 * linux-low.c (linux_wait): Unblock async I/O.
17118 (linux_resume): Block and enable async I/O.
17119 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17120 * server.h (block_async_io, unblock_async_io): Add prototypes.
17121
6910d122
DJ
171222004-02-29 Daniel Jacobowitz <drow@mvista.com>
17123
17124 * remote-utils.c (remote_open): Print a status notice after
17125 opening a TCP port.
17126 * server.c (attach_inferior): Print a status notice after
17127 attaching.
17128
171292004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17130
17131 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17132
c89dc5d4
DJ
171332004-02-26 Daniel Jacobowitz <drow@mvista.com>
17134
17135 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17136 error packet.
17137 * server.c, target.h: Update copyright years.
17138
4b8dad4a
RM
171392004-02-25 Roland McGrath <roland@redhat.com>
17140
17141 * target.h (struct target_ops): New member `read_auxv'.
17142 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17143 * linux-low.c (linux_read_auxv): New function.
17144 (linux_target_ops): Initialize `read_auxv' member to that.
17145
d7446758
JB
171462004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17147
17148 Committed by Jim Blandy <jimb@redhat.com>.
17149
17150 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17151 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17152 instead of GPR_SIZE to distiguish s390 and s390x targets.
17153
5544ad89
DJ
171542004-01-31 Daniel Jacobowitz <drow@mvista.com>
17155
17156 * linux-low.c: Update copyright year.
17157 (check_removed_breakpoint): Clear pending_is_breakpoint.
17158 (linux_set_resume_request, linux_queue_one_thread)
17159 (resume_status_pending_p): New functions.
17160 (linux_continue_one_thread): Use process->resume.
17161 (linux_resume): Only resume threads if there are no pending events.
17162 * linux-low.h (struct process_info): Add resume request
17163 pointer.
17164
2a68b70e
DJ
171652004-01-30 Daniel Jacobowitz <drow@mvista.com>
17166
17167 * regcache.c (new_register_cache): Clear the allocated register
17168 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17169
64386c31
DJ
171702003-10-13 Daniel Jacobowitz <drow@mvista.com>
17171
17172 * linux-low.c (linux_resume): Take a struct thread_resume *
17173 argument.
17174 (linux_wait): Update call.
17175 (resume_ptr): New static variable.
17176 (linux_continue_one_thread): Renamed from
17177 linux_continue_one_process. Use resume_ptr.
17178 (linux_resume): Use linux_continue_one_thread.
17179 * server.c (handle_v_cont, handle_v_requests): New functions.
17180 (myresume): New function.
17181 (main): Handle 'v' case.
17182 * target.h (struct thread_resume): New type.
17183 (struct target_ops): Change argument of "resume" to struct
17184 thread_resume *.
17185 (myresume): Delete macro.
17186
c938e9b0
L
171872003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17188
17189 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17190 (uninstall): Support DESTDIR.
17191
7f313d07
BC
17192Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17193
17194 * configure.srv: Add xscale*linux copy of arm*linux entry.
17195
3b2fc2ea
DJ
171962003-07-24 Daniel Jacobowitz <drow@mvista.com>
17197
17198 * linux-arm-low.c (arm_reinsert_addr): New function.
17199 (the_low_target): Add arm_reinsert_addr.
17200
1c0a559e
MK
172012003-07-08 Mark Kettenis <kettenis@gnu.org>
17202
17203 * mem-break.c: Remove whitespace at end of file.
17204
43d5792c
DJ
172052003-06-28 Daniel Jacobowitz <drow@mvista.com>
17206
17207 * configure.in: Check whether we need to prototype strerror.
17208 * server.h: Optionally prototype strerror.
17209 * gdbreplay.c (perror_with_name): Use strerror.
17210 * linux-low.c (linux_attach_lwp): Use strerror.
17211 * utils.c (perror_with_name): Use strerror.
17212 * config.in, configure: Regenerated.
17213
c8a86edf
DJ
172142003-06-28 Daniel Jacobowitz <drow@mvista.com>
17215
17216 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17217 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17218
73d37363
DJ
172192003-06-20 Daniel Jacobowitz <drow@mvista.com>
17220
17221 * Makefile.in (SFILES): Update.
17222 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17223 low-sun3.c: Remove files.
17224
6ad8ae5c
DJ
172252003-06-17 Daniel Jacobowitz <drow@mvista.com>
17226
17227 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17228 (linux_detach_one_process, linux_detach): New functions.
17229 (linux_target_ops): Add linux_detach.
17230 * server.c (main): Handle 'D' packet.
17231 * target.h (struct target_ops): Add "detach" member.
17232 (detach_inferior): Define.
17233
1581182a
MK
172342003-06-13 Mark Kettenis <kettenis@gnu.org>
17235
17236 From Kelley Cook <kelleycook@wideopenwest.com>:
17237 * configure.srv: Accept i[34567]86 variants.
17238
e5379b03
DJ
172392003-06-05 Daniel Jacobowitz <drow@mvista.com>
17240
17241 * linux-low.c (linux_wait_for_event): Correct comment typos.
17242 (linux_resume_one_process): Call check_removed_breakpoint.
17243 (linux_send_signal): New function.
17244 (linux_target_ops): Add linux_send_signal.
17245 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17246 of kill.
17247 * target.h (struct target_ops): Add send_signal.
17248
2ff29de4
JB
172492003-05-29 Jim Blandy <jimb@redhat.com>
17250
17251 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17252 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17253 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17254 away part of the register's value.
17255
254787d4
DJ
172562003-03-26 Daniel Jacobowitz <drow@mvista.com>
17257
17258 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17259 (linux_wait_for_event, linux_init_signals): Likewise.
17260
94e10508
DJ
172612003-03-17 Daniel Jacobowitz <drow@mvista.com>
17262
17263 * configure.in: Check for stdlib.h.
17264 * configure: Regenerated.
17265 * config.in: Regenerated.
17266
4c0711e0
DJ
172672003-01-04 Andreas Schwab <schwab@suse.de>
17268
17269 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17270
ef66e766
AC
172712003-01-02 Andrew Cagney <ac131313@redhat.com>
17272
17273 * Makefile.in: Remove obsolete code.
17274
a1358604
DJ
172752002-11-20 Daniel Jacobowitz <drow@mvista.com>
17276
17277 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17278 defined(PT_FPR0_HI).
17279
23ce3b1c
DJ
172802002-11-17 Stuart Hughes <seh@zee2.com>
17281
17282 * linux-arm-low.c (arm_num_regs): Increase.
17283 (arm_regmap): Include status register.
17284
172852002-11-17 Daniel Jacobowitz <drow@mvista.com>
17286
17287 * linux-low.c (register_addr): Remove incorrect -1 check.
17288
a9fa9f7d
DJ
172892002-08-29 Daniel Jacobowitz <drow@mvista.com>
17290
17291 * linux-low.c (linux_create_inferior): Call setpgid. Return
17292 the new PID.
17293 (unstopped_p, linux_signal_pid): Remove.
17294 (linux_target_ops): Remove linux_signal_pid.
17295 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17296 global instead of target method.
17297 * target.h (struct target_ops): Remove signal_pid. Update comment
17298 for create_inferior.
17299 * server.c (signal_pid): New variable.
17300 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17301 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17302 (attach_inferior): Set signal_pid.
17303
17574093
DJ
173042002-08-23 Daniel Jacobowitz <drow@mvista.com>
17305
17306 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17307
173082002-08-20 Jim Blandy <jimb@redhat.com>
17309
17310 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17311 default for this.
17312
173132002-08-01 Andrew Cagney <cagney@redhat.com>
17314
17315 * Makefile.in: Make chill references obsolete.
17316
173172002-07-24 Kevin Buettner <kevinb@redhat.com>
17318
17319 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17320 * configure: Regenerate.
17321 * config.in: Regenerate.
17322
173232002-07-09 David O'Brien <obrien@FreeBSD.org>
17324
17325 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17326 (perror_with_name, remote_close, remote_open, expect, play): Static.
17327
173282002-07-04 Michal Ludvig <mludvig@suse.cz>
17329
4b8dad4a 17330 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17331 byte offsets instead of an array of indexes.
17332 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17333
173342002-06-13 Daniel Jacobowitz <drow@mvista.com>
17335
17336 * regcache.c: Add comment.
17337
173382002-06-11 Daniel Jacobowitz <drow@mvista.com>
17339
17340 * thread-db.c: New file.
17341 * proc-service.c: New file.
17342 * acinclude.m4: New file.
17343 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17344 proc-service.o, and thread-db.o.
17345 (linux-low.o): Add USE_THREAD_DB.
17346 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17347 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17348 * aclocal.m4: Regenerated.
17349 * config.in: Regenerated.
17350 * configure: Regenerated.
17351 * configure.in: Check for proc_service.h, sys/procfs.h,
17352 thread_db.h, and linux/elf.h headrs.
17353 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17354 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17355 Check for -lthread_db and thread support.
17356 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17357 PowerPC, and SuperH.
17358 * i387-fp.c: Constify arguments.
17359 * i387-fp.h: Likewise.
17360 * inferiors.c: (struct thread_info): Renamed from
17361 `struct inferior_info'. Remove PID member. Use generic inferior
17362 list header. All uses updated.
17363 (inferiors, signal_pid): Removed.
17364 (all_threads): New variable.
17365 (get_thread): Define.
17366 (add_inferior_to_list): New function.
17367 (for_each_inferior): New function.
17368 (change_inferior_id): New function.
17369 (add_inferior): Removed.
17370 (remove_inferior): New function.
17371 (add_thread): New function.
17372 (free_one_thread): New function.
17373 (remove_thread): New function.
17374 (clear_inferiors): Use for_each_inferior and free_one_thread.
17375 (find_inferior): New function.
17376 (find_inferior_id): New function.
17377 (inferior_target_data): Update argument type.
17378 (set_inferior_target_data): Likewise.
17379 (inferior_regcache_data): Likewise.
17380 (set_inferior_regcache_data): Likewise.
17381 * linux-low.c (linux_bp_reinsert): Remove.
17382 (all_processes, stopping_threads, using_thrads)
17383 (struct pending_signals, debug_threads, pid_of): New.
17384 (inferior_pid): Replace with macro.
17385 (struct inferior_linux_data): Remove.
17386 (get_stop_pc, add_process): New functions.
17387 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17388 Use add_process and add_thread.
17389 (linux_attach_lwp): New function, based on old linux_attach. Use
17390 add_process and add_thread. Set stop_expected for new threads.
17391 (linux_attach): New function.
17392 (linux_kill_one_process): New function.
17393 (linux_kill): Kill all LWPs.
17394 (linux_thread_alive): Use find_inferior_id.
17395 (check_removed_breakpoints, status_pending_p): New functions.
17396 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17397 Update. Use WNOHANG. Wait for cloned processes also. Update process
17398 struct for the found process.
17399 (linux_wait_for_event): New function.
17400 (linux_wait): Use it. Support LWPs.
17401 (send_sigstop, wait_for_sigstop, stop_all_processes)
17402 (linux_resume_one_process, linux_continue_one_process): New functions.
17403 (linux_resume): Support LWPs.
17404 (REGISTER_RAW_SIZE): Remove.
17405 (fetch_register): Use register_size instead. Call supply_register.
17406 (usr_store_inferior_registers): Likewise. Call collect_register.
17407 Fix recursive case.
17408 (regsets_fetch_inferior_registers): Improve error message.
17409 (regsets_store_inferior_registers): Add debugging.
17410 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17411 (unstopped_p, linux_signal_pid): New functions.
17412 (linux_target_ops): Add linux_signal_pid.
17413 (linux_init_signals): New function.
17414 (initialize_low): Call it. Initialize using_threads.
17415 * regcache.c (inferior_regcache_data): Add valid
17416 flag.
17417 (get_regcache): Fetch registers lazily. Add fetch argument
17418 and update all callers.
17419 (regcache_invalidate_one, regcache_invalidate): New
17420 functions.
17421 (new_register_cache): Renamed from create_register_cache.
17422 Return the new regcache.
17423 (free_register_cache): Change argument to a void *.
17424 (registers_to_string, registers_from_string): Call get_regcache
17425 with fetch flag set.
17426 (register_data): Make static. Pass fetch flag to get_regcache.
17427 (supply_register): Call get_regcache with fetch flag clear.
17428 (collect_register): Call get_regcache with fetch flag set.
17429 (collect_register_as_string): New function.
17430 * regcache.h: Update.
17431 * remote-utils.c (putpkt): Flush after debug output and use
17432 stderr.
17433 Handle input interrupts while waiting for an ACK.
17434 (input_interrupt): Use signal_pid method.
17435 (getpkt): Flush after debug output and use stderr.
17436 (outreg): Use collect_register_as_string.
17437 (new_thread_notify, dead_thread_notify): New functions.
17438 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17439 and general_thread.
17440 (look_up_one_symbol): Flush after debug output.
17441 * server.c (step_thread, server_waiting): New variables.
17442 (start_inferior): Don't use signal_pid. Update call to mywait.
17443 (attach_inferior): Update call to mywait.
17444 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17445 (main): Don't fetch/store registers explicitly. Use
17446 set_desired_inferior. Support proposed ``Hs'' packet. Update
17447 calls to mywait.
17448 * server.h: Update.
17449 (struct inferior_list, struct_inferior_list_entry): New.
17450 * target.c (set_desired_inferior): New.
17451 (write_inferior_memory): Constify.
17452 (mywait): New function.
17453 * target.h: Update.
17454 (struct target_ops): New signal_pid method.
17455 (mywait): Removed macro, added prototype.
17456
17457 * linux-low.h (regset_func): Removed.
17458 (regset_fill_func, regset_store_func): New.
17459 (enum regset_type): New.
17460 (struct regset_info): Add type field. Use new operation types.
17461 (struct linux_target_ops): stop_pc renamed to get_pc.
17462 Add decr_pc_after_break and breakpoint_at.
17463 (get_process, get_thread_proess, get_process_thread)
17464 (strut process_info, all_processes, linux_attach_lwp)
17465 (thread_db_init): New.
17466
17467 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17468 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17469 (the_low_target): Add new members.
17470 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17471 (i386_store_fpxregset): Constify.
17472 (target_regsets): Add new kind identifier.
17473 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17474 (i386_set_pc): Add debugging.
17475 (i386_breakpoint_at): New function.
17476 (the_low_target): Add new members.
17477 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17478 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17479 (mips_breakpoint_at): New.
17480 (the_low_target): Add new members.
17481 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17482 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17483 (the_low_target): Add new members.
17484 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17485 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17486 (the_low_target): Add new members.
17487 * linux-x86-64-low.c (target_regsets): Add new kind
17488 identifier.
17489
174902002-05-15 Daniel Jacobowitz <drow@mvista.com>
17491
17492 From Martin Pool <mbp@samba.org>:
17493 * server.c (gdbserver_usage): New function.
17494 (main): Call it.
17495
174962002-05-14 Daniel Jacobowitz <drow@mvista.com>
17497
17498 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17499 stop_at -> stop_pc.
17500
175012002-05-04 Andrew Cagney <ac131313@redhat.com>
17502
17503 * Makefile.in: Remove obsolete code.
17504
175052002-04-24 Michal Ludvig <mludvig@suse.cz>
17506
17507 * linux-low.c (regsets_fetch_inferior_registers),
17508 (regsets_store_inferior_registers): Removed cast to int from
17509 ptrace() calls.
17510 * regcache.h: Added declaration of struct inferior_info.
17511
175122002-04-20 Daniel Jacobowitz <drow@mvista.com>
17513
17514 * inferiors.c (struct inferior_info): Add regcache_data.
17515 (add_inferior): Call create_register_cache.
17516 (clear_inferiors): Call free_register_cache.
17517 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17518 * regcache.c (struct inferior_regcache_data): New.
17519 (registers): Remove.
17520 (get_regcache): New function.
17521 (create_register_cache, free_register_cache): New functions.
17522 (set_register_cache): Don't initialize the register cache here.
17523 (registers_to_string, registers_from_string, register_data): Call
17524 get_regcache.
17525 * regcache.h: Add prototypes.
17526 * server.h: Likewise.
17527
175282002-04-20 Daniel Jacobowitz <drow@mvista.com>
17529
17530 * mem-break.c: New file.
17531 * mem-break.h: New file.
17532 * Makefile.in: Add mem-break.o rule; update server.h
17533 dependencies.
17534 * inferiors.c (struct inferior_info): Add target_data
17535 member.
17536 (clear_inferiors): Free target_data member if set.
17537 (inferior_target_data, set_inferior_target_data): New functions.
17538 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17539 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17540 * linux-low.c (linux_bp_reinsert): New variable.
17541 (struct inferior_linux_data): New.
17542 (linux_create_inferior): Use set_inferior_target_data.
17543 (linux_attach): Likewise. Call add_inferior.
17544 (linux_wait_for_one_inferior): New function.
17545 (linux_wait): Call it.
17546 (linux_write_memory): Add const.
17547 (initialize_low): Call set_breakpoint_data.
17548 * linux-low.h (struct linux_target_ops): Add breakpoint
17549 handling members.
17550 * server.c (attach_inferior): Remove extra add_inferior
17551 call.
17552 * server.h: Include mem-break.h. Update inferior.c
17553 prototypes.
17554 * target.c (read_inferior_memory)
17555 (write_inferior_memory): New functions.
17556 * target.h (read_inferior_memory)
17557 (write_inferior_memory): Change macros to prototypes.
17558 (struct target_ops): Update comments. Add const to write_memory
17559 definition.
17560
175612002-04-11 Daniel Jacobowitz <drow@mvista.com>
17562
17563 * linux-low.c (usr_store_inferior_registers): Support
17564 registers which are allowed to fail to store.
17565 * linux-low.h (linux_target_ops): Likewise.
17566 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17567 (ppc_cannot_store_register): FPSCR may not be storable.
17568
175692002-04-09 Daniel Jacobowitz <drow@mvista.com>
17570
17571 * server.h: Include <string.h> if HAVE_STRING_H.
17572 * ChangeLog: Correct paths in last ChangeLog entry.
17573
175742002-04-09 Daniel Jacobowitz <drow@mvista.com>
17575
17576 * linux-low.h: Remove obsolete prototypes.
17577 (struct linux_target_ops): New.
17578 (extern the_low_target): New.
17579 * linux-low.c (num_regs, regmap): Remove declarations.
17580 (register_addr): Use the_low_target explicitly.
17581 (fetch_register): Likewise.
17582 (usr_fetch_inferior_registers): Likewise.
17583 (usr_store_inferior_registers): Likewise.
17584 * linux-arm-low.c (num_regs): Remove.
17585 (arm_num_regs): Define.
17586 (arm_regmap): Renamed from regmap, made static.
17587 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17588 made static.
17589 (arm_cannot_store_register): Renamed from cannot_store_register,
17590 made static.
17591 (the_low_target): New.
17592 * linux-i386-low.c (num_regs): Remove.
17593 (i386_num_regs): Define.
17594 (i386_regmap): Renamed from regmap, made static.
17595 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17596 made static.
17597 (i386_cannot_store_register): Renamed from cannot_store_register,
17598 made static.
17599 (the_low_target): New.
17600 * linux-ia64-low.c (num_regs): Remove.
17601 (ia64_num_regs): Define.
17602 (ia64_regmap): Renamed from regmap, made static.
17603 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17604 made static.
17605 (ia64_cannot_store_register): Renamed from cannot_store_register,
17606 made static.
17607 (the_low_target): New.
17608 * linux-m68k-low.c (num_regs): Remove.
17609 (m68k_num_regs): Define.
17610 (m68k_regmap): Renamed from regmap, made static.
17611 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17612 made static.
17613 (m68k_cannot_store_register): Renamed from cannot_store_register,
17614 made static.
17615 (the_low_target): New.
17616 * linux-mips-low.c (num_regs): Remove.
17617 (mips_num_regs): Define.
17618 (mips_regmap): Renamed from regmap, made static.
17619 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17620 made static.
17621 (mips_cannot_store_register): Renamed from cannot_store_register,
17622 made static.
17623 (the_low_target): New.
17624 * linux-ppc-low.c (num_regs): Remove.
17625 (ppc_num_regs): Define.
17626 (ppc_regmap): Renamed from regmap, made static.
17627 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17628 made static.
17629 (ppc_cannot_store_register): Renamed from cannot_store_register,
17630 made static.
17631 (the_low_target): New.
17632 * linux-s390-low.c (num_regs): Remove.
17633 (s390_num_regs): Define.
17634 (s390_regmap): Renamed from regmap, made static.
17635 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17636 made static.
17637 (s390_cannot_store_register): Renamed from cannot_store_register,
17638 made static.
17639 (the_low_target): New.
17640 * linux-sh-low.c (num_regs): Remove.
17641 (sh_num_regs): Define.
17642 (sh_regmap): Renamed from regmap, made static.
17643 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17644 made static.
17645 (sh_cannot_store_register): Renamed from cannot_store_register,
17646 made static.
17647 (the_low_target): New.
17648 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17649 (the_low_target): New.
17650
176512002-04-09 Daniel Jacobowitz <drow@mvista.com>
17652
17653 * Makefile.in: Add stamp-h target.
17654 * configure.in: Create stamp-h.
17655 * configure: Regenerated.
17656
176572002-04-09 Daniel Jacobowitz <drow@mvista.com>
17658
17659 * inferiors.c: New file.
17660 * target.c: New file.
17661 * target.h: New file.
17662 * Makefile.in: Add target.o and inferiors.o. Update
17663 dependencies.
17664 * linux-low.c (inferior_pid): New static variable,
17665 moved from server.c.
17666 (linux_create_inferior): Renamed from create_inferior.
17667 Call add_inferior. Return 0 on success instead of a PID.
17668 (linux_attach): Renamed from myattach.
17669 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17670 (linux_thread_alive): Renamed from mythread_alive.
17671 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17672 child dies.
17673 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17674 (regsets_store_inferior_registers): Correct error message.
17675 Add missing ``return 0''.
17676 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17677 (linux_store_registers): Renamed from store_inferior_registers.
17678 (linux_read_memory): Renamed from read_inferior_memory.
17679 (linux_write_memory): Renamed from write_inferior_memory.
17680 (linux_target_ops): New structure.
17681 (initialize_low): Call set_target_ops ().
17682 * remote-utils.c (unhexify): New function.
17683 (hexify): New function.
17684 (input_interrupt): Send signals to ``signal_pid''.
17685 * server.c (inferior_pid): Remove.
17686 (start_inferior): Update create_inferior call.
17687 (attach_inferior): Call add_inferior.
17688 (handle_query): New function.
17689 (main): Call handle_query for `q' packets.
17690 * server.h: Include "target.h". Remove obsolete prototypes.
17691 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17692
176932002-04-09 Daniel Jacobowitz <drow@mvista.com>
17694
17695 * Makefile.in: Add WARN_CFLAGS. Update configury
17696 dependencies.
17697 * configure.in: Check for <string.h>
17698 * configure: Regenerate.
17699 * config.in: Regenerate.
17700 * gdbreplay.c: Include needed system headers.
17701 (remote_open): Remove strchr prototype.
17702 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17703 * regcache.c (supply_register): Change buf argument to const void *.
17704 (supply_register_by_name): Likewise.
17705 (collect_register): Change buf argument to void *.
17706 (collect_register_by_name): Likewise.
17707 * regcache.h: Add missing prototypes.
17708 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17709 * server.c (handle_query): New function.
17710 (attached): New static variable, moved out of main.
17711 (main): Quiet longjmp clobber warnings.
17712 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17713 * utils.c (error): Remove NORETURN.
17714 (fatal): Likewise.