Set names of worker threads
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4da8c3a8
TT
12019-11-26 Tom Tromey <tom@tromey.com>
2
3 * configure, config.in: Rebuild.
4
21987b9c
TT
52019-11-26 Tom Tromey <tom@tromey.com>
6
7 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
8 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
9 gdb_sigmask.
10 * configure, config.in: Rebuild.
11
5e030278
TT
122019-11-26 Tom Tromey <tom@tromey.com>
13
14 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
15 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
16 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
17 * acinclude.m4: Include ax_pthread.m4.
18 * config.in, configure: Rebuild.
19
6d91ce9a
CB
202019-11-26 Christian Biesinger <cbiesinger@google.com>
21
22 * debug.c (debug_set_output): Call safe_strerror instead of
23 strerror.
24 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
25 (linux_kill_one_lwp): Likewise.
26 (linux_detach_one_lwp): Likewise.
27 (linux_wait_for_event_filtered): Likewise.
28 (store_register): Likewise.
29 * lynx-low.c (lynx_attach): Likewise.
30 * mem-break.c (insert_memory_breakpoint): Likewise.
31 (remove_memory_breakpoint): Likewise.
32 (delete_fast_tracepoint_jump): Likewise.
33 (set_fast_tracepoint_jump): Likewise.
34 (uninsert_fast_tracepoint_jumps_at): Likewise.
35 (reinsert_fast_tracepoint_jumps_at): Likewise.
36 * nto-low.c (nto_xfer_memory): Likewise.
37 (nto_resume): Likewise.
38
6cdd651f
LM
392019-11-20 Luis Machado <luis.machado@linaro.org>
40
41 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
42 instead of register count.
43 * tdesc.c (tdesc_contains_feature): New function.
44 * tdesc.h (tdesc_contains_feature): New prototype.
45
cd850b40
CB
462019-11-15 Christian Biesinger <cbiesinger@google.com>
47
48 * Makefile.in: Add safe-strerror.c.
49 * configure: Regenerate.
50 * configure.ac: Don't source common.host.
51
5abebf3c
CB
522019-11-15 Christian Biesinger <cbiesinger@google.com>
53
54 * config.in: Regenerate.
55 * configure: Regenerate.
56
e06f3d6e
AB
572019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
58
59 * ax.c (ax_printf): Handle size_t_arg.
60
ca3a04f6
CB
612019-11-06 Christian Biesinger <cbiesinger@google.com>
62
63 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
64 * mi/mi-main.c (output_cores): Likewise.
65 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
66 (linux_xfer_osdata_modules): Likewise.
67 * remote.c (register_remote_support_xml): Likewise.
68 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
69 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
70
e48f6033
CB
712019-11-01 Christian Biesinger <cbiesinger@google.com>
72
73 * configure: Regenerate.
74 * configure.ac: Remove check for strerror_r.
75
e7e97a2e
CB
762019-10-31 Christian Biesinger <cbiesinger@google.com>
77
78 * config.in: Regenerate.
79 * configure: Regenerate.
80 * configure.ac: Also check for strerror_r.
81
75cafaa6
CB
822019-10-31 Christian Biesinger <cbiesinger@google.com>
83
84 * ax.h (debug_agent): Remove duplicate declaration.
85
30baf67b
TV
862019-10-26 Tom de Vries <tdevries@suse.de>
87
88 * linux-aarch64-low.c: Fix typos in comments.
89 * linux-arm-low.c: Same.
90 * linux-low.c: Same.
91 * linux-ppc-low.c: Same.
92 * proc-service.c: Same.
93 * regcache.h: Same.
94 * server.c: Same.
95 * tracepoint.c: Same.
96 * win32-low.c: Same.
97
52c64cf7
TT
982019-10-25 Tom Tromey <tromey@adacore.com>
99
100 * utils.c (xstrdup): Remove.
101
c12d372d
TT
1022019-10-23 Tom Tromey <tom@tromey.com>
103
104 * configure, config.in: Rebuild.
105
4d0b984b
TT
1062019-10-23 Tom Tromey <tom@tromey.com>
107
108 * configure: Rebuild.
109 * acinclude.m4: Use m4_include, not sinclude.
110
c5adaa19
TT
1112019-10-17 Tom Tromey <tromey@adacore.com>
112
113 * configure: Rebuild.
114 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
115 in AC_CONFIG_FILES invocation.
116 * Makefile.in (stamp-h, Makefile): Use new-style config.status
117 invocation.
118
fec4e896
CB
1192019-10-16 Christian Biesinger <cbiesinger@google.com>
120
121 * server.c: Include xml-builtin.h.
122 (get_xml_features): Don't declare xml_builtins here.
123
00975ff6
AB
1242019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
125
126 * Makefile.in: Remove references to vec-ipa.o.
127
0dc32745
AB
1282019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
129
130 * Makefile.in: Remove references to vec.c.
131
3e6ec53a
CB
1322019-10-02 Christian Biesinger <cbiesinger@google.com>
133
134 * server.c (server_waiting): Change to bool.
135 (extended_protocol): Likewise.
136 (response_needed): Likewise.
137 (exit_requested): Likewise.
138 (run_once): Likewise.
139 (report_no_resumed): Likewise.
140 (non_stop): Likewise.
141 (disable_packet_vCont): Likewise.
142 (disable_packet_Tthread): Likewise.
143 (disable_packet_qC): Likewise.
144 (disable_packet_qfThreadInfo): Likewise.
145 (handle_general_set): Update.
146 (handle_detach): Update.
147 (handle_monitor_command): Update.
148 (handle_query): Update.
149 (captured_main): Update.
150 (process_serial_event): Update.
151 * server.h (server_waiting): Change to bool.
152 (disable_packet_vCont): Likewise.
153 (disable_packet_Tthread): Likewise.
154 (disable_packet_qC): Likewise.
155 (disable_packet_qfThreadInfo): Likewise.
156 (run_once): Likewise.
157 (non_stop): Likewise.
158 * target.c (target_stop_and_wait): Update.
159
80fd2826
TT
1602019-10-02 Tom Tromey <tromey@adacore.com>
161
162 * Makefile.in (SFILES): Add common-inferior.c.
163 (OBS): Add common-inferior.o.
164 * server.c (startup_with_shell): Don't define.
165
46f29a9a
AB
1662019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
167
168 * linux-low.c (linux_low_read_btrace): Update for change to
169 std::vector.
170
f9d949fb
CB
1712019-09-20 Christian Biesinger <cbiesinger@google.com>
172
173 * debug.c (debug_threads): Remove comment in favor of the header.
174 * debug.h (using_threads): Add declaration.
175 (debug_threads): Add comment.
176 * linux-aarch64-low.c: Include debug.h and remove declaration of
177 debug_threads.
178 * nto-low.c: Likewise.
179 * remote-utils.c: Likewise.
180 * thread-db.c: Likewise.
181
abf516c6
UW
1822019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
183
184 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
185 and powerpc-cell64l-ipa.o.
186 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
187 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
188 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
189 (spu*-*-*): Remove.
190
191 * spu-low.c: Remove file.
192
193 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
194 (parse_spufs_run): Remove.
195 (ppc_get_pc): Remove Cell/B.E. support.
196 (ppc_set_pc): Likewise.
197 (ppc_breakpoint_at): Likewise.
198 (ppc_arch_setup): Likewise.
199 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
200 tdesc_powerpc_cell32l.
201 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
202 or init_registers_powerpc_cell32l.
203 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
204 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
205 or init_registers_powerpc_cell32l.
206 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
207 (init_registers_powerpc_cell32l): Remove prototype.
208 (init_registers_powerpc_cell64l): Likewise.
209
210 * target.h (struct target_ops): Remove qxfer_spu member.
211 * server.c (handle_qxfer_spu): Remove.
212 (qxfer_packets): Remove entry for "spu".
213 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
214 * linux-low.c (SPUFS_MAGIC): Remove.
215 (spu_enumerate_spu_ids): Remove.
216 (linux_qxfer_spu): Remove.
217 (linux_target_ops): Remove qxfer_spu member.
218 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
219 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
220 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
221
2d41fa11
SDJ
2222019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
223
224 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
225 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
226 * config.in: Regenerate.
227 * configure: Regenerate.
228
d59b55f0
TT
2292019-08-15 Tom Tromey <tromey@adacore.com>
230
231 * target.c (target_write_memory): Use gdb::byte_vector.
232
4196ab2a
TT
2332019-08-15 Tom Tromey <tromey@adacore.com>
234
235 * tracepoint.c (write_inferior_data_pointer)
236 (write_inferior_integer, write_inferior_int8)
237 (write_inferior_uinteger, m_tracepoint_action_download)
238 (r_tracepoint_action_download, x_tracepoint_action_download)
239 (l_tracepoint_action_download, clear_inferior_trace_buffer)
240 (download_agent_expr, download_tracepoint_1)
241 (download_trace_state_variables, upload_fast_traceframes): Update.
242 * server.c (gdb_write_memory): Update.
243 * remote-utils.c (relocate_instruction): Update.
244 * proc-service.c (ps_pdwrite): Update.
245 * mem-break.c (remove_memory_breakpoint)
246 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
247 (uninsert_fast_tracepoint_jumps_at)
248 (reinsert_fast_tracepoint_jumps_at): Update.
249 * linux-x86-low.c (append_insns)
250 (i386_install_fast_tracepoint_jump_pad)
251 (amd64_write_goto_address, i386_write_goto_address): Update.
252 * linux-s390-low.c (append_insns, s390_write_goto_address):
253 Update.
254 * linux-ppc-low.c (ppc_relocate_instruction)
255 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
256 (ppc_write_goto_address): Update.
257 * linux-aarch64-low.c (append_insns): Update.
258 * target.h (struct target_ops): Update.
259 (write_inferior_memory): Don't declare.
260 * target.c (target_write_memory): Rename from
261 write_inferior_memory. Remove old target_write_memory.
262
c6778d00
TT
2632019-08-15 Tom Tromey <tromey@adacore.com>
264
265 * target.c (write_inferior_memory): Use std::vector.
266
404f2902
FCE
2672019-08-06 Frank Ch. Eigler <fche@redhat.com>
268
269 PR build/24886
270 * configure.ac: Drop enable-libmcheck support.
271 * configure, config.in: Rebuild.
272 * acinclude.m4: Don't include it.
273
4c5aa8e0
AH
2742019-07-19 Alan Hayward <alan.hayward@arm.com>
275
276 * configure.srv: Remove Arm xml files.
277
7cc17433
AH
2782019-07-19 Alan Hayward <alan.hayward@arm.com>
279
280 * configure.srv: Add new files. Remove xml generated files.
281 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
282 registers.
283 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
284 * linux-aarch32-tdesc.c: New file.
285 * linux-aarch32-tdesc.h: New file.
286 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
287 * linux-arm-low.c (init_registers_arm, tdesc_arm)
288 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
289 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
290 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
291 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
292 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
293 (arm_read_description): Call arm_linux_read_description.
294 (initialize_low_arch): Don't init registers.
295 * linux-arm-tdesc.c: New file.
296 * linux-arm-tdesc.h: New file.
297
166a82be
AH
2982019-07-10 Alan Hayward <alan.hayward@arm.com>
299
300 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
301 Move counter inside for.
302 (arm_read_description): Check ptrace earlier.
303 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
304
268a13a5
TT
3052019-07-09 Tom Tromey <tom@tromey.com>
306
307 * configure: Rebuild.
308 * configure.ac: Change common to gdbsupport.
309 * acinclude.m4: Change common to gdbsupport.
310 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
311 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
312 common to gdbsupport.
313 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
314 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
315 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
316 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
317 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
318 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
319 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
320 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
321 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
322 common to gdbsupport.
323
350fab54
AH
3242019-07-04 Alan Hayward <alan.hayward@arm.com>
325
326 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
327 defines.
328 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
329
2b40fda7
AH
3302019-07-04 Alan Hayward <alan.hayward@arm.com>
331
332 * configure.srv: Remove legacy xml.
333 * linux-aarch64-low.c (initialize_low_arch): Remove
334 initialize_low_tdesc call.
335 * linux-aarch64-tdesc-selftest.c: Remove file.
336 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
337 * linux-x86-low.c (initialize_low_arch): Remove
338 initialize_low_tdesc call.
339 * linux-x86-tdesc-selftest.c: Remove file.
340 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
341
7d10623d
TV
3422019-06-20 Tom de Vries <tdevries@suse.de>
343
344 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
345 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
346
8d6a48df
TV
3472019-06-19 Tom de Vries <tdevries@suse.de>
348
349 * debug.h (debug_write): Change return type to ssize_t.
350 * debug.c (debug_write): Same.
351
73cc7272
TT
3522019-06-14 Tom Tromey <tom@tromey.com>
353
354 * configure.ac: Use new path to gnulib.
355 * configure: Rebuild.
356 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
357 to gnulib.
358
08f10e02
TT
3592019-06-11 Tom Tromey <tom@tromey.com>
360
361 * Makefile.in (SFILES): Add alloc.c.
362 (OBS): Add alloc.o.
363 (IPA_OBJS): Add alloc-ipa.o.
364 (alloc-ipa.o): New target.
365 (%.o: ../%.c): New pattern rule.
366
422186a9
TT
3672019-06-10 Tom Tromey <tromey@adacore.com>
368
369 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
370 end warning with a newline.
371 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
372 newline.
373 * thread-db.c (attach_thread): Don't end warning with a newline.
374 (thread_db_notice_clone): Likewise.
375 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
376 newline.
377 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
378 end warning with a newline.
379
b02f78f9
PA
3802019-06-04 Pedro Alves <palves@redhat.com>
381
382 * server.c (captured_main): Use make_unique_xstrdup.
383
88ed7edb
TT
3842019-06-02 Tom Tromey <tom@tromey.com>
385
386 * gdbreplay.c (fromhex): Remove.
387 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
388
33a6bc35
TT
3892019-05-29 Tom Tromey <tromey@adacore.com>
390
391 * configure: Rebuild.
392
e90a813d
KB
3932019-05-06 Kevin Buettner <kevinb@redhat.com>
394
395 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
396 sign extension code on 32-bit builds.
397
353ea2d1
EZ
3982019-05-03 Eli Zaretskii <eliz@gnu.org>
399
400 * remote-utils.c:
401 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
402
b494cdff
TT
4032019-04-19 Tom Tromey <tom@tromey.com>
404
405 * server.c (struct vstop_notif): Derive from notif_event.
406 <base>: Remove.
407 (queue_stop_reply): Update.
408 (remove_all_on_match_ptid): Change type. Rewrite.
409 (discard_queued_stop_replies): Rewrite.
410 (in_queued_stop_replies_ptid): Change type.
411 (in_queued_stop_replies): Rewrite.
412 (notif_stop): Update.
413 (queue_stop_reply_callback): Update.
414 (captured_main): Don't call initialize_notif.
415 (push_stop_notification): Update.
416 * notif.c (notif_write_event, handle_notif_ack)
417 (notif_event_enque, notif_push): Update.
418 (notif_event_xfree, initialize_notif): Remove.
419 * notif.h (struct notif_event): Include <list>, not
420 "common/queue.h".
421 (struct notif_server) <queue>: Now a std::list.
422 (notif_event_p): Remove typedef.
423 (initialize_notif): Don't declare.
424 (struct notif_event): Add virtual destructor.
425
a7e559cc
AH
4262019-04-17 Alan Hayward <alan.hayward@arm.com>
427
428 * ax.c (ax_vdebug): Call debug_printf.
429 * debug.c (debug_write): New function.
430 * debug.h (debug_write): New declaration.
431 * linux-low.c (sigchld_handler): Call debug_write.
432
aeb2e706
AH
4332019-04-17 Alan Hayward <alan.hayward@arm.com>
434
435 * debug.c (debug_set_output): New function.
436 (debug_vprintf): Send output to debug_file.
437 (debug_flush): Likewise.
438 * debug.h (debug_set_output): New declaration.
439 * server.c (handle_monitor_command): Add debug-file option.
440 (captured_main): Likewise.
441
c1bc0935
AH
4422019-04-17 Alan Hayward <alan.hayward@arm.com>
443
444 * debug.c (remote_debug): Add definition.
445 * debug.h (remote_debug): Add declaration.
446 * hostio.c (remote_debug): Remove declaration.
447 * remote-utils.c (struct ui_file): Likewise.
448 (remote_debug): Likewise.
449 * remote-utils.h (remote_debug): Likewise,
450 * server.c (remote_debug): Remove definition.
451
3f52fdbc
KB
4522019-04-10 Kevin Buettner <kevinb@redhat.com>
453
454 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
455 when using a 64-bit gdbserver.
456
b0319eaa
TT
4572019-04-09 Tom Tromey <tromey@adacore.com>
458
459 * linux-low.c (select_event_lwp): Use find_thread_in_random.
460
eedc3f4f
TT
4612019-04-08 Tom Tromey <tom@tromey.com>
462
463 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
464 throw.
465 (linux_resume_one_lwp): Likewise.
466
230d2906
TT
4672019-04-08 Tom Tromey <tom@tromey.com>
468
469 * gdbreplay.c: Update.
470 * linux-low.c: Update.
471 * server.c: Update.
472
a70b8144
TT
4732019-04-08 Tom Tromey <tom@tromey.com>
474
475 * server.c: Use C++ exception handling.
476 * linux-low.c: Use C++ exception handling.
477 * gdbreplay.c: Use C++ exception handling.
478
3d6e9d23
TT
4792019-04-08 Tom Tromey <tom@tromey.com>
480
481 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
482 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
483 (captured_main, main): Update.
484 * gdbreplay.c (main): Update.
485
0570503d
PFC
4862019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
487
488 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
489 value in argument pointer, return 1 if the entry is found and 0
490 otherwise. Move comment.
491 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
492 * linux-low.h (linux_get_auxv): Declare.
493 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
494
227a9e65
TT
4952019-04-05 Tom Tromey <tromey@adacore.com>
496
497 * server.c (gdbserver_usage): Use upper-case for metasyntactic
498 variables.
499
69f4c9cc
AH
5002019-03-28 Alan Hayward <alan.hayward@arm.com>
501
502 * linux-low.c (AT_HWCAP2): Add define if not already included.
503
974c89e0
AH
5042019-03-26 Alan Hayward <alan.hayward@arm.com>
505
506 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
507 (aarch64_arch_setup): Call linux_get_hwcap.
508 * linux-arm-low.c (arm_get_hwcap): Remove function.
509 (arm_read_description): Call linux_get_hwcap.
510 * linux-low.c (linux_get_auxv): New function.
511 (linux_get_hwcap): Likewise.
512 (linux_get_hwcap2): Likewise.
513 * linux-low.h (linux_get_hwcap): New declaration.
514 (linux_get_hwcap2): Likewise.
515 * linux-ppc-low.c (ppc_get_auxv): Remove function.
516 (ppc_arch_setup): Call linux_get_hwcap.
517 * linux-s390-low.c (s390_get_hwcap): Remove function.
518 (s390_arch_setup): Call linux_get_hwcap.
519
1ef53e6b
AH
5202019-03-22 Alan Hayward <alan.hayward@arm.com>
521 Jiong Wang <jiong.wang@arm.com>
522
523 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
524 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
525 to fail.
526 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
527
ee4fbcfa
AH
5282019-03-22 Alan Hayward <alan.hayward@arm.com>
529 Jiong Wang <jiong.wang@arm.com>
530
531 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
532 (aarch64_get_hwcap): New function.
533 (aarch64_arch_setup): Read APIA hwcap.
534
6dc0ebde
AH
5352019-03-22 Alan Hayward <alan.hayward@arm.com>
536 Jiong Wang <jiong.wang@arm.com>
537
538 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
539 (initialize_low_tracepoint): Likewise.
540 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
541 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
542 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
543 (aarch64_linux_read_description): Likewise.
544 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
545
1163a4b7
JB
5462019-03-12 John Baldwin <jhb@FreeBSD.org>
547
548 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
549 i386_create_target_description for 'segments' parameter.
550 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
551 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
552 * win32-i386-low.c (i386_arch_setup): Likewise.
553
d3a70e03
TT
5542019-03-12 Tom Tromey <tromey@adacore.com>
555
556 * linux-low.c (iterate_over_lwps): Update.
557
37991b4f
TT
5582019-03-06 Tom Tromey <tom@tromey.com>
559
560 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
561 (captured_main): Use SCOPE_EXIT.
562
45950eb6
SDJ
5632019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
564
565 * configure.srv: Use '$enable_unittest' instead of '$development'
566 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
567 case.
568
43ac54fc
TT
5692019-02-27 Tom Tromey <tromey@adacore.com>
570
571 * gdbreplay.c (logchar): Handle \r\n.
572
df0da8a2
AH
5732019-02-07 Alan Hayward <alan.hayward@arm.com>
574
575 * linux-low.c (linux_attach): Add process before lwp.
576 * server.c (attach_inferior): Check if already attached.
577
1a5c2598
TT
5782019-02-07 Tom Tromey <tom@tromey.com>
579
580 * x86-tdesc.h: Rename include guard.
581 * x86-low.h: Add include guard.
582 * wincecompat.h: Rename include guard.
583 * win32-low.h: Add include guard.
584 * utils.h: Rename include guard.
585 * tracepoint.h: Rename include guard.
586 * tdesc.h: Rename include guard.
587 * target.h: Rename include guard.
588 * server.h: Rename include guard.
589 * remote-utils.h: Rename include guard.
590 * regcache.h: Rename include guard.
591 * nto-low.h: Rename include guard.
592 * notif.h: Add include guard.
593 * mem-break.h: Rename include guard.
594 * lynx-low.h: Add include guard.
595 * linux-x86-tdesc.h: Add include guard.
596 * linux-s390-tdesc.h: Add include guard.
597 * linux-ppc-tdesc-init.h: Add include guard.
598 * linux-low.h: Add include guard.
599 * linux-aarch64-tdesc.h: Add include guard.
600 * linux-aarch32-low.h: Add include guard.
601 * inferiors.h: Rename include guard.
602 * i387-fp.h: Rename include guard.
603 * hostio.h: Rename include guard.
604 * gdbthread.h: Rename include guard.
605 * gdb_proc_service.h: Rename include guard.
606 * event-loop.h: Rename include guard.
607 * dll.h: Rename include guard.
608 * debug.h: Rename include guard.
609 * ax.h: Rename include guard.
610
956cc47c
SN
6112018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
612
613 PR gdb/23985
614 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
615 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
616
a0707f3c
TT
6172019-01-25 Tom Tromey <tom@tromey.com>
618
619 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
620
0747795c
TT
6212019-01-25 Tom Tromey <tom@tromey.com>
622
623 * win32-low.c: Fix common/ includes.
624 * win32-i386-low.c: Fix common/ includes.
625 * tracepoint.c: Fix common/ includes.
626 * thread-db.c: Fix common/ includes.
627 * target.h: Fix common/ includes.
628 * symbol.c: Fix common/ includes.
629 * spu-low.c: Fix common/ includes.
630 * server.h: Fix common/ includes.
631 * server.c: Fix common/ includes.
632 * remote-utils.c: Fix common/ includes.
633 * regcache.h: Fix common/ includes.
634 * regcache.c: Fix common/ includes.
635 * nto-x86-low.c: Fix common/ includes.
636 * notif.h: Fix common/ includes.
637 * mem-break.h: Fix common/ includes.
638 * lynx-low.c: Fix common/ includes.
639 * lynx-i386-low.c: Fix common/ includes.
640 * linux-x86-tdesc-selftest.c: Fix common/ includes.
641 * linux-x86-low.c: Fix common/ includes.
642 * linux-low.c: Fix common/ includes.
643 * inferiors.h: Fix common/ includes.
644 * i387-fp.c: Fix common/ includes.
645 * hostio.c: Fix common/ includes.
646 * hostio-errno.c: Fix common/ includes.
647 * gdbthread.h: Fix common/ includes.
648 * gdbreplay.c: Fix common/ includes.
649 * fork-child.c: Fix common/ includes.
650 * event-loop.c: Fix common/ includes.
651 * ax.c:
652 (enum gdb_agent_op): Fix common/ includes.
653
be6d4f74
TT
6542019-01-21 Tom Tromey <tom@tromey.com>
655
656 * tracepoint.c: Fix includes.
657 * remote-utils.c: Fix includes.
658 * linux-x86-low.c: Fix includes.
659
66d91b39
JB
6602019-01-01 Joel Brobecker <brobecker@adacore.com>
661
662 * gdbreplay.c (gdbreplay_version): Update copyright year in
663 version message.
664 * server.c (gdbserver_version): Likewise.
665
754e3168
AH
6662018-12-05 Alan Hayward <alan.hayward@arm.com>
667
668 * linux-low.c (add_lwp): Switch ordering.
669
d105de22
TT
6702018-11-29 Tom Tromey <tom@tromey.com>
671
672 * win32-low.c (win32_join): Take pid, not process.
673 * target.h (struct target_ops) <join>: Change argument type.
674 (join_inferior): Change argument name.
675 * spu-low.c (spu_join): Take pid, not process.
676 * server.c (handle_detach): Preserve pid before destroying
677 process.
678 * lynx-low.c (lynx_join): Take pid, not process.
679 * linux-low.c (linux_join): Take pid, not process.
680
50138245
AH
6812018-11-23 Alan Hayward <alan.hayward@arm.com>
682
683 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
684 (aarch64_cannot_fetch_register): Likewise.
685 (struct linux_target_ops): Update references.
686
64f57f3d
PFC
6872018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
688
689 * linux-ppc-low.c: Include nat/linux-ptrace.h.
690
8d619c01
EBM
6912018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
692
693 * configure.srv (ipa_ppc_linux_regobj): Add
694 powerpc-isa207-htm-vsx32l-ipa.o and
695 powerpc-isa207-htm-vsx64l-ipa.o.
696 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
697 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
698 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
699 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
700 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
701 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
702 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
703 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
704 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
705 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
706 (init_registers_powerpc_isa207_htm_vsx32l)
707 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
708 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
709 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
710 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
711 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
712 (ppc_store_tm_ctarregset): New functions.
713 (ppc_regsets): Add entries for HTM regsets.
714 (ppc_arch_setup): Set htm in features struct when needed. Set
715 sizes for the HTM regsets.
716 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
717 (initialize_low_arch): Call
718 init_registers_powerpc_isa207_htm_vsx32l and
719 init_registers_powerpc_isa207_htm_vsx64l.
720 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
721 PPC_TDESC_ISA207_HTM_VSX.
722 (initialize_low_tracepoint): Call
723 init_registers_powerpc_isa207_htm_vsx32l and
724 init_registers_powerpc_isa207_htm_vsx64l.
725
232bfb86
EBM
7262018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
727
728 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
729 rs6000/power-linux-pmu.xml to srv_xmlfiles.
730 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
731 (ppc_store_pmuregset): New functions.
732 (ppc_regsets): Add entries for ebb and pmu regsets.
733 (ppc_arch_setup): Set isa207 in features struct if the ebb and
734 pmu regsets are available. Set sizes for these regsets.
735
f2cf6173
EBM
7362018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
737
738 * configure.srv (ipa_ppc_linux_regobj): Add
739 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
740 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
741 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
742 rs6000/powerpc-isa207-vsx32l.xml, and
743 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
744 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
745 <PPC_TDESC_ISA207_VSX>: New enum value.
746 (init_registers_powerpc_isa207_vsx32l): Declare.
747 (init_registers_powerpc_isa207_vsx64l): Declare.
748 * linux-ppc-low.c (ppc_fill_tarregset): New function.
749 (ppc_store_tarregset): New function.
750 (ppc_regsets): Add entry for the TAR regset.
751 (ppc_arch_setup): Set isa207 in features struct when needed. Set
752 size for the TAR regsets.
753 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
754 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
755 and init_registers_powerpc_isa207_vsx64l.
756 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
757 (initialize_low_tracepoint): Call
758 init_registers_powerpc_isa207_vsx32l and
759 init_registers_powerpc_isa207_vsx64l.
760
7ca18ed6
EBM
7612018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
762 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
763
764 * configure.srv (ipa_ppc_linux_regobj): Add
765 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
766 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
767 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
768 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
769 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
770 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
771 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
772 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
773 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
774 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
775 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
776 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
777 (ppc_hwcap): Add comment.
778 (ppc_hwcap2): New global.
779 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
780 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
781 (ppc_regsets): Add entries for the DSCR and PPR regsets.
782 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
783 when needed. Set sizes for the the DSCR and PPR regsets.
784 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
785 (initialize_low_arch): Call
786 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
787 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
788 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
789 PPC_TDESC_ISA205_PPR_DSCR_VSX.
790 (initialize_low_tracepoint): Call
791 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
792 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
793
5c849b22
PFC
7942018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
795
796 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
797
8ecfd7bd
SDJ
7982018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
799 Simon Marchi <simark@simark.ca>
800
801 * acinclude.m4: Include "../selftest.m4".
802 * configure: Regenerate.
803 * configure.ac: Use "GDB_AC_SELFTEST".
804 * configure.srv: Use "$enable_unittests" instead of
805 "$development" when checking whether unit tests have been
806 enabled.
807 * server.c (captured_main): Update message informing that
808 selftests have been disabled.
809
96643e35
TT
8102018-10-04 Tom Tromey <tom@tromey.com>
811
812 * configure: Rebuild.
813
da4ae14a
TT
8142018-10-04 Tom Tromey <tom@tromey.com>
815
816 * server.c (handle_status): Rename inner "thread".
817 (process_serial_event): Declare "res" in 'm' case.
818 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
819 (iterate_over_lwps): Rename inner "thread".
820 (linux_qxfer_libraries_svr4): Rename inner "len".
821 * gdbthread.h (find_thread_in_random): Rename inner "thread".
822
7c619dbd
GB
8232018-10-01 Gary Benson <gbenson@redhat.com>
824
825 * gdb_proc_service.h: Moved common code to
826 common/gdb_proc_service.h.
827
3795e814
GB
8282018-10-01 Gary Benson <gbenson@redhat.com>
829
830 * gdb_proc_service.h: Synchronize comments and whitespace with
831 GDB's version of this file.
832
49b036f1
TT
8332018-09-25 Tom Tromey <tom@tromey.com>
834
835 * configure: Rebuild.
836 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
837
8ff03f0b
SM
8382018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
839
840 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
841 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
842 ($(IPA_LIB)): Sort IPA_OBJS.
843
a1cd91dc
SM
8442018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
845
846 * Makefile.in: Remove references to $(ADD_DEPS).
847
752312ba
TT
8482018-09-16 Tom Tromey <tom@tromey.com>
849
850 * remote-utils.c (remote_open): Use GNU style for metasyntactic
851 variables.
852 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
853 variables.
854
f1628857
TT
8552018-09-05 Tom Tromey <tom@tromey.com>
856
857 * configure: Rebuild.
858
ad202fcc
SM
8592018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
860
861 PR build/23399
862 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
863
d3d8724a
TT
8642018-08-27 Tom Tromey <tom@tromey.com>
865
866 PR build/23087:
867 * configure: Rebuild.
868
b4f183d2
TT
8692018-08-27 Tom Tromey <tom@tromey.com>
870
871 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
872 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
873 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
874 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
875 (s390x_emit_stack_adjust): Add casts to unsigned char.
876
4e2aa472
SM
8772018-08-22 Simon Marchi <simon.marchi@ericsson.com>
878
879 PR gdb/23374
880 PR gdb/23375
881 * server.h (struct client_state) <disable_randomization>:
882 Initialize to 1.
883
cf4088a9
SM
8842018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
885
886 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
887 variable.
888 (mips_supply_ptrace_register): Likewise.
889
a0de763e
TT
8902018-07-22 Tom Tromey <tom@tromey.com>
891
892 * configure: Rebuild.
893
b0a7723d
TT
8942018-07-22 Tom Tromey <tom@tromey.com>
895
896 * win32-low.c (win32_create_inferior): Remove unused variables.
897 * gdbreplay.c (remote_open): Remove unused variable.
898 * remote-utils.c (remote_prepare): Remove unused variable.
899 * x86-tdesc.h (X86_TDESC_H): Define.
900 (amd64_expedite_regs): Define conditionally.
901 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
902 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
903 * remote-utils.c (readchar): Remove unused variable.
904
a780ef4f
PA
9052018-07-13 Pedro Alves <palves@redhat.com>
906
907 * linux-low.c (linux_kill): Change parameter to process_info
908 pointer instead of pid. Adjust.
909 * lynx-low.c (lynx_kill): Likewise.
910 * nto-low.c (nto_kill): Likewise.
911 * spu-low.c (spu_kill): Likewise.
912 * win32-low.c (win32_kill): Likewise.
913 * server.c (handle_v_kill, kill_inferior_callback)
914 (detach_or_kill_for_exit): Adjust.
915 * target.c (kill_inferior): Change parameter to process_info
916 pointer instead of pid. Adjust.
917 * target.h (struct target_ops) <kill>: Change parameter to
918 process_info pointer instead of pid. Adjust all implementations
919 and callers.
920 (kill_inferior): Likewise.
921
ef2ddb33
PA
9222018-07-13 Pedro Alves <palves@redhat.com>
923
924 * linux-low.c (linux_detach, linux_join): Change parameter to
925 process_info pointer instead of pid. Adjust.
926 * lynx-low.c (lynx_detach, lynx_join): Likewise.
927 * nto-low.c (nto_detach): Likewise.
928 * spu-low.c (spu_detach, spu_join): Likewise.
929 * win32-low.c (win32_detach, win32_join): Likewise.
930 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
931 * target.h (struct target_ops) <detach, join>: Change parameter to
932 process_info pointer instead of pid. Adjust all implementations
933 and callers.
934 (detach_inferior, join_inferior): Rename 'pid' parameter to
935 'proc'.
936
c7ab0aef
SDJ
9372018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
938 Jan Kratochvil <jan.kratochvil@redhat.com>
939 Paul Fertser <fercerpav@gmail.com>
940 Tsutomu Seki <sekiriki@gmail.com>
941
942 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
943 (OBS): Add 'common/netstuff.o'.
944 (GDBREPLAY_OBS): Likewise.
945 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
946 (remote_open): Implement support for IPv6
947 connections.
948 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
949 and 'wspiapi.h'.
950 (handle_accept_event): Accept connections from IPv6 sources.
951 (remote_prepare): Handle IPv6-style hostnames; implement
952 support for IPv6 connections.
953 (remote_open): Implement support for printing connections from
954 IPv6 sources.
955
31445d10
PA
9562018-07-11 Pedro Alves <palves@redhat.com>
957
958 PR gdb/23377
959 * mem-break.c (any_persistent_commands): Add process_info
960 parameter and use it instead of relying on the current process.
961 Change return type to bool.
962 * mem-break.h (any_persistent_commands): Add process_info
963 parameter and change return type to bool.
964 * server.c (handle_detach): Remove require_running_or_return call.
965 Look up the process_info for the process we're about to detach.
966 If not found, return back error to GDB. Adjust
967 any_persistent_commands call to pass down a process pointer.
968
cb197132
PA
9692018-07-11 Pedro Alves <palves@redhat.com>
970
971 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
972 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
973 instead of collect_register_by_name.
974 * regcache.c (regcache_raw_get_unsigned_by_name): New.
975 * regcache.h (regcache_raw_get_unsigned_by_name): New.
976
1b919490
VB
9772018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
978 Pedro Alves <palves@redhat.com>
979
980 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
981
d7e15655
TT
9822018-07-03 Tom Tromey <tom@tromey.com>
983
984 * linux-low.c: Update.
985 * lynx-low.c: Update.
986 * mem-break.c: Update.
987 * nto-low.c: Update.
988 * remote-utils.c: Update.
989 * server.c: Update.
990 * spu-low.c: Update.
991 * target.c: Update.
992 * win32-low.c: Update.
993
26a57c92
TT
9942018-07-03 Tom Tromey <tom@tromey.com>
995
996 * server.c: Update.
997
0e998d96
TT
9982018-07-03 Tom Tromey <tom@tromey.com>
999
1000 * linux-low.c: Update.
1001
cc6bcb54
TT
10022018-07-03 Tom Tromey <tom@tromey.com>
1003
1004 * target.c: Update.
1005
e38504b3
TT
10062018-07-03 Tom Tromey <tom@tromey.com>
1007
1008 * linux-low.c: Update.
1009 * linux-mips-low.c: Update.
1010 * lynx-low.c: Update.
1011 * nto-low.c: Update.
1012 * remote-utils.c: Update.
1013 * server.c: Update.
1014 * spu-low.c: Update.
1015 * target.c: Update.
1016 * thread-db.c: Update.
1017
e99b03dc
TT
10182018-07-03 Tom Tromey <tom@tromey.com>
1019
1020 * linux-low.c: Update.
1021 * linux-mips-low.c: Update.
1022 * lynx-low.c: Update.
1023 * mem-break.c: Update.
1024 * nto-low.c: Update.
1025 * remote-utils.c: Update.
1026 * server.c: Update.
1027 * spu-low.c: Update.
1028 * target.c: Update.
1029 * tracepoint.c: Update.
1030
f2907e49
TT
10312018-07-03 Tom Tromey <tom@tromey.com>
1032
1033 * linux-low.c: Update.
1034 * linux-ppc-low.c: Update.
1035 * linux-x86-low.c: Update.
1036 * proc-service.c: Update.
1037 * server.c: Update.
1038 * spu-low.c: Update.
1039 * thread-db.c: Update.
1040 * win32-low.c: Update.
1041
fd79271b
TT
10422018-07-03 Tom Tromey <tom@tromey.com>
1043
1044 * linux-low.c: Update.
1045 * lynx-low.c: Update.
1046 * nto-low.c: Update.
1047 * remote-utils.c: Update.
1048 * spu-low.c: Update.
1049 * thread-db.c: Update.
1050 * win32-low.c: Update.
1051
c0867626
SDJ
10522018-06-29 Joel Brobecker <brobecker@adacore.com>
1053
1054 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1055 parameter in call to 'amd64_create_target_description'.
1056
2512d7ef
JK
10572018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1058
1059 * x86-tdesc.h: Remove executable permission flag.
1060
d0ac1c44
SM
10612018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1062
1063 * configure.ac: Remove AC_PREREQ, add missing quoting.
1064 * configure: Re-generate.
1065 * config.in: Re-generate.
1066 * aclocal.m4: Re-generate.
1067
c4eb05ff
SM
10682018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1069
1070 * tracepoint.h (current_traceframe): Remove declaration.
1071
02895270
AH
10722018-06-18 Alan Hayward <alan.hayward@arm.com>
1073
1074 * linux-aarch64-low.c (is_sve_tdesc): New function.
1075 (aarch64_sve_regs_copy_to_regcache): Likewise.
1076 (aarch64_sve_regs_copy_from_regcache): Likewise.
1077 (aarch64_regs_info): Add SVE checks.
1078 (initialize_low_arch): Initialize SVE.
1079
e9902bfc
AH
10802018-06-18 Alan Hayward <alan.hayward@arm.com>
1081
1082 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1083
fefa175e
AH
10842018-06-11 Alan Hayward <alan.hayward@arm.com>
1085
1086 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1087 (initialize_low_tracepoint): Likewise
1088 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1089 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1090 param.
1091 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1092 checks.
1093 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1094
b91ad3ff
AH
10952018-06-11 Alan Hayward <alan.hayward@arm.com>
1096
1097 * server.h (PBUFSIZ): Increase size
1098
f868386e
AH
10992018-06-11 Alan Hayward <alan.hayward@arm.com>
1100
1101 * regcache.c (regcache::raw_compare): New function.
1102 * regcache.h (regcache::raw_compare): New declaration.
1103
9c861883
AH
11042018-06-11 Alan Hayward <alan.hayward@arm.com>
1105
1106 * regcache.c (new_register_cache): Use new.
1107 (free_register_cache): Use delete.
1108 (register_data): Use const.
1109 (supply_register): Move body inside regcache.
1110 (regcache::raw_supply): New override function.
1111 (collect_register): Move body inside regcache.
1112 (regcache::raw_collect): New override function.
1113 (regcache::get_register_status): New override function.
1114 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1115
40591844
TT
11162018-06-09 Tom Tromey <tom@tromey.com>
1117
1118 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1119 declare queue.
1120 (event_queue): Use std::queue.
1121 (gdb_event_xfree): Remove.
1122 (initialize_event_loop, process_event, wait_for_event): Update.
1123
6341380d
SC
11242018-06-08 Stan Cox <scox@redhat.com>
1125
1126 * win32-low.c (win32_create_inferior): last_ptid and last_status
1127 moved to client_state.
1128
03349c93
PA
11292018-06-08 Pedro Alves <palves@redhat.com>
1130
1131 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1132 common/common-exceptions.o, common/common-utils.o,
1133 common/errors.o, common/print-utils.o and utils.o.
1134 * gdbreplay.c: Include "common-defs.h" instead of the two
1135 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1136 string.h or alloca.h.
1137 (perror_with_name): Delete.
1138 (remote_open): Use xstrdup instead of strdup.
1139 (main): Rename to ...
1140 (captured_main): ... this.
1141 (main): New.
1142
8dcc53b3
TT
11432018-06-08 Tom Tromey <tom@tromey.com>
1144
1145 * linux-low.c (linux_low_read_btrace): Update.
1146
c12a5089
SC
11472018-06-04 Stan Cox <scox@redhat.com>
1148
1149 * server.h (struct client_state): New.
1150 * server.c (cont_thread, general_thread, multi_process)
1151 (report_fork_events, report_vfork_events, report_exec_events)
1152 (report_thread_events, swbreak_feature, hwbreak_feature)
1153 (vCont_supported, disable_randomization, pass_signals)
1154 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1155 Moved to client_state.
1156 * remote-utils.c (remote_debug, noack_mode)
1157 (transport_is_reliable): Moved to client_state.
1158 * tracepoint.c (current_traceframe): Moved to client_state.
1159
1160 Update all callers.
1161 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1162 linux-low.c, remote-utils.h, target.c: Use client_state.
1163
122394f1
AH
11642018-05-31 Alan Hayward <alan.hayward@arm.com>
1165
1166 * configure.srv: Add new c/h file.
1167
95228a0d
AH
11682018-05-31 Alan Hayward <alan.hayward@arm.com>
1169
1170 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1171 null VQ.
1172
d8dab6c3
MR
11732018-05-25 Maciej W. Rozycki <macro@mips.com>
1174
1175 * gdb.arch/mips-fpregset-core.exp: New test.
1176 * gdb.arch/mips-fpregset-core.c: New test source.
1177
81e25b7c
EK
11782018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1179
1180 PR server/23198
1181 * hostio.c (require_int): Do not report overflow for integers
1182 between 0xfffffff and 0x7fffffff.
1183
7e947ad3
MR
11842018-05-22 Maciej W. Rozycki <macro@mips.com>
1185
1186 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1187 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1188 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1189 functions.
1190 (the_low_target): Wire them.
1191
1d75a658
PFC
11922018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1193
1194 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1195 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1196 mode. Call collect_register_by_name with vscr using
1197 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1198 (ppc_store_vrregset): Add and set vscr_offset variable as in
1199 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1200 vscr_offset.
1201
d078308a
PFC
12022018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1203
1204 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1205 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1206 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1207
7273b5fc
PFC
12082018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1209
1210 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1211 (ppc_store_vsxregset): Likewise.
1212 (ppc_fill_vrregset): Likewise.
1213 (ppc_store_vrregset): Likewise.
1214 (ppc_fill_evrregset): Likewise.
1215 (ppc_store_evrregset): Likewise.
1216 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1217 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1218 needed.
1219
2e077f5e
PFC
12202018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1221
1222 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1223 wordsize of the inferior. Call ppc_linux_target_wordsize.
1224
bd64614e
PFC
12252018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1226
1227 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1228 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1229 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1230 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1231 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1232 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1233 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1234 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1235 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1236 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1237 (tdesc_powerpc_e500l): Remove.
1238 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1239 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1240 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1241 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1242 linux-ppc-tdesc.h.
1243 (ppc_arch_setup): Remove target description matching code. Fill a
1244 ppc_linux_features struct and call ppc_linux_match_description
1245 with it.
1246
75d74cca
MR
12472018-05-22 Maciej W. Rozycki <macro@mips.com>
1248
1249 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1250 width of the requested register exceeds the width of the
1251 `ptrace' data type.
1252 (mips_cannot_store_register): Likewise.
1253
e4439e43
MR
12542018-05-21 Maciej W. Rozycki <macro@mips.com>
1255
1256 * linux-mips-low.c (mips_fetch_register): New function. Update
1257 preceding comment.
1258 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1259 (the_low_target): Wire `mips_fetch_register'.
1260
55271bf9
JB
12612018-05-10 Joel Brobecker <brobecker@adacore.com>
1262
1263 * lynx-i386-low.c (LYNXOS_178): New macro.
1264 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1265 the layout on LynxOS-178.
1266 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1267 handle floating point registers that are not supported by
1268 LynxOS-178.
1269
1a34f210
TT
12702018-05-10 Tom Tromey <tom@tromey.com>
1271
1272 * configure: Rebuild.
1273
190852c8
JB
12742018-05-10 Joel Brobecker <brobecker@adacore.com>
1275
1276 PR server/23158:
1277 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1278 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1279 Use it to set the expedite_regs field in the given tdesc.
1280 * x86-tdesc.h: New file.
1281 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1282 Adjust following the addition of the new expedite_regs parameter
1283 to init_target_desc.
1284 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1285 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1286 (i386_linux_read_description, amd64_linux_read_description):
1287 Adjust following the addition of the new expedite_regs parameter
1288 to init_target_desc.
1289 * lynx-i386-low.c: #include "x86-tdesc.h".
1290 (lynx_i386_arch_setup): Adjust following the addition of the new
1291 expedite_regs parameter to init_target_desc.
1292 * nto-x86-low.c: #include "x86-tdesc.h".
1293 (nto_x86_arch_setup): Adjust following the addition of the new
1294 expedite_regs parameter to init_target_desc.
1295 * win32-i386-low.c: #include "x86-tdesc.h".
1296 (i386_arch_setup): Adjust following the addition of the new
1297 expedite_regs parameter to init_target_desc.
1298
7dbac825
JB
12992018-05-10 Joel Brobecker <brobecker@adacore.com>
1300
1301 PR server/23158:
1302 * win32-low.c (win32_create_inferior): Add call to my_wait
1303 setting last_status global.
1304
906994d9
JB
13052018-05-10 Joel Brobecker <brobecker@adacore.com>
1306
1307 PR server/23158:
1308 * win32-low.c (create_process): Only call gdb_tilde_expand if
1309 inferior_cwd is not NULL.
1310
8ee22052
AB
13112018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1312
1313 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1314 registers to the cache if their values have changed.
1315 (i387_xsave_to_cache): Provide default values for x87 control
1316 registers when these features are available, but disabled.
1317 * regcache.c (supply_register_by_name_zeroed): New function.
1318 * regcache.h (supply_register_by_name_zeroed): Declare new
1319 function.
1320
aff689d3
TT
13212018-05-07 Tom Tromey <tom@tromey.com>
1322
1323 * configure: Rebuild.
1324
85e26832
TT
13252018-05-04 Tom Tromey <tom@tromey.com>
1326
1327 * configure: Rebuild.
1328
a3b60e45
JK
13292018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1330 Pedro Alves <palves@redhat.com>
1331
1332 * linux-aarch64-low.c (aarch64_stopped_data_address):
1333 Likewise.
1334
632e107b
TT
13352018-04-27 Tom Tromey <tom@tromey.com>
1336
1337 * configure: Rebuild.
1338
458412c3
TT
13392018-04-23 Tom Tromey <tom@tromey.com>
1340
1341 * configure: Rebuild.
1342
f31c089e
SM
13432018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1344
1345 * Makefile.in (depcomp): Add "..".
1346 (all_deps_files): New and use it.
1347
b319b098
AH
13482018-04-18 Alan Hayward <alan.hayward@arm.com>
1349
1350 * configure.srv (aarch64*-*-linux*): Don't include xml.
1351 (i[34567]86-*-cygwin*): Likewise.
1352 (i[34567]86-*-linux*): Likewise.
1353 (i[34567]86-*-lynxos*): Likewise.
1354 (i[34567]86-*-mingw32ce*): Likewise.
1355 (i[34567]86-*-mingw*): Likewise.
1356 (i[34567]86-*-nto*): Likewise.
1357 (tic6x-*-uclinux): Likewise.
1358 (x86_64-*-linux*): Likewise.
1359 (x86_64-*-mingw*): Likewise.
1360 (x86_64-*-cygwin*): Likewise.
1361
3b74854b
AH
13622018-04-18 Alan Hayward <alan.hayward@arm.com>
1363
1364 * tdesc.c: Remove xml parameter.
1365
e98577a9
AH
13662018-04-18 Alan Hayward <alan.hayward@arm.com>
1367
1368 * server.c (get_features_xml): Remove cast.
1369 * tdesc.c (void target_desc::accept): Fill in function.
1370 (tdesc_get_features_xml): Remove old xml creation.
1371 (print_xml_feature::visit_pre): Add xml vistor.
1372 * tdesc.h (struct target_desc): Make xmltarget mutable.
1373 (tdesc_get_features_xml): Remove declaration.
1374
d278f585
AH
13752018-04-18 Alan Hayward <alan.hayward@arm.com>
1376
1377 * tdesc.c (tdesc_architecture_name): Add new function.
1378 (tdesc_osabi_name): Likewise.
1379 (tdesc_get_features_xml): Use new functions.
1380
eee8a18d
AH
13812018-04-18 Alan Hayward <alan.hayward@arm.com>
1382
1383 * tdesc.c (tdesc_create_flags): Remove.
1384 (tdesc_add_flag): Likewise.
1385 (tdesc_named_type): Likewise.
1386 (tdesc_create_union): Likewise.
1387 (tdesc_create_struct): Likewise.
1388 (tdesc_create_vector): Likewise.
1389 (tdesc_add_bitfield): Likewise.
1390 (tdesc_add_field): Likewise.
1391 (tdesc_set_struct_size): Likewise.
1392
82ec9bc7
AH
13932018-04-18 Alan Hayward <alan.hayward@arm.com>
1394
1395 * tdesc.c (~target_desc): Remove implictly deleted items.
1396 (init_target_desc): Iterate all features.
1397 (tdesc_get_features_xml): Use vector.
1398 (tdesc_create_feature): Create feature.
1399 * tdesc.h (tdesc_feature) Remove
1400 (target_desc): Add features.
1401
ea3e7d71
AH
14022018-04-18 Alan Hayward <alan.hayward@arm.com>
1403
1404 * Makefile.in: Add common/tdesc.c
1405 * tdesc.c (init_target_desc): init all reg_defs from register
1406 vector.
1407 (tdesc_create_reg): Create tdesc_reg.
1408 * tdesc.h (tdesc_feature): Add register vector.
1409
17d08cd4
SM
14102018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * tdesc.h (struct target_desc) <features>: Change type to
1413 std::vector<std::string>.
1414 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1415 changes.
1416 (tdesc_get_features_xml): Likewise.
1417 (tdesc_create_feature): Likewise.
1418
5cd3e386
AH
14192018-03-26 Alan Hayward <alan.hayward@arm.com>
1420
1421 * regcache.c (find_register_by_number): Return a ref.
1422 (find_regno): Use references.
1423 (register_size): Likewise.
1424 (register_data): Likewise.
1425 * tdesc.c (target_desc::~target_desc): Remove free calls.
1426 (target_desc::operator==): Use std::vector compare.
1427 (init_target_desc): Use reference.
1428 (tdesc_create_reg): Use reg constructors.
1429 * tdesc.h (struct target_desc): Replace pointer with object.
1430
dff7492c
AH
14312018-03-23 Alan Hayward <alan.hayward@arm.com>
1432
1433 * regcache.c (find_register_by_number): Make static.
1434 (find_regno): Use find_register_by_number
1435 * regcache.h (struct reg): Remove declaration.
1436
d80e5242
AH
14372018-03-23 Alan Hayward <alan.hayward@arm.com>
1438
1439 * tdesc.c (target_desc::~target_desc): Move to here.
1440 (target_desc::operator==): Likewise.
1441 * tdesc.h (target_desc::~target_desc): Move from here.
1442 (target_desc::operator==): Likewise.
1443
f69c5afb
AA
14442018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1445
1446 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1447
ce29f843
AA
14482018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1449
1450 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1451 S390_TDESC_GS.
1452 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1453 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1454 and init_registers_s390_gs_linux64.
1455
c49bd90b
AA
14562018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1457
1458 * linux-s390-low.c (s390_fill_gs): Remove function.
1459 (s390_fill_gsbc): Remove function.
1460 (s390_regsets): Set fill functions for the guarded storage regsets
1461 to NULL.
1462
7edb9bd3
AA
14632018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1464
1465 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1466 the word size. Add comment.
1467 (s390_get_wordsize): New function.
1468 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1469 pswm with it. Instead, use s390_get_wordsize to determine the
1470 word size first and derive the correct tdesc from that directly.
1471
39be3c7e
SM
14722018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1473
1474 * Makefile.in: Include silent-rules.mk.
1475 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1476 (COMPILE): Add ECHO_CXX.
1477 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1478 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1479 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1480 (version-generated.c): Add ECHO_GEN.
1481 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1482 (IPAGENT_COMPILE): Add ECHO_CXX.
1483 (%-generated.c): Add ECHO_REGDAT.
1484
3ae9ce5d
TT
14852018-03-14 Tom Tromey <tom@tromey.com>
1486
1487 PR cli/14977:
1488 * ax.c (ax_printf): Special case for NULL.
1489
e6a58aa8
SM
14902018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1491
1492 * linux-low.c (linux_qxfer_libraries_svr4): Use
1493 xml_escape_text_append.
1494
f6e8a41e
SM
14952018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1496
1497 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1498
b9671caf
SM
14992018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1500
1501 * server.c (handle_general_set): Remove unnecessary xstrdup.
1502
e80aaf61
SM
15032018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1504
1505 * server.c (parse_debug_format_options): Adjust to
1506 delim_string_to_char_ptr_vec changes.
1507 * thread-db.c (thread_db_load_search): Adjust to
1508 dirnames_to_char_ptr_vec changes.
1509
b1223e78
MM
15102018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1511
1512 * target.h (target_enable_btrace, target_disable_btrace)
1513 (target_read_btrace, target_read_btrace_conf): Turn macro into
1514 inline function. Throw error if target method is not defined.
1515 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1516 check for btrace target method. Be prepared to handle exceptions
1517 from btrace target methods.
1518
81561546
SDJ
15192018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1520
1521 * server.c (captured_main): Change order of error message printed
1522 when the current working directory cannot be found.
1523
25e3c82c
SDJ
15242018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1525
1526 * server.c: Include "filenames.h" and "pathstuff.h".
1527 (program_name): Delete variable.
1528 (program_path): New anonymous class.
1529 (get_exec_wrapper): Use "program_path" instead of
1530 "program_name".
1531 (handle_v_run): Likewise.
1532 (captured_main): Likewise.
1533 (process_serial_event): Likewise.
1534
b4987c95
SDJ
15352018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1536
1537 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1538 (OBJS): Add "pathstuff.o".
1539 * server.c (current_directory): New global variable.
1540 (captured_main): Initialize "current_directory".
1541
f46cd62a
AH
15422018-02-26 Alan Hayward <alan.hayward@arm.com>
1543
1544 * tdesc.c: Use common/tdesc.h.
1545 * tdesc.h: Likewise.
1546
a543c5ca
AH
15472018-02-20 Alan Hayward <alan.hayward@arm.com>
1548 Simon Marchi <simon.marchi@ericsson.com>
1549
1550 * Makefile.in: Switch order of make rules.
1551
b5884fa7
AH
15522018-02-19 Alan Hayward <alan.hayward@arm.com>
1553
1554 * Makefile.in: Add common directory in build.
1555 * configure.ac: Add common reference.
1556 * configure: Regenerate.
1557
de6242d3
MM
15582018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1559
1560 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1561 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1562 * spu-low.c (spu_target_ops): Likewise.
1563 * win32-low.c (win32_target_ops): Likewise.
1564 * server.c (supported_btrace_packets): Report packets unconditionally.
1565 * target.h (target_ops) <supports_btrace>: Remove.
1566 (target_supports_btrace): Remove.
1567
9ee23a85
MM
15682018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1569
1570 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1571 (handle_btrace_disable): Change return type to void. Use exceptions
1572 to report errors.
1573 (handle_btrace_general_set): Catch exception and copy message to
1574 return message.
1575
8ce47547
TT
15762018-02-08 Tom Tromey <tom@tromey.com>
1577
1578 * linux-low.c (install_software_single_step_breakpoints): Use
1579 make_scoped_restore.
1580 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1581 (do_restore_current_thread_cleanup): Remove.
1582 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1583 declare.
1584
45dd3607
TT
15852018-02-08 Tom Tromey <tom@tromey.com>
1586
1587 * mem-break.c (set_raw_breakpoint_at): Use
1588 gdb::unique_xmalloc_ptr.
1589
e671cd59
PA
15902018-01-30 Pedro Alves <palves@redhat.com>
1591
1592 PR gdb/13211
1593 * target.c (target_terminal::terminal_state): Rename to ...
1594 (target_terminal::m_terminal_state): ... this.
1595
a0aad537
JC
15962018-01-19 James Clarke <jrtc27@jrtc27.com>
1597
1598 * linux-low.c (handle_extended_wait): Surround call to
1599 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1600
4d9b86e1
SM
16012018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1604 linux_ptrace_attach_fail_reason_string now returning an
1605 std::string.
1606 (linux_attach): Likewise.
1607 * thread-db.c (attach_thread): Likewise.
1608
f517c180
EA
16092018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1610
1611 PR gdb/21559
1612 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1613 checking for fs_base/gs_base fields in struct user_regs_struct.
1614 * configure: Regenerate.
1615
9a70f35c
YQ
16162018-01-16 Yao Qi <yao.qi@linaro.org>
1617
1618 PR gdb/18749
1619 * linux-low.c (fetch_register): Call supply_register instead of
1620 error.
1621
605fd3c6
YQ
16222018-01-08 Yao Qi <yao.qi@linaro.org>
1623 Simon Marchi <simon.marchi@ericsson.com>
1624
1625 * Makefile.in (OBS): Remove selftest.o.
1626 * configure.ac: Set srv_selftest_objs if $development is true.
1627 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1628 * configure: Re-generated.
1629 * server.c (captured_main): Wrap variable selftest_filter with
1630 GDB_SELF_TEST.
1631
2cc05030
SM
16322018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1633
1634 * server.c (parse_debug_format_options): Return std::string.
1635 (handle_monitor_command, captured_main): Adjust.
1636
e379cee6
PA
16372018-01-05 Pedro Alves <palves@redhat.com>
1638
1639 PR gdb/18653
1640 * server.c (captured_main): Pass quiet=false to
1641 save_original_signals_state.
1642
82e1e79a
JB
16432018-01-01 Joel Brobecker <brobecker@adacore.com>
1644
1645 * gdbreplay.c (gdbreplay_version): Update copyright year in
1646 version message.
1647 * server.c (gdbserver_version): Likewise.
1648
8e481c3b
TT
16492017-12-08 Tom Tromey <tom@tromey.com>
1650
1651 * ax.c (ax_printf): Update.
1652
a8806230
YQ
16532017-12-07 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1656 aarch64_linux_read_description.
1657 * linux-amd64-ipa.c (idx2mask): New array.
1658 (get_ipa_tdesc): Move idx2mask out.
1659 (initialize_low_tracepoint): Initialize target descriptions.
1660 * linux-i386-ipa.c (idx2mask): New array.
1661 (get_ipa_tdesc): Move idx2mask out.
1662 (initialize_low_tracepoint): Initialize target descriptions.
1663
d4a0e8b5
SM
16642017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1665
1666 * tdesc.c (struct tdesc_type): Change return type.
1667 (tdesc_add_flag): Change parameter type.
1668 (tdesc_add_bitfield): Likewise.
1669 (tdesc_add_field): Likewise.
1670 (tdesc_set_struct_size): Likewise.
1671
798a7429
SM
16722017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1673
1674 * regcache.c (registers_to_string): Remove unused variable.
1675
c0e15c9b
SM
16762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1677
1678 * inferiors.c (for_each_inferior_with_data): Remove.
1679 * inferiors.h (for_each_inferior_with_data): Remove.
1680 * server.c (handle_qxfer_threads_worker): Change parameter type.
1681 (handle_qxfer_threads_proper): Use for_each_thread.
1682
f0045347
SM
16832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * inferiors.c (for_each_inferior): Remove.
1686 (clear_inferiors): Use for_each_thread.
1687 * inferiors.h (for_each_inferior): Remove.
1688 * linux-low.c (linux_wait_for_event_filtered): Use
1689 for_each_thread.
1690 (linux_stabilize_threads): Likewise.
1691 * regcache.c (regcache_release): Likewise.
1692 * server.c (gdb_wants_all_threads_stopped): Likewise.
1693 (clear_pending_status_callback): Remove.
1694 (handle_status): Use for_each_thread.
1695 (captured_main): Likewise.
1696 * win32-low.c (child_init_thread_list): Likewise.
1697 (win32_clear_inferiors): Likewise.
1698 (fake_breakpoint_event): Likewise.
1699
9521758b
SM
17002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1701
1702 * inferiors.h (find_inferior): Remove.
1703 * inferiors.c (find_inferior): Remove.
1704
8f86d7aa
SM
17052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1706
1707 * linux-low.c (resume_status_pending_p): Update comment.
1708 (need_step_over_p): Update comment.
1709
e2b44075
SM
17102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1711
1712 * linux-low.c (proceed_one_lwp): Return void, change parameter
1713 type.
1714 (unsuspend_and_proceed_one_lwp): Likewise.
1715 (proceed_all_lwps): Use for_each_thread.
1716 (unstop_all_lwps): Likewise.
1717
c80825ff
SM
17182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1719
1720 * linux-low.c (linux_resume_one_thread): Return void, take
1721 parameter directly.
1722 (linux_resume): Use for_each_thread.
1723
df3e4dbe
SM
17242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1725
1726 * linux-low.c (send_sigstop_callback): Return void, change
1727 parameter type. Rename to...
1728 (send_sigstop): ... this.
1729 (suspend_and_send_sigstop_callback): Return void, change parameter
1730 type. Rename to...
1731 (suspend_and_send_sigstop): ... this.
1732 (stop_all_lwps): Use for_each_thread.
1733
5a6b0a41
SM
17342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1735
1736 * linux-low.c (lwp_running): Return bool, remove unused
1737 argument.
1738 (linux_stabilize_threads): Use find_thread.
1739
39a64da5
SM
17402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1741
1742 * linux-low.c (select_singlestep_lwp_callback): Remove.
1743 (count_events_callback): Remove.
1744 (select_event_lwp_callback): Remove.
1745 (select_event_lwp): Use find_thread/for_each_thread.
1746
a1385b7b
SM
17472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1748
1749 * linux-low.c (not_stopped_callback): Return bool, take filter
1750 argument directly.
1751 (linux_wait_for_event_filtered): Use find_thread.
1752 (linux_wait_1): Likewise.
1753
454296a2
SM
17542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1755
1756 * linux-low.c (same_lwp): Remove.
1757 (find_lwp_pid): Use find_thread.
1758
6b2a85da
SM
17592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1760
1761 * linux-low.c (delete_lwp_callback): Remove.
1762 (linux_mourn): Use for_each_thread.
1763
798a38e8
SM
17642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1767 args parameter, don't check for pid.
1768 (linux_detach): Use for_each_thread.
1769
e4eb0dec
SM
17702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1771
1772 * linux-low.c (struct counter): Remove.
1773 (second_thread_of_pid_p): Remove.
1774 (last_thread_of_process_p): Use find_thread.
1775
83e1b6c1
SM
17762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1777
1778 * inferiors.c (find_inferior_in_random): Remove.
1779 * inferiors.h (find_inferior_in_random): Remove.
1780 * linux-low.c (status_pending_p_callback): Return bool, accept
1781 parameter ptid directly.
1782 (linux_wait_for_event_filtered): Use find_thread_in_random.
1783 (linux_wait_1): Likewise.
1784
8dc7b443
SM
17852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1786
1787 * inferiors.c (find_inferior_id): Remove.
1788 (find_thread_ptid): Move implemention from find_inferior_id to
1789 here.
1790 * inferiors.h (find_inferior_id): Remove.
1791 * server.c (handle_status): Use find_thread_ptid.
1792 (process_serial_event): Likewise.
1793 * thread-db.c (find_one_thread): Likewise.
1794 (thread_db_thread_handle): Likewise.
1795 * win32-low.c (thread_rec): Likewise.
1796 (child_delete_thread): Likewise.
1797 (win32_thread_alive): Likewise.
1798 (get_child_debug_event): Likewise.
1799
da25033c
SM
18002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * linux-mips-low.c (update_watch_registers_callback): Return
1803 void, remove pid_p parameter, don't check for pid.
1804 (mips_insert_point, mips_remove_point): Use for_each_thread.
1805
c91bb56b
SM
18062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1807
1808 * lynx.low (lynx_delete_thread_callback): Remove.
1809 (lynx_mourn): Use for_each_thread.
1810
634a3254
SM
18112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1812
1813 * regcache.c (regcache_invalidate_one): Remove.
1814 (regcache_invalidate_pid): use for_each_thread.
1815
41272101
TT
18162017-11-26 Tom Tromey <tom@tromey.com>
1817
1818 * linux-low.c (linux_create_inferior): Update.
1819
f5291a6f
UW
18202017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1821
1822 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1823
6654d750
AH
18242017-11-24 Alan Hayward <alan.hayward@arm.com>
1825
1826 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1827 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1828 * linux-aarch64-tdesc-selftest.c: New file.
1829 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1830
18312017-11-24 Alan Hayward <alan.hayward@arm.com>
1832
1833 * configure.srv: Add new file.
1834 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1835 * linux-aarch64-tdesc-selftest.c: New file.
1836 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1837
49bdb7ee
AH
18382017-11-24 Alan Hayward <alan.hayward@arm.com>
1839
1840 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1841 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1842 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1843
d6d7ce56
AH
18442017-11-24 Alan Hayward <alan.hayward@arm.com>
1845
1846 * configure.srv: Add new files.
1847 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1848 aarch64_linux_read_description.
1849 * linux-aarch64-low.c (aarch64_linux_read_description):
1850 Merge with aarch64_arch_setup.
1851 (aarch64_arch_setup): Call aarch64_linux_read_description.
1852 * linux-aarch64-tdesc.c: New file.
1853 * linux-aarch64-tdesc.h: New file.
1854
506fe5f4
YQ
18552017-11-24 Yao Qi <yao.qi@linaro.org>
1856
1857 * configure.srv: Set $srv_regobj for tic6x-linux.
1858 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1859 (tic6x_read_description): Move some code to tic6x_arch_setup.
1860 (tic6x_tdesc_test): New function.
1861 (initialize_low_arch): Call selftests::register_test.
1862
29f9a567
YQ
18632017-11-22 Yao Qi <yao.qi@linaro.org>
1864
1865 * remote-utils.c (prepare_resume_reply): Use memcpy.
1866
578290ec
SM
18672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1868
1869 * linux-low.c (kill_one_lwp_callback): Return void, take
1870 argument directly, don't filter on pid.
1871 (linux_kill): Use for_each_thread.
1872
eca55aec
SM
18732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1874
1875 * linux-low.c (need_step_over_p): Return bool, remove dummy
1876 argument.
1877 (linux_resume, proceed_all_lwps): Use find_thread.
1878
25c28b4d
SM
18792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1880
1881 * linux-low.c (resume_status_pending_p): Return bool, remove
1882 flag_p argument.
1883 (linux_resume): Use find_thread.
1884
5fdda392
SM
18852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1886
1887 * linux-low.c (struct thread_resume_array): Remove.
1888 (linux_set_resume_request): Return void, take arguments
1889 directly.
1890 (linux_resume): Use for_each_thread.
1891
fcb056a5
SM
18922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1893
1894 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1895 return bool, remove data argument.
1896 (linux_stabilize_threads): Use find_thread.
1897
139720c5
SM
18982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * linux-low.c (unsuspend_one_lwp): Remove.
1901 (unsuspend_all_lwps): Use for_each_thread, inline code from
1902 unsuspend_one_lwp.
1903
6d1e5673
SM
19042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1907 * linux-low.c (struct iterate_over_lwps_args): Remove.
1908 (iterate_over_lwps_filter): Remove.
1909 (iterate_over_lwps): Use find_thread.
1910
bbf550d5
SM
19112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1912
1913 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1914 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1915 code from reset_lwp_ptrace_options_callback.
1916
00192f77
SM
19172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1918
1919 * linux-arm-low.c (struct update_registers_data): Remove.
1920 (update_registers_callback): Return void, take arguments
1921 directly, don't check thread's pid.
1922 (arm_insert_point, arm_remove_point): Use for_each_thread.
1923
2bee2b6c
SM
19242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1925
1926 * win32-low.c (continue_one_thread): Return void, take argument
1927 directly.
1928 (child_continue): Use for_each_thread.
1929
0b360f19
SM
19302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1931
1932 * win32-i386-low.c (update_debug_registers_callback): Rename
1933 to ...
1934 (update_debug_registers): ... this, return void, remove pid_p arg.
1935 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1936
f27866ba
SM
19372017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1938
1939 * inferiors.h (struct process_info): Add constructor, initialize
1940 fields..
1941 <syscalls_to_catch>: Change type to std::vector<int>.
1942 * inferiors.c (add_process): Allocate process_info with new.
1943 (remove_process): Free process_info with delete.
1944 * linux-low.c (handle_extended_wait): Adjust.
1945 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1946 * server.c (handle_general_set): Adjust.
1947
e849ea89
PA
19482017-11-16 Pedro Alves <palves@redhat.com>
1949
1950 * remote-utils.c (remote_close): Block SIGIO signals instead of
1951 uninstalling the SIGIO handler.
1952
1d0aa65c
AH
19532017-11-16 Alan Hayward <alan.hayward@arm.com>
1954
1955 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1956
3491a34c
YQ
19572017-11-16 Yao Qi <yao.qi@linaro.org>
1958
1959 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1960 (tic6x_store_gregset): Likewise.
1961 (tic6x_usrregs_info): Move it up.
1962
a602f924
AH
19632017-11-15 Alan Hayward <alan.hayward@arm.com>
1964
1965 * Makefile.in: Update arch rules.
1966 * configure.srv: Explicitly mark arch/ files.
1967
5616b6c3
AS
19682017-11-13 Andreas Schwab <schwab@suse.de>
1969
1970 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1971 function.
1972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1973
d1928160
PA
19742017-11-06 Pedro Alves <palves@redhat.com>
1975
1976 * config.in, configure: Regenerate.
1977
bac608e7
SM
19782017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1979
1980 * target.c (struct thread_search): Remove.
1981 (thread_search_callback): Remove.
1982 (prepare_to_access_memory): Use for_each_thread instead of
1983 find_inferior. Inline code from thread_search_callback.
1984
eaddb425
SM
19852017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1986
1987 * server.c (struct visit_actioned_threads_data): Remove.
1988 (visit_actioned_threads): Change prototype to take arguments
1989 directly.
1990 (resume): Use find_thread instead of find_inferior.
1991
99078d34
SM
19922017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1993
1994 * server.c (queue_stop_reply_callback): Change prototype, return
1995 void.
1996 (find_status_pending_thread_callback): Remove.
1997 (handle_status): Replace find_inferior with find_thread and
1998 for_each_thread.
1999
cc628f3d
AH
20002017-10-25 Alan Hayward <alan.hayward@arm.com>
2001
2002 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2003 with REGNO.
2004 (aarch64_store_gregset): Likewise.
2005 (aarch64_fill_fpregset): Likewise.
2006 (aarch64_store_fpregset): Likewise.
2007
4d3bb80e
SM
20082017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2009
2010 * gdbthread.h (find_thread, for_each_thread): New functions.
2011 * inferiors.c (thread_of_pid): Remove.
2012 (find_any_thread_of_pid): Use find_thread.
2013 * linux-low.c (num_lwps): Use for_each_thread.
2014
7a7cdfa0
YQ
20152017-10-17 Yao Qi <yao.qi@linaro.org>
2016
2017 * Makefile.in: Remove one rule.
2018 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2019
e675d170
YQ
20202017-10-17 Yao Qi <yao.qi@linaro.org>
2021
2022 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2023 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2024
7eb4e0f9
YQ
20252017-10-17 Yao Qi <yao.qi@linaro.org>
2026
2027 * configure.srv: Rename arm.o with arch/arm.o.
2028
60d6cfc9
YQ
20292017-10-17 Yao Qi <yao.qi@linaro.org>
2030
2031 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2032 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2033 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2034 (arch-i386.o, arch-amd64.o): Remove rules.
2035 (arch/%.o): New rule.
2036 Update POSTCOMPILE and COMPILE.pre.
2037 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2038 * configure: Re-generated.
2039 * configure.srv: Replace arch-i386.o with arch/i386.o.
2040 Replace arch-amd64.o with arch/amd64.o.
2041
5bfda255
YQ
20422017-10-16 Yao Qi <yao.qi@linaro.org>
2043
2044 * configure: Regenerated.
2045
9c80ecd6
SM
20462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2047
2048 * inferiors.h: (struct inferior_list): Remove.
2049 (struct inferior_list_entry); Remove.
2050 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2051 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2052 get_first_inferior): Remove.
2053 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2054 find_inferior_id, find_inferior_in_random): Change signature.
2055 * inferiors.c (all_threads): Change type to
2056 std::list<thread_info *>.
2057 (get_thread): Remove macro.
2058 (find_inferior, find_inferior_id): Change signature, implement
2059 using find_thread.
2060 (find_inferior_in_random): Change signature, implement using
2061 find_thread_in_random.
2062 (for_each_inferior, for_each_inferior_with_data): Change
2063 signature, implement using for_each_thread.
2064 (add_inferior_to_list, remove_inferior): Remove.
2065 (add_thread, get_first_thread, thread_of_pid,
2066 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2067 (get_first_inferior, one_inferior_p, clear_inferior_list):
2068 Remove.
2069 (clear_inferiors, get_thread_process): Update.
2070 * gdbthread.h: Include <list>.
2071 (struct thread_info) <entry>: Remove field.
2072 <id>: New field.
2073 (all_threads): Change type to std::list<thread_info *>.
2074 (get_first_inferior): Add doc.
2075 (find_thread, for_each_thread, find_thread_in_random): New
2076 functions.
2077 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2078 * linux-arm-low.c (update_registers_callback): Update.
2079 * linux-low.c (second_thread_of_pid_p): Update.
2080 (kill_one_lwp_callback, linux_detach_lwp_callback,
2081 delete_lwp_callback, status_pending_p_callback, same_lwp,
2082 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2083 iterate_over_lwps, not_stopped_callback,
2084 resume_stopped_resumed_lwps, count_events_callback,
2085 select_singlestep_lwp_callback, select_event_lwp_callback,
2086 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2087 suspend_and_send_sigstop_callback, wait_for_sigstop,
2088 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2089 lwp_running, linux_set_resume_request, resume_status_pending_p,
2090 need_step_over_p, start_step_over, linux_resume_one_thread,
2091 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2092 reset_lwp_ptrace_options_callback): Update.
2093 * linux-mips-low.c (update_watch_registers_callback): Update.
2094 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2095 Update.
2096 (free_register_cache_thread_one): Remove.
2097 (regcache_release): Update.
2098 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2099 handle_qxfer_threads_worker): Update.
2100 (handle_query): Update, use list iterator.
2101 (visit_actioned_threads, handle_pending_status,
2102 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2103 clear_pending_status_callback, set_pending_status_callback,
2104 find_status_pending_thread_callback, handle_status,
2105 process_serial_event): Update.
2106 * target.c (thread_search_callback): Update.
2107 * thread-db.c (thread_db_get_tls_address): Update.
2108 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2109 Update.
2110 * win32-i386-low.c (update_debug_registers_callback): Update.
2111 * win32-low.c (delete_thread_info, child_delete_thread,
2112 continue_one_thread, suspend_one_thread,
2113 get_child_debug_event): Adjust.
2114
9179355e
SM
21152017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2116
2117 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2118 * inferiors.h: Include <list>.
2119 (struct process_info) <entry>: Remove field.
2120 <pid>: New field.
2121 (pid_of): Change macro to function.
2122 (ptid_of, lwpid_of): Remove macro.
2123 (all_processes): Change type to std::list<process_info *>.
2124 (ALL_PROCESSES): Remove macro.
2125 (for_each_process, find_process): New function.
2126 * inferiors.c (all_processes): Change type to
2127 std::list<process_info *>.
2128 (find_thread_process): Adjust.
2129 (add_process): Likewise.
2130 (remove_process): Likewise.
2131 (find_process_pid): Likewise.
2132 (get_first_process): Likewise.
2133 (started_inferior_callback): Remove.
2134 (have_started_inferiors_p): Adjust.
2135 (attached_inferior_callback): Remove.
2136 (have_attached_inferiors_p): Adjust.
2137 * linux-low.c (check_zombie_leaders): Likewise.
2138 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2139 (x86_linux_update_xmltarget): Adjust.
2140 * server.c (handle_query): Likewise.
2141 (gdb_reattached_process): Remove.
2142 (handle_status): Adjust.
2143 (kill_inferior_callback): Likewise.
2144 (detach_or_kill_inferior): Remove.
2145 (print_started_pid): Likewise.
2146 (print_attached_pid): Likewise.
2147 (detach_or_kill_for_exit): Update.
2148 (process_serial_event): Likewise.
2149 * linux-arm-low.c (arm_new_fork): Likewise.
2150
c9cb8905
SM
21512017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2152
2153 * dll.h: Include <list>.
2154 (struct dll_info): Add constructor.
2155 <entry>: Remove field.
2156 (all_dlls): Change type to std::list<dll_info>.
2157 * dll.c: Include <algorithm>.
2158 (get_dll): Remove macro.
2159 (all_dlls): Change type to std::list<dll_info *>.
2160 (free_one_dll): Remove.
2161 (match_dll): Likewise.
2162 (loaded_dll): Adjust.
2163 (unloaded_dll): Adjust to all_dlls type change, use
2164 std::find_if. Inline code from match_dll.
2165 (clear_dlls): Adjust to all_dlls type change.
2166 * server.c (emit_dll_description): Remove.
2167 (handle_qxfer_libraries): Adjust to all_dlls type change,
2168 integrate emit_dll_description's functionality.
2169
04ec7890
SM
21702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2171
2172 * linux-low.h (struct linux_target_ops) <delete_process>: New
2173 field.
2174 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2175 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2176 (struct linux_target_ops): Add delete_process callback.
2177 * linux-arm-low.c (arm_delete_process): New.
2178 (struct linux_target_ops): Add delete_process callback.
2179 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2180 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2181 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2182 * linux-mips-low.c (mips_linux_delete_process): New.
2183 (struct linux_target_ops): Add delete_process callback.
2184 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2185 * linux-s390-low.c (struct linux_target_ops): Likewise.
2186 * linux-sh-low.c (struct linux_target_ops): Likewise.
2187 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2188 * linux-tile-low.c (struct linux_target_ops): Likewise.
2189 * linux-x86-low.c (x86_linux_delete_process): New.
2190 (struct linux_target_ops): Add delete_process callback.
2191 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2192
466eecee
SM
21932017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2194
2195 * linux-aarch64-low.c (the_low_target): Add thread delete
2196 callback.
2197 * linux-arm-low.c (arm_delete_thread): New function.
2198 (the_low_target): Add thread delete callback.
2199 * linux-bfin-low.c (the_low_target): Likewise.
2200 * linux-crisv32-low.c (the_low_target): Likewise.
2201 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2202 set.
2203 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2204 field.
2205 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2206 * linux-mips-low.c (mips_linux_delete_thread): New function.
2207 (the_low_target): Add thread delete callback.
2208 * linux-ppc-low.c (the_low_target): Likewise.
2209 * linux-s390-low.c (the_low_target): Likewise.
2210 * linux-sh-low.c (the_low_target): Likewise.
2211 * linux-tic6x-low.c (the_low_target): Likewise.
2212 * linux-tile-low.c (the_low_target): Likewise.
2213 * linux-x86-low.c (the_low_target): Likewise.
2214 * linux-xtensa-low.c (the_low_target): Likewise.
2215
b79f7801
YZ
22162017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2217
2218 * win32-low.c: Include "common-inferior.h".
2219
bc3b087d
SDJ
22202017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2221
2222 * inferiors.c (set_inferior_cwd): New function.
2223 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2224 (handle_query): Inform that QSetWorkingDir is supported.
2225 * win32-low.c (create_process): Pass the inferior's cwd to
2226 CreateProcess.
2227
d092c5a2
SDJ
22282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2229
2230 * inferiors.c (current_inferior_cwd): New global variable.
2231 (get_inferior_cwd): New function.
2232 * inferiors.h (struct process_info) <cwd>: New field.
2233
7da0a886
SDJ
22342017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2235
2236 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2237 (OBS): Add gdb_tilde_expand.o.
2238
289a6840
SM
22392017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2242 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2243
256642e8
PA
22442017-09-29 Pedro Alves <palves@redhat.com>
2245
2246 * ax.c (gdb_parse_agent_expr): Constify.
2247 * ax.h (gdb_parse_agent_expr): Constify.
2248 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2249 Constify.
2250 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2251 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2252 * remote-utils.h (read_ptid): Constify.
2253 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2254 (process_point_options, process_serial_event): Constify.
2255 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2256 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2257 (cmd_qtbuffer): Constify.
2258
5b9ca4d4
PA
22592017-09-29 Pedro Alves <palves@redhat.com>
2260
2261 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2262 fails.
2263
94c207e0
PA
22642017-09-29 Pedro Alves <palves@redhat.com>
2265
2266 * linux-low.c (handle_extended_wait): Pass parent thread instead
2267 of process to thread_db_notice_clone.
2268 * linux-low.h (thread_db_notice_clone): Replace parent process
2269 parameter with parent thread parameter.
2270 * thread-db.c (find_one_thread): Add comment.
2271 (thread_db_notice_clone): Replace parent process parameter with
2272 parent thread parameter. Temporarily switch to the parent thread.
2273
75352e28
SDJ
22742017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2275
2276 * gdbthread.h: Include "common-gdbthread.h".
2277 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2278 "if" when validating the ptid.
2279 * remote-utils.c: Include "gdbthread.h".
2280 (prepare_resume_reply): Use "switch_to_thread".
2281 * target.c (done_accessing_memory): Likewise.
2282
ad339634
AA
22832017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2284
2285 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2286 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2287 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2288 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2289 s390x-gs-linux64-ipa.o to ipa_obj.
2290 * linux-s390-low.c (HWCAP_S390_GS): New define.
2291 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2292 New functions.
2293 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2294 (s390_arch_setup): Check for guarded-storage support and choose
2295 appropriate tdesc.
2296 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2297 init_registers_s390x_gs_linux64.
2298 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2299 enum value.
2300 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2301 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2302
cc4d742f
SM
23032017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2304
2305 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2306
f6327dcb
KB
23072017-09-21 Kevin Buettner <kevinb@redhat.com>
2308
2309 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2310 (thread_db_thread_handle): Declare.
2311 * linux-low.c (linux_target_ops): Initialize thread_handle.
2312 * server.c (handle_qxfer_threads_worker): Add support for
2313 "handle" attribute.
2314 * target.h (struct target_ops): Add new function pointer,
2315 thread_handle.
2316 (target_thread_handle): Define.
2317 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2318 field in lwp.
2319 (thread_db_thread_handle): New function.
2320
86299109
KB
23212017-09-21 Kevin Buettner <kevinb@redhat.com>
2322
2323 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2324 * linux-low.h (thread_db_notice_clone): Declare.
2325 * thread-db.c (thread_db_notice_clone): New function.
2326
f557a88a
PA
23272017-09-21 Pedro Alves <palves@redhat.com>
2328
2329 * server.c (gdb_read_memory, handle_status, process_serial_event)
2330 (handle_serial_event, handle_target_event): Adjust to
2331 set_desired_thread prototype change.
2332 * target.c (set_desired_thread): Remove 'use_general' parameter
2333 and adjust.
2334 * target.h (set_desired_thread): Remove 'use_general' parameter.
2335
223ffa71
TT
23362017-09-20 Tom Tromey <tom@tromey.com>
2337
2338 * target.c (target_terminal::terminal_state): Define.
2339 (target_terminal::init): Rename from target_terminal_init.
2340 (target_terminal::inferior): Rename from
2341 target_terminal_inferior.
2342 (target_terminal::ours): Rename from target_terminal_ours.
2343 (target_terminal::ours_for_output, target_terminal::info): New.
2344
04fd3ba9
SM
23452017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2346
2347 * server.c (accumulate_file_name_length): Remove.
2348 (emit_dll_description): Adjust to std::string change.
2349 (handle_qxfer_libraries): Use std::string to hold document.
2350
5e187554
SM
23512017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2352
2353 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2354 return type of xml_escape_text.
2355 * server.c (emit_dll_description): Likewise.
2356
1526853e
SM
23572017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2358
2359 * server.c (captured_main): Accept argument for --selftest.
2360 Update run_tests call.
2361 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2362 when registering selftests.
2363
c4dfafab
SDJ
23642017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2365
2366 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2367 instead of "VEC" for "target_desc.reg_defs".
2368 (regcache_cpy): Likewise.
2369 (registers_to_string): Likewise.
2370 (registers_from_string): Likewise.
2371 (find_regno): Likewise.
2372 (supply_regblock): Likewise.
2373 (regcache_raw_read_unsigned): Likewise.
2374 * tdesc.c (init_target_desc): Likewise.
2375 (tdesc_create_reg): Likewise.
2376 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2377 (struct target_desc) <reg_defs>: Convert to "std::vector".
2378 (target_desc): Do not initialize "reg_defs".
2379 (~target_desc): Update code to use "std::vector" instead of "VEC"
2380 for "target_desc.reg_defs".
2381 (operator==): Likewise.
2382
124aceb4
SM
23832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2384
2385 * inferiors.h (thread_to_gdb_id): Remove.
2386 * inferiors.c (thread_to_gdb_id): Remove.
2387 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2388 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2389 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2390 Likewise.
2391 * nto-low.c (nto_fetch_registers, nto_store_registers,
2392 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2393
96cde54f
SM
23942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2395
2396 * inferiors.h (gdb_id_to_thread_id): Remove.
2397 * inferiors.c (gdb_id_to_thread_id): Remove.
2398 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2399 removal. Move pid declaration closer to where it's used.
2400
e8ca139e
SM
24012017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2402
2403 * server.c (handle_detach): New function.
2404 (process_serial_event): Move code out, call handle_detach.
2405
f8a4e119
SM
24062017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * server.c (require_running): Rename to ...
2409 (require_running_or_return): ... this ...
2410 (require_running_or_break): ... and this.
2411 (handle_query, process_serial_event): Adjust.
2412
0eb0a407
SM
24132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2414
2415 * linux-low.c (linux_set_resume_request): Remove unused
2416 variables.
2417
785922a5
SM
24182017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2419
2420 * server.c (first_thread_of): Remove.
2421 (process_serial_event): Replace usage of first_thread_of with
2422 find_any_thread_of_pid.
2423 * tracepoint.c (same_process_p): Remove.
2424 (gdb_agent_about_to_close): Replace usage of same_process_p with
2425 find_any_thread_of_pid.
2426 * linux-x86-low.c (same_process_callback): Remove.
2427 (x86_arch_setup_process_callback): Replace usage of
2428 same_process_callback with find_any_thread_of_pid.
2429 * thread-db.c (any_thread_of): Remove.
2430 (switch_to_process): Replace usage of any_thread_of with
2431 find_any_thread_of_pid.
2432 * inferiors.c (thread_pid_matches_callback): Remove.
2433 (find_thread_process): Adjust to use find_any_thread_of_pid.
2434
a059f00c
SDJ
24352017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2436
2437 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2438 with "!VEC_empty".
a059f00c 2439
cc397f3a
SDJ
24402017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2441
2442 * linux-low.c (handle_extended_wait): Use
2443 "allocate_target_description" instead of "XNEW".
2444 * linux-x86-low.c (initialize_low_arch): Likewise.
2445
22916b07
YQ
24462017-09-05 Yao Qi <yao.qi@linaro.org>
2447
2448 * configure.srv (srv_i386_regobj): Remove.
2449 (srv_amd64_regobj): Remove.
2450 (srv_regobj): Set it to "" for x86 non-linux targets.
2451 * linux-x86-tdesc.c (i386_linux_read_description):
2452 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2453 (init_registers_i386): Remove the declaration.
2454 (tdesc_i386): Remove the declaration.
2455 (lynx_i386_arch_setup): Call i386_create_target_description.
2456 * nto-x86-low.c: Likewise.
2457 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2458 [!__x86_64__]: include arch/i386.h.
2459 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2460
38602d55
YQ
24612017-09-05 Yao Qi <yao.qi@linaro.org>
2462
2463 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2464 i386/amd64-XXX-linux from it.
2465
44b886ff
YQ
24662017-09-05 Yao Qi <yao.qi@linaro.org>
2467
2468 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2469 false.
2470 (ipa_amd64_linux_regobj): Remove.
2471 (ipa_x32_linux_regobj): Remove.
2472
b4570e4b
YQ
24732017-09-05 Yao Qi <yao.qi@linaro.org>
2474
2475 * Makefile.in (arch-amd64.o): New rule.
2476 * configure.srv: Append arch-amd64.o.
2477 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2478 (get_ipa_tdesc): Call amd64_linux_read_description.
2479 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2480 and init_registers_amd64_XXX.
2481 * linux-x86-low.c (x86_linux_read_description): Call
2482 amd64_linux_read_description.
2483 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2484 (initialize_low_arch): Don't call init_registers_x32_XXX and
2485 init_registers_amd64_XXX.
2486 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2487 and tdesc_amd64_XXX.
2488 [__x86_64__] (amd64_tdesc_test): New function.
2489 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2490 and init_registers_amd64_XXX.
2491 * linux-x86-tdesc.c: Include arch/amd64.h.
2492 (xcr0_to_tdesc_idx): New function.
2493 (i386_linux_read_description): New function.
2494 (amd64_get_ipa_tdesc_idx): New function.
2495 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2496 (amd64_get_ipa_tdesc): Declare.
2497
d1f28ea2
YQ
24982017-09-05 Yao Qi <yao.qi@linaro.org>
2499
2500 * configure.srv (srv_i386_linux_xmlfiles): Remove
2501 i386/i386-XXX-linux.xml from it.
2502
25a93583
YQ
25032017-09-05 Yao Qi <yao.qi@linaro.org>
2504
2505 * configure.srv: Set srv_i386_linux_regobj empty if $development
2506 is false.
2507 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2508 initialize_low_tdesc.
2509 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2510 with #if initialize_low_tdesc.
2511 * linux-x86-tdesc-selftest.c: New file.
2512 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2513
5f035c07
YQ
25142017-09-05 Yao Qi <yao.qi@linaro.org>
2515
2516 * Makefile.in (arch-i386.o): New rule.
2517 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2518 (x86_64-*-linux*): Likewise.
2519 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2520 include arch/i386.h.
2521 (i386_linux_read_description): Remove code and call
2522 i386_create_target_description.
2523 * tdesc.c (allocate_target_description): New function.
2524 * tdesc.h (set_tdesc_architecture): Remove declaration.
2525 (set_tdesc_osabi): Likewise.
2526
0abe8a89
YQ
25272017-09-05 Yao Qi <yao.qi@linaro.org>
2528
2529 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2530 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2531 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2532 .xmltarget.
2533 * server.c (get_features_xml): Call tdesc_get_features_xml.
2534 * tdesc.c (set_tdesc_architecture): New function.
2535 (set_tdesc_osabi): New function.
2536 (tdesc_get_features_xml): New function.
2537 (tdesc_create_feature): Add an argument.
2538 * tdesc.h (struct target_desc) <features>: New field.
2539 <arch, osabi>: New field.
2540 (~target_desc): xfree features, arch, and osabi.
2541 (target_desc::oerator==): Don't compare .xmltarget.
2542 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2543 (set_tdesc_osabi): Likewise.
2544 (tdesc_get_features_xml): Likewise.
2545
0a188386
YQ
25462017-09-05 Yao Qi <yao.qi@linaro.org>
2547
2548 * linux-x86-tdesc.c: Include selftest.h.
2549 (i386_tdesc_test): New function.
2550 (initialize_low_tdesc): Call selftests::register_test.
2551 * tdesc.h: Include regdef.h.
2552 (target_desc): Override operator == and !=.
2553
f49ff000
YQ
25542017-09-05 Yao Qi <yao.qi@linaro.org>
2555
2556 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2557 (ipa_obj): Likewise.
2558 * linux-i386-ipa.c: Include common/x86-xstate.h
2559 (get_ipa_tdesc): Call i386_linux_read_description.
2560 (initialize_low_tracepoint): Don't call init_registers_XXX
2561 functions, call initialize_low_tdesc instead.
2562 * linux-x86-low.c (x86_linux_read_description): Call
2563 i386_linux_read_description.
2564 (initialize_low_arch): Don't call init_registers_i386_XXX
2565 functions, call initialize_low_tdesc.
2566 * linux-x86-tdesc.c: New file.
2567 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2568 (i386_get_ipa_tdesc_idx): Declare.
2569 (i386_get_ipa_tdesc): Declare.
2570 (initialize_low_tdesc): Declare.
2571
2b68ef2f
YQ
25722017-09-05 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2575 instead of 0.
2576
f7000548
YQ
25772017-09-05 Yao Qi <yao.qi@linaro.org>
2578
2579 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2580 * regcache.c (get_thread_regcache): Use VEC_length.
2581 (init_register_cache): Likewise.
2582 (regcache_cpy): Likewise.
2583 (registers_to_string): Iterate reg_defs via VEC_iterate.
2584 (find_regno): Likewise.
2585 (find_register_by_number): Use VEC_index.
2586 (register_size): Call find_register_by_number.
2587 (register_data): Call find_register_by_number.
2588 (supply_regblock): Use VEC_length.
2589 (regcache_raw_read_unsigned): Likewise.
2590 * tdesc.c (init_target_desc): Iterate reg_defs via
2591 VEC_iterate.
2592 (default_description): Update initializer.
2593 (copy_target_description): Don't update field num_registers.
2594 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2595 <num_registers>: Remove.
2596
50a421ac
SM
25972017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2598
2599 * Makefile.in (.SECONDARY): Define target.
2600
23fdd69e
SM
26012017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2602
2603 * linux-low.c (linux_wait_1): Adjust.
2604 * server.c (queue_stop_reply_callback): Adjust.
2605
0a2dde4a
SDJ
26062017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2607
2608 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2609 QEnvironmentUnset and QEnvironmentReset packets.
2610 (handle_query): Inform remote that QEnvironmentHexEncoded,
2611 QEnvironmentUnset and QEnvironmentReset are supported.
2612
6afd337d
SM
26132017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2614
2615 * inferiors.h (inferior_target_data): Rename to ...
2616 (thread_target_data): ... this.
2617 (inferior_regcache_data): Rename to ...
2618 (thread_regcache_data): ... this.
2619 (set_inferior_regcache_data): Rename to ...
2620 (set_thread_regcache_data): ... this.
2621 * inferiors.c (inferior_target_data): Rename to ...
2622 (thread_target_data): ... this.
2623 (inferior_regcache_data): Rename to ...
2624 (thread_regcache_data): ... this.
2625 (set_inferior_regcache_data): Rename to ...
2626 (set_thread_regcache_data): ... this.
2627 (free_one_thread): Update.
2628 * linux-low.h (get_thread_lwp): Update.
2629 * regcache.c (get_thread_regcache): Update.
2630 (regcache_invalidate_thread): Update.
2631 (free_register_cache_thread): Update.
2632 * win32-i386-low.c (update_debug_registers_callback): Update.
2633 (win32_get_current_dr): Update.
2634 * win32-low.c (thread_rec): Update.
2635 (delete_thread_info): Update.
2636 (continue_one_thread): Update.
2637 (suspend_one_thread): Update.
2638
a160cc46
SM
26392017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2640
2641 * inferiors.c (set_inferior_target_data): Remove.
2642 * inferiors.h (set_inferior_target_data): Remove.
2643
6d580b63
YQ
26442017-08-18 Yao Qi <yao.qi@linaro.org>
2645
2646 * Makefile.in (OBS): Add selftest.o.
2647 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2648 * configure, config.in: Re-generated.
2649 * server.c: Include common/sefltest.h.
2650 (captured_main): Handle option --selftest.
2651
f5a29eb0
YQ
26522017-08-09 Yao Qi <yao.qi@linaro.org>
2653
2654 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2655 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2656 i386-avx-mpx.o and i386-mmx.o.
2657 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2658 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2659 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2660 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2661 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2662 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2663 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2664 i386/amd64-avx-mpx.xml.
2665
57757c2f
YQ
26662017-08-09 Yao Qi <yao.qi@linaro.org>
2667
2668 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2669 and x32-avx-avx512.o.
2670 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2671 i386/x32-avx-avx512.xml.
2672
229d26fc
SM
26732017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2674
2675 * tracepoint.h (enum class fast_tpoint_collect_result): New
2676 enumeration.
2677 (fast_tracepoint_collecting): Change return type to
2678 fast_tpoint_collect_result.
2679 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2680 * linux-low.h: Include tracepoint.h.
2681 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2682 fast_tpoint_collect_result.
2683 * linux-low.c (handle_tracepoints): Adjust.
2684 (linux_fast_tracepoint_collecting): Change return type to
2685 fast_tpoint_collect_result.
2686 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2687 linux_wait_1, stuck_in_jump_pad_callback,
2688 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2689 proceed_one_lwp): Adjust to type change.
2690
2e1e43e1
YQ
26912017-07-10 Yao Qi <yao.qi@linaro.org>
2692
2693 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2694
adc764e7
YQ
26952017-06-29 Yao Qi <yao.qi@linaro.org>
2696
2697 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2698 Remove.
2699 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2700
a206891a
SM
27012017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2702
2703 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2704
9a6c7d9c
SDJ
27052017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2706
2707 * linux-low.c (linux_create_inferior): Adjust code to access the
2708 environment information via 'gdb_environ' class.
2709 * lynx-low.c (lynx_create_inferior): Likewise.
2710 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2711 (get_environ): Return a pointer to 'our_environ'.
2712 (captured_main): Initialize 'our_environ'.
2713 * server.h (get_environ): Adjust prototype.
2714 * spu-low.c (spu_create_inferior): Adjust code to access the
2715 environment information via 'gdb_environ' class.
2716
ae3e2ccf
SM
27172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2718
2719 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2720 usage of "register" keyword.
2721
3e019bdc
SM
27222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2723
2724 * configure: Re-generate.
2725
8465943a
SM
27262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2727
2728 * configure: Re-generate.
2729
cf0dd6f0
SM
27302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2731
2732 * Makefile.in (COMPILE.pre): Add "-x c++".
2733
9845682b
SDJ
27342017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2735
2736 * fork-child.c: Conditionally include <signal.h>.
2737
aefd8b33
SDJ
27382017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2739
2740 * server.c (handle_general_set): Handle new packet
2741 "QStartupWithShell".
2742 (handle_query): Add "QStartupWithShell" to the list of supported
2743 packets.
2744 (gdbserver_usage): Add help text explaining the
2745 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2746 options.
2747 (captured_main): Recognize and act upon the presence of the new
2748 CLI options.
2749
2090129c
SDJ
27502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2751 Pedro Alves <palves@redhat.com>
2752
2753 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2754 * configure: Regenerate.
2755 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2756 "fork-inferior.o".
2757 (i[34567]86-*-lynxos*): Likewise.
2758 (spu*-*-*): Likewise.
2759 * fork-child.c: New file.
2760 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2761 and "environ.h".
2762 (linux_ptrace_fun): New function.
2763 (linux_create_inferior): Adjust function prototype to reflect
2764 change on "target.h". Adjust function code to use
2765 "fork_inferior".
2766 (linux_request_interrupt): Delete "signal_pid".
2767 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2768 (lynx_ptrace_fun): New function.
2769 (lynx_create_inferior): Adjust function prototype to reflect
2770 change on "target.h". Adjust function code to use
2771 "fork_inferior".
2772 * nto-low.c (nto_create_inferior): Adjust function prototype and
2773 code to reflect change on "target.h". Update comments.
2774 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2775 "common-terminal.h" and "environ.h".
2776 (terminal_fd): Moved to fork-child.c.
2777 (old_foreground_pgrp): Likewise.
2778 (restore_old_foreground_pgrp): Likewise.
2779 (last_status): Make it global.
2780 (last_ptid): Likewise.
2781 (our_environ): New variable.
2782 (startup_with_shell): Likewise.
2783 (program_name): Likewise.
2784 (program_argv): Rename to...
2785 (program_args): ...this.
2786 (wrapper_argv): New variable.
2787 (start_inferior): Delete function.
2788 (get_exec_wrapper): New function.
2789 (get_exec_file): Likewise.
2790 (get_environ): Likewise.
2791 (prefork_hook): Likewise.
2792 (post_fork_inferior): Likewise.
2793 (postfork_hook): Likewise.
2794 (postfork_child_hook): Likewise.
2795 (handle_v_run): Update code to deal with arguments coming from the
2796 remote host. Update calls from "start_inferior" to
2797 "create_inferior".
2798 (captured_main): Likewise. Initialize environment variable. Call
2799 "have_job_control".
2800 * server.h (post_fork_inferior): New prototype.
2801 (get_environ): Likewise.
2802 (last_status): Declare.
2803 (last_ptid): Likewise.
2804 (signal_pid): Likewise.
2805 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2806 (spu_ptrace_fun): New function.
2807 (spu_create_inferior): Adjust function prototype to reflect change
2808 on "target.h". Adjust function code to use "fork_inferior".
2809 * target.c (target_terminal_init): New function.
2810 (target_terminal_inferior): Likewise.
2811 (target_terminal_ours): Likewise.
2812 * target.h: Include <vector>.
2813 (struct target_ops) <create_inferior>: Update prototype.
2814 (create_inferior): Update macro.
2815 * utils.c (gdb_flush_out_err): New function.
2816 * win32-low.c (win32_create_inferior): Adjust function prototype
2817 and code to reflect change on "target.h".
2818
043a4934
SDJ
28192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2820
2821 * inferiors.c (switch_to_thread): New function.
2822
15652511
SDJ
28232017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2824
2825 * Makefile.in (SFILE): Add "common/job-control.c".
2826 (OBS): Add "job-control.o".
2827
21ea5acd
SDJ
28282017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2829
2830 * Makefile: Remove "@host_makefile_frag@".
2831
e13cb306
PA
28322017-05-05 Pedro Alves <palves@redhat.com>
2833
2834 * configure: Regenerate.
2835
c94fee56
SDJ
28362017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2837
2838 * configure: Regenerate.
2839
a0ff9e1a
SM
28402017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2841
2842 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2843 software_single_step change of return type to
2844 std::vector<CORE_ADDR>.
2845 * linux-low.c (install_software_single_step_breakpoints):
2846 Likewise.
2847 * linux-low.h (install_software_single_step_breakpoints):
2848 Likewise.
2849
be628ab8
SDJ
28502017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2851
2852 * remote-utils.c: Include "gdb_termios.h" instead of
2853 "terminal.h".
2854 * terminal.h: Delete file.
2855
7c5ded6a
SDJ
28562017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2857
2858 * server.c: Include <vector>.
2859 <program_argv, wrapper_argv>: Convert to std::vector.
2860 (start_inferior): Rewrite function to use C++.
2861 (handle_v_run): Likewise. Update code that calculates the argv
2862 based on the vRun packet; use C++.
2863 (captured_main): Likewise.
2864
436252de
SM
28652017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2866
2867 * server.c (handle_v_cont): Initialize thread_resume::thread
2868 with null_ptid.
2869
9bf2a700
PA
28702017-04-05 Pedro Alves <palves@redhat.com>
2871
2872 * configure: Regenerate.
2873
a121b7c1
PA
28742017-04-05 Pedro Alves <palves@redhat.com>
2875
2876 * gdbreplay.c (sync_error): Constify.
2877 * linux-x86-low.c (push_opcode): Constify.
2878
21c8a587
PA
28792017-04-05 Pedro Alves <palves@redhat.com>
2880
2881 * win32-low.c (get_child_debug_event)
2882 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2883 Report TARGET_WAITKIND_SPURIOUS instead.
2884
fb32b4f7
PA
28852017-04-05 Pedro Alves <palves@redhat.com>
2886
e79be6e5
SM
2887 * remote-utils.c (remote_prepare, remote_open): Constify.
2888 * remote-utils.h (remote_prepare, remote_open): Constify.
2889 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2890
65dd1e59
SM
28912017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2892
2893 * Makefile.in (clean): Clear .deps.
2894
8fa5b777
SM
28952017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2896
2897 * .gitignore: Remove generated files, replace with wildcard.
2898 * (clean): Replace removal of generated files with wildcard.
2899 (version.c): Replace with...
2900 (version-generated.c): ...this.
2901 (xml-builtin.c): Replace with...
2902 (xml-builtin-generated.c): ...this.
2903 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2904 (%.c: *regformats*): Replace with...
2905 (%-generated.c: *regformats*): ...this.
2906
a12e714b
MF
29072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2908
2909 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2910 (xtensa_fill_gregset): Call collect_register_by_name for
2911 threadptr register.
2912 (xtensa_store_gregset): Call supply_register_by_name for
2913 threadptr register.
2914
1a09b50a
MF
29152017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2916
2917 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2918 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2919 (xtensa_store_gregset): Call supply_register for all registers in
2920 a0_regnum..a0_regnum + C0_NREGS range.
2921
1a01e7c6
SM
29222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2923
2924 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2925 (ax-ipa.o: ax.c): Remove.
2926 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2927 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2928 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2929 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2930 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2931
36bc18a8
SM
29322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2933
2934 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2935 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2936 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2937 (errors-ipa.o: ../common/errors.c): Remove.
2938 (format-ipa.o: ../common/format.c): Remove.
2939 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2940
a8ebe3d5
SM
29412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * Makefile.in (%-ipa.o: %.c): New rule.
2944 (tracepoint-ipa.o: tracepoint.c): Remove.
2945 (utils-ipa.o: utils.c): Remove.
2946 (remote-utils-ipa.o: remote-utils.c): Remove.
2947 (regcache-ipa.o: regcache.c): Remove.
2948 (i386-linux-ipa.o: i386-linux.c): Remove.
2949 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2950 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2951 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2952 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2953 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2954 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2955 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2956 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2957 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2958 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2959 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2960 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2961 (aarch64-ipa.o: aarch64.c): Remove.
2962 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2963 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2964 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2965 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2966 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2967 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2968 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2969 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2970 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2971 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2972 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2973 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2974 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2975 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2976 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2977 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2978 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2979 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2980 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2981 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2982 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2983 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2984 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2985 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2986 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2987 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2988 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2989 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2990 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2991 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2992 (tdesc-ipa.o: tdesc.c): Remove.
2993 (x32-linux-ipa.o: x32-linux.c): Remove.
2994 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2995 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2996
50cfacb7
SM
29972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2998
2999 * Makefile.in (%.o: ../arch/%.c): New rule.
3000 (arm.o: ../arch/arm.c): Remove.
3001 (arm-linux.o: ../arch/arm-linux.c): Remove.
3002 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3003 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3004
c5a22423
SM
30052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3006
3007 * Makefile.in (%.o: ../nat/%.c): New rule.
3008 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3009 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3010 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3011 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3012 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3013 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3014 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3015 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3016 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3017 (linux-personality.o: ../nat/linux-personality.c): Remove.
3018 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3019 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3020 (x86-linux.o: ../nat/x86-linux.c): Remove.
3021 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3022 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3023
6bda016b
SM
30242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3025
3026 * Makefile.in (%.o: ../common/%.c): New rule.
3027 (signals.o: ../common/signals.c): Remove.
3028 (print-utils.o: ../common/print-utils.c): Remove.
3029 (rsp-low.o: ../common/rsp-low.c): Remove.
3030 (common-utils.o: ../common/common-utils.c): Remove.
3031 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3032 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3033 (vec.o: ../common/vec.c): Remove.
3034 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3035 (xml-utils.o: ../common/xml-utils.c): Remove.
3036 (ptid.o: ../common/ptid.c): Remove.
3037 (buffer.o: ../common/buffer.c): Remove.
3038 (format.o: ../common/format.c): Remove.
3039 (filestuff.o: ../common/filestuff.c): Remove.
3040 (agent.o: ../common/agent.c): Remove.
3041 (errors.o: ../common/errors.c): Remove.
3042 (environ.o: ../common/environ.c): Remove.
3043 (common-debug.o: ../common/common-debug.c): Remove.
3044 (cleanups.o: ../common/cleanups.c): Remove.
3045 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3046 (fileio.o: ../common/fileio.c): Remove.
3047 (common-regcache.o: ../common/common-regcache.c): Remove.
3048 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3049 (new-op.o: ../common/new-op.c): Remove.
3050 (btrace-common.o: ../common/btrace-common.c): Remove.
3051
21122961
SM
30522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3053
3054 * Makefile.in (%.o: ../target/%.c): New rule.
3055 (waitstatus.o: ../target/waitstatus.c): Remove.
3056
c362e621
SM
30572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3058
3059 * Makefile.in
3060 (%.c: ../regformats/%.dat,
3061 (%.c: ../regformats/arm/%.dat,
3062 (%.c: ../regformats/i386/%.dat,
3063 (%.c: ../regformats/rs6000/%.dat): New rules.
3064 (aarch64.c): Remove.
3065 (reg-arm.c): Remove.
3066 (arm-with-iwmmxt.c): Remove.
3067 (arm-with-vfpv2.c): Remove.
3068 (arm-with-vfpv3.c): Remove.
3069 (arm-with-neon.c): Remove.
3070 (reg-bfin.c): Remove.
3071 (reg-cris.c): Remove.
3072 (reg-crisv32.c): Remove.
3073 (i386.c): Remove.
3074 (i386-linux.c): Remove.
3075 (i386-avx.c): Remove.
3076 (i386-avx-linux.c): Remove.
3077 (i386-avx-avx512.c): Remove.
3078 (i386-avx-avx512-linux.c): Remove.
3079 (i386-mpx.c): Remove.
3080 (i386-mpx-linux.c): Remove.
3081 (i386-avx-mpx-avx512-pku.c): Remove.
3082 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3083 (i386-avx-mpx.c): Remove.
3084 (i386-avx-mpx-linux.c): Remove.
3085 (i386-mmx.c): Remove.
3086 (i386-mmx-linux.c): Remove.
3087 (reg-ia64.c): Remove.
3088 (reg-m32r.c): Remove.
3089 (reg-m68k.c): Remove.
3090 (reg-cf.c): Remove.
3091 (mips-linux.c): Remove.
3092 (mips-dsp-linux.c): Remove.
3093 (mips64-linux.c): Remove.
3094 (mips64-dsp-linux.c): Remove.
3095 (nios2-linux.c): Remove.
3096 (powerpc-32.c): Remove.
3097 (powerpc-32l.c): Remove.
3098 (powerpc-altivec32l.c): Remove.
3099 (powerpc-cell32l.c): Remove.
3100 (powerpc-vsx32l.c): Remove.
3101 (powerpc-isa205-32l.c): Remove.
3102 (powerpc-isa205-altivec32l.c): Remove.
3103 (powerpc-isa205-vsx32l.c): Remove.
3104 (powerpc-e500l.c): Remove.
3105 (powerpc-64l.c): Remove.
3106 (powerpc-altivec64l.c): Remove.
3107 (powerpc-cell64l.c): Remove.
3108 (powerpc-vsx64l.c): Remove.
3109 (powerpc-isa205-64l.c): Remove.
3110 (powerpc-isa205-altivec64l.c): Remove.
3111 (powerpc-isa205-vsx64l.c): Remove.
3112 (s390-linux32.c): Remove.
3113 (s390-linux32v1.c): Remove.
3114 (s390-linux32v2.c): Remove.
3115 (s390-linux64.c): Remove.
3116 (s390-linux64v1.c): Remove.
3117 (s390-linux64v2.c): Remove.
3118 (s390-te-linux64.c): Remove.
3119 (s390-vx-linux64.c): Remove.
3120 (s390-tevx-linux64.c): Remove.
3121 (s390x-linux64.c): Remove.
3122 (s390x-linux64v1.c): Remove.
3123 (s390x-linux64v2.c): Remove.
3124 (s390x-te-linux64.c): Remove.
3125 (s390x-vx-linux64.c): Remove.
3126 (s390x-tevx-linux64.c): Remove.
3127 (tic6x-c64xp-linux.c): Remove.
3128 (tic6x-c64x-linux.c): Remove.
3129 (tic6x-c62x-linux.c): Remove.
3130 (reg-sh.c): Remove.
3131 (reg-sparc64.c): Remove.
3132 (reg-spu.c): Remove.
3133 (amd64.c): Remove.
3134 (amd64-linux.c): Remove.
3135 (amd64-avx.c): Remove.
3136 (amd64-avx-linux.c): Remove.
3137 (amd64-avx-avx512.c): Remove.
3138 (amd64-avx-avx512-linux.c): Remove.
3139 (amd64-mpx.c): Remove.
3140 (amd64-mpx-linux.c): Remove.
3141 (amd64-avx-mpx-avx512-pku.c): Remove.
3142 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3143 (amd64-avx-mpx.c): Remove.
3144 (amd64-avx-mpx-linux.c): Remove.
3145 (x32.c): Remove.
3146 (x32-linux.c): Remove.
3147 (x32-avx.c): Remove.
3148 (x32-avx-linux.c): Remove.
3149 (x32-avx-avx512.c): Remove.
3150 (x32-avx-avx512-linux.c): Remove.
3151 (reg-xtensa.c): Remove.
3152 (reg-tilegx.c): Remove.
3153 (reg-tilegx32.c): Remove.
3154
1672e0d9
SDJ
31552017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3156
3157 * Makefile.in (SFILES): Add "common/environ.c".
3158 (OBJS): Add "common/environ.h".
3159
239b6d10
WT
31602017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3161
3162 * configure.ac: Check if the fs_base and gs_base members of
3163 `struct user_regs_struct' exist.
3164 * config.in: Regenerated.
3165 * configure: Likewise.
3166
694b382c
AT
31672017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3168
3169 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3170 target_read_memory.
3171 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3172 (get_next_pcs_syscall_next_pc): Likewise.
3173
7dc53023
LM
31742016-12-23 Luis Machado <lgustavo@codesourcery.com>
3175
3176 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3177 * nto-x86-low.c: Likewise.
3178
ad02e4fe
SM
31792016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3180
3181 * Makefile.in: Include disable-implicit-rules.mk.
3182
dcb07cfa
PA
31832016-11-23 Pedro Alves <palves@redhat.com>
3184
3185 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3186 (debug_vprintf): Use std::chrono::steady_clock instead of
3187 gettimeofday. Use '.' instead of ':'.
3188 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3189 (get_timestamp): Use std::chrono::steady_clock instead of
3190 gettimeofday.
3191
8629c02c
SM
31922016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3193
3194 * Makefile.in: Fix whitespace formatting.
3195
b593ecca
SM
31962016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3197
3198 * Makefile.in (SFILES, OBS): Flatten list and order
3199 alphabetically.
3200
9986ba08
PA
32012016-11-23 Pedro Alves <palves@redhat.com>
3202
3203 * event-loop.c (handle_file_event): Use warning.
3204 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3205 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3206 Use warning.
3207
4eefa7bc
PA
32082016-11-23 Pedro Alves <palves@redhat.com>
3209
3210 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3211 output.
3212 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3213 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3214 debug_printf and debug_flush for debug output.
3215 * server.c (handle_general_set): Likewise.
3216 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3217 output.
3218
5443506e
SM
32192016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3220
3221 * Makefile.in (.c.o): Replace rule with ...
3222 (%.o: %.c): ... this one.
3223
3b165252
SM
32242016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3225
3226 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3227 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3228 make.
3229 * configure.ac: Remove checks for the make program.
3230 * configure: Re-generate.
3231
0bcda685
PA
32322016-10-28 Pedro Alves <palves@redhat.com>
3233
3234 * Makefile.in (CXX_DIALECT): Get from configure.
3235 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3236 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3237 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3238 * config.in: Regenerate.
3239 * configure: Regenerate.
3240
c3805894
YQ
32412016-10-27 Yao Qi <yao.qi@linaro.org>
3242
3243 * linux-low.c (linux_supports_range_stepping): Return true if
3244 can_software_single_step return true.
3245
89342618
YQ
32462016-10-27 Yao Qi <yao.qi@linaro.org>
3247
3248 * inferiors.c (find_inferior_in_random): New function.
3249 * inferiors.h (find_inferior_in_random): Declare.
3250 * linux-low.c (linux_wait_for_event_filtered): Call
3251 find_inferior_in_random instead of find_inferior.
3252
e3652c84
YQ
32532016-10-27 Yao Qi <yao.qi@linaro.org>
3254
3255 * linux-low.c (linux_wait_1): If single-step breakpoints are
3256 inserted, remove them.
3257
5a04c4cf
PA
32582016-10-26 Pedro Alves <palves@redhat.com>
3259
3260 * linux-low.c (handle_extended_wait): Link parent/child fork
3261 threads.
3262 (linux_wait_1): Unlink them.
3263 (linux_set_resume_request): Ignore resume requests for
3264 already-resumed and unhandled fork child threads.
3265 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3266 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3267 New functions.
3268 (handle_v_requests) <vCont>: Don't call require_running.
3269 * server.h (in_queued_stop_replies): New declaration.
3270
cb93dc7f
YQ
32712016-10-24 Yao Qi <yao.qi@linaro.org>
3272
3273 PR server/20733
3274 * linux-aarch64-low.c (append_insns): Cast the return value to
3275 'uint32_t *'.
3276
a1078bea
YQ
32772016-10-10 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3280
1fb77080
SDJ
32812016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3282
3283 * target.c (target_supports_multi_process): New function, moved
3284 from...
3285 * target.h (target_supports_multi_process): ... here. Remove
3286 macro.
3287
39b5a3b9
TT
32882016-10-05 Tom Tromey <tom@tromey.com>
3289
3290 PR remote/20655:
3291 * tracepoint.c (handle_tracepoint_bkpts): Check
3292 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3293
c1d0b70a
YQ
32942016-10-05 Yao Qi <yao.qi@linaro.org>
3295
3296 * configure.srv: Update the path of arm-*.xml files.
3297
0a69eedb
YQ
32982016-10-05 Terry Guo <terry.guo@arm.com>
3299 Yao Qi <yao.qi@linaro.org>
3300
3301 * Makefile.in: Adjust the path of rules.
3302 * configure.srv: Update the path of xml files.
3303 * regformats/arm-with-iwmmxt.dat: Regenerated.
3304 * regformats/arm-with-neon.dat: Likewise.
3305 * regformats/arm-with-vfpv2.dat: Likewise.
3306 * regformats/arm-with-vfpv3.dat Likewise.
3307
17e16485
YQ
33082016-09-30 Yao Qi <yao.qi@linaro.org>
3309
3310 PR gdbserver/20627
3311 * target.c (target_stop_and_wait): Don't call
3312 target_continue_no_signal, use resume_stop instead.
3313
edeeb602
YQ
33142016-09-26 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-low.c (linux_wait_1): Call debug_exit.
3317
503b1c39
PA
33182016-09-23 Pedro Alves <palves@redhat.com>
3319
3320 * Makefile.in (SFILES): Add common/new-op.c.
3321 (OBS): Add common/new-op.o.
3322 (new-op.o): New rule.
3323
74172ecf
SM
33242016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3325
3326 * .gitinore: Ignore more files.
3327
fc6cda2e
YQ
33282016-09-21 Yao Qi <yao.qi@linaro.org>
3329
3330 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3331 23.
3332
bc1e6c81
SDJ
33332016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3334
3335 * server.c (start_inferior): Call target_mourn_inferior instead of
3336 mourn_inferior; pass ptid_t argument to it.
3337 (resume): Likewise.
3338 (handle_target_event): Likewise.
3339 * target.c (target_mourn_inferior): New function.
3340 * target.h (mourn_inferior): Delete macro.
3341
0e00e962
AA
33422016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3343
3344 * linux-low.c (lwp_is_stepping): New function.
3345
1d8cb77d
CL
33462016-09-06 Carl Love <cel@us.ibm.com>
3347
3348 * server.c (start_inferior): Fixed comment, requested comment change
3349 didn't get updated correctly. Removed reference to ptrace () call as
3350 it is only true on Linux systems.
3351
7313bced
CL
33522016-09-06 Carl Love <cel@us.ibm.com>
3353
3354 * server.c (start_inferior): Do not call
3355 function target_post_create_inferior () if the
3356 inferior process has already exited.
3357
cf6de44d
PA
33582016-09-05 Pedro Alves <palves@redhat.com>
3359
3360 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3361 (COMPILE.pre, CC_LD): Use CXX directly.
3362 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3363 * acinclude.m4: Don't include build-with-cxx.m4.
3364 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3365 * configure: Regenerate.
3366
c1da6748
AT
33672016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3368
3369 PR gdb/19495
3370 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3371 call writing data to own_buf.
3372
f2b9e3df
SDJ
33732016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3374
3375 * target.c (mywait): Call target_wait instead of
3376 the_target->wait.
3377 (target_wait): New function.
3378
049a8570
SDJ
33792016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3380
3381 * server.c (start_inferior): New variable 'ptid'. Replace calls
3382 to the_target->resume by target_continue{,_no_signal}, depending
3383 on the case.
3384 * target.c (target_stop_and_wait): Call target_continue_no_signal
3385 instead of the_target->resume.
3386 (target_continue): New function.
3387
3aa5cfa0
AT
33882016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3389
3390 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3391
754653a7
AZ
33922016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3393
3394 PR server/20491
3395 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3396 ps_prochandle.
3397 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3398 * linux-arm-low.c (ps_get_thread_area): Likewise.
3399 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3400 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3401 * linux-mips-low.c (ps_get_thread_area): Likewise.
3402 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3403 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3404 * linux-x86-low.c (ps_get_thread_area): Likewise.
3405 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3406
ed036b40
PA
34072016-08-19 Pedro Alves <palves@redhat.com>
3408
3409 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3410
c8ef42ee
PA
34112016-08-19 Pedro Alves <palves@redhat.com>
3412
3413 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3414 comment. Use memcpy instead of casting through unsigned long.
3415
9c235a72
PA
34162016-08-19 Pedro Alves <palves@redhat.com>
3417
3418 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3419 allocating around 0x80000000.
3420
201506da
PA
34212016-08-19 Pedro Alves <palves@redhat.com>
3422
3423 PR gdb/20415
3424 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3425 (x32-avx512-linux-ipa.o): New rules.
3426 * configure.ac (x86_64-*-linux*): New x32 check.
3427 * configure.srv (ipa_x32_linux_regobj): New.
3428 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3429 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3430 descriptions.
3431 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3432 descriptions.
3433 * configure: Regenerate.
3434
f348d89a
PA
34352016-08-09 Pedro Alves <palves@redhat.com>
3436
3437 PR gdb/18653
3438 * Makefile.in (OBS): Add signals-state-save-restore.o.
3439 (signals-state-save-restore.o): New rule.
3440 * config.in: Regenerate.
3441 * configure: Regenerate.
3442 * linux-low.c: Include "signals-state-save-restore.h".
3443 (linux_create_inferior): Call
3444 restore_original_signals_state.
3445 * server.c: Include "dispositions-save-restore.h".
3446 (captured_main): Call save_original_signals_state.
3447
1baf5149
PA
34482016-08-05 Pedro Alves <palves@redhat.com>
3449
3450 * configure: Regenerate.
3451
fcd4a73d
YQ
34522016-08-04 Yao Qi <yao.qi@linaro.org>
3453
3454 * linux-low.c (regsets_fetch_inferior_registers): Check
3455 errno is ESRCH or not.
3456
979659d0
YQ
34572016-08-02 Yao Qi <yao.qi@linaro.org>
3458
3459 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3460 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3461 (thread_db_load_search): Update.
3462 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3463 td_ta_set_event and td_ta_event_getmsg.
3464
6598661d
PA
34652016-07-26 Pedro Alves <palves@redhat.com>
3466
3467 PR server/20414
3468 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3469 of unsigned long for 64-bit registers and use uint32_t instead of
3470 unsigned int for 32-bit registers.
3471
9cf12d57
PA
34722016-07-26 Pedro Alves <palves@redhat.com>
3473
3474 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3475 to 'ptrace'.
3476
305450ed
TT
34772016-07-21 Tom Tromey <tom@tromey.com>
3478
3479 * configure: Rebuild.
3480
2583da7c
YQ
34812016-07-21 Yao Qi <yao.qi@linaro.org>
3482
3483 * mem-break.c (find_gdb_breakpoint): Cast bp to
3484 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3485
21536b36
YQ
34862016-07-21 Yao Qi <yao.qi@linaro.org>
3487
3488 * server.c (handle_v_requests): Support s and S actions
3489 if target_supports_software_single_step return true.
3490
8901d193
YQ
34912016-07-21 Yao Qi <yao.qi@linaro.org>
3492
3493 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3494 is resume_step, call maybe_hw_step.
3495 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3496 and unstop them.
3497 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3498 breakpoints or not.
3499 (proceed_one_lwp): If resume request is resume_step, install
3500 reinsert breakpoints and call maybe_hw_step.
3501
0e9a339e
YQ
35022016-07-21 Yao Qi <yao.qi@linaro.org>
3503
3504 * linux-low.c (proceed_one_lwp): Declare.
3505 (linux_resume_one_thread): Remove local variable 'step'.
3506 Lift code enqueue signal. Call proceed_one_lwp instead of
3507 linux_resume_one_lwp.
3508
4281b351
YQ
35092016-07-21 Yao Qi <yao.qi@linaro.org>
3510
3511 * linux-low.c (linux_resume_one_thread): Call
3512 enqueue_pending_signal.
3513
984a2c04
YQ
35142016-07-21 Yao Qi <yao.qi@linaro.org>
3515
3516 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3517 * inferiors.c (do_restore_current_thread_cleanup): New function.
3518 (make_cleanup_restore_current_thread): Likewise.
3519 * linux-low.c (install_software_single_step_breakpoints): Call
3520 make_cleanup_restore_current_thread. Switch current_thread to
3521 thread.
3522
bec903c9
YQ
35232016-07-21 Yao Qi <yao.qi@linaro.org>
3524
3525 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3526 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3527 (clone_one_breakpoint): Likewise.
3528 (delete_reinsert_breakpoints): Change parameter to thread.
3529 Callers updated.
3530 (has_reinsert_breakpoints): Likewise.
3531 (uninsert_reinsert_breakpoints): Likewise.
3532 (reinsert_reinsert_breakpoints): Likewise.
3533 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3534 (delete_reinsert_breakpoints): Likewise.
3535 (reinsert_reinsert_breakpoints): Likewise.
3536 (uninsert_reinsert_breakpoints): Likewise.
3537 (has_reinsert_breakpoints): Likewise.
3538
63c40ec7
YQ
35392016-07-21 Yao Qi <yao.qi@linaro.org>
3540
3541 * inferiors.c (get_thread_process): Make parameter const.
3542 * inferiors.h (get_thread_process): Update declaration.
3543 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3544 Add new parameters child_thread and parent_thread. Callers
3545 updated.
3546 * mem-break.h (clone_all_breakpoints): Update declaration.
3547
9aa76cd0
YQ
35482016-07-21 Yao Qi <yao.qi@linaro.org>
3549
3550 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3551 <command_list, handler>: Remove.
3552 (struct gdb_breakpoint): New.
3553 (struct other_breakpoint): New.
3554 (struct reinsert_breakpoint): New.
3555 (is_gdb_breakpoint): New function.
3556 (any_persistent_commands): Update command_list if
3557 is_gdb_breakpoint returns true.
3558 (set_breakpoint): Create breakpoints according to their types.
3559 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3560 (set_gdb_breakpoint_1): Likewise.
3561 (set_gdb_breakpoint): Likewise.
3562 (clear_breakpoint_conditions): Change parameter type to
3563 'struct gdb_breakpoint *'.
3564 (clear_breakpoint_commands): Likewise.
3565 (clear_breakpoint_conditions_and_commands): Likewise.
3566 (add_condition_to_breakpoint): Likewise.
3567 (add_breakpoint_condition): Likewise.
3568 (add_commands_to_breakpoint): Likewise.
3569 (check_breakpoints): Check other_breakpoint.
3570 (clone_one_breakpoint): Clone breakpopint according to its type.
3571 * mem-break.h (struct gdb_breakpoint): Declare.
3572 (set_gdb_breakpoint): Update declaration.
3573 (clear_breakpoint_conditions_and_commands): Likewise.
3574 (add_breakpoint_condition): Likewise.
3575 (add_breakpoint_commands): Likewise.
3576 * server.c (process_point_options): Change parameter type to
3577 'struct gdb_breakpoint *'.
3578
811f8301
YQ
35792016-07-21 Yao Qi <yao.qi@linaro.org>
3580
3581 * mem-break.c (set_breakpoint_at): Rename it to ...
3582 (set_breakpoint_type_at): ... it.
3583 (set_breakpoint_at): Call set_breakpoint_type_at.
3584 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3585 * mem-break.h (set_breakpoint_at): Update comments.
3586
b1c51e36
CLT
35872016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3588
3589 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3590 to buf parameter.
3591 (nios2_store_gregset): Likewise.
3592
ced2dffb
PA
35932016-07-01 Pedro Alves <palves@redhat.com>
3594 Antoine Tremblay <antoine.tremblay@ericsson.com>
3595
3596 * linux-low.c: Change interface to take the target lwp_info
3597 pointer directly and return void. Handle detaching from a zombie
3598 thread.
3599 (linux_detach_lwp_callback): New function.
3600 (linux_detach): Detach from the leader thread after detaching from
3601 the clone threads.
3602
2ac09a5b
YQ
36032016-06-28 Yao Qi <yao.qi@linaro.org>
3604
3605 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3606 for variable new_offset.
3607 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3608 (aarch64_ftrace_insn_reloc_cb): Likewise.
3609 (aarch64_ftrace_insn_reloc_tb): Likewise.
3610 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3611 PRIx64 instead of PRIx32.
3612
79e7fd4f
YQ
36132016-06-28 Yao Qi <yao.qi@linaro.org>
3614
3615 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3616 (the_low_target): Install arm_get_syscall_trapinfo.
3617
061fc021
YQ
36182016-06-28 Yao Qi <yao.qi@linaro.org>
3619
3620 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3621 function.
3622 (the_low_target): Install aarch64_get_syscall_trapinfo.
3623
4cc32bec
YQ
36242016-06-28 Yao Qi <yao.qi@linaro.org>
3625
3626 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3627 Callers updated.
3628 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3629 Remove parameter sysno.
3630 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3631 sysret.
3632
782c1122
AA
36332016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3634
3635 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3636 (s390_emit_ne_goto): Likewise.
3637 (s390_emit_lt_goto): Likewise.
3638 (s390_emit_le_goto): Likewise.
3639 (s390_emit_gt_goto): Likewise.
3640 (s390_emit_ge_goto): Likewise.
3641 (s390x_emit_eq_goto): Likewise.
3642 (s390x_emit_ne_goto): Likewise.
3643 (s390x_emit_lt_goto): Likewise.
3644 (s390x_emit_le_goto): Likewise.
3645 (s390x_emit_gt_goto): Likewise.
3646 (s390x_emit_ge_goto): Likewise.
3647 (s390_emit_ops_impl): Mark variable static.
3648 (s390x_emit_ops): Likewise.
3649
2e7b624b
YQ
36502016-06-17 Yao Qi <yao.qi@linaro.org>
3651
3652 * linux-low.c (handle_extended_wait): Call
3653 uninsert_reinsert_breakpoints for the parent process. Remove
3654 reinsert breakpoints from the child process. Reinsert them to
3655 the parent process when vfork is done.
3656 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3657 (reinsert_reinsert_breakpoints): New function.
3658 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3659 (reinsert_reinsert_breakpoints): Declare.
3660
8a81c5d7
YQ
36612016-06-17 Yao Qi <yao.qi@linaro.org>
3662
3663 * linux-low.c (handle_extended_wait): If the parent is doing
3664 step-over, remove the reinsert breakpoints from the forked child.
3665
f50bf8e5
YQ
36662016-06-17 Yao Qi <yao.qi@linaro.org>
3667
3668 * linux-low.c (unsuspend_all_lwps): Declare.
3669 (linux_low_filter_event): If thread exited, call finish_step_over.
3670 If step-over is finished, unsuspend other threads.
3671
8376a3cb
YQ
36722016-06-17 Yao Qi <yao.qi@linaro.org>
3673
3674 * linux-low.c (linux_resume_one_lwp_throw): Assert
3675 has_reinsert_breakpoints returns false.
3676 * mem-break.c (delete_disabled_breakpoints): Assert
3677 bp type isn't reinsert_breakpoint.
3678
f79b145d
YQ
36792016-06-17 Yao Qi <yao.qi@linaro.org>
3680
3681 * linux-low.c (maybe_hw_step): New function.
3682 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3683 (finish_step_over): Switch current_thread to lwp temporarily,
3684 and assert has_reinsert_breakpoints returns true.
3685 (proceed_one_lwp): Call maybe_hw_step.
3686 * mem-break.c (has_reinsert_breakpoints): New function.
3687 * mem-break.h (has_reinsert_breakpoints): Declare.
3688
0ae534d2
JT
36892016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3690
3691 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3692
fcdad592
YQ
36932016-05-17 Yao Qi <yao.qi@linaro.org>
3694
3695 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3696 instead of find_inferior.
3697
9e784964
YQ
36982016-05-05 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3701 Initialize res to zero.
3702
cf2ebb6e
YQ
37032016-05-05 Yao Qi <yao.qi@linaro.org>
3704
3705 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3706 to uint32_t.
3707
c1aebf87
UW
37082016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3709
3710 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3711 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3712 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3713
35fd2deb 37142016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3715 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3716
3717 * tracepoint.c (write_inferior_int8): New function.
3718 (cmd_qtenable_disable): Write enable flag using
3719 write_inferior_int8.
3720
484b3c32
YQ
37212016-04-25 Yao Qi <yao.qi@linaro.org>
3722
3723 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3724 (need_step_over_p): Return zero if the LWP has pending signals
3725 can be delivered on software single step target.
3726
85ba7d86
YQ
37272016-04-25 Yao Qi <yao.qi@linaro.org>
3728
3729 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3730 return instead of error.
3731
3539aa13
YQ
37322016-04-22 Yao Qi <yao.qi@linaro.org>
3733
3734 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3735 to 23.
3736
5b061e98
YQ
37372016-04-22 Yao Qi <yao.qi@linaro.org>
3738
3739 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3740 signal when stepping over breakpoint with software single
3741 step.
3742
3451269c
PA
37432016-04-21 Pedro Alves <palves@redhat.com>
3744
3745 * linux-s390-low.c (s390_collect_ptrace_register)
3746 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3747 add casts.
3748 (s390_check_regset): Use void * instead of gdb_byte *.
3749
a2358508
PA
37502016-04-20 Pedro Alves <palves@redhat.com>
3751
3752 * configure: Renegerate.
3753
6885166d
YQ
37542016-04-20 Yao Qi <yao.qi@linaro.org>
3755
3756 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3757 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3758 number 16.
3759 (arm_store_gregset): Likewise.
3760
2b863f51
WT
37612016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3762
3763 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3764 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3765 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3766 (amd64-avx-mpx-linux.c): New rules.
3767 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3768 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3769 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3770 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3771 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3772 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3773 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3774 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3775 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3776 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3777 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3778 * linux-x86-low.c (x86_linux_read_description): Add case for
3779 X86_XSTATE_AVX_MPX_MASK.
3780 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3781 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3782 init_registers_i386_avx_mpx_linux.
3783 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3784 (initialize_low_tracepoint): Call
3785 init_registers_i386_avx_mpx_linux.
3786 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3787 (initialize_low_tracepoint): Call
3788 init_registers_amd64_avx_mpx_linux.
3789 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3790 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3791 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3792 declarations.
3793
9b30624b
PA
37942016-04-18 Pedro Alves <palves@redhat.com>
3795
3796 * configure: Regenerate.
3797
45e3745e
AT
37982016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3799
3800 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3801 (aarch64_emit_sub): Likewise.
3802
2afc13ff
PA
38032016-04-12 Pedro Alves <palves@redhat.com>
3804
3805 * utils.c (prepare_to_throw_exception): Delete.
3806
6e774b13
SM
38072016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3808
3809 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3810
4dca19f8
MK
38112016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3812
3813 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3814
d0a9981f
MK
38152016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3816
3817 * linux-aarch64-ipa.c: Add <elf.h> include.
3818 * linux-ppc-ipa.c: Add <elf.h> include.
3819 * linux-s390-ipa.c: Add <elf.h> include.
3820
252db07e
MK
38212016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3822
3823 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3824 (get_raw_reg_ptr): Likewise.
3825 (get_trace_state_variable_value_ptr): Likewise.
3826 (set_trace_state_variable_value_ptr): Likewise.
3827 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3828 char *.
3829
14e2b6d9
MK
38302016-03-31 Wei-cheng Wang <cole945@gmail.com>
3831 Marcin Kościelnicki <koriakin@0x04.net>
3832
3833 PR/17221
3834 * linux-ppc-low.c (emit_insns): New function.
3835 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3836 (ppc_emit_prologue): New function.
3837 (ppc_emit_epilogue): New function.
3838 (ppc_emit_add): New function.
3839 (ppc_emit_sub): New function.
3840 (ppc_emit_mul): New function.
3841 (ppc_emit_lsh): New function.
3842 (ppc_emit_rsh_signed): New function.
3843 (ppc_emit_rsh_unsigned): New function.
3844 (ppc_emit_ext): New function.
3845 (ppc_emit_zero_ext): New function.
3846 (ppc_emit_log_not): New function.
3847 (ppc_emit_bit_and): New function.
3848 (ppc_emit_bit_or): New function.
3849 (ppc_emit_bit_xor): New function.
3850 (ppc_emit_bit_not): New function.
3851 (ppc_emit_equal): New function.
3852 (ppc_emit_less_signed): New function.
3853 (ppc_emit_less_unsigned): New function.
3854 (ppc_emit_ref): New function.
3855 (ppc_emit_const): New function.
3856 (ppc_emit_reg): New function.
3857 (ppc_emit_pop): New function.
3858 (ppc_emit_stack_flush): New function.
3859 (ppc_emit_swap): New function.
3860 (ppc_emit_stack_adjust): New function.
3861 (ppc_emit_call): New function.
3862 (ppc_emit_int_call_1): New function.
3863 (ppc_emit_void_call_2): New function.
3864 (ppc_emit_if_goto): New function.
3865 (ppc_emit_goto): New function.
3866 (ppc_emit_eq_goto): New function.
3867 (ppc_emit_ne_goto): New function.
3868 (ppc_emit_lt_goto): New function.
3869 (ppc_emit_le_goto): New function.
3870 (ppc_emit_gt_goto): New function.
3871 (ppc_emit_ge_goto): New function.
3872 (ppc_write_goto_address): New function.
3873 (ppc_emit_ops_impl): New static variable.
3874 (ppc64v1_emit_prologue): New function.
3875 (ppc64v2_emit_prologue): New function.
3876 (ppc64_emit_epilogue): New function.
3877 (ppc64_emit_add): New function.
3878 (ppc64_emit_sub): New function.
3879 (ppc64_emit_mul): New function.
3880 (ppc64_emit_lsh): New function.
3881 (ppc64_emit_rsh_signed): New function.
3882 (ppc64_emit_rsh_unsigned): New function.
3883 (ppc64_emit_ext): New function.
3884 (ppc64_emit_zero_ext): New function.
3885 (ppc64_emit_log_not): New function.
3886 (ppc64_emit_bit_and): New function.
3887 (ppc64_emit_bit_or): New function.
3888 (ppc64_emit_bit_xor): New function.
3889 (ppc64_emit_bit_not): New function.
3890 (ppc64_emit_equal): New function.
3891 (ppc64_emit_less_signed): New function.
3892 (ppc64_emit_less_unsigned): New function.
3893 (ppc64_emit_ref): New function.
3894 (ppc64_emit_const): New function.
3895 (ppc64v1_emit_reg): New function.
3896 (ppc64v2_emit_reg): New function.
3897 (ppc64_emit_pop): New function.
3898 (ppc64_emit_stack_flush): New function.
3899 (ppc64_emit_swap): New function.
3900 (ppc64v1_emit_call): New function.
3901 (ppc64v2_emit_call): New function.
3902 (ppc64v1_emit_int_call_1): New function.
3903 (ppc64v2_emit_int_call_1): New function.
3904 (ppc64v1_emit_void_call_2): New function.
3905 (ppc64v2_emit_void_call_2): New function.
3906 (ppc64_emit_if_goto): New function.
3907 (ppc64_emit_eq_goto): New function.
3908 (ppc64_emit_ne_goto): New function.
3909 (ppc64_emit_lt_goto): New function.
3910 (ppc64_emit_le_goto): New function.
3911 (ppc64_emit_gt_goto): New function.
3912 (ppc64_emit_ge_goto): New function.
3913 (ppc64v1_emit_ops_impl): New static variable.
3914 (ppc64v2_emit_ops_impl): New static variable.
3915 (ppc_emit_ops): New function.
3916 (linux_low_target): Wire in ppc_emit_ops.
3917
a2174ba4
MK
39182016-03-31 Wei-cheng Wang <cole945@gmail.com>
3919 Marcin Kościelnicki <koriakin@0x04.net>
3920
3921 PR/17221
3922 * Makefile.in: Add powerpc-*-ipa.o
3923 * configure.srv: Add ipa_obj for powerpc*-linux.
3924 * linux-ppc-ipa.c: New file.
3925 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3926 includes.
3927 (PPC_FIELD): New macro.
3928 (PPC_SEXT): New macro.
3929 (PPC_OP6): New macro.
3930 (PPC_BO): New macro.
3931 (PPC_LI): New macro.
3932 (PPC_BD): New macro.
3933 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3934 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3935 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3936 (ppc_get_thread_area): New function.
3937 (is_elfv2_inferior): New function.
3938 (gen_ds_form): New function.
3939 (GEN_STD): New macro.
3940 (GEN_STDU): New macro.
3941 (GEN_LD): New macro.
3942 (GEN_LDU): New macro.
3943 (gen_d_form): New function.
3944 (GEN_ADDI): New macro.
3945 (GEN_ADDIS): New macro.
3946 (GEN_LI): New macro.
3947 (GEN_LIS): New macro.
3948 (GEN_ORI): New macro.
3949 (GEN_ORIS): New macro.
3950 (GEN_LWZ): New macro.
3951 (GEN_STW): New macro.
3952 (GEN_STWU): New macro.
3953 (gen_xfx_form): New function.
3954 (GEN_MFSPR): New macro.
3955 (GEN_MTSPR): New macro.
3956 (GEN_MFCR): New macro.
3957 (GEN_MTCR): New macro.
3958 (GEN_SYNC): New macro.
3959 (GEN_LWSYNC): New macro.
3960 (gen_x_form): New function.
3961 (GEN_OR): New macro.
3962 (GEN_MR): New macro.
3963 (GEN_LWARX): New macro.
3964 (GEN_STWCX): New macro.
3965 (GEN_CMPW): New macro.
3966 (gen_md_form): New function.
3967 (GEN_RLDICL): New macro.
3968 (GEN_RLDICR): New macro.
3969 (gen_i_form): New function.
3970 (GEN_B): New macro.
3971 (GEN_BL): New macro.
3972 (gen_b_form): New function.
3973 (GEN_BNE): New macro.
3974 (GEN_LOAD): New macro.
3975 (GEN_STORE): New macro.
3976 (gen_limm): New function.
3977 (gen_atomic_xchg): New function.
3978 (gen_call): New function.
3979 (ppc_relocate_instruction): New function.
3980 (ppc_install_fast_tracepoint_jump_pad): New function.
3981 (ppc_get_min_fast_tracepoint_insn_len): New function.
3982 (ppc_get_ipa_tdesc_idx): New function.
3983 (the_low_target): Wire in the new functions.
3984 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3985 tdescs.
3986 * linux-ppc-tdesc.h: New file.
3987
a13c4696
MK
39882016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3989
3990 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3991 (alloc_jump_pad_buffer): New function.
3992 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3993 (alloc_jump_pad_buffer): New function.
3994 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3995 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3996 (alloc_jump_pad_buffer): New function.
3997 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3998 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3999 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4000 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4001
1cda1512
MK
40022016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4003
4004 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4005 * linux-amd64-ipa.c: Likewise.
4006 * linux-i386-ipa.c: Likewise.
4007 * linux-s390-ipa.c: Likewise.
4008 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4009 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4010 set_trace_state_variable_value_ptr.
4011 (struct ipa_sym_addresses): Likewise.
4012 (symbol_list): Likewise.
4013 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4014 accessing gdb_collect directly.
4015 (gdb_collect_ptr_type): New typedef.
4016 (get_raw_reg_ptr_type): New typedef.
4017 (get_trace_state_variable_value_ptr_type): New typedef.
4018 (set_trace_state_variable_value_ptr_type): New typedef.
4019 (gdb_collect_ptr): New global.
4020 (get_raw_reg_ptr): New global.
4021 (get_trace_state_variable_value_ptr): New global.
4022 (set_trace_state_variable_value_ptr): New global.
4023 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4024 accessing get_raw_reg directly.
4025 (get_get_tsv_func_addr): Likewise for
4026 get_trace_state_variable_value_ptr.
4027 (get_set_tsv_func_addr): Likewise for
4028 set_trace_state_variable_value_ptr.
4029 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4030
72fb5488
SM
40312016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4032
4033 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4034
28170b88
MK
40352016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4036
4037 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4038 packets.
4039 (relocate_instruction): Remove own_buf.
4040 * server.c (own_buf): Make global.
4041 (handle_v_requests): Make global.
4042 * server.h (own_buf): New declaration.
4043 (handle_v_requests): New prototype.
4044
f39e8743
MK
40452016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4046
4047 PR 18377
4048 * linux-s390-low.c (add_insns): New function.
4049 (s390_emit_prologue): New function.
4050 (s390_emit_epilogue): New function.
4051 (s390_emit_add): New function.
4052 (s390_emit_sub): New function.
4053 (s390_emit_mul): New function.
4054 (s390_emit_lsh): New function.
4055 (s390_emit_rsh_signed): New function.
4056 (s390_emit_rsh_unsigned): New function.
4057 (s390_emit_ext): New function.
4058 (s390_emit_log_not): New function.
4059 (s390_emit_bit_and): New function.
4060 (s390_emit_bit_or): New function.
4061 (s390_emit_bit_xor): New function.
4062 (s390_emit_bit_not): New function.
4063 (s390_emit_equal): New function.
4064 (s390_emit_less_signed): New function.
4065 (s390_emit_less_unsigned): New function.
4066 (s390_emit_ref): New function.
4067 (s390_emit_if_goto): New function.
4068 (s390_emit_goto): New function.
4069 (s390_write_goto_address): New function.
4070 (s390_emit_litpool): New function.
4071 (s390_emit_const): New function.
4072 (s390_emit_call): New function.
4073 (s390_emit_reg): New function.
4074 (s390_emit_pop): New function.
4075 (s390_emit_stack_flush): New function.
4076 (s390_emit_zero_ext): New function.
4077 (s390_emit_swap): New function.
4078 (s390_emit_stack_adjust): New function.
4079 (s390_emit_set_r2): New function.
4080 (s390_emit_int_call_1): New function.
4081 (s390_emit_void_call_2): New function.
4082 (s390_emit_eq_goto): New function.
4083 (s390_emit_ne_goto): New function.
4084 (s390_emit_lt_goto): New function.
4085 (s390_emit_le_goto): New function.
4086 (s390_emit_gt_goto): New function.
4087 (s390_emit_ge_goto): New function.
4088 (s390x_emit_prologue): New function.
4089 (s390x_emit_epilogue): New function.
4090 (s390x_emit_add): New function.
4091 (s390x_emit_sub): New function.
4092 (s390x_emit_mul): New function.
4093 (s390x_emit_lsh): New function.
4094 (s390x_emit_rsh_signed): New function.
4095 (s390x_emit_rsh_unsigned): New function.
4096 (s390x_emit_ext): New function.
4097 (s390x_emit_log_not): New function.
4098 (s390x_emit_bit_and): New function.
4099 (s390x_emit_bit_or): New function.
4100 (s390x_emit_bit_xor): New function.
4101 (s390x_emit_bit_not): New function.
4102 (s390x_emit_equal): New function.
4103 (s390x_emit_less_signed): New function.
4104 (s390x_emit_less_unsigned): New function.
4105 (s390x_emit_ref): New function.
4106 (s390x_emit_if_goto): New function.
4107 (s390x_emit_const): New function.
4108 (s390x_emit_call): New function.
4109 (s390x_emit_reg): New function.
4110 (s390x_emit_pop): New function.
4111 (s390x_emit_stack_flush): New function.
4112 (s390x_emit_zero_ext): New function.
4113 (s390x_emit_swap): New function.
4114 (s390x_emit_stack_adjust): New function.
4115 (s390x_emit_int_call_1): New function.
4116 (s390x_emit_void_call_2): New function.
4117 (s390x_emit_eq_goto): New function.
4118 (s390x_emit_ne_goto): New function.
4119 (s390x_emit_lt_goto): New function.
4120 (s390x_emit_le_goto): New function.
4121 (s390x_emit_gt_goto): New function.
4122 (s390x_emit_ge_goto): New function.
4123 (s390_emit_ops): New function.
4124 (struct linux_target_ops): Fill in emit_ops hook.
4125
abd9baf9
MK
41262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4127
4128 PR 18377
4129 * Makefile.in: Add s390 IPA files.
4130 * configure.srv: Build IPA for s390.
4131 * linux-s390-ipa.c: New file.
4132 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4133 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4134 (tdesc_s390_linux32): Likewise.
4135 (init_registers_s390_linux32v1): Likewise.
4136 (tdesc_s390_linux32v1): Likewise.
4137 (init_registers_s390_linux32v2): Likewise.
4138 (tdesc_s390_linux32v2): Likewise.
4139 (init_registers_s390_linux64): Likewise.
4140 (tdesc_s390_linux64): Likewise.
4141 (init_registers_s390_linux64v1): Likewise.
4142 (tdesc_s390_linux64v1): Likewise.
4143 (init_registers_s390_linux64v2): Likewise.
4144 (tdesc_s390_linux64v2): Likewise.
4145 (init_registers_s390_te_linux64): Likewise.
4146 (tdesc_s390_te_linux64): Likewise.
4147 (init_registers_s390_vx_linux64): Likewise.
4148 (tdesc_s390_vx_linux64): Likewise.
4149 (init_registers_s390_tevx_linux64): Likewise.
4150 (tdesc_s390_tevx_linux64): Likewise.
4151 (init_registers_s390x_linux64): Likewise.
4152 (tdesc_s390x_linux64): Likewise.
4153 (init_registers_s390x_linux64v1): Likewise.
4154 (tdesc_s390x_linux64v1): Likewise.
4155 (init_registers_s390x_linux64v2): Likewise.
4156 (tdesc_s390x_linux64v2): Likewise.
4157 (init_registers_s390x_te_linux64): Likewise.
4158 (tdesc_s390x_te_linux64): Likewise.
4159 (init_registers_s390x_vx_linux64): Likewise.
4160 (tdesc_s390x_vx_linux64): Likewise.
4161 (init_registers_s390x_tevx_linux64): Likewise.
4162 (tdesc_s390x_tevx_linux64): Likewise.
4163 (have_hwcap_s390_vx): New static variable.
4164 (s390_arch_setup): Fill have_hwcap_s390_vx.
4165 (s390_get_thread_area): New function.
4166 (s390_ft_entry_gpr_esa): New const.
4167 (s390_ft_entry_gpr_zarch): New const.
4168 (s390_ft_entry_misc): New const.
4169 (s390_ft_entry_fr): New const.
4170 (s390_ft_entry_vr): New const.
4171 (s390_ft_main_31): New const.
4172 (s390_ft_main_64): New const.
4173 (s390_ft_exit_fr): New const.
4174 (s390_ft_exit_vr): New const.
4175 (s390_ft_exit_misc): New const.
4176 (s390_ft_exit_gpr_esa): New const.
4177 (s390_ft_exit_gpr_zarch): New const.
4178 (append_insns): New function.
4179 (s390_relocate_instruction): New function.
4180 (s390_install_fast_tracepoint_jump_pad): New function.
4181 (s390_get_min_fast_tracepoint_insn_len): New function.
4182 (s390_get_ipa_tdesc_idx): New function.
4183 (struct linux_target_ops): Wire in the above functions.
4184 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4185 * linux-s390-tdesc.h: New file.
4186
a4105d04
MK
41872016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4188
4189 * linux-s390-low.c (s390_supports_tracepoints): New function.
4190 (struct linux_target_ops): Fill supports_tracepoints hook.
4191
35ac8b3e
YQ
41922016-03-18 Yao Qi <yao.qi@linaro.org>
4193
4194 * linux-low.c (lwp_signal_can_be_delivered): New function.
4195 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4196
94610ec4
YQ
41972016-03-18 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4200 0 if signal is enqueued. Remove 'signal' from one debugging
4201 message. Move one debugging message to some lines below.
4202 Remove code setting 'signal' to 0.
4203
80aea927
YQ
42042016-03-18 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-low.c (linux_low_filter_event): Remove redundant
4207 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4208
b04fd3be
MK
42092016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4210
4211 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4212 (struct linux_target_ops): Wire in the above.
4213
c40c8d4b
YQ
42142016-03-03 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-low.c: Update comments to start_step_over.
4217
0f8288ae
YQ
42182016-03-03 Yao Qi <yao.qi@linaro.org>
4219
4220 PR server/19736
4221 * linux-low.c (handle_extended_wait): Set child suspended
4222 if event_lwp->bp_reinsert isn't zero.
4223
fdbd04a8
YQ
42242016-03-02 Yao Qi <yao.qi@linaro.org>
4225
4226 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4227 enqueue_pending_signal.
4228
6896a8fa
MK
42292016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4230
4231 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4232 is actually loaded.
4233
ab503087
MK
42342016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4235
4236 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4237 (s390_regmap_3264) [!__s390x__]: New global.
4238 (s390_collect_ptrace_register): Skip map entries containing -1.
4239 (s390_supply_ptrace_register): Ditto.
4240 (s390_fill_gprs_high): New function.
4241 (s390_store_gprs_high): New function.
4242 (s390_regsets): Add NT_S390_HIGH_GPRS.
4243 (s390_get_hwcap): Enable on 31-bit.
4244 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4245 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4246 Detect NT_S390_HIGH_GPRS.
4247 (s390_usrregs_info_3264): Enable on 31-bit.
4248 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4249 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4250
ae91f625
MK
42512016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4252
4253 PR gdb/13808
4254 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4255 * configure.srv: Ditto.
4256 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4257 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4258 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4259 (init_registers_amd64_linux): Remove prototype.
4260 (tdesc_amd64_linux): Remove declaration.
4261 (get_ipa_tdesc): New function.
4262 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4263 initialize remaining tdescs.
4264 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4265 (init_registers_i386_linux): Remove prototype.
4266 (tdesc_i386_linux): Remove declaration.
4267 (get_ipa_tdesc): New function.
4268 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4269 initialize remaining tdescs.
4270 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4271 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4272 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4273 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4274 (x86_get_ipa_tdesc_idx): New function.
4275 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4276 * linux-x86-tdesc.h: New file.
4277 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4278 (target_get_ipa_tdesc_idx): New macro.
4279 * tracepoint.c (ipa_tdesc_idx): New macro.
4280 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4281 (symbol_list): Add ipa_tdesc_idx.
4282 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4283 (ipa_tdesc): Remove.
4284 (ipa_tdesc_idx): New variable.
4285 (get_context_regcache): Use get_ipa_tdesc.
4286 (gdb_collect): Ditto.
4287 (gdb_probe): Ditto.
4288 * tracepoint.h (get_ipa_tdesc): New prototype.
4289 (ipa_tdesc): Remove.
4290
e7ad2f14
PA
42912016-02-24 Pedro Alves <palves@redhat.com>
4292
4293 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4294 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4295 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4296 Factor out common code between the USE_SIGTRAP_SIGINFO and
4297 !USE_SIGTRAP_SIGINFO blocks.
4298 (linux_low_filter_event): Call save_stop_reason instead of
4299 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4300 Update comments.
4301 (linux_wait_1): Update comments.
4302
657f9cde
WW
43032016-02-24 Wei-cheng Wang <cole945@gmail.com>
4304
4305 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4306 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4307 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4308 ppc_insert_point, ppc_remove_point.
4309
b00b61e1
MK
43102016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4311
4312 * linux-s390-low.c (s390_supports_z_point_type): New function.
4313 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4314
553cb527
YQ
43152016-02-16 Yao Qi <yao.qi@linaro.org>
4316
4317 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4318 PC. Get pc from regcache_read_pc.
4319
a5652c21
YQ
43202016-02-12 Yao Qi <yao.qi@linaro.org>
4321
4322 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4323 or linux_get_pc_32bit.
4324 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4325
ed443b61
YQ
43262016-02-12 Yao Qi <yao.qi@linaro.org>
4327
4328 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4329 arm_linux_get_next_pcs_fixup.
4330
020ecd38
MK
43312016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4332
4333 * tracepoint.c (x_tracepoint_action_download): Change
4334 write_inferior_data_ptr to write_inferior_data_pointer.
4335 (cmd_qtstart): Likewise.
4336 (write_inferior_data_ptr): Remove.
4337 (download_agent_expr): Change write_inferior_data_ptr to
4338 write_inferior_data_pointer.
4339 (download_tracepoint_1): Likewise.
4340 (download_tracepoint): Likewise.
4341 (download_trace_state_variables): Likewise.
4342
7cae9051
WW
43432016-02-11 Wei-cheng Wang <cole945@gmail.com>
4344 Marcin Kościelnicki <koriakin@0x04.net>
4345
4346 * tracepoint.c (struct tracepoint_action_ops): Remove.
4347 (struct tracepoint_action): Remove ops.
4348 (m_tracepoint_action_download, r_tracepoint_action_download)
4349 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4350 size and offset accordingly.
4351 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4352 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4353 (tracepoint_action_send, tracepoint_action_download): New functions.
4354 Helpers for trace action handlers.
4355 (add_tracepoint_action): Remove setup actions ops.
4356 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4357
9f6a71b4
YQ
43582016-02-10 Yao Qi <yao.qi@linaro.org>
4359
4360 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4361
1e94266c
SM
43622016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4363
4364 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4365 to AC_OUTPUT.
4366 * configure: Regenerate.
4367
8adce034
SM
43682016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4369
4370 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4371 void * to gdb_byte *.
4372 * linux-low.c (siginfo_fixup): Likewise.
4373 (linux_xfer_siginfo): Likewise.
4374 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4375 Likewise.
4376 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4377
93813b37
WT
43782016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4379
4380 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4381 to srv_tgtobj.
4382 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4383 to srv_tgtobj.
4384 * linux-x86-low.c [__x86_64__]: Include
4385 "nat/amd64-linux-siginfo.h".
4386 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4387 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4388 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4389 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4390 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4391 (cpt_si_fd, si_timerid, si_overrun): Move from
4392 nat/amd64-linux-siginfo.c.
4393 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4394
8424cc97
SM
43952016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4396
4397 * server.c (skip_to_semicolon): Remove.
4398 (process_point_options): Use strchrnul instead of
4399 skip_to_semicolon.
4400
4d18591b
YQ
44012016-01-26 Yao Qi <yao.qi@linaro.org>
4402
4403 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4404 * linux-low.c (install_software_single_step_breakpoints): Don't
4405 call regcache_read_pc.
4406 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4407 argument pc.
4408
d8020970
YQ
44092016-01-26 Yao Qi <yao.qi@linaro.org>
4410
4411 * linux-low.c (install_software_single_step_breakpoints): Call
4412 regcache_read_pc instead of get_pc.
4413
8b207339
YQ
44142016-01-26 Yao Qi <yao.qi@linaro.org>
4415
4416 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4417 (unblock_async_io): Rename to ...
4418 (block_unblock_async_io): ... it. New function.
4419 (enable_async_io): Don't install SIGIO handler. Unblock it
4420 instead.
4421 (disable_async_io): Don't ignore SIGIO. Block it instead.
4422 (initialize_async_io): Install SIGIO handler. Don't call
4423 unblock_async_io.
4424
18879fef
YQ
44252016-01-26 Yao Qi <yao.qi@linaro.org>
4426
4427 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4428 first character is '\003', call *the_target->request_interrupt.
4429
a0f8e08a
YQ
44302016-01-25 Yao Qi <yao.qi@linaro.org>
4431
4432 * remote-utils.c (new_thread_notify): Remove.
4433 (dead_thread_notify): Likewise.
4434 * remote-utils.h (new_thread_notify): Remove declaration.
4435 (dead_thread_notify): Likewise.
4436
cc5fd9ab
MK
44372016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4438
4439 * gdb.trace/pending.exp: Fix expected message on continue.
4440
99e8eb11
MK
44412016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4442
4443 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4444 it works properly on big-endian machines where sizeof (CORE_ADDR)
4445 != sizeof (void *).
4446
a994041d
PA
44472016-01-21 Pedro Alves <palves@redhat.com>
4448
4449 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4450 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4451 * configure: Regenerate.
4452
f7a6a40d
YQ
44532016-01-21 Yao Qi <yao.qi@linaro.org>
4454
4455 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4456 is_thumb and set it according to CPSR saved on the stack.
4457 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4458 arm_sigreturn_next_pc.
4459
6f69e520
YQ
44602016-01-18 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-low.c (linux_set_pc_64bit): New function.
4463 (linux_get_pc_64bit): New function.
4464 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4465 Declare.
4466 * linux-sparc-low.c (debug_threads): Remove declaration.
4467 (sparc_get_pc): Remove.
4468 (the_low_target): Use linux_get_pc_64bit instead of
4469 sparc_get_pc.
4470 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4471 (the_low_target): Use linux_get_pc_64bit and
4472 linux_set_pc_64bit.
4473
276d4552
YQ
44742016-01-18 Yao Qi <yao.qi@linaro.org>
4475
4476 * linux-arm-low.c (debug_threads): Remove declaration.
4477 (arm_get_pc, arm_set_pc): Remove.
4478 (the_low_target): Use linux_get_pc_32bit and
4479 linux_set_pc_32bit.
4480 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4481 (the_low_target): Use linux_get_pc_32bit and
4482 linux_set_pc_32bit.
4483 * linux-cris-low.c (debug_threads): Remove declaration.
4484 (cris_get_pc, cris_set_pc,): Remove.
4485 (the_low_target): Use linux_get_pc_32bit and
4486 linux_set_pc_32bit.
4487 * linux-crisv32-low.c (debug_threads): Remove declaration.
4488 (cris_get_pc, cris_set_pc): Remove.
4489 (the_low_target): Use linux_get_pc_32bit and
4490 linux_set_pc_32bit.
4491 * linux-low.c: Include inttypes.h.
4492 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4493 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4494 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4495 (the_low_target): Use linux_get_pc_32bit and
4496 linux_set_pc_32bit.
4497 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4498 (the_low_target): Use linux_get_pc_32bit and
4499 linux_set_pc_32bit.
4500 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4501 (the_low_target): Use linux_get_pc_32bit and
4502 linux_set_pc_32bit.
4503 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4504 (the_low_target): Use linux_get_pc_32bit and
4505 linux_set_pc_32bit.
4506 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4507 (the_low_target): Use linux_get_pc_32bit and
4508 linux_set_pc_32bit.
4509
eb0edac8
GB
45102016-01-18 Gary Benson <gbenson@redhat.com>
4511
4512 * configure.ac (AC_FUNC_FORK): New check.
4513 * config.in: Regenerate.
4514 * configure: Likewise.
4515
1b451dda
YQ
45162016-01-14 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4519 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4520 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4521 arm_get_next_pcs_ctor.
4522
82075af2
JS
45232016-01-12 Josh Stone <jistone@redhat.com>
4524 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4525
4526 * inferiors.h: Include "gdb_vecs.h".
4527 (struct process_info): Add syscalls_to_catch.
4528 * inferiors.c (remove_process): Free syscalls_to_catch.
4529 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4530 syscall_return stops.
4531 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4532 * server.c (handle_general_set): Handle QCatchSyscalls.
4533 (handle_query): Report support for QCatchSyscalls.
4534 * target.h (struct target_ops): Add supports_catch_syscall.
4535 (target_supports_catch_syscall): New macro.
4536 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4537 (struct lwp_info): Add syscall_state.
4538 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4539 Maintain syscall_state and syscalls_to_catch across exec.
4540 (get_syscall_trapinfo): New function, proxy to the_low_target.
4541 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4542 (linux_low_filter_event): Toggle syscall_state entry/return for
4543 syscall traps, and set it ignored for all others.
4544 (gdb_catching_syscalls_p): New function.
4545 (gdb_catch_this_syscall_p): New function.
4546 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4547 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4548 (linux_supports_catch_syscall): New function.
4549 (linux_target_ops): Install it.
4550 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4551 (the_low_target): Install it.
4552
8f13a3ce
MF
45532016-01-12 Mike Frysinger <vapier@gentoo.org>
4554
4555 * acinclude.m4: Include new ../warning.m4 file.
4556 * configure: Regenerated.
4557 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4558
5b3da067
MF
45592016-01-12 Mike Frysinger <vapier@gentoo.org>
4560
4561 * ax.c (is_goto_target): Mark static.
4562 * linux-low.c (register_addr): Likewise.
4563 (linux_fetch_registers, linux_store_registers): Likewise.
4564 * mem-break.c (any_persistent_commands): Fix old prototype.
4565 (add_commands_to_breakpoint): Mark static.
4566 * regcache.c (find_register_by_name): Delete unused func.
4567 * remote-utils.c (hex_or_minus_one): Mark static.
4568 * server.c (monitor_show_help): Mark static.
4569 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4570 handle_v_requests): Likewise.
4571
bc504a31
PA
45722016-01-12 Pedro Alves <palves@redhat.com>
4573
4574 Remove use of the registered trademark symbol throughout.
4575
5a0dd67a
YQ
45762016-01-08 Yao Qi <yao.qi@linaro.org>
4577
4578 * remote-utils.c (getpkt): If c is '\003', call target hook
4579 request_interrupt.
4580
b2ca446f
YQ
45812016-01-06 Yao Qi <yao.qi@linaro.org>
4582
4583 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4584 linux-aarch32-low.c.
4585 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4586 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4587 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4588 (thumb2_breakpoint): Declare.
4589 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4590 linux-aarch32-low.h.
4591 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4592 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4593 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4594
edd88788
JB
45952016-01-01 Joel Brobecker <brobecker@adacore.com>
4596
4597 * gdbreplay.c (gdbreplay_version): Change copyright year in
4598 version message.
4599 * server.c (gdbserver_version): Likewise.
4600
65da7f14
PP
46012015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4602
4603 * server.c (crc32_table): Delete.
4604 (crc32): Use libiberty's xcrc32 function.
4605
4abd5ed2
JB
46062015-12-22 Joel Brobecker <brobecker@adacore.com>
4607
4608 * lynx-low.c (lynx_delete_thread_callback): New function.
4609 (lynx_mourn): Properly delete our process and all of its
4610 threads. Remove call to clear_inferiors.
4611
0e50fe5c
JB
46122015-12-22 Joel Brobecker <brobecker@adacore.com>
4613
4614 * target.c (thread_search_callback): Add check that
4615 the thread_stopped target callback is not NULL before
4616 calling it.
4617
35adc03f
YQ
46182015-12-21 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4621 arm breakpoint.
4622
bd2b2909
AT
46232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4624
4625 * server.c (handle_query): Call target_supports_software_single_step.
4626
7fe5e27e
AT
46272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4628
4629 * linux-low.c (single_step): New function.
4630 (linux_resume_one_lwp_throw): Call single_step.
4631 (start_step_over): Likewise.
4632
d9311bfa
AT
46332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4634
4635 * Makefile.in (SFILES): Append arch/arm-linux.c,
4636 arch/arm-get-next-pcs.c.
4637 (arm-linux.o): New rule.
4638 (arm-get-next-pcs.o): New rule.
4639 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4640 arm-linux.o.
4641 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4642 to linux-aarch32-low.c.
4643 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4644 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4645 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4646 (thumb2_breakpoint_len): Likewise.
4647 (arm_is_thumb_mode): Make non-static.
4648 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4649 from linux-aarch32-low.c.
4650 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4651 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4652 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4653 (thumb2_breakpoint_len): Likewise.
4654 (arm_is_thumb_mode): New declaration.
4655 * linux-arm-low.c: Include arch/arm-linux.h
4656 aarch/arm-get-next-pcs.h, sys/syscall.h.
4657 (get_next_pcs_ops): New struct.
4658 (get_next_pcs_addr_bits_remove): New function.
4659 (get_next_pcs_is_thumb): New function.
4660 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4661 (arm_sigreturn_next_pc): Likewise.
4662 (get_next_pcs_syscall_next_pc): Likewise.
4663 (arm_gdbserver_get_next_pcs): Likewise.
4664 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4665 Initialize.
4666 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4667 * server.h: Include gdb_vecs.h.
4668
68ce2059
AT
46692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4670
4671 * Makefile.in (SFILES): Append common/common-regcache.c.
4672 (OBS): Append common-regcache.o.
4673 (common-regcache.o): New rule.
4674 * regcache.c (init_register_cache): Initialize cache to
4675 REG_UNAVAILABLE.
4676 (regcache_raw_read_unsigned): New function.
4677 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4678 register_status enum.
4679
fa5308bd
AT
46802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4681
4682 * linux-aarch64-low.c (the_low_targets): Rename
4683 breakpoint_reinsert_addr to get_next_pcs.
4684 * linux-arm-low.c (the_low_targets): Likewise.
4685 * linux-bfin-low.c (the_low_targets): Likewise.
4686 * linux-cris-low.c (the_low_targets): Likewise.
4687 * linux-crisv32-low.c (the_low_targets): Likewise.
4688 * linux-low.c (can_software_single_step): Likewise.
4689 (install_software_single_step_breakpoints): New function.
4690 (start_step_over): Use install_software_single_step_breakpoints.
4691 * linux-low.h: New CORE_ADDR vector.
4692 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4693 get_next_pcs.
4694 * linux-mips-low.c (the_low_targets): Likewise.
4695 * linux-nios2-low.c (the_low_targets): Likewise.
4696 * linux-sparc-low.c (the_low_targets): Likewise.
4697
4a6ed09b
PA
46982015-12-17 Pedro Alves <palves@redhat.com>
4699
4700 * linux-low.c (linux_kill_one_lwp): Remove references to
4701 LinuxThreads.
4702 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4703 to 'kill'.
4704 (linux_init_signals): Delete.
4705 (initialize_low): Adjust.
4706 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4707
7544db95
PA
47082015-12-16 Pedro Alves <palves@redhat.com>
4709
4710 * configure.ac (compiler warning flags): When testing a
4711 -Wno-foo option, check whether -Wfoo works instead.
4712 * configure: Regenerate.
4713
8020350c
DB
47142015-12-11 Don Breazeal <donb@codesourcery.com>
4715
4716 * server.c (process_serial_event): Don't exit from gdbserver
4717 in remote mode if there are still active inferiors.
4718
db91f502
YQ
47192015-12-11 Yao Qi <yao.qi@linaro.org>
4720
4721 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4722 arm_breakpoint_at if the process is 32-bit.
4723
b37a6290
YQ
47242015-12-11 Yao Qi <yao.qi@linaro.org>
4725
4726 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4727 arm breakpoint.
4728
17b1509a
YQ
47292015-12-07 Yao Qi <yao.qi@linaro.org>
4730
4731 * configure.srv: Append arm.o to srv_tgtobj for
4732 aarch64*-*-linux* target.
4733 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4734 from linux-arm-low.c.
4735 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4736 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4737 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4738 (thumb2_breakpoint_len): Likewise.
4739 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4740 (arm_breakpoint_kinds): Likewise.
4741 (arm_breakpoint_kind_from_pc): Likewise.
4742 (arm_sw_breakpoint_from_kind): Likewise.
4743 (arm_breakpoint_kind_from_current_state): Likewise.
4744 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4745 (arm_sw_breakpoint_from_kind): Declare.
4746 (arm_breakpoint_kind_from_current_state): Declare.
4747 (arm_breakpoint_at): Declare.
4748 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4749 arm_sw_breakpoint_from_kind if process is 32-bit.
4750 (aarch64_breakpoint_kind_from_pc): New function.
4751 (aarch64_breakpoint_kind_from_current_state): New function.
4752 (the_low_target): Initialize fields breakpoint_kind_from_pc
4753 and breakpoint_kind_from_current_state.
4754 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4755 linux-aarch32-low.c.
4756 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4757 (arm_breakpoint, arm_breakpoint_len): Likewise.
4758 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4759 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4760 (arm_is_thumb_mode): Likewise.
4761 (arm_breakpoint_at): Likewise.
4762 (arm_breakpoint_kind_from_pc): Likewise.
4763 (arm_sw_breakpoint_from_kind): Likewise.
4764 (arm_breakpoint_kind_from_current_state): Likewise.
4765
4766 Revert:
4767 2015-08-04 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4770 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4771 * server.c (extended_protocol): Remove "static".
4772 * server.h (extended_protocol): Declare it.
4773
ece66d65
JS
47742015-12-04 Josh Stone <jistone@redhat.com>
4775
4776 * target.h (struct target_ops) <arch_setup>: Rename to ...
4777 (struct target_ops) <post_create_inferior>: ... this.
4778 (target_arch_setup): Rename to ...
4779 (target_post_create_inferior): ... this, calling post_create_inferior.
4780 * server.c (start_inferior): Update target_arch_setup calls to
4781 target_post_create_inferior.
4782 * linux-low.c (linux_low_ptrace_options): Forward declare.
4783 (linux_arch_setup): Update its comment for general use.
4784 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4785 (struct linux_target_ops): Use linux_post_create_inferior.
4786 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4787 to post_create_inferior.
4788 * nto-low.c (struct nto_target_ops): Likewise.
4789 * spu-low.c (struct spu_target_ops): Likewise.
4790 * win32-low.c (struct win32_target_ops): Likewise.
4791
e58c48b4
AT
47922015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4793
4794 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4795
fbec8956
AT
47962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4797
4798 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4799 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4800 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4801 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4802 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4803 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4804 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4805 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4806 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4807 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4808 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4809 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4810
9b4c5f87
AT
48112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4812
4813 * linux-low.c (linux_look_up_symbols): Don't call
4814 linux_supports_traceclone.
4815 * linux-low.h (thread_db_init): Remove use_events argument.
4816 * thread-db.c (thread_db_use_event): Remove global variable.
4817 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4818 (struct thread_db) <td_create_bp>: Remove field.
4819 (thread_db_create_event): Remove function.
4820 (thread_db_enable_reporting): Likewise.
4821 (find_one_thread): Don't check for thread_db_use_events.
4822 (attach_thread): Likewise.
4823 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4824 (try_thread_db_load_1): Don't check for thread_db_use_events.
4825 (thread_db_init): Remove use_events argument and thread events
4826 handling.
4827 (remove_thread_event_breakpoints): Remove function.
4828 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4829
7d00775e
AT
48302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4831
4832 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4833 New function.
4834 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4835 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4836 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4837 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4838 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4839 Initialize.
4840 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4841 New function.
4842 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4843 * linux-low.c (can_hardware_single_step): Use
4844 supports_hardware_single_step.
4845 (can_software_single_step): New function.
4846 (start_step_over): Call can_software_single_step.
4847 (linux_supports_hardware_single_step): New function.
4848 (struct target_ops) <supports_software_single_step>: Initialize.
4849 * linux-low.h (struct linux_target_ops)
4850 <supports_hardware_single_step>: Initialize.
4851 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4852 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4853 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4854 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4855 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4856 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4857 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4858 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4859 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4860 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4861 Initialize.
4862 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4863 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4864 Initialize.
4865 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4866 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4867 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4868 New function.
4869 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4870 * target.h (struct target_ops): <supports_software_single_step>:
4871 New field.
4872 (target_supports_software_single_step): New macro.
4873
2d97cd35
AT
48742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4875
4876 * linux-low.c (linux_wait_1): Fix pc advance condition.
4877 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4878 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4879
769ef81f
AT
48802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4881
4882 * linux-arm-low.c (arm_is_thumb_mode): New function.
4883 (arm_breakpoint_at): Use arm_is_thumb_mode.
4884 (arm_breakpoint_kind_from_current_state): New function.
4885 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4886 Initialize.
4887 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4888 (linux_breakpoint_kind_from_current_state): New function.
4889 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4890 * linux-low.h (struct linux_target_ops)
4891 <breakpoint_kind_from_current_state>: New field.
4892 * target.h (struct target_ops): Likewise.
4893 (target_breakpoint_kind_from_current_state): New macro.
4894
1bebeeca
PA
48952015-11-30 Pedro Alves <palves@redhat.com>
4896
4897 * linux-low.c (linux_resume): Wake up the event loop before
4898 returning.
4899
a67a9fae
PA
49002015-11-30 Pedro Alves <palves@redhat.com>
4901
4902 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4903 check.
4904 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4905 to -1.
4906 * target.c (struct thread_search): New structure.
4907 (thread_search_callback): New function.
4908 (prev_general_thread): New global.
4909 (prepare_to_access_memory, done_accessing_memory): New functions.
4910 * target.h (prepare_to_access_memory, done_accessing_memory):
4911 Replace macros with function declarations.
4912
f2faf941
PA
49132015-11-30 Pedro Alves <palves@redhat.com>
4914
4915 PR 14618
4916 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4917 report TARGET_WAITKIND_NO_RESUMED.
4918 * remote-utils.c (prepare_resume_reply): Handle
4919 TARGET_WAITKIND_NO_RESUMED.
4920 * server.c (report_no_resumed): New global.
4921 (handle_query) <qSupported>: Handle "no-resumed+". Report
4922 "no-resumed+" support.
4923 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4924 return error if the client doesn't support no-resumed events.
4925 (push_stop_notification): New function.
4926 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4927 events if the client supports them.
4928
a681f9c9
PA
49292015-11-30 Pedro Alves <palves@redhat.com>
4930
4931 * linux-low.c (thread_still_has_status_pending_p): Don't check
4932 vCont;t here.
4933 (lwp_resumed): New function.
4934 (status_pending_p_callback): Return early if the LWP is not
4935 supposed to be resumed.
4936
65706a29
PA
49372015-11-30 Pedro Alves <palves@redhat.com>
4938
4939 * linux-low.c (handle_extended_wait): Assert that the LWP's
4940 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4941 thread create events, leave the new child's status pending.
4942 (linux_low_filter_event): If GDB wants to hear about thread exit
4943 events, leave the LWP marked dead and don't delete it.
4944 (linux_wait_for_event_filtered): Don't check for thread exit.
4945 (filter_exit_event): New function.
4946 (linux_wait_1): Use it, when returning an exit event.
4947 (linux_resume_one_lwp_throw): Assert that the LWP's
4948 waitstatus is TARGET_WAITKIND_IGNORE.
4949 * remote-utils.c (prepare_resume_reply): Handle
4950 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4951 * server.c (report_thread_events): New global.
4952 (handle_general_set): Handle QThreadEvents.
4953 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4954 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4955 TARGET_WAITKIND_THREAD_EXITED.
4956 * server.h (report_thread_events): Declare.
4957
56cf4bed
PA
49582015-11-30 Pedro Alves <palves@redhat.com>
4959
4960 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4961 the thread's last_resume_kind was resume_stop.
4962
500c1d85
PA
49632015-11-30 Pedro Alves <palves@redhat.com>
4964
4965 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4966 before returning.
4967
de979965
PA
49682015-11-30 Pedro Alves <palves@redhat.com>
4969
4970 * server.c (handle_v_requests): Handle vCtrlC.
4971
34c65914
PA
49722015-11-30 Pedro Alves <palves@redhat.com>
4973
4974 * gdbthread.h (find_any_thread_of_pid): Declare.
4975 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4976 functions.
4977 * server.c (handle_query): If current_thread is NULL, look for
4978 another thread of the selected process.
4979
79efa585 49802015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4981 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4982
4983 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4984 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4985 name in reply.
4986 * target.h (struct target_ops) <thread_name>: New field.
4987 (target_thread_name): New macro.
4988
80d82c19
JB
49892015-11-23 Joel Brobecker <brobecker@adacore.com>
4990
4991 * regcache.h (regcache_invalidate_pid): Add declaration.
4992 * regcache.c (regcache_invalidate_pid): New function, extracted
4993 from regcache_invalidate.
4994 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4995 Add trivial documentation comment.
4996 * lynx-low.c: Use regcache_invalidate_pid instead of
4997 regcache_invalidate.
4998
64da5dd5
JB
49992015-11-23 Joel Brobecker <brobecker@adacore.com>
5000
5001 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5002 and Elf64_auxv_t if the target is Android.
5003
37ce4055
DE
50042015-11-22 Doug Evans <xdje42@gmail.com>
5005
5006 * target.h: #include <sys/types.h>.
5007
06e03fff
PA
50082015-11-19 Pedro Alves <palves@redhat.com>
5009
5010 * linux-low.c (linux_process_qsupported): Change prototype.
5011 Adjust.
5012 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5013 Change prototype.
5014 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5015 and adjust to loop over all features.
5016 * server.c (handle_query) <qSupported>: Adjust to call
5017 target_process_qsupported once, passing it a vector of unprocessed
5018 features.
5019 * target.h (struct target_ops) <process_qsupported>: Change
5020 prototype.
5021 (target_process_qsupported): Adjust.
5022
9a084706
PA
50232015-11-19 Pedro Alves <palves@redhat.com>
5024
5025 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5026 mode.
5027 * configure: Regenerate.
5028
dad44a1f
PA
50292015-11-19 Pedro Alves <palves@redhat.com>
5030
5031 * configure: Regenerate.
5032
231c0592
YQ
50332015-11-19 Yao Qi <yao.qi@linaro.org>
5034
5035 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5036 type to uint32_t.
5037
6c1c9a8b
YQ
50382015-11-19 Yao Qi <yao.qi@linaro.org>
5039
5040 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5041 (struct aarch64_operand): Move enum out.
5042
9caa3311
YQ
50432015-11-19 Yao Qi <yao.qi@linaro.org>
5044
5045 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5046 struct user_fpsimd_state *.
5047 (aarch64_store_fpregset): Likewise.
5048
6a69a054
YQ
50492015-11-19 Yao Qi <yao.qi@linaro.org>
5050
5051 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5052 struct user_pt_regs *.
5053 (aarch64_store_gregset): Likewise.
5054
1798301e
PA
50552015-11-18 Pedro Alves <palves@redhat.com>
5056
5057 * Makefile.in (all_object_files): Add $IPA_OBJS.
5058
ce7715e2
PA
50592015-11-17 Pedro Alves <palves@redhat.com>
5060
5061 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5062 GDB_SIGNAL_0 and gdb_signal_to_string.
5063
c0879059
PA
50642015-11-17 Pedro Alves <palves@redhat.com>
5065
5066 * win32-low.c (handle_output_debug_string): Remove parameter.
5067 (win32_kill): Remove our_status local and adjust call to
5068 handle_output_debug_string.
5069 (get_child_debug_event): Adjust call to
5070 handle_output_debug_string.
5071
1996e237
SM
50722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5073
5074 * linux-mips-low.c (mips_fill_gregset): Add cast.
5075 (mips_store_gregset): Likewise.
5076 (mips_fill_fpregset): Likewise.
5077 (mips_store_fpregset): Likewise.
5078
cbec665b
SM
50792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5080
5081 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5082 priv.
5083
eb3e3c67
SM
50842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5085
5086 * linux-mips-low.c (mips_linux_new_thread): Change type of
5087 watch_type to enum target_hw_bp_type.
5088
171de4b8
SM
50892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5090
5091 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5092 Change return type to arm_hwbp_type.
5093
04248ead
SM
50942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5095
5096 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5097 (arm_store_gregset): Likewise.
5098 * linux-arm-low.c (arm_get_hwcap): Likewise.
5099 (arm_read_description): Likewise.
5100
04b3479c
SM
51012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5102
5103 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5104
2bc84e8a
SM
51052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5106
5107 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5108 (ppc_fill_vsxregset): Likewise.
5109 (ppc_store_vsxregset): Likewise.
5110 (ppc_fill_vrregset): Likewise.
5111 (ppc_store_vrregset): Likewise.
5112 (ppc_fill_evrregset): Likewise.
5113 (ppc_store_evrregset): Likewise.
5114
e6c5bb05
SM
51152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5116
5117 * linux-ppc-low.c (ppc_usrregs_info): Remove
5118 forward-declaration.
5119 (ppc_arch_setup): Move lower in file.
5120
7ea45d72
SM
51212015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5122
5123 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5124 (ps_pdwrite): Likewise.
5125
69291610
HW
51262015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5127
5128 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5129 to after assert checks.
5130
b42945fd
SM
51312015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5132
5133 * proc-service.c (ps_pdread): Add/adjust casts.
5134 (ps_pdwrite): Add/adjust casts.
5135
d6f85c84
SM
51362015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5137
5138 * server.c (handle_search_memory_1): Cast return value of
5139 memmem.
5140
f98cd059
SM
51412015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5142
5143 * server.c (write_qxfer_response): Change type of data to
5144 gdb_byte *.
5145
d2412fa5
PA
51462015-10-29 Pedro Alves <palves@redhat.com>
5147
5148 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5149
c17414a2
PA
51502015-10-29 Pedro Alves <palves@redhat.com>
5151
5152 * tracepoint.c (clear_installed_tracepoints): Add casts.
5153
e053fbc4
PA
51542015-10-29 Pedro Alves <palves@redhat.com>
5155
5156 * server.c (handle_v_cont, process_serial_event): Add enum
5157 gdb_signal casts to signal parsing code.
5158
add67df8
PA
51592015-10-29 Pedro Alves <palves@redhat.com>
5160
5161 * linux-low.h (NULL_REGSET): Define.
5162 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5163 * linux-arm-low.c (arm_regsets): Likewise.
5164 * linux-crisv32-low.c (cris_regsets): Likewise.
5165 * linux-m68k-low.c (m68k_regsets): Likewise.
5166 * linux-mips-low.c (mips_regsets): Likewise.
5167 * linux-nios2-low.c (nios2_regsets): Likewise.
5168 * linux-ppc-low.c (ppc_regsets): Likewise.
5169 * linux-s390-low.c (s390_regsets): Likewise.
5170 * linux-sh-low.c (sh_regsets): Likewise.
5171 * linux-sparc-low.c (sparc_regsets): Likewise.
5172 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5173 * linux-tile-low.c (tile_regsets): Likewise.
5174 * linux-x86-low.c (x86_regsets): Likewise.
5175 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5176
50bc912a
PA
51772015-10-29 Pedro Alves <palves@redhat.com>
5178
5179 * linux-low.h (NULL_REGSET): Define.
5180 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5181 * linux-arm-low.c (arm_regsets): Likewise.
5182 * linux-crisv32-low.c (cris_regsets): Likewise.
5183 * linux-m68k-low.c (m68k_regsets): Likewise.
5184 * linux-mips-low.c (mips_regsets): Likewise.
5185 * linux-nios2-low.c (nios2_regsets): Likewise.
5186 * linux-ppc-low.c (ppc_regsets): Likewise.
5187 * linux-s390-low.c (s390_regsets): Likewise.
5188 * linux-sh-low.c (sh_regsets): Likewise.
5189 * linux-sparc-low.c (sparc_regsets): Likewise.
5190 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5191 * linux-tile-low.c (tile_regsets): Likewise.
5192 * linux-x86-low.c (x86_regsets): Likewise.
5193 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5194
682b2546
DE
51952015-10-26 Doug Evans <dje@google.com>
5196
5197 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5198
963843d4
DE
51992015-10-26 Doug Evans <dje@google.com>
5200
5201 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5202
d41401ac
DE
52032015-10-26 Doug Evans <dje@google.com>
5204
5205 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5206 for debug_printf.
5207 (attach_thread, find_new_threads_callback): Ditto.
5208
3db28855
AT
52092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5210
5211 * mem-break.h (set_breakpoint_data): Remove.
5212
fb78e89c
AT
52132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5214
5215 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5216 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5217 (initialize_low): Remove set_breakpoint_data call.
5218 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5219 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5220 (initialize_low): Remove set_breakpoint_data call.
5221 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5222 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5223 (initialize_low): Remove set_breakpoint_data call.
5224
2e6ee069
AT
52252015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5226
5227 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5228 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5229 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5230 * target.h (target_breakpoint_kind_from_pc): New macro.
5231
1652a986
AT
52322015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5233
5234 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5235 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5236 the default breakpoint kind.
5237
abeead09
AT
52382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5239
5240 * linux-arm-low.c (arm_supports_z_point_type): Add software
5241 breakpoint support.
5242
b0b4b501
AT
52432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5244
5245 * linux-arm-low.c: Refactor breakpoint definitions.
5246 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5247 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5248
8689682c
AT
52492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5250
5251 * Makefile.in: Add arm.c/o.
5252 * configure.srv: Likewise.
5253 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5254 (arm_breakpoint_kind_from_pc): New function.
5255 (arm_sw_breakpoint_from_kind): Return proper kind.
5256 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5257
27165294
AT
52582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5259
5260 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5261 removal.
5262 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5263 (struct raw_breakpoint) <size>: Remove.
5264 (struct raw_breakpoint) <kind>: Add.
5265 (bp_size): New function.
5266 (bp_opcode): Likewise.
5267 (find_raw_breakpoint_at): Adjust for kind.
5268 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5269 (remove_memory_breakpoint): Adjust for kind call bp_size.
5270 (set_raw_breakpoint_at): Adjust for kind.
5271 (set_breakpoint): Likewise.
5272 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5273 (delete_raw_breakpoint): Adjust for kind.
5274 (delete_breakpoint): Likewise.
5275 (find_gdb_breakpoint): Likewise.
5276 (set_gdb_breakpoint_1): Likewise.
5277 (set_gdb_breakpoint): Likewise.
5278 (delete_gdb_breakpoint_1): Likewise.
5279 (delete_gdb_breakpoint): Likewise.
5280 (uninsert_raw_breakpoint): Likewise.
5281 (reinsert_raw_breakpoint): Likewise.
5282 (set_breakpoint_data): Remove.
5283 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5284 (check_mem_read): Adjust for kind call bp_size.
5285 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5286 (clone_one_breakpoint): Adjust for kind.
5287 * mem-break.h (set_gdb_breakpoint): Likewise.
5288 (delete_gdb_breakpoint): Likewise.
5289 * server.c (process_serial_event): Likewise.
5290
dd373349
AT
52912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5292
5293 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5294 (struct linux_target_ops) <breakpoint>: Remove.
5295 (struct linux_target_ops) <breakpoint_len>: Remove.
5296 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5297 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5298 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5299 (arm_sw_breakpoint_from_kind): New function.
5300 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5301 (struct linux_target_ops) <breakpoint>: Remove.
5302 (struct linux_target_ops) <breakpoint_len>: Remove.
5303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5305 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5306 (struct linux_target_ops) <breakpoint>: Remove.
5307 (struct linux_target_ops) <breakpoint_len>: Remove.
5308 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5310 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5311 (struct linux_target_ops) <breakpoint>: Remove.
5312 (struct linux_target_ops) <breakpoint_len>: Remove.
5313 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5314 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5315 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5316 and sw_breakpoint_from_kind to increment the pc.
5317 (linux_breakpoint_kind_from_pc): New function.
5318 (linux_sw_breakpoint_from_kind): New function.
5319 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5320 (initialize_low): Call breakpoint_kind_from_pc and
5321 sw_breakpoint_from_kind to replace breakpoint_data/len.
5322 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5323 New field.
5324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5325 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5326 (struct linux_target_ops) <breakpoint>: Remove.
5327 (struct linux_target_ops) <breakpoint_len>: Remove.
5328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5330 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5331 (struct linux_target_ops) <breakpoint>: Remove.
5332 (struct linux_target_ops) <breakpoint_len>: Remove.
5333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5335 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5336 (struct linux_target_ops) <breakpoint>: Remove.
5337 (struct linux_target_ops) <breakpoint_len>: Remove.
5338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5340 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5341 (struct linux_target_ops) <breakpoint>: Remove.
5342 (struct linux_target_ops) <breakpoint_len>: Remove.
5343 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5344 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5345 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5346 (struct linux_target_ops) <breakpoint>: Remove.
5347 (struct linux_target_ops) <breakpoint_len>: Remove.
5348 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5349 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5350 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5351 (struct linux_target_ops) <breakpoint>: Remove.
5352 (struct linux_target_ops) <breakpoint_len>: Remove.
5353 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5354 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5355 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5356 (struct linux_target_ops) <breakpoint>: Remove.
5357 (struct linux_target_ops) <breakpoint_len>: Remove.
5358 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5359 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5360 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5361 (struct linux_target_ops) <breakpoint>: Remove.
5362 (struct linux_target_ops) <breakpoint_len>: Remove.
5363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5365 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5366 (struct linux_target_ops) <breakpoint>: Remove.
5367 (struct linux_target_ops) <breakpoint_len>: Remove.
5368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5370 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5371 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5372 (struct linux_target_ops) <breakpoint>: Remove.
5373 (struct linux_target_ops) <breakpoint_len>: Remove.
5374 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5375 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5376 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5377 (struct linux_target_ops) <breakpoint>: Remove.
5378 (struct linux_target_ops) <breakpoint_len>: Remove.
5379 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5380 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5381
4cd98a19
AT
53822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5383
5384 * linux-cris-low.c (cris_get_pc): Remove void arg.
5385
774ee6d2
AR
53862015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5387
5388 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5389 variable name.
5390
833dcd29
AR
53912015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5392
5393 * inferiors.c (thread_pid_matches_callback): New function.
5394 (find_thread_process): New function.
5395 (remove_thread): Reset current_thread.
5396 (remove_process): Assert threads have been removed first.
5397
8d689ee5
YQ
53982015-10-15 Yao Qi <yao.qi@linaro.org>
5399
5400 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5401 if it is 3.
5402 (aarch64_remove_point): Likewise.
5403 * regcache.c (regcache_register_size): New function.
5404
1c2e1515
YQ
54052015-10-12 Yao Qi <yao.qi@linaro.org>
5406
5407 * linux-aarch64-low.c: Update all callers as emit_load_store
5408 is renamed to aarch64_emit_load_store.
5409
e1c587c3
YQ
54102015-10-12 Yao Qi <yao.qi@linaro.org>
5411
5412 * linux-aarch64-low.c: Update all callers of function renaming
5413 from emit_insn to aarch64_emit_insn.
5414
b6542f81
YQ
54152015-10-12 Yao Qi <yao.qi@linaro.org>
5416
5417 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5418 arch/aarch64-insn.h.
5419 (struct aarch64_memory_operand): Likewise.
5420 (ENCODE): Likewise.
5421 (emit_insn): Move to arch/aarch64-insn.c.
5422 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5423 (emit_load_store): Move to arch/aarch64-insn.c.
5424 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5425 (can_encode_int32): Remove.
5426
246994ce
YQ
54272015-10-12 Yao Qi <yao.qi@linaro.org>
5428
5429 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5430 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5431 (aarch64_relocate_instruction): Likewise.
5432 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5433 (struct aarch64_insn_visitor): Likewise.
5434
0badd99f
YQ
54352015-10-12 Yao Qi <yao.qi@linaro.org>
5436
5437 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5438 (struct aarch64_insn_visitor): New.
5439 (struct aarch64_insn_relocation_data): New.
5440 (aarch64_ftrace_insn_reloc_b): New function.
5441 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5442 (aarch64_ftrace_insn_reloc_cb): Likewise.
5443 (aarch64_ftrace_insn_reloc_tb): Likewise.
5444 (aarch64_ftrace_insn_reloc_adr): Likewise.
5445 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5446 (aarch64_ftrace_insn_reloc_others): Likewise.
5447 (visitor): New.
5448 (aarch64_relocate_instruction): Use visitor.
5449
dfaffe9d
YQ
54502015-10-12 Yao Qi <yao.qi@linaro.org>
5451
5452 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5453 int. Add argument buf.
5454 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5455 aarch64_relocate_instruction.
5456
70b439f0
YQ
54572015-10-12 Yao Qi <yao.qi@linaro.org>
5458
5459 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5460 argument insn. Remove local variable insn. Don't call
5461 target_read_uint32.
5462 (aarch64_install_fast_tracepoint_jump_pad): Call
5463 target_read_uint32.
5464
7781c06f
YQ
54652015-09-30 Yao Qi <yao.qi@linaro.org>
5466
5467 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5468 (emit_load_store_pair): Likewise.
5469
9a3c8263
SM
54702015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5471
5472 * dll.c (match_dll): Add cast(s).
5473 (unloaded_dll): Likewise.
5474 * linux-low.c (second_thread_of_pid_p): Likewise.
5475 (delete_lwp_callback): Likewise.
5476 (count_events_callback): Likewise.
5477 (select_event_lwp_callback): Likewise.
5478 (linux_set_resume_request): Likewise.
5479 * server.c (accumulate_file_name_length): Likewise.
5480 (emit_dll_description): Likewise.
5481 (handle_qxfer_threads_worker): Likewise.
5482 (visit_actioned_threads): Likewise.
5483 * thread-db.c (any_thread_of): Likewise.
5484 * tracepoint.c (same_process_p): Likewise.
5485 (match_blocktype): Likewise.
5486 (build_traceframe_info_xml): Likewise.
5487
224c3ddb
SM
54882015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5489
5490 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5491 assignment.
5492 (gdb_unparse_agent_expr): Likewise.
5493 * hostio.c (require_data): Likewise.
5494 (handle_pread): Likewise.
5495 * linux-low.c (disable_regset): Likewise.
5496 (fetch_register): Likewise.
5497 (store_register): Likewise.
5498 (get_dynamic): Likewise.
5499 (linux_qxfer_libraries_svr4): Likewise.
5500 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5501 (set_fast_tracepoint_jump): Likewise.
5502 (uninsert_fast_tracepoint_jumps_at): Likewise.
5503 (reinsert_fast_tracepoint_jumps_at): Likewise.
5504 (validate_inserted_breakpoint): Likewise.
5505 (clone_agent_expr): Likewise.
5506 * regcache.c (init_register_cache): Likewise.
5507 * remote-utils.c (putpkt_binary_1): Likewise.
5508 (decode_M_packet): Likewise.
5509 (decode_X_packet): Likewise.
5510 (look_up_one_symbol): Likewise.
5511 (relocate_instruction): Likewise.
5512 (monitor_output): Likewise.
5513 * server.c (handle_search_memory): Likewise.
5514 (handle_qxfer_exec_file): Likewise.
5515 (handle_qxfer_libraries): Likewise.
5516 (handle_qxfer): Likewise.
5517 (handle_query): Likewise.
5518 (handle_v_cont): Likewise.
5519 (handle_v_run): Likewise.
5520 (captured_main): Likewise.
5521 * target.c (write_inferior_memory): Likewise.
5522 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5523 * tracepoint.c (init_trace_buffer): Likewise.
5524 (add_tracepoint_action): Likewise.
5525 (add_traceframe): Likewise.
5526 (add_traceframe_block): Likewise.
5527 (cmd_qtdpsrc): Likewise.
5528 (cmd_qtdv): Likewise.
5529 (cmd_qtstatus): Likewise.
5530 (response_source): Likewise.
5531 (response_tsv): Likewise.
5532 (cmd_qtnotes): Likewise.
5533 (gdb_collect): Likewise.
5534 (initialize_tracepoint): Likewise.
5535
afbe19f8
PL
55362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5537
5538 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5539 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5540 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5541 <NOP>: New.
5542 (enum aarch64_condition_codes): New enum.
5543 (w0): New static global.
5544 (fp): Likewise.
5545 (lr): Likewise.
5546 (struct aarch64_memory_operand) <type>: New
5547 MEMORY_OPERAND_POSTINDEX type.
5548 (postindex_memory_operand): New helper function.
5549 (emit_ret): New function.
5550 (emit_load_store_pair): New function, factored out of emit_stp
5551 with support for MEMORY_OPERAND_POSTINDEX.
5552 (emit_stp): Rewrite using emit_load_store_pair.
5553 (emit_ldp): New function.
5554 (emit_load_store): Likewise.
5555 (emit_ldr): Mention post-index instruction in comment.
5556 (emit_ldrh): New function.
5557 (emit_ldrb): New function.
5558 (emit_ldrsw): Mention post-index instruction in comment.
5559 (emit_str): Likewise.
5560 (emit_subs): New function.
5561 (emit_cmp): Likewise.
5562 (emit_and): Likewise.
5563 (emit_orr): Likewise.
5564 (emit_orn): Likewise.
5565 (emit_eor): Likewise.
5566 (emit_mvn): Likewise.
5567 (emit_lslv): Likewise.
5568 (emit_lsrv): Likewise.
5569 (emit_asrv): Likewise.
5570 (emit_mul): Likewise.
5571 (emit_sbfm): Likewise.
5572 (emit_sbfx): Likewise.
5573 (emit_ubfm): Likewise.
5574 (emit_ubfx): Likewise.
5575 (emit_csinc): Likewise.
5576 (emit_cset): Likewise.
5577 (emit_nop): Likewise.
5578 (emit_ops_insns): New helper function.
5579 (emit_pop): Likewise.
5580 (emit_push): Likewise.
5581 (aarch64_emit_prologue): New function.
5582 (aarch64_emit_epilogue): Likewise.
5583 (aarch64_emit_add): Likewise.
5584 (aarch64_emit_sub): Likewise.
5585 (aarch64_emit_mul): Likewise.
5586 (aarch64_emit_lsh): Likewise.
5587 (aarch64_emit_rsh_signed): Likewise.
5588 (aarch64_emit_rsh_unsigned): Likewise.
5589 (aarch64_emit_ext): Likewise.
5590 (aarch64_emit_log_not): Likewise.
5591 (aarch64_emit_bit_and): Likewise.
5592 (aarch64_emit_bit_or): Likewise.
5593 (aarch64_emit_bit_xor): Likewise.
5594 (aarch64_emit_bit_not): Likewise.
5595 (aarch64_emit_equal): Likewise.
5596 (aarch64_emit_less_signed): Likewise.
5597 (aarch64_emit_less_unsigned): Likewise.
5598 (aarch64_emit_ref): Likewise.
5599 (aarch64_emit_if_goto): Likewise.
5600 (aarch64_emit_goto): Likewise.
5601 (aarch64_write_goto_address): Likewise.
5602 (aarch64_emit_const): Likewise.
5603 (aarch64_emit_call): Likewise.
5604 (aarch64_emit_reg): Likewise.
5605 (aarch64_emit_pop): Likewise.
5606 (aarch64_emit_stack_flush): Likewise.
5607 (aarch64_emit_zero_ext): Likewise.
5608 (aarch64_emit_swap): Likewise.
5609 (aarch64_emit_stack_adjust): Likewise.
5610 (aarch64_emit_int_call_1): Likewise.
5611 (aarch64_emit_void_call_2): Likewise.
5612 (aarch64_emit_eq_goto): Likewise.
5613 (aarch64_emit_ne_goto): Likewise.
5614 (aarch64_emit_lt_goto): Likewise.
5615 (aarch64_emit_le_goto): Likewise.
5616 (aarch64_emit_gt_goto): Likewise.
5617 (aarch64_emit_ge_got): Likewise.
5618 (aarch64_emit_ops_impl): New static global variable.
5619 (aarch64_emit_ops): New target function, return
5620 &aarch64_emit_ops_impl.
5621 (struct linux_target_ops): Install it.
5622
bb903df0
PL
56232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5624
5625 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5626 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5627 aarch64-ipa.o.
5628 * linux-aarch64-ipa.c: New file.
5629 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5630 and endian.h.
5631 (aarch64_get_thread_area): New target method.
5632 (extract_signed_bitfield): New helper function.
5633 (aarch64_decode_ldr_literal): New function.
5634 (enum aarch64_opcodes): New enum.
5635 (struct aarch64_register): New struct.
5636 (struct aarch64_operand): New struct.
5637 (x0): New static global.
5638 (x1): Likewise.
5639 (x2): Likewise.
5640 (x3): Likewise.
5641 (x4): Likewise.
5642 (w2): Likewise.
5643 (ip0): Likewise.
5644 (sp): Likewise.
5645 (xzr): Likewise.
5646 (aarch64_register): New helper function.
5647 (register_operand): Likewise.
5648 (immediate_operand): Likewise.
5649 (struct aarch64_memory_operand): New struct.
5650 (offset_memory_operand): New helper function.
5651 (preindex_memory_operand): Likewise.
5652 (enum aarch64_system_control_registers): New enum.
5653 (ENCODE): New macro.
5654 (emit_insn): New helper function.
5655 (emit_b): New function.
5656 (emit_bcond): Likewise.
5657 (emit_cb): Likewise.
5658 (emit_tb): Likewise.
5659 (emit_blr): Likewise.
5660 (emit_stp): Likewise.
5661 (emit_ldp_q_offset): Likewise.
5662 (emit_stp_q_offset): Likewise.
5663 (emit_load_store): Likewise.
5664 (emit_ldr): Likewise.
5665 (emit_ldrsw): Likewise.
5666 (emit_str): Likewise.
5667 (emit_ldaxr): Likewise.
5668 (emit_stxr): Likewise.
5669 (emit_stlr): Likewise.
5670 (emit_data_processing_reg): Likewise.
5671 (emit_data_processing): Likewise.
5672 (emit_add): Likewise.
5673 (emit_sub): Likewise.
5674 (emit_mov): Likewise.
5675 (emit_movk): Likewise.
5676 (emit_mov_addr): Likewise.
5677 (emit_mrs): Likewise.
5678 (emit_msr): Likewise.
5679 (emit_sevl): Likewise.
5680 (emit_wfe): Likewise.
5681 (append_insns): Likewise.
5682 (can_encode_int32_in): New helper function.
5683 (aarch64_relocate_instruction): New function.
5684 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5685 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5686 (struct linux_target_ops): Install aarch64_get_thread_area,
5687 aarch64_install_fast_tracepoint_jump_pad and
5688 aarch64_get_min_fast_tracepoint_insn_len.
5689
787749ea
PL
56902015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5691
5692 * Makefile.in (aarch64-insn.o): New rule.
5693 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5694
9812b2e6
YQ
56952015-09-21 Yao Qi <yao.qi@linaro.org>
5696
5697 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5698
18fe412b
YQ
56992015-09-21 Yao Qi <yao.qi@linaro.org>
5700
5701 * tracepoint.c (max_jump_pad_size): Remove.
5702
a0cc84cd
YQ
57032015-09-18 Yao Qi <yao.qi@linaro.org>
5704
5705 * linux-aarch64-low.c: Don't include sys/uio.h.
5706 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5707
d78908cf
WW
57082015-09-16 Wei-cheng Wang <cole945@gmail.com>
5709
5710 * tracepoint.c (eval_result_type): Change prototype.
5711 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5712
d57e0d50
PA
57132015-09-15 Pedro Alves <palves@redhat.com>
5714
5715 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5716 Check whether to report exec events instead of checking whether
5717 multiprocess is enabled.
5718
5a676acc
PA
57192015-09-15 Pedro Alves <palves@redhat.com>
5720
5721 PR remote/18965
5722 * remote-utils.c (prepare_resume_reply): Merge
5723 TARGET_WAITKIND_VFORK_DONE switch case with the
5724 TARGET_WAITKIND_FORKED case.
5725
7c5d0fad
YQ
57262015-09-15 Yao Qi <yao.qi@linaro.org>
5727
5728 * server.c (handle_query): Check string comparison using
5729 "else if" instead of "if".
5730
750ce8d1
YQ
57312015-09-15 Yao Qi <yao.qi@linaro.org>
5732
5733 * server.c (vCont_supported): New global variable.
5734 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5735 matches. Append ";vContSupported+" to own_buf.
5736 (handle_v_requests): Append ";s;S" to own_buf if target supports
5737 hardware single step or vCont_supported is false.
5738 (capture_main): Set vCont_supported to zero.
5739
70b90b91
YQ
57402015-09-15 Yao Qi <yao.qi@linaro.org>
5741
5742 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5743 it to ...
5744 (linux_supports_hardware_single_step): ... New function.
5745 (linux_target_ops): Update.
5746 * lynx-low.c (lynx_target_ops): Set field
5747 supports_hardware_single_step to target_can_do_hardware_single_step.
5748 * nto-low.c (nto_target_ops): Likewise.
5749 * spu-low.c (spu_target_ops): Likewise.
5750 * win32-low.c (win32_target_ops): Likewise.
5751 * target.c (target_can_do_hardware_single_step): New function.
5752 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5753 Remove. <supports_hardware_single_step>: New field.
5754 (target_supports_conditional_breakpoints): Remove.
5755 (target_supports_hardware_single_step): New macro.
5756 (target_can_do_hardware_single_step): Declare.
5757 * server.c (handle_query): Use target_supports_hardware_single_step
5758 instead of target_supports_conditional_breakpoints.
5759
ade90bde
YQ
57602015-09-15 Yao Qi <yao.qi@linaro.org>
5761
5762 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5763 function.
5764 (struct linux_target_ops the_low_target): Install
5765 aarch64_linux_siginfo_fixup.
5766
94585166
DB
57672015-09-11 Don Breazeal <donb@codesourcery.com>
5768 Luis Machado <lgustavo@codesourcery.com>
5769
5770 * linux-low.c (linux_mourn): Static declaration.
5771 (linux_arch_setup): Move in front of
5772 handle_extended_wait.
5773 (linux_arch_setup_thread): New function.
5774 (handle_extended_wait): Handle exec events. Call
5775 linux_arch_setup_thread. Make event_lwp argument a
5776 pointer-to-a-pointer.
5777 (check_zombie_leaders): Do not check stopped threads.
5778 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5779 (linux_low_filter_event): Add lwp and thread for exec'ing
5780 non-leader thread if leader thread has been deleted.
5781 Refactor code into linux_arch_setup_thread and call it.
5782 Pass child lwp pointer by reference to handle_extended_wait.
5783 (linux_wait_for_event_filtered): Update comment.
5784 (linux_wait_1): Prevent clobbering exec event status.
5785 (linux_supports_exec_events): New function.
5786 (linux_target_ops) <supports_exec_events>: Initialize new member.
5787 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5788 new member.
5789 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5790 * server.c (report_exec_events): New global variable.
5791 (handle_query): Handle qSupported query for exec-events feature.
5792 (captured_main): Initialize report_exec_events.
5793 * server.h (report_exec_events): Declare new global variable.
5794 * target.h (struct target_ops) <supports_exec_events>: New
5795 member.
5796 (target_supports_exec_events): New macro.
5797 * win32-low.c (win32_target_ops) <supports_exec_events>:
5798 Initialize new member.
5799
0568462b
MM
58002015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5801
5802 * linux-low.c (linux_low_enable_btrace): Remove.
5803 (linux_target_ops): Replace linux_low_enable_btrace with
5804 linux_enable_btrace.
5805
39edd165
YQ
58062015-09-03 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-aarch64-low.c (aarch64_insert_point): Call
5809 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5810 returns true.
5811
1db33b5a
UW
58122015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5813
5814 * linux-low.c (check_stopped_by_breakpoint): Use
5815 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5816
ab290430
PA
58172015-08-27 Pedro Alves <palves@redhat.com>
5818
5819 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5820
8d749320
SM
58212015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5822
6711b7f8
SM
5823 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5824 the XNEW-family equivalent.
8d749320
SM
5825 (compile_bytecodes): Likewise.
5826 * dll.c (loaded_dll): Likewise.
5827 * event-loop.c (append_callback_event): Likewise.
5828 (create_file_handler): Likewise.
5829 (create_file_event): Likewise.
5830 * hostio.c (handle_open): Likewise.
5831 * inferiors.c (add_thread): Likewise.
5832 (add_process): Likewise.
5833 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5834 * linux-arm-low.c (arm_new_process): Likewise.
5835 (arm_new_thread): Likewise.
5836 * linux-low.c (add_to_pid_list): Likewise.
5837 (linux_add_process): Likewise.
5838 (handle_extended_wait): Likewise.
5839 (add_lwp): Likewise.
5840 (enqueue_one_deferred_signal): Likewise.
5841 (enqueue_pending_signal): Likewise.
5842 (linux_resume_one_lwp_throw): Likewise.
5843 (linux_resume_one_thread): Likewise.
5844 (linux_read_memory): Likewise.
5845 (linux_write_memory): Likewise.
5846 * linux-mips-low.c (mips_linux_new_process): Likewise.
5847 (mips_linux_new_thread): Likewise.
5848 (mips_add_watchpoint): Likewise.
5849 * linux-x86-low.c (initialize_low_arch): Likewise.
5850 * lynx-low.c (lynx_add_process): Likewise.
5851 * mem-break.c (set_raw_breakpoint_at): Likewise.
5852 (set_breakpoint): Likewise.
5853 (add_condition_to_breakpoint): Likewise.
5854 (add_commands_to_breakpoint): Likewise.
5855 (clone_agent_expr): Likewise.
5856 (clone_one_breakpoint): Likewise.
5857 * regcache.c (new_register_cache): Likewise.
5858 * remote-utils.c (look_up_one_symbol): Likewise.
5859 * server.c (queue_stop_reply): Likewise.
5860 (start_inferior): Likewise.
5861 (queue_stop_reply_callback): Likewise.
5862 (handle_target_event): Likewise.
5863 * spu-low.c (fetch_ppc_memory): Likewise.
5864 (store_ppc_memory): Likewise.
5865 * target.c (set_target_ops): Likewise.
5866 * thread-db.c (thread_db_load_search): Likewise.
5867 (try_thread_db_load_1): Likewise.
5868 * tracepoint.c (add_tracepoint): Likewise.
5869 (add_tracepoint_action): Likewise.
5870 (create_trace_state_variable): Likewise.
5871 (cmd_qtdpsrc): Likewise.
5872 (cmd_qtro): Likewise.
5873 (add_while_stepping_state): Likewise.
5874 * win32-low.c (child_add_thread): Likewise.
5875 (get_image_name): Likewise.
5876
ed8b7b42
YQ
58772015-08-25 Yao Qi <yao.qi@linaro.org>
5878
5879 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5880
db3cb7cb
YQ
58812015-08-25 Yao Qi <yao.qi@linaro.org>
5882
5883 * Makefile.in (aarch64-linux.o): New rule.
5884 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5885 srv_tgtobj.
5886 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5887 (aarch64_init_debug_reg_state): Make it extern.
5888 (aarch64_linux_prepare_to_resume): Remove.
5889
f6011a1c
YQ
58902015-08-25 Yao Qi <yao.qi@linaro.org>
5891
5892 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5893 lwp_arch_private_info and ptid_of_lwp.
5894
88e2cf7e
YQ
58952015-08-25 Yao Qi <yao.qi@linaro.org>
5896
5897 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5898 Find proc_info by find_process_pid. All callers updated.
5899
5e35436e
YQ
59002015-08-25 Yao Qi <yao.qi@linaro.org>
5901
5902 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5903 Remove.
5904 (debug_reg_change_callback): Remove.
5905 (aarch64_notify_debug_reg_change): Remove.
5906
4a8a7965
YQ
59072015-08-25 Yao Qi <yao.qi@linaro.org>
5908
5909 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5910 Call current_lwp_ptid.
5911
32a271ee
YQ
59122015-08-25 Yao Qi <yao.qi@linaro.org>
5913
5914 * linux-aarch64-low.c (debug_reg_change_callback): Use
5915 debug_printf.
5916
0d51c8d7
YQ
59172015-08-25 Yao Qi <yao.qi@linaro.org>
5918
5919 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5920
31a43dd5
YQ
59212015-08-25 Yao Qi <yao.qi@linaro.org>
5922
5923 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5924
8ee52567
YQ
59252015-08-25 Yao Qi <yao.qi@linaro.org>
5926
5927 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5928 the code.
5929
ff3f0f45
YQ
59302015-08-25 Yao Qi <yao.qi@linaro.org>
5931
5932 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5933 Remove.
5934 (debug_reg_change_callback): Remove argument entry and add argument
5935 lwp. Remove local variable thread. Don't print thread id in the
5936 debugging output. Don't check whether pid of thread equals to pid.
5937 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5938 iterate_over_lwps instead find_inferior.
5939
3d40fbb5
PA
59402015-08-24 Pedro Alves <palves@redhat.com>
5941
5942 * inferiors.c (get_first_process): New function.
5943 * inferiors.h (get_first_process): New declaration.
5944 * remote-utils.c (read_ptid): Default to the first process in the
5945 list, instead of to the current thread's process.
5946
438e1e42
PA
59472015-08-24 Pedro Alves <palves@redhat.com>
5948
5949 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5950 * event-loop.c: Likewise.
5951 * remote-utils.c: Likewise.
5952 * tracepoint.c: Likewise.
5953
a8c6d4fc
PA
59542015-08-24 Pedro Alves <palves@redhat.com>
5955
5956 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5957 ptid_get_lwp.
5958
99b0bb12
PA
59592015-08-21 Pedro Alves <palves@redhat.com>
5960
5961 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5962 instead of literal 1.
5963
f8904751
PA
59642015-08-21 Pedro Alves <palves@redhat.com>
5965
5966 * tdesc.c (default_description): Explicitly zero-initialize.
5967
465a859e
PA
59682015-08-21 Pedro Alves <palves@redhat.com>
5969
5970 PR gdb/18749
5971 * inferiors.c (remove_thread): Discard any pending stop reply for
5972 this thread.
5973 * server.c (remove_all_on_match_pid): Rename to ...
5974 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5975 instead of a pid.
5976 (discard_queued_stop_replies): Change parameter to a ptid. Now
5977 extern.
5978 (handle_v_kill, kill_inferior_callback, captured_main)
5979 (process_serial_event): Adjust.
5980 * server.h (discard_queued_stop_replies): Declare.
5981
f0db101d
PA
59822015-08-21 Pedro Alves <palves@redhat.com>
5983
5984 * linux-low.c (wait_for_sigstop): Always switch to no thread
5985 selected if the previously current thread dies.
5986 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5987 process instead of the current thread's.
5988 * remote-utils.c (input_interrupt): Don't check if there's no
5989 current thread.
5990 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5991 current thread to the general thread fails, error out.
5992 (handle_qxfer_auxv, handle_qxfer_libraries)
5993 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5994 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5995 (handle_query): Check if there's a thread selected instead of
5996 checking whether there's any thread in the thread list.
5997 (handle_qxfer_threads, handle_qxfer_btrace)
5998 (handle_qxfer_btrace_conf): Don't error out early if there's no
5999 thread in the thread list.
6000 (handle_v_cont, myresume): Don't set the current thread to the
6001 continue thread.
6002 (process_serial_event) <Hg handling>: Also set thread_id if the
6003 previous general thread is still alive.
6004 (process_serial_event) <g/G handling>: If setting the current
6005 thread to the general thread fails, error out.
6006 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6007 thread's lwp instead of the current thread's.
6008 * target.c (set_desired_thread): If the desired thread was not
6009 found, leave the current thread pointing to NULL. Return an int
6010 (boolean) indicating success.
6011 * target.h (set_desired_thread): Change return type to int.
6012
40045d91
MF
60132015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6014
6015 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6016 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6017 #includes.
6018 (ps_get_thread_area): New function.
6019
45face3b
GB
60202015-08-19 Gary Benson <gbenson@redhat.com>
6021
6022 * hostio.c (handle_pread): Do not attempt to read more data
6023 than hostio_reply_with_data can fit in a packet.
6024
16d5f642
JB
60252015-08-18 Joel Brobecker <brobecker@adacore.com>
6026
6027 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6028
a738da3a
MF
60292015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6030
6031 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6032
33ebda9d
PA
60332015-08-06 Pedro Alves <palves@redhat.com>
6034
6035 * tracepoint.c (expr_eval_result): Now an int.
6036
a44892be
PA
60372015-08-06 Pedro Alves <palves@redhat.com>
6038
6039 * gdbthread.h (struct regcache): Forward declare.
6040 (struct thread_info) <regcache_data>: Now a struct regcache
6041 pointer.
6042 * inferiors.c (inferior_regcache_data)
6043 (set_inferior_regcache_data): Now work with struct regcache
6044 pointers.
6045 * inferiors.h (struct regcache): Forward declare.
6046 (inferior_regcache_data, set_inferior_regcache_data): Now work
6047 with struct regcache pointers.
6048 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6049 (free_register_cache_thread): Remove struct regcache pointer
6050 casts.
6051
608a1e46
PA
60522015-08-06 Pedro Alves <palves@redhat.com>
6053
6054 * server.c (captured_main): On error, print the exception message
6055 to stderr, and if run_once is set, throw a quit.
6056
f0ce0d3a
PA
60572015-08-06 Pedro Alves <palves@redhat.com>
6058
6059 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6060 the current thread.
6061
bf47e248
PA
60622015-08-06 Pedro Alves <palves@redhat.com>
6063
6064 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6065 reading beyond the passed in buffer length.
6066
b6b9ffcc
PL
60672015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6068
6069 * tracepoint.c (symbol_list) <required>: Remove.
6070
863d01bd
PA
60712015-08-06 Pedro Alves <palves@redhat.com>
6072
6073 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6074 count if stopping and suspending threads.
6075 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6076 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6077 (linux_detach): Complete an ongoing step-over.
6078 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6079 throughout.
6080 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6081 (linux_wait_1): If passing a signal to the inferior after
6082 finishing a step-over, unsuspend and re-resume all lwps. If we
6083 see a single-step event but the thread should be continuing, don't
6084 pass the trap to gdb.
6085 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6086 internal_error instead of gdb_assert.
6087 (enqueue_pending_signal): New function.
6088 (check_ptrace_stopped_lwp_gone): Add debug output.
6089 (start_step_over): Use internal_error instead of gdb_assert.
6090 (complete_ongoing_step_over): New function.
6091 (linux_resume_one_thread): Don't resume a suspended thread.
6092 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6093 it stepping.
6094
00db26fa
PA
60952015-08-06 Pedro Alves <palves@redhat.com>
6096
6097 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6098 (linux_thread_alive): Use lwp_is_marked_dead.
6099 (extended_event_reported): Delete.
6100 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6101 instead of extended_event_reported.
6102 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6103 as well.
6104 (lwp_is_marked_dead): New function.
6105 (lwp_running): Use lwp_is_marked_dead.
6106 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6107 comment.
6108
ad071a30
PA
61092015-08-06 Pedro Alves <palves@redhat.com>
6110
6111 * linux-low.c (linux_wait_1): Move fork event output out of the
6112 !report_to_gdb check. Pass event_child->waitstatus to
6113 target_waitstatus_to_string instead of ourstatus.
6114
524b57e6
YQ
61152015-08-04 Yao Qi <yao.qi@linaro.org>
6116
6117 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6118 if current_thread is 32 bit.
6119
6085d6f6
YQ
61202015-08-04 Yao Qi <yao.qi@linaro.org>
6121
6122 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6123 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6124 * server.c (extended_protocol): Remove "static".
6125 * server.h (extended_protocol): Declare it.
6126
8a7e4587
YQ
61272015-08-04 Yao Qi <yao.qi@linaro.org>
6128
6129 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6130 both aarch64 and aarch32.
6131 (aarch64_set_pc): Likewise.
6132
3b53ae99
YQ
61332015-08-04 Yao Qi <yao.qi@linaro.org>
6134
6135 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6136 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6137 arm-with-neon.xml to srv_xmlfiles.
6138 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6139 (is_64bit_tdesc): New function.
6140 (aarch64_linux_read_description): New function.
6141 (aarch64_arch_setup): Call aarch64_linux_read_description.
6142 (regs_info): Rename to regs_info_aarch64.
6143 (aarch64_regs_info): Return right regs_info.
6144 (initialize_low_arch): Call initialize_low_arch_aarch32.
6145
bd9e6534
YQ
61462015-08-04 Yao Qi <yao.qi@linaro.org>
6147
6148 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6149 * linux-aarch32-low.c: New file.
6150 * linux-aarch32-low.h: New file.
6151 * linux-arm-low.c (arm_fill_gregset): Move it to
6152 linux-aarch32-low.c.
6153 (arm_store_gregset): Likewise.
6154 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6155 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6156 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6157 (regs_info): Rename to regs_info_arm.
6158 (arm_regs_info): Return regs_info_aarch32 if
6159 have_ptrace_getregset is 1 and target description is
6160 arm_with_neon or arm_with_vfpv3.
6161 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6162 Call initialize_low_arch_aarch32 instead.
6163
ded48a5e
YQ
61642015-08-04 Yao Qi <yao.qi@linaro.org>
6165
6166 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6167 * linux-low.c: ... here.
6168 * linux-low.h (have_ptrace_getregset): Declare it.
6169
96e9210f
PA
61702015-08-04 Pedro Alves <palves@redhat.com>
6171
6172 * thread-db.c (struct thread_db): Use new typedefs.
6173 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6174 CHK calls.
6175 (disable_thread_event_reporting): Cast result of dlsym to
6176 destination function pointer type.
6177 (thread_db_mourn): Use td_ta_delete_ftype.
6178
af60a1ef
SL
61792015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6180
6181 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6182 arch variant.
6183 (CDX_BREAKPOINT): Define for R2.
6184 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6185 (the_low_target): Add comments.
6186
e8b41681
YQ
61872015-07-30 Yao Qi <yao.qi@linaro.org>
6188
6189 * linux-arm-low.c (arm_hwcap): Remove it.
6190 (arm_read_description): New local variable arm_hwcap. Don't
6191 set arm_hwcap to zero.
6192
89abb039
YQ
61932015-07-30 Yao Qi <yao.qi@linaro.org>
6194
6195 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6196 Use regcache->tdesc instead.
6197 (arm_store_wmmxregset): Likewise.
6198 (arm_fill_vfpregset): Likewise.
6199 (arm_store_vfpregset): Likewise.
6200
deca266c
YQ
62012015-07-30 Yao Qi <yao.qi@linaro.org>
6202
6203 * linux-arm-low.c: Include arch/arm.h.
6204 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6205 (arm_store_gregset): Likewise.
6206
aa58a496
SM
62072015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6208
6209 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6210 ptrace's 4th parameter.
6211
50904b25
YQ
62122015-07-27 Yao Qi <yao.qi@linaro.org>
6213
6214 * configure.srv (case aarch64*-*-linux*): Don't set
6215 srv_linux_usrregs.
6216
5826e159
PA
62172015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6218
6219 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6220 sys/ptrace.h.
6221 * linux-arm-low.c: Likewise.
6222 * linux-cris-low.c: Likewise.
6223 * linux-crisv32-low.c: Likewise.
6224 * linux-low.c: Likewise.
6225 * linux-m68k-low.c: Likewise.
6226 * linux-mips-low.c: Likewise.
6227 * linux-nios2-low.c: Likewise.
6228 * linux-s390-low.c: Likewise.
6229 * linux-sparc-low.c: Likewise.
6230 * linux-tic6x-low.c: Likewise.
6231 * linux-tile-low.c: Likewise.
6232 * linux-x86-low.c: Likewise.
6233
54019719
PA
62342015-07-24 Pedro Alves <palves@redhat.com>
6235
6236 * config.in: Regenerate.
6237 * configure: Regenerate.
6238
eb7aa561
PA
62392015-07-24 Pedro Alves <palves@redhat.com>
6240
6241 * acinclude.m4: Include ../ptrace.m4.
6242 * configure.ac: Call GDB_AC_PTRACE.
6243 * config.in, configure: Regenerate.
6244
55d7b841
YQ
62452015-07-24 Yao Qi <yao.qi@linaro.org>
6246
6247 * linux-low.c (linux_create_inferior): Remove setting to
6248 proc->priv->new_inferior.
6249 (linux_attach): Likewise.
6250 (linux_low_filter_event): Likewise.
6251 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6252
c06cbd92
YQ
62532015-07-24 Yao Qi <yao.qi@linaro.org>
6254
6255 * linux-low.c (linux_arch_setup): New function.
6256 (linux_low_filter_event): If proc->tdesc is NULL and
6257 proc->attached is true, call the_low_target.arch_setup.
6258 Otherwise, keep status pending, and return.
6259 (linux_resume_one_lwp_throw): Don't call get_pc if
6260 thread->while_stepping isn't NULL. Don't call
6261 get_thread_regcache if proc->tdesc is NULL.
6262 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6263 (linux_target_ops): Install arch_setup.
6264 * server.c (start_inferior): Call the_target->arch_setup.
6265 * target.h (struct target_ops) <arch_setup>: New field.
6266 (target_arch_setup): New marco.
6267 * lynx-low.c (lynx_target_ops): Update.
6268 * nto-low.c (nto_target_ops): Update.
6269 * spu-low.c (spu_target_ops): Update.
6270 * win32-low.c (win32_target_ops): Update.
6271
5ae3ebba
YQ
62722015-07-24 Yao Qi <yao.qi@linaro.org>
6273
6274 * linux-low.c (linux_add_process): Don't set
6275 proc->priv->new_inferior.
6276 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6277 (linux_attach): Likewise.
6278
eb97750b
YQ
62792015-07-24 Yao Qi <yao.qi@linaro.org>
6280
6281 * server.c (start_inferior): Code refactor.
6282
51aee833
YQ
62832015-07-24 Yao Qi <yao.qi@linaro.org>
6284
6285 * server.c (process_serial_event): Set general_thread.
6286
af1b22f3
YQ
62872015-07-21 Yao Qi <yao.qi@linaro.org>
6288
6289 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6290 aarch64_linux_get_debug_reg_capacity.
6291
554717a3
YQ
62922015-07-17 Yao Qi <yao.qi@linaro.org>
6293
6294 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6295 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6296 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6297 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6298 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6299 (AARCH64_HWP_ALIGNMENT): Likewise.
6300 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6301 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6302 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6303 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6304 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6305 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6306 (struct aarch64_debug_reg_state): Likewise.
6307 (struct arch_lwp_info): Likewise.
6308 (aarch64_align_watchpoint): Likewise.
6309 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6310 (aarch64_watchpoint_length): Likewise.
6311 (aarch64_point_encode_ctrl_reg): Likewise
6312 (aarch64_point_is_aligned): Likewise.
6313 (aarch64_align_watchpoint): Likewise.
6314 (aarch64_linux_set_debug_regs):
6315 (aarch64_dr_state_insert_one_point): Likewise.
6316 (aarch64_dr_state_remove_one_point): Likewise.
6317 (aarch64_handle_breakpoint): Likewise.
6318 (aarch64_handle_aligned_watchpoint): Likewise.
6319 (aarch64_handle_unaligned_watchpoint): Likewise.
6320 (aarch64_handle_watchpoint): Likewise.
6321
c67ca4de
YQ
63222015-07-17 Yao Qi <yao.qi@linaro.org>
6323
6324 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6325 and don't aarch64_get_debug_reg_state. All callers update.
6326 (aarch64_handle_aligned_watchpoint): Likewise.
6327 (aarch64_handle_unaligned_watchpoint): Likewise.
6328 (aarch64_handle_watchpoint): Likewise.
6329 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6330 (aarch64_remove_point): Likewise.
6331
25abf979
YQ
63322015-07-17 Yao Qi <yao.qi@linaro.org>
6333
6334 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6335 debug_printf.
6336 (aarch64_handle_unaligned_watchpoint): Likewise.
6337
db1ff28b
JK
63382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6339
6340 Revert the previous 3 commits:
6341 Move gdb_regex* to common/
6342 Move linux_find_memory_regions_full & co.
6343 gdbserver build-id attribute generator
6344
700ca40f
JK
63452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6346 Jan Kratochvil <jan.kratochvil@redhat.com>
6347
6348 gdbserver build-id attribute generator.
6349 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6350 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6351 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6352 (find_phdr): New.
6353 (get_dynamic): Use find_pdhr to traverse program headers.
6354 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6355 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6356 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6357 (get_hex_build_id): New.
6358 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6359 to reply XML document.
6360
9904185c
JK
63612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6362 Jan Kratochvil <jan.kratochvil@redhat.com>
6363
6364 * target.c: Include target/target-utils.h and fcntl.h.
6365 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6366 (target_fileio_read_stralloc): New functions.
6367
6e5b4429
JK
63682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6369
6370 * Makefile.in (OBS): Add gdb_regex.o.
6371 (gdb_regex.o): New.
6372 * config.in: Rebuilt.
6373 * configure: Rebuilt.
6374
ddc98fbf
JK
63752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6376 Jan Kratochvil <jan.kratochvil@redhat.com>
6377
6378 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6379 * Makefile.in (OBS): Add target-utils.o.
6380 (linux-maps.o, target-utils.o): New.
6381 * configure.srv (srv_linux_obj): Add linux-maps.o.
6382
e57bb7a0
PL
63832015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6384
6385 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6386 function, return 1.
6387 (the_low_target): Install it.
6388
586b02a9
PA
63892015-07-14 Pedro Alves <palves@redhat.com>
6390
6391 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6392 Instead, ignore ECHILD, and throw an error for other errnos.
6393
58c1b36c
PA
63942015-07-10 Pedro Alves <palves@redhat.com>
6395
6396 * event-loop.c (struct callback_event) <data>: Change type to
6397 gdb_client_data instance instead of gdb_client_data pointer.
6398 (append_callback_event): Adjust.
6399
421530db
PL
64002015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6401
6402 * linux-aarch64-low.c: Add comments for each linux_target_ops
6403 method. Remove comments already covered in target_ops and
6404 linux_target_ops definitions.
6405 (the_low_target): Add comments for each unimplemented method.
6406
c2d65f38
YQ
64072015-07-09 Yao Qi <yao.qi@linaro.org>
6408
6409 * linux-aarch64-low.c (aarch64_regmap): Remove.
6410 (aarch64_usrregs_info): Remove.
6411 (regs_info): Set field usrregs to NULL.
6412
b20a6524
MM
64132015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6414
6415 * linux-low.c: Include "rsp-low.h"
6416 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6417 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6418 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6419 (handle_btrace_enable_pt): New.
6420 (handle_btrace_general_set): Support "pt".
6421 (handle_btrace_conf_general_set): Support "pt:size".
6422
96c97461
PL
64232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6424
6425 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6426 Z_PACKET_SW_BP.
6427
37d66942
PL
64282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6429
6430 * linux-aarch64-low.c: Remove comment about endianness.
6431 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6432 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6433 memcmp.
6434
dc06243f
GB
64352015-06-24 Gary Benson <gbenson@redhat.com>
6436
6437 * linux-i386-ipa.c (stdint.h): Do not include.
6438 * lynx-i386-low.c (stdint.h): Likewise.
6439 * lynx-ppc-low.c (stdint.h): Likewise.
6440 * mem-break.c (stdint.h): Likewise.
6441 * thread-db.c (stdint.h): Likewise.
6442 * tracepoint.c (stdint.h): Likewise.
6443 * win32-low.c (stdint.h): Likewise.
6444
124e13d9
SM
64452015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * server.c (write_qxfer_response): Update call to
6448 remote_escape_output.
6449
909c2cda
JK
64502015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6451 Jan Kratochvil <jan.kratochvil@redhat.com>
6452
6453 Merge multiple hex conversions.
6454 * gdbreplay.c (tohex): Rename to 'fromhex'.
6455 (logchar): Use fromhex.
6456
24c05f46
JK
64572015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6458
6459 * server.c (handle_qxfer_libraries): Set `version' attribute for
6460 <library-list>.
6461
14d2069a
GB
64622015-06-10 Gary Benson <gbenson@redhat.com>
6463
6464 * target.h (struct target_ops) <multifs_open>: New field.
6465 <multifs_unlink>: Likewise.
6466 <multifs_readlink>: Likewise.
6467 * linux-low.c (nat/linux-namespaces.h): New include.
6468 (linux_target_ops): Initialize the_target->multifs_open,
6469 the_target->multifs_unlink and the_target->multifs_readlink.
6470 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6471 * hostio.c (hostio_fs_pid): New static variable.
6472 (hostio_handle_new_gdb_connection): New function.
6473 (handle_setfs): Likewise.
6474 (handle_open): Use the_target->multifs_open as appropriate.
6475 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6476 (handle_readlink): Use the_target->multifs_readlink as
6477 appropriate.
6478 (handle_vFile): Handle vFile:setfs packets.
6479 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6480 after target_handle_new_gdb_connection.
6481
4b8b5e72
GB
64822015-06-10 Gary Benson <gbenson@redhat.com>
6483
6484 * configure.ac (AC_CHECK_FUNCS): Add setns.
6485 * config.in: Regenerate.
6486 * configure: Likewise.
6487 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6488 (linux-namespaces.o): New rule.
6489 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6490
3ac2e371
GB
64912015-06-09 Gary Benson <gbenson@redhat.com>
6492
6493 * hostio.c (handle_open): Process mode argument with
6494 fileio_to_host_mode.
6495
ca9b78ce
YQ
64962015-06-01 Yao Qi <yao.qi@linaro.org>
6497
6498 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6499 * linux-x86-low.c: Likewise.
6500
bfacd19d
DB
65012015-05-28 Don Breazeal <donb@codesourcery.com>
6502
6503 * linux-low.c (handle_extended_wait): Initialize
6504 thread_info.last_resume_kind for new fork children.
6505
452003ef
PA
65062015-05-15 Pedro Alves <palves@redhat.com>
6507
6508 * target.h (target_handle_new_gdb_connection): Rewrite using if
6509 wrapped in do/while.
6510
1041a03c
JB
65112015-05-14 Joel Brobecker <brobecker@adacore.com>
6512
6513 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6514 * configure, config.in: Regenerate.
6515 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6516 Declare typedef.
6517
c269dbdb
DB
65182015-05-12 Don Breazeal <donb@codesourcery.com>
6519
6520 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6521 PTRACE_EVENT_VFORK_DONE.
6522 (linux_low_ptrace_options, extended_event_reported): Add vfork
6523 events.
6524 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6525 and "vforkdone" for RSP 'T' Stop Reply Packet.
6526 * server.h (report_vfork_events): Declare
6527 global variable.
6528
3a8a0396
DB
65292015-05-12 Don Breazeal <donb@codesourcery.com>
6530
6531 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6532 (the_low_target) <new_fork>: Initialize new member.
6533 * linux-arm-low.c (arm_new_fork): New function.
6534 (the_low_target) <new_fork>: Initialize new member.
6535 * linux-low.c (handle_extended_wait): Call new target function
6536 new_fork.
6537 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6538 * linux-mips-low.c (mips_add_watchpoint): New function
6539 extracted from mips_insert_point.
6540 (the_low_target) <new_fork>: Initialize new member.
6541 (mips_linux_new_fork): New function.
6542 (mips_insert_point): Call mips_add_watchpoint.
6543 * linux-x86-low.c (x86_linux_new_fork): New function.
6544 (the_low_target) <new_fork>: Initialize new member.
6545
de0d863e
DB
65462015-05-12 Don Breazeal <donb@codesourcery.com>
6547
6548 * linux-low.c (handle_extended_wait): Implement return value,
6549 rename argument 'event_child' to 'event_lwp', handle
6550 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6551 (linux_low_ptrace_options): New function.
6552 (linux_low_filter_event): Call linux_low_ptrace_options,
6553 use different argument fo linux_enable_event_reporting,
6554 use return value from handle_extended_wait.
6555 (extended_event_reported): New function.
6556 (linux_wait_1): Call extended_event_reported and set
6557 status to report fork events.
6558 (linux_write_memory): Add pid to debug message.
6559 (reset_lwp_ptrace_options_callback): New function.
6560 (linux_handle_new_gdb_connection): New function.
6561 (linux_target_ops): Initialize new structure member.
6562 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6563 * lynx-low.c: Initialize new structure member.
6564 * remote-utils.c (prepare_resume_reply): Implement stop reason
6565 "fork" for "T" stop message.
6566 * server.c (handle_query): Call handle_new_gdb_connection.
6567 * server.h (report_fork_events): Declare global flag.
6568 * target.h (struct target_ops) <handle_new_gdb_connection>:
6569 New member.
6570 (target_handle_new_gdb_connection): New macro.
6571 * win32-low.c: Initialize new structure member.
6572
ddcbc397
DB
65732015-05-12 Don Breazeal <donb@codesourcery.com>
6574
6575 * mem-break.c (APPEND_TO_LIST): Define macro.
6576 (clone_agent_expr): New function.
6577 (clone_one_breakpoint): New function.
6578 (clone_all_breakpoints): New function.
6579 * mem-break.h: Declare new functions.
6580
89245bc0
DB
65812015-05-12 Don Breazeal <donb@codesourcery.com>
6582
6583 * linux-low.c (linux_supports_fork_events): New function.
6584 (linux_supports_vfork_events): New function.
6585 (linux_target_ops): Initialize new structure members.
6586 (initialize_low): Call linux_check_ptrace_features.
6587 * lynx-low.c (lynx_target_ops): Initialize new structure
6588 members.
6589 * server.c (report_fork_events, report_vfork_events):
6590 New global flags.
6591 (handle_query): Add new features to qSupported packet and
6592 response.
6593 (captured_main): Initialize new global variables.
6594 * target.h (struct target_ops) <supports_fork_events>:
6595 New member.
6596 <supports_vfork_events>: New member.
6597 (target_supports_fork_events): New macro.
6598 (target_supports_vfork_events): New macro.
6599 * win32-low.c (win32_target_ops): Initialize new structure
6600 members.
6601
835205d0
GB
66022015-05-12 Gary Benson <gbenson@redhat.com>
6603
6604 * server.c (handle_qxfer_exec_file): Use current process
6605 if annex is empty.
6606
21e94bd9
SL
66072015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6608
6609 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6610 Remove HAVE_PTRACE_GETREGS conditionals.
6611 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6612 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6613
45614f15
YQ
66142015-05-08 Yao Qi <yao.qi@linaro.org>
6615
6616 * linux-low.c (linux_supports_conditional_breakpoints): New
6617 function.
6618 (linux_target_ops): Install new target method.
6619 * lynx-low.c (lynx_target_ops): Install NULL hook for
6620 supports_conditional_breakpoints.
6621 * nto-low.c (nto_target_ops): Likewise.
6622 * spu-low.c (spu_target_ops): Likewise.
6623 * win32-low.c (win32_target_ops): Likewise.
6624 * server.c (handle_query): Check
6625 target_supports_conditional_breakpoints.
6626 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6627 New field.
6628 (target_supports_conditional_breakpoints): New macro.
6629
80ad801e
PA
66302015-05-06 Pedro Alves <palves@redhat.com>
6631
6632 PR server/18081
6633 * server.c (start_inferior): If the process exits, mourn it.
6634
819843c7
GB
66352015-04-21 Gary Benson <gbenson@redhat.com>
6636
6637 * hostio.c (fileio_open_flags_to_host): Factored out to
6638 fileio_to_host_openflags in common/fileio.c. Single use
6639 updated.
6640
a2d5a9d7
MF
66412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6642
6643 * linux-xtensa-low.c (xtensa_fill_gregset)
6644 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6645 XCHAL_HAVE_LOOP.
6646
deb44829
MF
66472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6648
6649 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6650 (regs_info): Replace usrregs pointer with NULL.
6651
e57f1de3
GB
66522015-04-17 Gary Benson <gbenson@redhat.com>
6653
6654 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6655 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6656 * server.c (handle_qxfer_exec_file): New function.
6657 (qxfer_packets): Add exec-file entry.
6658 (handle_query): Report qXfer:exec-file:read as supported packet.
6659
62828379
RN
66602015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6661
6662 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6663
b88bb450
GB
66642015-04-09 Gary Benson <gbenson@redhat.com>
6665
6666 * hostio-errno.c (errno_to_fileio_error): Remove function.
6667 Update caller to use remote_fileio_to_fio_error.
6668
c8f4bfdd
YQ
66692015-04-09 Yao Qi <yao.qi@linaro.org>
6670
6671 * linux-low.c (linux_insert_point): Call
6672 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6673 (linux_remove_point): Call remove_memory_breakpoint if type is
6674 raw_bkpt_type_sw.
6675 * linux-x86-low.c (x86_insert_point): Don't call
6676 insert_memory_breakpoint.
6677 (x86_remove_point): Don't call remove_memory_breakpoint.
6678
41f98f02
PA
66792015-04-01 Pedro Alves <palves@redhat.com>
6680 Cleber Rosa <crosa@redhat.com>
6681
6682 * server.c (gdbserver_usage): Reorganize and extend the usage
6683 message.
6684
2bf6fb9d
PA
66852015-03-24 Pedro Alves <palves@redhat.com>
6686
6687 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6688 output. Also dump TRAP_TRACE.
6689 (linux_low_filter_event): In debug output, distinguish a
6690 resume_stop SIGSTOP from a delayed SIGSTOP.
6691
369f6daa
GB
66922015-03-24 Gary Benson <gbenson@redhat.com>
6693
6694 * linux-x86-low.c (x86_linux_new_thread): Moved to
6695 nat/x86-linux.c.
6696 (x86_linux_prepare_to_resume): Likewise.
6697
8e5d4070
GB
66982015-03-24 Gary Benson <gbenson@redhat.com>
6699
6700 * Makefile.in (x86-linux-dregs.o): New rule.
6701 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6702 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6703 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6704 (x86_linux_dr_get): Likewise.
6705 (x86_linux_dr_set): Likewise.
6706 (update_debug_registers_callback): Likewise.
6707 (x86_linux_dr_set_addr): Likewise.
6708 (x86_linux_dr_get_addr): Likewise.
6709 (x86_linux_dr_set_control): Likewise.
6710 (x86_linux_dr_get_control): Likewise.
6711 (x86_linux_dr_get_status): Likewise.
6712 (x86_linux_update_debug_registers): Likewise.
6713
2b95d440
GB
67142015-03-24 Gary Benson <gbenson@redhat.com>
6715
6716 * linux-x86-low.c (x86_linux_update_debug_registers):
6717 New function, factored out from...
6718 (x86_linux_prepare_to_resume): ...this.
6719
14b0bc68
GB
67202015-03-24 Gary Benson <gbenson@redhat.com>
6721
6722 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6723 (x86_linux_dr_set): Likewise.
6724 (update_debug_registers_callback): Likewise.
6725 (x86_linux_dr_set_addr): Likewise.
6726 (x86_linux_dr_get_addr): Likewise.
6727 (x86_linux_dr_set_control): Likewise.
6728 (x86_linux_dr_get_control): Likewise.
6729 (x86_linux_dr_get_status): Likewise.
6730 (x86_linux_prepare_to_resume): Likewise.
6731
5dfe6ca8
GB
67322015-03-24 Gary Benson <gbenson@redhat.com>
6733
6734 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6735 Use perror_with_name. Pass string through gettext.
6736 (x86_linux_dr_set): Likewise.
6737
d33472ad
GB
67382015-03-24 Gary Benson <gbenson@redhat.com>
6739
6740 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6741 (x86_linux_dr_set_addr): ...this.
6742 (x86_dr_low_get_addr): Rename to...
6743 (x86_linux_dr_get_addr): ...this.
6744 (x86_dr_low_set_control): Rename to...
6745 (x86_linux_dr_set_control): ...this.
6746 (x86_dr_low_get_control): Rename to...
6747 (x86_linux_dr_get_control): ...this.
6748 (x86_dr_low_get_status): Rename to...
6749 (x86_linux_dr_get_status): ...this.
6750 (x86_dr_low): Update with new function names.
6751
4b134ca1
GB
67522015-03-24 Gary Benson <gbenson@redhat.com>
6753
6754 * Makefile.in (x86-linux.o): New rule.
6755 * configure.srv: Add x86-linux.o to relevant targets.
6756 * linux-low.c (lwp_set_arch_private_info): New function.
6757 (lwp_arch_private_info): Likewise.
6758 * linux-x86-low.c: Include nat/x86-linux.h.
6759 (arch_lwp_info): Removed structure.
6760 (update_debug_registers_callback):
6761 Use lwp_set_debug_registers_changed.
6762 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6763 and lwp_set_debug_registers_changed.
6764 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6765
34c703da
GB
67662015-03-24 Gary Benson <gbenson@redhat.com>
6767
6768 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6769 * linux-arm-low.c (arm_new_thread): Likewise.
6770 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6771 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6772 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6773 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6774
cff068da
GB
67752015-03-24 Gary Benson <gbenson@redhat.com>
6776
6777 * linux-low.c (ptid_of_lwp): New function.
6778 (lwp_is_stopped): Likewise.
6779 (lwp_stop_reason): Likewise.
6780 * linux-x86-low.c (update_debug_registers_callback):
6781 Use lwp_is_stopped.
6782 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6783 lwp_stop_reason.
6784
b2f7c7e8
GB
67852015-03-24 Gary Benson <gbenson@redhat.com>
6786
6787 * linux-low.h (linux_stop_lwp): Remove declaration.
6788
6d4ee8c6
GB
67892015-03-24 Gary Benson <gbenson@redhat.com>
6790
6791 * linux-low.h: Include nat/linux-nat.h.
6792 * linux-low.c (iterate_over_lwps_args): New structure.
6793 (iterate_over_lwps_filter): New function.
6794 (iterate_over_lwps): Likewise.
6795 * linux-x86-low.c (update_debug_registers_callback):
6796 Update signature to what iterate_over_lwps expects.
6797 Remove PID check that iterate_over_lwps now performs.
6798 (x86_dr_low_set_addr): Use iterate_over_lwps.
6799 (x86_dr_low_set_control): Likewise.
6800
70a0bb6b
GB
68012015-03-24 Gary Benson <gbenson@redhat.com>
6802
6803 * linux-x86-low.c (x86_debug_reg_state): New function.
6804 (x86_linux_prepare_to_resume): Use the above.
6805
7b669087
GB
68062015-03-24 Gary Benson <gbenson@redhat.com>
6807
6808 * linux-low.c (current_lwp_ptid): New function.
6809 * linux-x86-low.c: Include nat/linux-nat.h.
6810 (x86_dr_low_get_addr): Use current_lwp_ptid.
6811 (x86_dr_low_get_control): Likewise.
6812 (x86_dr_low_get_status): Likewise.
6813
eef49a3d
PA
68142015-03-20 Pedro Alves <palves@redhat.com>
6815
6816 * tracepoint.c (cmd_qtstatus): Make "str" const.
6817
b2333d22
PA
68182015-03-20 Pedro Alves <palves@redhat.com>
6819
6820 * server.c (handle_general_set): Make "req_str" const.
6821
23f238d3
PA
68222015-03-19 Pedro Alves <palves@redhat.com>
6823
6824 * linux-low.c (linux_resume_one_lwp): Rename to ...
6825 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6826 instead call perror_with_name.
6827 (check_ptrace_stopped_lwp_gone): New function.
6828 (linux_resume_one_lwp): Reimplement as wrapper around
6829 linux_resume_one_lwp_throw that swallows errors if the LWP is
6830 gone.
6831
91baf43f
PA
68322015-03-19 Pedro Alves <palves@redhat.com>
6833
6834 * linux-low.c (count_events_callback, select_event_lwp_callback):
6835 No longer check whether the thread has resume_stop as last resume
6836 kind.
6837
8bf3b159
PA
68382015-03-19 Pedro Alves <palves@redhat.com>
6839
6840 * linux-low.c (count_events_callback, select_event_lwp_callback):
6841 Use the lwp's status_pending_p field, not the thread's.
6842
b90fc188
PA
68432015-03-19 Pedro Alves <palves@redhat.com>
6844
6845 * linux-low.c (select_event_lwp_callback): Update comments to
6846 no longer mention SIGTRAP.
6847
464b0089
GB
68482015-03-18 Gary Benson <gbenson@redhat.com>
6849
6850 * server.c (handle_query): Do not report vFile:fstat as supported.
6851
aa9e327f
GB
68522015-03-11 Gary Benson <gbenson@redhat.com>
6853
6854 * hostio.c (sys/types.h): New include.
6855 (sys/stat.h): Likewise.
6856 (common-remote-fileio.h): Likewise.
6857 (handle_fstat): New function.
6858 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6859
791c0056
GB
68602015-03-11 Gary Benson <gbenson@redhat.com>
6861
6862 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6863 struct stat.st_blocks and struct stat.st_blksize.
6864 * configure: Regenerate.
6865 * config.in: Likewise.
6866 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6867 (OBS): Add common-remote-fileio.o.
6868 (common-remote-fileio.o): New rule.
6869
9a9df970
PA
68702015-03-09 Pedro Alves <palves@redhat.com>
6871
6872 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6873 'struct sockaddr' pointer in 'accept' call.
6874
9eb1356e
PA
68752015-03-09 Pedro Alves <palves@redhat.com>
6876
6877 Revert:
6878 2015-03-07 Pedro Alves <palves@redhat.com>
6879 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6880 or <winsock2.h> here. Instead include "gdb_socket.h".
6881 (remote_open): Use union gdb_sockaddr_u.
6882 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6883 or <winsock2.h> here. Instead include "gdb_socket.h".
6884 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6885 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6886 or <sys/un.h>.
6887 (init_named_socket, gdb_agent_helper_thread): Use union
6888 gdb_sockaddr_u.
6889
aac331e4
PA
68902015-03-07 Pedro Alves <palves@redhat.com>
6891
6892 * configure.ac (build_warnings): Move
6893 -Wdeclaration-after-statement to the C-specific set.
6894 * configure: Regenerate.
6895
366c75fc
PA
68962015-03-07 Pedro Alves <palves@redhat.com>
6897
6898 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6899 or <winsock2.h> here. Instead include "gdb_socket.h".
6900 (remote_open): Use union gdb_sockaddr_u.
6901 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6902 or <winsock2.h> here. Instead include "gdb_socket.h".
6903 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6904 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6905 or <sys/un.h>.
6906 (init_named_socket, gdb_agent_helper_thread): Use union
6907 gdb_sockaddr_u.
6908
492d29ea
PA
69092015-03-07 Pedro Alves <palves@redhat.com>
6910
6911 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6912 instead.
6913
60a191ed
YQ
69142015-03-06 Yao Qi <yao.qi@linaro.org>
6915
6916 * linux-aarch64-low.c (aarch64_insert_point): Use
6917 show_debug_regs as a boolean.
6918 (aarch64_remove_point): Likewise.
6919
f5771b1d
PA
69202015-03-05 Pedro Alves <palves@redhat.com>
6921
6922 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6923 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6924 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6925 * nto-low.c (nto_target_ops): Likewise.
6926 * spu-low.c (spu_target_ops): Likewise.
6927 * win32-low.c (win32_target_ops): Likewise.
6928
3e572f71
PA
69292015-03-04 Pedro Alves <palves@redhat.com>
6930
72f4393d 6931 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6932 Decide whether a breakpoint triggered based on the SIGTRAP's
6933 siginfo.si_code.
72f4393d
L
6934 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6935 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6936 (linux_low_filter_event): Check for breakpoints before checking
6937 watchpoints.
6938 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6939 siginfo.si_code.
72f4393d
L
6940 (linux_stopped_by_sw_breakpoint)
6941 (linux_supports_stopped_by_sw_breakpoint)
6942 (linux_stopped_by_hw_breakpoint)
6943 (linux_supports_stopped_by_hw_breakpoint): New functions.
6944 (linux_target_ops): Install new target methods.
3e572f71 6945
1ec68e26
PA
69462015-03-04 Pedro Alves <palves@redhat.com>
6947
6948 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6949 * server.c (swbreak_feature, hwbreak_feature): New globals.
6950 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6951 (captured_main): Clear swbreak_feature and hwbreak_feature.
6952 * server.h (swbreak_feature, hwbreak_feature): Declare.
6953 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6954 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6955 supports_stopped_by_hw_breakpoint>: New fields.
6956 (target_supports_stopped_by_sw_breakpoint)
6957 (target_stopped_by_sw_breakpoint)
6958 (target_supports_stopped_by_hw_breakpoint)
6959 (target_stopped_by_hw_breakpoint): Declare.
6960
15c66dd6
PA
69612015-03-04 Pedro Alves <palves@redhat.com>
6962
6963 enum lwp_stop_reason -> enum target_stop_reason
6964 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6965 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6966 (linux_wait_1, stuck_in_jump_pad_callback)
6967 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6968 (linux_stopped_by_watchpoint):
6969 * linux-low.h (enum lwp_stop_reason): Delete.
6970 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6971 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6972
98fc70d6
YQ
69732015-03-04 Yao Qi <yao.qi@linaro.org>
6974
6975 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6976
dd2ac174
GB
69772015-03-03 Gary Benson <gbenson@redhat.com>
6978
6979 * hostio.c (handle_vFile): Fix prefix lengths.
6980
d68e53f4
MM
69812015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6982
6983 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6984 ptr_bits.
6985
bf2d68ab
AA
69862015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6987
6988 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6989 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6990 (clean): Add "rm -f" for above C files.
6991 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6992 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6993 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6994 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6995 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6996 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6997 (init_registers_s390x_vx_linux64)
6998 (init_registers_s390x_tevx_linux64)
6999 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7000 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7001 declarations.
7002 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7003 (s390_store_vxrs_high): New functions.
7004 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7005 NT_S390_VXRS_HIGH.
7006 (s390_arch_setup): Add logic for selecting one of the new target
7007 descriptions. Activate the new vector regsets if applicable.
7008 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7009 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7010 and init_registers_s390x_tevx_linux64.
7011
c966a859
PA
70122015-03-01 Pedro Alves <palves@redhat.com>
7013
7014 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7015 parameter.
7016
4180215b
PA
70172015-02-27 Pedro Alves <palves@redhat.com>
7018
7019 * linux-x86-low.c (u_debugreg_offset): New function.
7020 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7021
749bab01
PA
70222015-02-27 Pedro Alves <palves@redhat.com>
7023
7024 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7025 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7026 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7027 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7028 (ps_lsetfpregs, ps_getpid)
7029 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7030 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7031 (ps_lsetxregs, ps_plog): Declare.
7032
3c14e5a3
PA
70332015-02-27 Pedro Alves <palves@redhat.com>
7034
7035 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7036 IP_AGENT_EXPORT_FUNC.
7037 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7038 IP_AGENT_EXPORT_FUNC.
7039 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7040 (IP_AGENT_EXPORT): Delete.
7041 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7042 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7043 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7044 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7045 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7046 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7047 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7048 (traceframe_read_count, traceframe_write_count)
7049 (traceframes_created, trace_state_variables, get_raw_reg)
7050 (get_trace_state_variable_value, set_trace_state_variable_value)
7051 (ust_loaded, helper_thread_id, cmd_buf): Use
7052 IPA_SYM_EXPORTED_NAME.
7053 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7054 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7055 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7056 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7057 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7058 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7059 EXTERN_C_PUSH/EXTERN_C_POP.
7060 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7061 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7062 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7063 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7064 (traceframe_write_count, traceframe_read_count)
7065 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7066 (about_to_request_buffer_space, get_trace_state_variable_value)
7067 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7068 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7069 EXTERN_C_PUSH/EXTERN_C_POP.
7070 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7071 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7072 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7073 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7074 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7075 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7076 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7077 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7078 Define.
7079 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7080 (IP_AGENT_EXPORT_VAR_DECL): Define.
7081 (tracing): Declare.
7082 (gdb_agent_get_raw_reg): Declare.
7083
fe978cb0
PA
70842015-02-27 Tom Tromey <tromey@redhat.com>
7085 Pedro Alves <palves@redhat.com>
7086
7087 Rename symbols whose names are reserved C++ keywords throughout.
7088
3bc3d82a
PA
70892015-02-27 Pedro Alves <palves@redhat.com>
7090
7091 * Makefile.in (COMPILER): New, get it from autoconf.
7092 (CXX): Get from autoconf instead.
7093 (COMPILE.pre): Use COMPILER.
7094 (CC-LD): Rename to ...
7095 (CC_LD): ... this. Use COMPILER.
7096 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7097 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7098 * acinclude.m4: Include build-with-cxx.m4.
7099 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7100 Disable -Werror by default if building in C++ mode.
7101 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7102 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7103 the C++ compiler. Save/restore CXXFLAGS too.
7104 * configure: Regenerate.
7105
07697489
PA
71062015-02-27 Pedro Alves <palves@redhat.com>
7107
7108 * acinclude.m4: Include libiberty.m4.
7109 * configure.ac: Call libiberty_INIT.
7110 * config.in, configure: Regenerate.
7111
9beb7c4e
PA
71122015-02-26 Pedro Alves <palves@redhat.com>
7113
7114 * linux-low.c (linux_wait_1): When incrementing the PC past a
7115 program breakpoint always use the_low_target.breakpoint_len as
7116 increment, rather than the maximum between that and
7117 the_low_target.decr_pc_after_break.
7118
8090aef2
PA
71192015-02-23 Pedro Alves <palves@redhat.com>
7120
7121 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7122 thread was doing a step-over; always adjust the PC if
7123 we stepped over a permanent breakpoint.
7124 (linux_wait_1): If we stepped over breakpoint that was on top of a
7125 permanent breakpoint, manually advance the PC past it.
7126
bc9540e8
PA
71272015-02-23 Pedro Alves <palves@redhat.com>
7128
7129 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7130 modes.
7131 (x86_fill_gregset, x86_store_gregset): Use it when handling
7132 $orig_eax.
7133
2db9a427
PA
71342015-02-20 Pedro Alves <palves@redhat.com>
7135
7136 * thread-db.c: Include "nat/linux-procfs.h".
7137 (thread_db_init): Skip listing new threads if the kernel supports
7138 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7139
afa8d396
PA
71402015-02-20 Pedro Alves <palves@redhat.com>
7141
7142 * linux-low.c (status_pending_p_callback): Use ptid_match.
7143
c9587f88
AT
71442015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7145
7146 PR breakpoints/16812
7147 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7148 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7149 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7150
b05ec7a5
AT
71512015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7152
7153 PR breakpoints/15956
7154 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7155
d33501a5
MM
71562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7157
7158 * linux-low.c (linux_low_btrace_conf): Print size.
7159 * server.c (handle_btrace_conf_general_set): New.
7160 (hanle_general_set): Call handle_btrace_conf_general_set.
7161 (handle_query): Report Qbtrace-conf:bts:size as supported.
7162
f4abbc16
MM
71632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7164
7165 * linux-low.c (linux_low_enable_btrace): Update parameters.
7166 (linux_low_btrace_conf): New.
7167 (linux_target_ops)<to_btrace_conf>: Initialize.
7168 * server.c (current_btrace_conf): New.
7169 (handle_btrace_enable): Rename to ...
7170 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7171 to target_enable_btrace. Update comment. Update users.
7172 (handle_qxfer_btrace_conf): New.
7173 (qxfer_packets): Add btrace-conf entry.
7174 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7175 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7176 (target_ops)<read_btrace_conf>: New.
7177 (target_enable_btrace): Update parameters.
7178 (target_read_btrace_conf): New.
7179
043c3577
MM
71802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7181
7182 * server.c (handle_btrace_general_set): Remove call to
7183 target_supports_btrace.
7184 (supported_btrace_packets): New.
7185 (handle_query): Call supported_btrace_packets.
7186 * target.h: include btrace-common.h.
7187 (btrace_target_info): Removed.
7188 (supports_btrace, target_supports_btrace): Update parameters.
7189
734b0e4b
MM
71902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7191
7192 * Makefile.in (SFILES): Add common/btrace-common.c.
7193 (OBS): Add common/btrace-common.o.
7194 (btrace-common.o): Add build rules.
7195 * linux-low: Include btrace-common.h.
7196 (linux_low_read_btrace): Use struct btrace_data. Call
7197 btrace_data_init and btrace_data_fini.
7198
d6c146e9
PA
71992015-02-06 Pedro Alves <palves@redhat.com>
7200
7201 * thread-db.c (find_new_threads_callback): Add debug output.
7202
20ba1ce6
PA
72032015-02-04 Pedro Alves <palves@redhat.com>
7204
7205 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7206 (resume_stopped_resumed_lwps): New function.
7207 (linux_wait_for_event_filtered): Use it.
7208
8cc73a39
SDJ
72092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7210
7211 * Makefile.in (SFILES): Add linux-personality.c.
7212 (linux-personality.o): New rule.
7213 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7214 list of objects to be built.
7215 * linux-low.c: Include nat/linux-personality.h.
7216 (linux_create_inferior): Remove code to disable address space
7217 randomization (moved to ../nat/linux-personality.c). Create
7218 cleanup to disable address space randomization.
7219
fb23d554
SDJ
72202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7221
7222 * Makefile.in (posix-strerror.o): New rule.
7223 (mingw-strerror.o): Likewise.
7224 * configure: Regenerated.
7225 * configure.ac: Source file ../common/common.host. Initialize new
7226 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7227
cdf43629
YQ
72282015-01-14 Yao Qi <yao@codesourcery.com>
7229
7230 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7231 (ppc-linux.o): New rule.
7232 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7233 * configure.ac: AC_CHECK_FUNCS(getauxval).
7234 * config.in: Re-generated.
7235 * configure: Re-generated.
7236 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7237 ppc64_64bit_inferior_p
7238
514c5338
YQ
72392015-01-14 Yao Qi <yao@codesourcery.com>
7240
7241 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7242 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7243 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7244 (PT_ORIG_R3, PT_TRAP): Likewise.
7245 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7246 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7247 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7248
3368c1e5
JB
72492015-01-10 Joel Brobecker <brobecker@adacore.com>
7250
7251 * i387-fp.c (i387_cache_to_xsave): In look over
7252 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7253 zmmh_low_space field by use of zmmh_high_space.
7254
582511be
PA
72552015-01-09 Pedro Alves <palves@redhat.com>
7256
7257 * linux-low.c (step_over_bkpt): Move higher up in the file.
7258 (handle_extended_wait): Don't store the stop_pc here.
7259 (get_stop_pc): Adjust comments and rename to ...
7260 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7261 stopped for a software breakpoint or hardware breakpoint.
7262 (thread_still_has_status_pending_p): New function.
7263 (status_pending_p_callback): Use
7264 thread_still_has_status_pending_p. If the event is no longer
7265 interesting, resume the LWP.
7266 (handle_tracepoints): Add assert.
7267 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7268 (wstatus_maybe_breakpoint): New function.
7269 (cancel_breakpoint): Delete function.
7270 (check_stopped_by_watchpoint): New function, factored out from
7271 linux_low_filter_event.
7272 (lp_status_maybe_breakpoint): Delete function.
7273 (linux_low_filter_event): Remove filter_ptid argument.
7274 Leave thread group exits pending here. Store the LWP's stop PC.
7275 Always leave events pending.
7276 (linux_wait_for_event_filtered): Pull all events out of the
7277 kernel, and leave them all pending.
7278 (count_events_callback, select_event_lwp_callback): Consider all
7279 events.
7280 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7281 (select_event_lwp): Only give preference to the stepping LWP in
7282 all-stop mode. Adjust comments.
7283 (ignore_event): New function.
7284 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7285 references to cancel_breakpoints. Adjust to renames. Also give
7286 equal priority to all LWPs that have had events in non-stop mode.
7287 If reporting a software breakpoint event, unadjust the LWP's PC.
7288 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7289 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7290 Adjust.
7291 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7292 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7293 (linux_stopped_by_watchpoint): Adjust.
7294 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7295 * linux-low.h (enum lwp_stop_reason): New.
7296 (struct lwp_info) <stop_pc>: Adjust comment.
7297 <stopped_by_watchpoint>: Delete field.
7298 <stop_reason>: New field.
7299 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7300 * mem-break.c (software_breakpoint_inserted_here)
7301 (hardware_breakpoint_inserted_here): New function.
7302 * mem-break.h (software_breakpoint_inserted_here)
7303 (hardware_breakpoint_inserted_here): Declare.
7304 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7305 (cancel_breakpoints): Delete.
7306 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7307 (upload_fast_traceframes): Remove references to
7308 cancel_breakpoints.
7309
a33e3959
PA
73102015-01-09 Pedro Alves <palves@redhat.com>
7311
7312 * thread-db.c (find_new_threads_callback): Ignore thread if the
7313 kernel thread ID is -1.
7314
8784d563
PA
73152015-01-09 Pedro Alves <palves@redhat.com>
7316
7317 * linux-low.c (linux_attach_fail_reason_string): Move to
7318 nat/linux-ptrace.c, and rename.
7319 (linux_attach_lwp): Update comment.
7320 (attach_proc_task_lwp_callback): New function.
7321 (linux_attach): Adjust to rename and use
7322 linux_proc_attach_tgid_threads.
7323 (linux_attach_fail_reason_string): Delete declaration.
7324
76f2b779
JB
73252015-01-01 Joel Brobecker <brobecker@adacore.com>
7326
7327 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7328 * server.c (gdbserver_version): Likewise.
7329
fafcc06a
SDJ
73302014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7331
7332 * remote-utils.c: Include ctype.h.
7333 (input_interrupt): Explicitly handle the case when the char
7334 received is the NUL byte. Improve the printing of non-ASCII
7335 characters.
7336
beed38b8
JB
73372014-12-16 Joel Brobecker <brobecker@adacore.com>
7338
7339 * linux-low.c (linux_low_filter_event): Update call to
7340 linux_enable_event_reporting following the addition of
7341 a new parameter to that function.
7342
bf330350
CU
73432014-12-16 Catalin Udma <catalin.udma@freescale.com>
7344
7345 PR server/17457
7346 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7347 (AARCH64_FPCR_REGNO): Likewise.
7348 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7349 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7350 (aarch64_store_fpregset): Likewise.
7351
5227d625
JB
73522014-12-15 Joel Brobecker <brobecker@adacore.com>
7353
7354 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7355 Remove FIXME comment about assumption about N.
7356
f93b65a0
JB
73572014-12-13 Joel Brobecker <brobecker@adacore.com>
7358
7359 * configure.ac: If large-file support is disabled in GDBserver,
7360 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7361 * configure: Regenerate.
7362
e5a9158d
AA
73632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7364
7365 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7366 warning upon ENODATA from ptrace.
7367 * linux-s390-low.c (s390_store_tdb): New.
7368 (s390_regsets): Add regset for NT_S390_TDB.
7369
feea5f36
AA
73702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7371
7372 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7373 without a fill_function.
7374 * linux-s390-low.c (s390_fill_last_break): Remove.
7375 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7376 (s390_arch_setup): Use regset's size instead of fill_function for
7377 loop end condition.
7378
098dbe61
AA
73792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7380
7381 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7382 the regset's store function when ptrace returned an error.
7383 * regcache.c (get_thread_regcache): Invalidate register cache
7384 before fetching inferior's registers.
7385
28eef672
AA
73862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7387
7388 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7389 while-loop as for-loop.
7390 (regsets_store_inferior_registers): Likewise.
7391
bdca27a2
YQ
73922014-11-28 Yao Qi <yao@codesourcery.com>
7393
7394 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7395 * config.in, configure: Re-generate.
7396 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7397 is defined.
7398
9c232dda
YQ
73992014-11-21 Yao Qi <yao@codesourcery.com>
7400
7401 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7402 (AC_CHECK_HEADERS): Remove malloc.h.
7403 * configure: Re-generated.
7404 * config.in: Re-generated.
7405 * server.h: Don't include alloca.h and malloc.h.
7406 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7407 Don't include malloc.h.
7408
43968415
JB
74092014-11-17 Joel Brobecker <brobecker@adacore.com>
7410
7411 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7412 corresponding ERRNO check in same block.
7413
40e91bc7
PA
74142014-11-12 Pedro Alves <palves@redhat.com>
7415
7416 * server.c (cont_thread): Update comment.
7417 (start_inferior, attach_inferior): No longer clear cont_thread.
7418 (handle_v_cont): No longer set cont_thread.
7419 (captured_main): Clear cont_thread each time a GDB connects.
7420
c2c118cf
PA
74212014-11-12 Pedro Alves <palves@redhat.com>
7422
7423 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7424 thread, and don't resume all threads if the Hc thread has exited.
7425
78708b7c
PA
74262014-11-12 Pedro Alves <palves@redhat.com>
7427
7428 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7429 the process group instead of to a specific LWP.
7430
a2abc7de
PA
74312014-10-15 Pedro Alves <palves@redhat.com>
7432
7433 PR server/17487
7434 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7435 parameter.
7436 (arm_set_thread_context): Delete.
7437 (the_low_target): Adjust.
7438 * win32-i386-low.c (debug_registers_changed)
7439 (debug_registers_used): Delete.
7440 (update_debug_registers_callback): New function.
7441 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7442 needing to update their debug registers.
7443 (win32_get_current_dr): New function.
7444 (x86_dr_low_get_addr, x86_dr_low_get_control)
7445 (x86_dr_low_get_status): Fetch the debug register from the thread
7446 record's context.
7447 (i386_initial_stuff): Adjust.
7448 (i386_get_thread_context): Remove current_event parameter. Don't
7449 clear debug_registers_changed nor copy DR values to
7450 debug_reg_state.
7451 (i386_set_thread_context): Delete.
7452 (i386_prepare_to_resume): New function.
7453 (i386_thread_added): Mark the thread as needing to update irs
7454 debug registers.
7455 (the_low_target): Remove i386_set_thread_context and install
7456 i386_prepare_to_resume.
7457 * win32-low.c (win32_get_thread_context): Adjust.
7458 (win32_set_thread_context): Use SetThreadContext
7459 directly.
7460 (win32_prepare_to_resume): New function.
7461 (win32_require_context): New function, factored out from ...
7462 (thread_rec): ... this.
7463 (continue_one_thread): Call win32_prepare_to_resume on each thread
7464 we're about to continue.
7465 (win32_resume): Call win32_prepare_to_resume on the event thread.
7466 * win32-low.h (struct win32_thread_info)
7467 <debug_registers_changed>: New field.
7468 (struct win32_target_ops): Change prototype of set_thread_context,
7469 delete set_thread_context and add prepare_to_resume.
7470 (win32_require_context): New declaration.
7471
a442d071
GB
74722014-10-08 Gary Benson <gbenson@redhat.com>
7473
7474 * server.h: Do not include common-exceptions.h.
7475
6f1947e8
GB
74762014-10-08 Gary Benson <gbenson@redhat.com>
7477
7478 * server.h: Do not include cleanups.h.
7479
63b434a4
JH
74802014-09-30 James Hogan <james.hogan@imgtec.com>
7481
7482 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7483 mips64-dsp-linux.c.
7484
c4d9ceb6
YQ
74852014-09-23 Yao Qi <yao@codesourcery.com>
7486
7487 * linux-low.c (lp_status_maybe_breakpoint): New function.
7488 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7489 (count_events_callback): Likewise.
7490 (select_event_lwp_callback): Likewise.
7491 (cancel_breakpoints_callback): Likewise.
7492
89a5711c
DB
74932014-09-19 Don Breazeal <donb@codesourcery.com>
7494
7495 * linux-low.c (handle_extended_wait): Call
7496 linux_ptrace_get_extended_event.
7497 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7498 linux_is_extended_waitstatus.
7499
bffc0964
JB
75002014-09-16 Joel Brobecker <brobecker@adacore.com>
7501
7502 * Makefile.in (CPPFLAGS): Define.
7503 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7504 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7505
0bfdf32f
GB
75062014-09-16 Gary Benson <gbenson@redhat.com>
7507
7508 * inferiors.h (current_inferior): Renamed as...
7509 (current_thread): New variable. All uses updated.
7510 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7511 (maybe_move_out_of_jump_pad): Likewise.
7512 (cancel_breakpoint): Likewise.
7513 (linux_low_filter_event): Likewise.
7514 (wait_for_sigstop): Likewise.
7515 (linux_resume_one_lwp): Likewise.
7516 (need_step_over_p): Likewise.
7517 (start_step_over): Likewise.
7518 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7519 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7520 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7521 and save_inferior as saved_thread.
7522 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7523 saved_thread.
7524 (regcache_invalidate_thread): Likewise.
7525 * remote-utils.c (prepare_resume_reply): Likewise.
7526 * thread-db.c (thread_db_get_tls_address): Likewise.
7527 (disable_thread_event_reporting): Likewise.
7528 (remove_thread_event_breakpoints): Likewise.
7529 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7530 as saved_thread.
7531 * target.h (set_desired_inferior): Renamed as...
7532 (set_desired_thread): New declaration. All uses updated.
7533 * server.c (myresume): Updated comment to reference thread instead
7534 of inferior.
7535 (handle_serial_event): Likewise.
7536 (handle_target_event): Likewise.
7537
361c8ade
GB
75382014-09-12 Tom Tromey <tromey@redhat.com>
7539 Gary Benson <gbenson@redhat.com>
7540
7541 * regcache.h: Include common-regcache.h.
7542 (regcache_read_pc): Don't declare.
7543 * regcache.c (get_thread_regcache_for_ptid): New function.
7544
bd9269f7
GB
75452014-09-11 Tom Tromey <tromey@redhat.com>
7546 Gary Benson <gbenson@redhat.com>
7547
7548 * symbol.c: New file.
7549 * Makefile.in (SFILES): Add symbol.c.
7550 (OBS): Add symbol.o.
7551
f8c1d06b
GB
75522014-09-11 Gary Benson <gbenson@redhat.com>
7553
7554 * target.c (target_stop_ptid, target_continue_ptid): New
7555 functions.
7556
721ec300
GB
75572014-09-11 Tom Tromey <tromey@redhat.com>
7558 Gary Benson <gbenson@redhat.com>
7559
7560 * target.h: Include target/target.h.
7561 * target.c (target_read_memory, target_read_uint32)
7562 (target_write_memory): New functions.
7563
c5e92cca
GB
75642014-09-11 Gary Benson <gbenson@redhat.com>
7565
7566 * server.h (debug_hw_points): Don't declare.
7567 * server.c (debug_hw_points): Don't define. Replace all uses
7568 with show_debug_regs.
7569 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7570 all uses with show_debug_regs.
7571
2e4bb98a
EBM
75722014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7573
7574 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7575 endianness into account.
7576 (ppc_supply_ptrace_register): Likewise.
7577
ac740bc7
JH
75782014-09-03 James Hogan <james.hogan@imgtec.com>
7579
7580 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7581 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7582
97ea6506
GB
75832014-09-03 Gary Benson <gbenson@redhat.com>
7584
7585 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7586 ALL_DEBUG_ADDRESS_REGISTERS.
7587
df7e5265
GB
75882014-09-02 Gary Benson <gbenson@redhat.com>
7589
7590 * i386-low.h: Renamed as...
7591 * x86-low.h: New file. All type, function and variable name
7592 prefixes changed from "i386_" to "x86_". All references updated.
7593 * i386-low.c: Renamed as...
7594 * x86-low.c: New file. All type, function and variable name
7595 prefixes changed from "i386_" to "x86_". All references updated.
7596
ed859da7
GB
75972014-09-02 Gary Benson <gbenson@redhat.com>
7598
7599 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7600 (x86_linux_new_thread): Likewise.
7601
860789c7
GB
76022014-08-29 Gary Benson <gbenson@redhat.com>
7603
7604 * server.h (setjmp.h): Do not include.
7605 (toplevel): Do not declare.
7606 (common-exceptions.h): Include.
7607 (cleanups.h): Likewise.
7608 * server.c (toplevel): Do not define.
7609 (exit_code): New static global.
7610 (detach_or_kill_for_exit_cleanup): New function.
7611 (main): New function. Original main renamed to...
7612 (captured_main): New function.
7613 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7614
ff55e1b5
GB
76152014-08-29 Gary Benson <gbenson@redhat.com>
7616
7617 * Makefile.in (SFILES): Add common/common-exceptions.c.
7618 (OBS): Add common-exceptions.o.
7619 (common-exceptions.o): New rule.
7620 * utils.c (prepare_to_throw_exception): New function.
7621
e9bcb658
GB
76222014-08-29 Gary Benson <gbenson@redhat.com>
7623
7624 * config.in: Regenerate.
7625 * configure: Likewise.
7626
e3180625
GB
76272014-08-29 Gary Benson <gbenson@redhat.com>
7628
7629 * Makefile.in (SFILES): Add common/cleanups.c.
7630 (OBS): cleanups.o.
7631 (cleanups.o): New rule.
7632
e3d6ba5d
GB
76332014-08-29 Gary Benson <gbenson@redhat.com>
7634
7635 * utils.c (internal_vwarning): New function.
7636
7096e886
GB
76372014-08-28 Gary Benson <gbenson@redhat.com>
7638
7639 * utils.h (fatal): Remove declaration.
7640 * utils.c (fatal): Remove function.
7641
14ce3192
GB
76422014-08-28 Gary Benson <gbenson@redhat.com>
7643
7644 * tracepoint.c (gdb_agent_init): Replace fatal with
7645 perror_with_name.
7646 (initialize_tracepoint): Likewise.
7647
50278d59
GB
76482014-08-28 Gary Benson <gbenson@redhat.com>
7649
7650 * remote-utils.c (remote_prepare): Replace fatal with error.
7651
aa96c426
GB
76522014-08-28 Gary Benson <gbenson@redhat.com>
7653
7654 * linux-low.c (linux_async): Replace fatal with warning.
7655 Tidy up and return.
7656 (linux_start_non_stop): Return -1 if linux_async failed.
7657
f7160e97
GB
76582014-08-28 Gary Benson <gbenson@redhat.com>
7659
7660 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7661 gdb_assert.
7662 (i386_dr_low_get_addr): Remove vague comment.
7663 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7664 gdb_assert.
7665
38e08fca
GB
76662014-08-28 Gary Benson <gbenson@redhat.com>
7667
7668 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7669 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7670 internal_error.
7671 (linux_resume_one_lwp): Likewise.
7672 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7673 gdb_assert.
7674 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7675 with internal_error.
7676 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7677 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7678 (find_register_by_name): Replace fatal with internal_error.
7679 (find_regno): Likewise.
7680 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7681 * thread-db.c (thread_db_create_event): Likewise.
7682 (thread_db_load_search): Likewise.
7683 (try_thread_db_load_1): Likewise.
7684 * tracepoint.c (get_jump_space_head): Replace fatal with
7685 internal_error.
7686 (claim_trampoline_space): Likewise.
7687 (have_fast_tracepoint_trampoline_buffer): Likewise.
7688 (cmd_qtstart): Likewise.
7689 (stop_tracing): Likewise.
7690 (fast_tracepoint_collecting): Likewise.
7691 (target_malloc): Likewise.
7692 (download_tracepoint): Likewise.
7693 (download_trace_state_variables): Replace check with gdb_assert.
7694 (upload_fast_traceframes): Replace fatal with internal_error.
7695
34abf635
GB
76962014-08-19 Tom Tromey <tromey@redhat.com>
7697 Gary Benson <gbenson@redhat.com>
7698
7699 * Makefile.in (SFILES): Add common/common-debug.c.
7700 (OBS): Add common-debug.o.
7701 (common-debug.o): New rule.
7702 * debug.h (debug_printf): Don't declare.
7703 * debug.c (debug_printf): Renamed and rewritten as...
7704 (debug_vprintf): New function.
7705
f6e94d78
GB
77062014-08-19 Gary Benson <gbenson@redhat.com>
7707
7708 * utils.h: Do not include print-utils.h.
7709
9239eeab
GB
77102014-08-19 Tom Tromey <tromey@redhat.com>
7711 Gary Benson <gbenson@redhat.com>
7712
7713 * server.h: Add static assertion.
7714 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7715
ef87c8bb
GB
77162014-08-19 Tom Tromey <tromey@redhat.com>
7717 Gary Benson <gbenson@redhat.com>
7718
7719 * Makefile.in (SFILES): Add common/errors.c.
7720 (OBS): Add errors.o.
7721 (IPA_OBS): Add errors-ipa.o.
7722 (errors.o): New rule.
7723 (errors-ipa.o): Likewise.
7724 * utils.h (perror_with_name, error, warning): Don't declare.
7725 * utils.c (warning): Renamed and rewritten as...
7726 (vwarning): New function.
7727 (error): Renamed and rewritten as...
7728 (verror): New function.
7729 (internal_error): Renamed and rewritten as...
7730 (internal_verror): New function.
7731
bb974a24
GB
77322014-08-07 Gary Benson <gbenson@redhat.com>
7733
7734 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7735 * configure: Regenerate.
7736 * config.in: Likewise.
7737 * server.h: Do not include errno.h.
7738 * event-loop.c: Likewise.
7739 * hostio-errno.c: Likewise.
7740 * linux-low.c: Likewise.
7741 * remote-utils.c: Likewise.
7742 * spu-low.c: Likewise.
7743 * utils.c: Likewise.
7744 * gdbreplay.c: Unconditionally include errno.h.
7745
6d3d12eb
GB
77462014-08-07 Gary Benson <gbenson@redhat.com>
7747
7748 * server.h: Do not include string.h.
7749 * event-loop.c: Likewise.
7750 * linux-low.c: Likewise.
7751 * regcache.c: Likewise.
7752 * remote-utils.c: Likewise.
7753 * spu-low.c: Likewise.
7754 * utils.c: Likewise.
7755
dccbb609
GB
77562014-08-07 Gary Benson <gbenson@redhat.com>
7757
7758 * server.h: Do not include gdb_assert.h.
7759
e76df0d0
GB
77602014-08-07 Gary Benson <gbenson@redhat.com>
7761
7762 * server.h: Do not include common-utils.h.
7763
4cb9c816
GB
77642014-08-07 Gary Benson <gbenson@redhat.com>
7765
7766 * server.h: Do not include ptid.h.
7767 * notif.h: Likewise.
7768
3995eeee
GB
77692014-08-07 Gary Benson <gbenson@redhat.com>
7770
7771 * server.h: Do not include gdb_locale.h.
7772
cb9f1a9b
GB
77732014-08-07 Gary Benson <gbenson@redhat.com>
7774
7775 * server.h: Do not include gdb/signals.h.
7776 * win32-low.c: Likewise.
7777
a5fceff8
GB
77782014-08-07 Gary Benson <gbenson@redhat.com>
7779
7780 * server.h: Do not include pathmax.h.
7781
b9391142
GB
77822014-08-07 Gary Benson <gbenson@redhat.com>
7783
7784 * server.h: Do not include libiberty.h.
7785 * linux-bfin-low.c: Likewise.
7786
0e443c87
GB
77872014-08-07 Gary Benson <gbenson@redhat.com>
7788
7789 * server.h: Do not include ansidecl.h.
7790
8ebb3f56
GB
77912014-08-07 Gary Benson <gbenson@redhat.com>
7792
7793 * linux-x86-low.c: Do not include stddef.h.
7794 * lynx-ppc-low.c: Likewise.
7795 * tracepoint.c: Likewise.
7796
8980bdf6
GB
77972014-08-07 Gary Benson <gbenson@redhat.com>
7798
7799 * server.h: Do not include stdarg.h.
7800 * nto-low.c: Likewise.
7801
d7096f71
GB
78022014-08-07 Gary Benson <gbenson@redhat.com>
7803
7804 * server.h: Do not include stdlib.h.
7805 * inferiors.c: Likewise.
7806 * linux-low.c: Likewise.
7807 * regcache.c: Likewise.
7808 * spu-low.c: Likewise.
7809 * tracepoint.c: Likewise.
7810 * utils.c: Likewise.
7811
d02f550d
GB
78122014-08-07 Gary Benson <gbenson@redhat.com>
7813
7814 * server.h: Do not include stdio.h.
7815 * linux-low.c: Likewise.
7816 * remote-utils.c: Likewise.
7817 * spu-low.c: Likewise.
7818 * utils.c: Likewise.
7819 * wincecompat.c: Likewise.
7820
87f6c4e3
GB
78212014-08-06 Gary Benson <gbenson@redhat.com>
7822
7823 * regcache.c (init_register_cache): Move conditionals inside if.
7824
7089dca4
GB
78252014-08-06 Gary Benson <gbenson@redhat.com>
7826
7827 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7828
462f517e
GB
78292014-07-31 Gary Benson <gbenson@redhat.com>
7830
7831 * ax.h: Do not include server.h.
7832 * gdbthread.h: Likewise.
7833 * lynx-low.h: Likewise.
7834 * notif.h: Likewise.
7835
976411d6
GB
78362014-07-30 Gary Benson <gbenson@redhat.com>
7837
7838 * server.h: Include common-defs.h.
7839 Do not include config.h or build-gnulib-gdbserver/config.h.
7840
d41f6d8e
GB
78412014-07-30 Gary Benson <gbenson@redhat.com>
7842
7843 * hostio-errno.c: Move server.h to top of includes list.
7844 * inferiors.c: Likewise.
7845 * linux-x86-low.c: Likewise.
7846 * notif.c: Include server.h.
7847
314c6a35
TT
78482014-07-24 Tom Tromey <tromey@redhat.com>
7849 Gary Benson <gbenson@redhat.com>
7850
7851 * server.h (CORE_ADDR): Now unsigned.
7852
69ff6be5
PA
78532014-07-16 Pedro Alves <palves@redhat.com>
7854
7855 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7856
ce9e3fe7
PA
78572014-07-15 Pedro Alves <palves@redhat.com>
7858
7859 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7860 copy.
7861
e76126e8
PA
78622014-07-11 Pedro Alves <palves@redhat.com>
7863
7864 * linux-low.c (kill_wait_lwp): New function, based on
7865 kill_one_lwp_callback, but use my_waitpid directly.
7866 (kill_one_lwp_callback, linux_kill): Use it.
7867
8e9db26e
PA
78682014-06-23 Pedro Alves <palves@redhat.com>
7869
7870 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7871 before setting DR0..DR3.
7872
698b3e08
GB
78732014-06-20 Gary Benson <gbenson@redhat.com>
7874
7875 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7876 * configure: Regenerated.
7877 * config.in: Likewise.
7878
125f8a3d
GB
78792014-06-20 Gary Benson <gbenson@redhat.com>
7880
7881 * Makefile.in (SFILES): Update locations for files moved
7882 from common to nat.
7883 (object file files): Reordered.
7884
42995dbd
GB
78852014-06-20 Gary Benson <gbenson@redhat.com>
7886
7887 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7888 (i386_dr_low_set_addr): Likewise.
7889 (i386_dr_low_get_addr): Likewise.
7890 (i386_dr_low_can_set_control): Likewise.
7891 (i386_dr_low_set_control): Likewise.
7892 (i386_dr_low_get_control): Likewise.
7893 (i386_dr_low_get_status): Likewise.
7894 (i386_get_debug_register_length): Likewise.
7895 * linux-x86-low.c (i386_dr_low_set_addr):
7896 Changed signature. Made static.
7897 (i386_dr_low_get_addr): Likewise.
7898 (i386_dr_low_set_control): Likewise.
7899 (i386_dr_low_get_control): Likewise.
7900 (i386_dr_low_get_status): Likewise.
7901 (i386_dr_low): New global variable.
7902 * win32-i386-low.c (i386_dr_low_set_addr):
7903 Changed signature. Made static.
7904 (i386_dr_low_get_addr): Likewise.
7905 (i386_dr_low_set_control): Likewise.
7906 (i386_dr_low_get_control): Likewise.
7907 (i386_dr_low_get_status): Likewise.
7908 (i386_dr_low): New global variable.
7909
e1d2394b
MS
79102014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7911
7912 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7913 * Makefile.in (AR, AR_FLAGS): Define.
7914 * configure: Regenerate.
7915
3a8ee006
GB
79162014-06-19 Gary Benson <gbenson@redhat.com>
7917
7918 * Makefile.in (i386-dregs.o): New rule.
7919 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7920 * i386-low.c (target.h): Remove include.
7921 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7922 (DR_CONTROL_SHIFT): Likewise.
7923 (DR_CONTROL_SIZE): Likewise.
7924 (DR_RW_EXECUTE): Likewise.
7925 (DR_RW_WRITE): Likewise.
7926 (DR_RW_READ): Likewise.
7927 (DR_RW_IORW): Likewise.
7928 (DR_LEN_1): Likewise.
7929 (DR_LEN_2): Likewise.
7930 (DR_LEN_4): Likewise.
7931 (DR_LEN_8): Likewise.
7932 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7933 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7934 (DR_ENABLE_SIZE): Likewise.
7935 (DR_LOCAL_SLOWDOWN): Likewise.
7936 (DR_GLOBAL_SLOWDOWN): Likewise.
7937 (DR_CONTROL_RESERVED): Likewise.
7938 (I386_DR_CONTROL_MASK): Likewise.
7939 (I386_DR_VACANT): Likewise.
7940 (I386_DR_LOCAL_ENABLE): Likewise.
7941 (I386_DR_GLOBAL_ENABLE): Likewise.
7942 (I386_DR_DISABLE): Likewise.
7943 (I386_DR_SET_RW_LEN): Likewise.
7944 (I386_DR_GET_RW_LEN): Likewise.
7945 (I386_DR_WATCH_HIT): Likewise.
7946 (i386_wp_op_t): Likewise.
7947 (i386_show_dr): Likewise.
7948 (i386_length_and_rw_bits): Likewise.
7949 (i386_insert_aligned_watchpoint): Likewise.
7950 (i386_remove_aligned_watchpoint): Likewise.
7951 (i386_handle_nonaligned_watchpoint): Likewise.
7952 i386_update_inferior_debug_regs(): Likewise.
7953 (i386_dr_insert_watchpoint): Likewise.
7954 (i386_dr_remove_watchpoint): Likewise.
7955 (i386_dr_region_ok_for_watchpoint): Likewise.
7956 (i386_dr_stopped_data_address): Likewise.
7957 (i386_dr_stopped_by_watchpoint): Likewise.
7958
8f26655c
GB
79592014-06-19 Gary Benson <gbenson@redhat.com>
7960
7961 * i386-low.c (i386_dr_show): Renamed to
7962 i386_show_dr and made static. All uses updated.
7963 (i386_dr_length_and_rw_bits): Renamed to
7964 i386_length_and_rw_bits and made static.
7965 All uses updated.
7966 (i386_dr_insert_aligned_watchpoint): Renamed to
7967 i386_insert_aligned_watchpoint and made static.
7968 All uses updated.
7969 (i386_dr_remove_aligned_watchpoint): Renamed to
7970 i386_remove_aligned_watchpoint and made static.
7971 All uses updated.
7972 (i386_dr_update_inferior_debug_regs): Renamed to
7973 i386_update_inferior_debug_regs and made static.
7974 All uses updated.
7975
b9228891
GB
79762014-06-18 Gary Benson <gbenson@redhat.com>
7977
5171def3
GB
7978 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7979 (i386_dr_low_can_set_control): Likewise.
7980 (i386_get_debug_register_length): Likewise.
7981 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7982 (i386_dr_low_can_set_control): Likewise.
7983 (i386_get_debug_register_length): Likewise.
7984
79852014-06-17 Gary Benson <gbenson@redhat.com>
7986
b9228891
GB
7987 * i386-low.h (i386-dregs.h): New include.
7988 (DR_FIRSTADDR): Now in i386-dregs.h.
7989 (DR_LASTADDR): Likewise.
7990 (DR_NADDR): Likewise.
7991 (DR_STATUS): Likewise.
7992 (DR_CONTROL): Likewise.
7993 (i386_debug_reg_state): Likewise.
7994 (i386_dr_insert_watchpoint): Likewise.
7995 (i386_dr_remove_watchpoint): Likewise.
7996 (i386_dr_region_ok_for_watchpoint): Likewise.
7997 (i386_dr_stopped_data_address): Likewise.
7998 (i386_dr_stopped_by_watchpoint): Likewise.
7999 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8000
4be83cc2
GB
80012014-06-18 Gary Benson <gbenson@redhat.com>
8002
8003 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8004 i386_dr_insert_watchpoint.
8005 (i386_low_remove_watchpoint): Renamed to
8006 i386_dr_remove_watchpoint.
8007 (i386_low_region_ok_for_watchpoint): Renamed to
8008 i386_dr_region_ok_for_watchpoint.
8009 (i386_low_stopped_data_address): Renamed to
8010 i386_dr_stopped_data_address.
8011 (i386_low_stopped_by_watchpoint): Renamed to
8012 i386_dr_stopped_by_watchpoint.
8013 * i386-low.c (i386_show_dr): Renamed to
8014 i386_dr_show and made nonstatic. All uses updated.
8015 (i386_length_and_rw_bits): Renamed to
8016 i386_dr_length_and_rw_bits and made nonstatic.
8017 All uses updated.
8018 (i386_insert_aligned_watchpoint): Renamed to
8019 i386_dr_insert_aligned_watchpoint and made nonstatic.
8020 All uses updated.
8021 (i386_remove_aligned_watchpoint): Renamed to
8022 i386_dr_remove_aligned_watchpoint and made nonstatic.
8023 All uses updated.
8024 (i386_update_inferior_debug_regs): Renamed to
8025 i386_dr_update_inferior_debug_regs and made nonstatic.
8026 All uses updated.
8027 (i386_low_insert_watchpoint): Renamed to
8028 i386_dr_insert_watchpoint. All uses updated.
8029 (i386_low_remove_watchpoint): Renamed to
8030 i386_dr_remove_watchpoint. All uses updated.
8031 (i386_low_region_ok_for_watchpoint): Renamed to
8032 i386_dr_region_ok_for_watchpoint. All uses updated.
8033 (i386_low_stopped_data_address): Renamed to
8034 i386_dr_stopped_data_address. All uses updated.
8035 (i386_low_stopped_by_watchpoint): Renamed to
8036 i386_dr_stopped_by_watchpoint. All uses updated.
8037
131aa0d4
GB
80382014-06-18 Gary Benson <gbenson@redhat.com>
8039
8040 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8041 (i386_dr_low_can_set_control): Likewise.
8042 (i386_insert_aligned_watchpoint): New check.
8043
d9305f7f
GB
80442014-06-18 Gary Benson <gbenson@redhat.com>
8045
8046 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8047 Renamed to state.
8048
e927c9fc
GB
80492014-06-18 Gary Benson <gbenson@redhat.com>
8050
8051 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8052 instead of fatal and error.
8053 (i386_handle_nonaligned_watchpoint): Likewise.
8054
1b6d4134
GB
80552014-06-18 Gary Benson <gbenson@redhat.com>
8056
8057 * i386-low.c (i386_get_debug_register_length): New macro.
8058 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8059 (i386_show_dr): Use debug_printf instead of fprintf. Use
8060 phex to format values.
8061
6e62758f
GB
80622014-06-18 Gary Benson <gbenson@redhat.com>
8063
8064 * i386-low.h: Comment changes.
8065 * i386-low.c: Likewise.
8066
fc6e2f03
GB
80672014-06-18 Gary Benson <gbenson@redhat.com>
8068
8069 * i386-low.c: Whitespace changes.
8070
f9d1eeed
TT
80712014-06-12 Tom Tromey <tromey@redhat.com>
8072
8073 * utils.c (freeargv): Remove.
8074
0b04e523
TT
80752014-06-12 Tom Tromey <tromey@redhat.com>
8076
8077 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8078 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8079 (parse_debug_format_options): Likewise.
8080 (gdbserver_usage): Likewise.
8081 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8082 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8083 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8084 against libiberty.
8085 ($(LIBGNU)): Depend on libiberty.
8086 (all-lib): Recurse into all subdirs.
8087 (install-only): Invoke "install" target in subdirs.
8088 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8089 targets.
8090 * configure: Rebuild.
8091 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8092 for vasprintf, vsnprintf, or gettimeofday.
8093 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8094 srv_tgtobj.
8095
270c9937
JB
80962014-06-05 Joel Brobecker <brobecker@adacore.com>
8097
8098 * development.sh: Delete.
8099 * Makefile.in (config.status): Adjust dependency on development.sh.
8100 * configure.ac: Adjust development.sh source call.
8101 * configure: Regenerate.
8102
0a261ed8
PA
81032014-06-02 Pedro Alves <palves@redhat.com>
8104
8105 * ax.c (gdb_free_agent_expr): New function.
8106 * ax.h (gdb_free_agent_expr): New declaration.
8107 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8108 list.
8109 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8110 static.
8111 (clear_breakpoint_conditions_and_commands): New function.
8112 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8113 (clear_breakpoint_conditions_and_commands): New declaration.
8114
e9dae05e
RR
81152014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8116
8117 * linux-aarch64-low.c (asm/ptrace.h): Include.
8118
5876f503
JK
81192014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8120
8121 Fix TLS access for -static -pthread.
8122 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8123 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8124 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8125
802e8e6d
PA
81262014-05-20 Pedro Alves <palves@redhat.com>
8127
8128 * linux-aarch64-low.c (aarch64_insert_point)
8129 (aarch64_remove_point): No longer check whether the type is
8130 supported here. Adjust to new interface.
8131 (the_low_target): Install aarch64_supports_z_point_type as
8132 supports_z_point_type method.
8133 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8134 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8135 instead of a Z packet char. Adjust.
8136 (arm_supports_z_point_type): New function.
8137 (arm_insert_point, arm_remove_point): Adjust to new interface.
8138 (the_low_target): Install arm_supports_z_point_type.
8139 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8140 (cris_insert_point, cris_remove_point): Adjust to new interface.
8141 Don't check whether the type is supported here.
8142 (the_low_target): Install cris_supports_z_point_type.
8143 * linux-low.c (linux_supports_z_point_type): New function.
8144 (linux_insert_point, linux_remove_point): Adjust to new interface.
8145 * linux-low.h (struct linux_target_ops) <insert_point,
8146 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8147 raw_breakpoint pointer parameter.
8148 <supports_z_point_type>: New method.
8149 * linux-mips-low.c (mips_supports_z_point_type): New function.
8150 (mips_insert_point, mips_remove_point): Adjust to new interface.
8151 Use mips_supports_z_point_type.
8152 (the_low_target): Install mips_supports_z_point_type.
8153 * linux-ppc-low.c (the_low_target): Install NULL as
8154 supports_z_point_type method.
8155 * linux-s390-low.c (the_low_target): Install NULL as
8156 supports_z_point_type method.
8157 * linux-sparc-low.c (the_low_target): Install NULL as
8158 supports_z_point_type method.
8159 * linux-x86-low.c (x86_supports_z_point_type): New function.
8160 (x86_insert_point): Adjust to new insert_point interface. Use
8161 insert_memory_breakpoint. Adjust to new
8162 i386_low_insert_watchpoint interface.
8163 (x86_remove_point): Adjust to remove_point interface. Use
8164 remove_memory_breakpoint. Adjust to new
8165 i386_low_remove_watchpoint interface.
8166 (the_low_target): Install x86_supports_z_point_type.
8167 * lynx-low.c (lynx_target_ops): Install NULL as
8168 supports_z_point_type callback.
8169 * nto-low.c (nto_supports_z_point_type): New.
8170 (nto_insert_point, nto_remove_point): Adjust to new interface.
8171 (nto_target_ops): Install nto_supports_z_point_type.
8172 * mem-break.c: Adjust intro comment.
8173 (struct raw_breakpoint) <raw_type, size>: New fields.
8174 <inserted>: Update comment.
8175 <shlib_disabled>: Delete field.
8176 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8177 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8178 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8179 (raw_bkpt_type_to_target_hw_bp_type): New function.
8180 (find_enabled_raw_code_breakpoint_at): New function.
8181 (find_raw_breakpoint_at): New type and size parameters. Use them.
8182 (insert_memory_breakpoint): New function, based off
8183 set_raw_breakpoint_at.
8184 (remove_memory_breakpoint): New function.
8185 (set_raw_breakpoint_at): Reimplement.
8186 (set_breakpoint): New, based on set_breakpoint_at.
8187 (set_breakpoint_at): Reimplement.
8188 (delete_raw_breakpoint): Go through the_target->remove_point
8189 instead of assuming memory breakpoints.
8190 (find_gdb_breakpoint_at): Delete.
8191 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8192 (find_gdb_breakpoint): New function.
8193 (set_gdb_breakpoint_at): Delete.
8194 (z_type_supported): New function.
8195 (set_gdb_breakpoint_1): New function, loosely based off
8196 set_gdb_breakpoint_at.
8197 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8198 (delete_gdb_breakpoint_at): Delete.
8199 (delete_gdb_breakpoint_1): New function, loosely based off
8200 delete_gdb_breakpoint_at.
8201 (delete_gdb_breakpoint): New function.
8202 (clear_gdb_breakpoint_conditions): Rename to ...
8203 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8204 breakpoint.
8205 (add_condition_to_breakpoint): Make static.
8206 (add_breakpoint_condition): Take a struct breakpoint pointer
8207 instead of an address. Adjust.
8208 (gdb_condition_true_at_breakpoint): Rename to ...
8209 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8210 z_type parameter.
8211 (gdb_condition_true_at_breakpoint): Reimplement.
8212 (add_breakpoint_commands): Take a struct breakpoint pointer
8213 instead of an address. Adjust.
8214 (gdb_no_commands_at_breakpoint): Rename to ...
8215 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8216 parameter. Return true if no breakpoint was found. Change debug
8217 output.
8218 (gdb_no_commands_at_breakpoint): Reimplement.
8219 (run_breakpoint_commands): Rename to ...
8220 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8221 and change return type to boolean.
8222 (run_breakpoint_commands): New function.
8223 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8224 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8225 breakpoint. Go through the_target->remove_point instead of
8226 assuming memory breakpoint.
8227 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8228 software and hardware breakpoints.
8229 (reinsert_raw_breakpoint): Go through the_target->insert_point
8230 instead of assuming memory breakpoint.
8231 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8232 software and hardware breakpoints.
8233 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8234 Check both software and hardware breakpoints.
8235 (validate_inserted_breakpoint): Assert the breakpoint is a
8236 software breakpoint. Set the inserted flag to -1 instead of
8237 setting shlib_disabled.
8238 (delete_disabled_breakpoints): Adjust.
8239 (validate_breakpoints): Only validate software breakpoints.
8240 Adjust to inserted flag change.
8241 (check_mem_read, check_mem_write): Skip breakpoint types other
8242 than software breakpoints. Adjust to inserted flag change.
8243 * mem-break.h (enum raw_bkpt_type): New enum.
8244 (raw_breakpoint, struct process_info): Forward declare.
8245 (Z_packet_to_target_hw_bp_type): Delete declaration.
8246 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8247 (set_gdb_breakpoint, delete_gdb_breakpoint)
8248 (clear_breakpoint_conditions): New declarations.
8249 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8250 (breakpoint_inserted_here): Update comment.
8251 (add_breakpoint_condition, add_breakpoint_commands): Replace
8252 address parameter with a breakpoint pointer parameter.
8253 (gdb_breakpoint_here): Update comment.
8254 (delete_gdb_breakpoint_at): Delete.
8255 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8256 * server.c (process_point_options): Take a struct breakpoint
8257 pointer instead of an address. Adjust.
8258 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8259 delete_gdb_breakpoint.
8260 * spu-low.c (spu_target_ops): Install NULL as
8261 supports_z_point_type method.
8262 * target.h: Include mem-break.h.
8263 (struct target_ops) <prepare_to_access_memory>: Update comment.
8264 <supports_z_point_type>: New field.
8265 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8266 instead of a char. Also take a raw breakpoint pointer.
8267 * win32-arm-low.c (the_low_target): Install NULL as
8268 supports_z_point_type.
8269 * win32-i386-low.c (i386_supports_z_point_type): New function.
8270 (i386_insert_point, i386_remove_point): Adjust to new interface.
8271 (the_low_target): Install i386_supports_z_point_type.
8272 * win32-low.c (win32_supports_z_point_type): New function.
8273 (win32_insert_point, win32_remove_point): Adjust to new interface.
8274 (win32_target_ops): Install win32_supports_z_point_type.
8275 * win32-low.h (struct win32_target_ops):
8276 <supports_z_point_type>: New method.
8277 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8278 instead of a char. Also take a raw breakpoint pointer.
8279
932539e3
PA
82802014-05-20 Pedro Alves <palves@redhat.com>
8281
8282 * mem-break.h: Include break-common.h.
8283 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8284 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8285 (Z_packet_to_target_hw_bp_type): New declaration.
8286 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8287 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8288 (Z_PACKET_ACCESS_WP): Delete macros.
8289 (Z_packet_to_hw_type): Delete function.
8290 * i386-low.h: Don't include break-common.h here.
8291 (Z_packet_to_hw_type): Delete declaration.
8292 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8293 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8294 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8295 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8296 * linux-aarch64-low.c: Don't include break-common.h here.
8297 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8298 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8299 (Z_packet_to_target_hw_bp_type): Delete function.
8300 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8301 function.
8302 (mips_insert_point, mips_remove_point): Use
8303 Z_packet_to_target_hw_bp_type.
8304
4ff0d3d8
PA
83052014-05-20 Pedro Alves <palves@redhat.com>
8306
8307 * linux-aarch64-low.c: Include break-common.h.
8308 (enum target_point_type): Delete.
8309 (Z_packet_to_point_type): Rename to ...
8310 (Z_packet_to_target_hw_bp_type): ... this, and return a
8311 target_hw_bp_type instead.
8312 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8313 instead of an enum target_point_type.
8314 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8315 breakpoint type.
8316 (aarch64_dr_state_insert_one_point)
8317 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8318 (aarch64_handle_aligned_watchpoint)
8319 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8320 Take an enum target_hw_bp_type instead of an enum
8321 target_point_type.
8322 (aarch64_supports_z_point_type): New function.
8323 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8324 use Z_packet_to_target_hw_bp_type.
8325
786dc519
JB
83262014-05-20 Joel Brobecker <brobecker@adacore.com>
8327
8328 * configure.ac: Only use -Werror by default when DEVELOPMENT
8329 is true.
8330 * configure: Regenerate.
8331
9e0aa64f
JK
83322014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8333
8334 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8335 * linux-x86-low.c (X86_64_USER_REGS): New.
8336 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8337
2b577b92
YQ
83382014-04-28 Yao Qi <yao@codesourcery.com>
8339
8340 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8341 name.
8342
94611da2
PA
83432014-04-25 Pedro Alves <palves@redhat.com>
8344
8345 PR server/16255
8346 * linux-low.c (linux_attach_fail_reason_string): New function.
8347 (linux_attach_lwp): Delete.
8348 (linux_attach_lwp_1): Rename to ...
8349 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8350 argument. Remove "initial" parameter. Return int instead of
8351 void. Don't error or warn here.
8352 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8353 failure to attach to the tgid. Call warning when failing to
8354 attach to an lwp.
8355 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8356 argument. Remove "initial" parameter. Return int instead of
8357 void. Don't error or warn here.
8358 (linux_attach_fail_reason_string): New declaration.
8359 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8360 interface change. Use linux_attach_fail_reason_string.
8361
01f9f808
MS
83622014-04-24 Michael Sturm <michael.sturm@mintel.com>
8363 Walfred Tedeschi <walfred.tedeschi@intel.com>
8364
8365 * Makefile.in: Added rules to handle new files
8366 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8367 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8368 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8369 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8370 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8371 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8372 x32-avx512-linux.o.
8373 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8374 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8375 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8376 i386/x32-avx512.xml.
8377 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8378 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8379 i386/x32-avx512-linux.xml.
8380 * i387-fp.c (num_avx512_k_registers): New constant for number
8381 of K registers.
8382 (num_avx512_zmmh_low_registers): New constant for number of
8383 lower ZMM registers (0-15).
8384 (num_avx512_zmmh_high_registers): New constant for number of
8385 higher ZMM registers (16-31).
8386 (num_avx512_ymmh_registers): New contant for number of higher
8387 YMM registers (ymm16-31 added by avx521 on x86_64).
8388 (num_avx512_xmm_registers): New constant for number of higher
8389 XMM registers (xmm16-31 added by AVX512 on x86_64).
8390 (struct i387_xsave): Add space for AVX512 registers.
8391 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8392 Add code to handle AVX512 registers.
8393 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8394 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8395 prototypei from generated file.
8396 (tdesc_amd64_avx512_linux): Likewise.
8397 (init_registers_x32_avx512_linux): Likewise.
8398 (tdesc_x32_avx512_linux): Likewise.
8399 (init_registers_i386_avx512_linux): Likewise.
8400 (tdesc_i386_avx512_linux): Likewise.
8401 (x86_64_regmap): Add AVX512 registers.
8402 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8403 mask.
8404 (initialize_low_arch): Add code to initialize AVX512 registers.
8405
51aa91f9
PA
84062014-04-23 Pedro Alves <palves@redhat.com>
8407
8408 * mem-break.c (find_gdb_breakpoint_at): Make static.
8409 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8410
a4165e94
PA
84112014-04-23 Pedro Alves <palves@redhat.com>
8412
8413 * i386-low.c: Don't include break-common.h here.
8414 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8415 prototype to take target_hw_bp_type as argument instead of a Z
8416 packet char.
8417 * i386-low.h: Include break-common.h here.
8418 (Z_packet_to_hw_type): Declare.
8419 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8420 prototypes.
8421 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8422 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8423 (x86_remove_point): Convert the packet number to a
8424 target_hw_bp_type before calling i386_low_remove_watchpoint.
8425 * win32-i386-low.c (i386_insert_point): Convert the packet number
8426 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8427 (i386_remove_point): Convert the packet number to a
8428 target_hw_bp_type before calling i386_low_remove_watchpoint.
8429
b8acf843
PA
84302014-04-23 Pedro Alves <palves@redhat.com>
8431
8432 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8433
d708bcd1
PA
84342014-04-10 Pedro Alves <palves@redhat.com>
8435
8436 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8437 Check if the condition or command is NULL before checking if the
8438 breakpoint is known. On success, return true.
8439 * mem-break.h (add_breakpoint_condition): Document return.
8440 (add_breakpoint_commands): Add describing comment.
8441 * server.c (skip_to_semicolon): New function.
8442 (process_point_options): Use it.
8443
2eec7d5b
PA
84442014-04-09 Pedro Alves <palves@redhat.com>
8445
8446 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8447 to lwpid_of.
8448
fa96cb38
PA
84492014-02-27 Pedro Alves <palves@redhat.com>
8450
8451 PR 12702
8452 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8453 macros.
8454 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8455 output.
8456 (last_thread_of_process_p): Take a PID argument instead of a
8457 thread pointer.
8458 (linux_wait_for_lwp): Delete.
8459 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8460 functions.
8461 (linux_low_filter_event): New function, party factored out from
8462 linux_wait_for_event.
8463 (linux_wait_for_event): Rename to ...
8464 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8465 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8466 sigsuspend. Check for zombie leaders.
8467 (linux_wait_for_event): Reimplement as wrapper around
8468 linux_wait_for_event_filtered.
8469 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8470 a normal or signal exit is seen, it's the whole process exiting.
8471 (wait_for_sigstop): No longer a for_each_inferior callback.
8472 Rewrite on top of linux_wait_for_event_filtered.
8473 (stop_all_lwps): Call wait_for_sigstop directly.
8474 * server.c (resume, handle_target_event): Handle
8475 TARGET_WAITKIND_NO_RESUMED.
8476
d763de10
JB
84772014-02-26 Joel Brobecker <brobecker@adacore.com>
8478
8479 * win32-low.c (psapi_get_dll_name,
8480 * win32_CreateToolhelp32Snapshot): Delete.
8481 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8482 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8483 Delete.
8484 (handle_load_dll): Add function description.
8485 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8486
850a0f76
JB
84872014-02-26 Joel Brobecker <brobecker@adacore.com>
8488
8489 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8490 Add comment.
8491 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8492 base address when calling win32_add_one_solib.
8493 (handle_load_dll): Delete local variable load_addr.
8494 Remove 0x1000 offset applied to DLL base address when calling
8495 win32_add_one_solib.
8496 (handle_unload_dll): Add comment.
8497
f25b3fc3
JB
84982014-02-26 Joel Brobecker <brobecker@adacore.com>
8499
8500 * win32-low.c (win32_add_all_dlls): Renames
8501 win32_ensure_ntdll_loaded. Rewrite function documentation.
8502 Adjust implementation to always load all DLLs.
8503 Add 0x1000 offset to DLL base address when calling
8504 win32_add_one_solib.
8505 (child_initialization_done): New static global.
8506 (do_initial_child_stuff): Set child_initialization_done to
8507 zero during child initialization, and 1 after. Replace call
8508 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8509 Add comment.
8510 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8511 (handle_unload_dll): Add function documentation.
8512 (get_child_debug_event): Ignore load and unload DLL events
8513 during child initialization.
8514
d86d4aaf
DE
85152014-02-20 Doug Evans <dje@google.com>
8516
3bc32da3 8517 Remove global all_lwps.
d86d4aaf
DE
8518 * inferiors.h (ptid_of): Move here from linux-low.h.
8519 (pid_of, lwpid_of): Ditto.
8520 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8521 parameter is a struct thread_info * now.
8522 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8523 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8524 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8525 directly.
8526 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8527 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8528 * linux-arm-low.c (update_registers_callback): Update, "entry"
8529 parameter is a struct thread_info * now.
8530 Fetch lwpid from current_inferior directly.
8531 (arm_insert_point): Pass &all_threads to find_inferior instead of
8532 &all_lwps.
8533 (arm_remove_point): Ditto.
8534 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8535 (arm_prepare_to_resume): Fetch pid from thread.
8536 (arm_read_description): Fetch lwpid from current_inferior directly.
8537 * linux-low.c (all_lwps): Delete.
8538 (delete_lwp): Delete call to remove_inferior.
8539 (handle_extended_wait): Fetch lwpid from thread.
8540 (add_lwp): Don't set lwp->entry.id. Remove call to
8541 add_inferior_to_list.
8542 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8543 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8544 (kill_one_lwp_callback): Ditto.
8545 (linux_kill): Don't dereference NULL pointer.
8546 Fetch ptid,lwpid from thread.
8547 (get_detach_signal): Fetch ptid from thread.
8548 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8549 Simplify call to regcache_invalidate_thread.
8550 (delete_lwp_callback): Update, "entry" parameter is a
8551 struct thread_info * now. Fetch pid from thread.
8552 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8553 (status_pending_p_callback): Update, "entry" parameter is a
8554 struct thread_info * now. Fetch ptid from thread.
8555 (find_lwp_pid): Update, "entry" parameter is a
8556 struct thread_info * now.
8557 (linux_wait_for_lwp): Fetch pid from thread.
8558 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8559 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8560 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8561 (dequeue_one_deferred_signal): Ditto.
8562 (cancel_breakpoint): Fetch ptid from current_inferior.
8563 (linux_wait_for_event): Pass &all_threads to find_inferior,
8564 not &all_lwps. Fetch ptid, lwpid from thread.
8565 (count_events_callback): Update, "entry" parameter is a
8566 struct thread_info * now.
8567 (select_singlestep_lwp_callback): Ditto.
8568 (select_event_lwp_callback): Ditto.
8569 (cancel_breakpoints_callback): Ditto.
8570 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8571 not &all_lwps.
8572 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8573 (unsuspend_one_lwp): Update, "entry" parameter is a
8574 struct thread_info * now.
8575 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8576 not &all_lwps.
8577 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8578 Fetch lwpid from thread, not lwp.
8579 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8580 Pass &all_threads to find_inferior, not &all_lwps.
8581 (send_sigstop): Fetch lwpid from thread, not lwp.
8582 (send_sigstop_callback): Update, "entry" parameter is a
8583 struct thread_info * now.
8584 (suspend_and_send_sigstop_callback): Ditto.
8585 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8586 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8587 struct thread_info * now.
8588 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8589 from thread, lwp.
8590 (lwp_running): Update, "entry" parameter is a
8591 struct thread_info * now.
8592 (stop_all_lwps): Fetch ptid from thread.
8593 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8594 (linux_resume_one_lwp): Fetch lwpid from thread.
8595 (linux_set_resume_request): Update, "entry" parameter is a
8596 struct thread_info * now. Fetch pid, lwpid from thread.
8597 (resume_status_pending_p): Update, "entry" parameter is a
8598 struct thread_info * now.
8599 (need_step_over_p): Ditto. Fetch lwpid from thread.
8600 (start_step_over): Fetch lwpid from thread.
8601 (linux_resume_one_thread): Update, "entry" parameter is a
8602 struct thread_info * now. Fetch lwpid from thread.
8603 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8604 (proceed_one_lwp): Update, "entry" parameter is a
8605 struct thread_info * now. Fetch lwpid from thread.
8606 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8607 struct thread_info * now.
8608 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8609 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8610 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8611 directly.
8612 (regsets_store_inferior_registers): Ditto.
8613 (fetch_register, store_register): Ditto.
8614 (linux_read_memory, linux_write_memory): Ditto.
8615 (linux_request_interrupt): Ditto.
8616 (linux_read_auxv): Ditto.
8617 (linux_xfer_siginfo): Ditto.
8618 (linux_qxfer_spu): Ditto.
8619 (linux_qxfer_libraries_svr4): Ditto.
8620 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8621 moved to inferiors.h.
8622 (get_lwp): Delete.
8623 (get_thread_lwp): Update.
8624 (struct lwp_info): Delete member "entry". Simplify comment for
8625 member "thread".
8626 (all_lwps): Delete.
8627 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8628 current_inferior directly.
8629 (update_watch_registers_callback): Update, "entry" parameter is a
8630 struct thread_info * now. Fetch pid from thread.
8631 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8632 (mips_insert_point): Fetch lwpid from current_inferior.
8633 Pass &all_threads to find_inferior, not &all_lwps.
8634 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8635 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8636 directly.
8637 (mips_stopped_data_address): Ditto.
8638 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8639 directly.
8640 * linux-tile-low.c (tile_arch_setup): Ditto.
8641 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8642 (update_debug_registers_callback): Update, "entry" parameter is a
8643 struct thread_info * now. Fetch pid from thread.
8644 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8645 Pass &all_threads to find_inferior, not &all_lwps.
8646 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8647 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8648 Pass &all_threads to find_inferior, not &all_lwps.
8649 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8650 (i386_dr_low_get_status): Ditto.
8651 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8652 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8653 (x86_linux_read_description): Ditto.
8654 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8655
3b8361aa
DE
86562014-02-20 Doug Evans <dje@google.com>
8657
8658 * inferiors.c (get_first_inferior): Fix buglet.
8659
f7667f0d
DE
86602014-02-19 Doug Evans <dje@google.com>
8661
8662 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8663 * inferiors.c (add_thread): Change result type to struct thread_info *.
8664 All callers updated.
8665 (add_lwp): Call add_thread here instead of in callers.
8666 All callers updated.
8667 * linux-low.h (get_lwp_thread): Rewrite.
8668 (struct lwp_info): New member "thread".
8669
b3312d80
DE
86702014-02-19 Doug Evans <dje@google.com>
8671
8672 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8673 All callers updated.
8674
ecc6f45c
DE
86752014-02-19 Doug Evans <dje@google.com>
8676
8677 * inferiors.c (add_thread): Fix whitespace.
8678
649ebbca
DE
86792014-02-19 Doug Evans <dje@google.com>
8680
8681 * dll.c (clear_dlls): Replace accessing list implemention details
8682 with API function.
8683 * gdbthread.h (get_first_thread): Declare.
8684 * inferiors.c (for_each_inferior_with_data): New function.
8685 (get_first_thread): New function.
8686 (find_thread_ptid): Simplify.
8687 (get_first_inferior): New function.
8688 (clear_list): Delete.
8689 (one_inferior_p): New function.
8690 (clear_inferior_list): New function.
8691 (clear_inferiors): Update.
8692 * inferiors.h (for_each_inferior_with_data): Declare.
8693 (clear_inferior_list): Declare.
8694 (one_inferior_p): Declare.
8695 (get_first_inferior): Declare.
8696 * linux-low.c (linux_wait_for_event): Replace accessing list
8697 implemention details with API function.
8698 * server.c (target_running): Ditto.
8699 (accumulate_file_name_length): New function.
8700 (emit_dll_description): New function.
8701 (handle_qxfer_libraries): Replace accessing list implemention
8702 details with API function.
8703 (handle_qxfer_threads_worker): New function.
8704 (handle_qxfer_threads_proper): Replace accessing list implemention
8705 details with API function.
8706 (handle_query): Ditto.
8707 (visit_actioned_threads_callback_ftype): New typedef.
8708 (visit_actioned_threads_data): New struct.
8709 (visit_actioned_threads): Rewrite to be find_inferior callback.
8710 (resume): Call find_inferior.
8711 (handle_status): Replace accessing list implemention
8712 details with API function.
8713 (process_serial_event): Replace accessing list implemention details
8714 with API function.
8715 * target.c (set_desired_inferior): Replace accessing list implemention
8716 details with API function.
8717 * tracepoint.c (same_process_p): New function.
8718 (gdb_agent_about_to_close): Replace accessing list implemention
8719 details with API function.
8720 * win32-low.c (child_delete_thread): Replace accessing list
8721 implemention details with API function.
8722 (match_dll_by_basename): New function.
8723 (dll_is_loaded_by_basename): New function.
8724 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8725 details call to dll_is_loaded_by_basename.
8726
80894984
DE
87272014-02-19 Doug Evans <dje@google.com>
8728
8729 * dll.h (struct dll_info): Add comment.
8730 * gdbthread.h (struct thread_info): Add comment.
8731 (current_ptid): Simplify.
8732 * inferiors.c (add_process): Update.
8733 (remove_process): Update.
8734 * inferiors.h (struct process_info): Rename member "head" to "entry".
8735 * linux-low.c (delete_lwp): Update.
8736 (add_lwp): Update.
8737 (last_thread_of_process_p): Update.
8738 (kill_one_lwp_callback, linux_kill): Update.
8739 (status_pending_p_callback): Update.
8740 (wait_for_sigstop): Update. Simplify read of ptid.
8741 (start_step_over): Update.
8742 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8743 (get_lwp_thread): Update.
8744 (struct lwp_info): Rename member "head" to "entry".
8745 * regcache.h (inferior_list_entry): Delete.
8746 * server.c (kill_inferior_callback): Update.
8747 (detach_or_kill_inferior_callback): Update.
8748 (print_started_pid): Update.
8749 (print_attached_pid): Update.
8750 (process_serial_event): Simplify read of ptid.
8751 * thread-db.c (thread_db_create_event): Update.
8752 (thread_db_get_tls_address): Update.
8753 * win32-low.c (current_inferior_ptid): Simplify.
8754
46917d26
TT
87552014-02-19 Tom Tromey <tromey@redhat.com>
8756
8757 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8758 argument.
8759 (target_supports_btrace): Update.
8760
0759a81e
YQ
87612014-02-14 Yao Qi <yao@codesourcery.com>
8762
8763 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8764 (rsp-low-ipa.o): New target.
8765
a7191e8b
TT
87662014-02-12 Tom Tromey <tromey@redhat.com>
8767
8768 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8769 convert_ascii_to_int.
8770 * regcache.c (registers_to_string): Likewise.
8771 * remote-utils.c (decode_M_packet): Likewise.
8772 * server.c (process_serial_event): Likewise.
8773
ff0e980e
TT
87742014-02-12 Tom Tromey <tromey@redhat.com>
8775
8776 * server.c (handle_query, handle_v_run): Use hex2bin, not
8777 unhexify.
8778 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8779
e9371aff
TT
87802014-02-12 Tom Tromey <tromey@redhat.com>
8781
8782 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8783 convert_int_to_ascii.
8784 * regcache.c (registers_to_string, collect_register_as_string):
8785 Likewise.
8786 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8787 Likewise.
8788 * server.c (process_serial_event): Likewise.
8789 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8790 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8791
971dc0b8
TT
87922014-02-12 Tom Tromey <tromey@redhat.com>
8793
8794 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8795 bin2hex, not hexify.
8796 * tracepoint.c (cmd_qtstatus): Likewise.
8797
0a822afb
TT
87982014-02-12 Tom Tromey <tromey@redhat.com>
8799
8800 * remote-utils.c (monitor_output): Pass explicit length to
8801 hexify.
8802
9c3d6531
TT
88032014-02-12 Tom Tromey <tromey@redhat.com>
8804
8805 * tracepoint.c: Include rsp-low.h.
8806 * server.c: Include rsp-low.h.
8807 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8808 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8809 declare.
8810 * remote-utils.c: Include rsp-low.h.
8811 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8812 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8813 (convert_int_to_ascii, convert_ascii_to_int): Move to
8814 common/rsp-low.c.
8815 * regcache.c: Include rsp-low.h.
8816 * ax.c: Include rsp-low.h.
8817 * Makefile.in (SFILES): Add common/rsp-low.c.
8818 (OBS): Add rsp-low.o.
8819 (rsp-low.o): New target.
8820
01fd3ea5
TT
88212014-02-12 Tom Tromey <tromey@redhat.com>
8822
8823 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8824 Include print-utils.h.
8825 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8826 (plongest, thirty_two, phex_nz): Remove.
8827 * Makefile.in (SFILES): Add common/print-utils.c.
8828 (OBS): Add print-utils.o.
8829 (print-utils-ipa.o): New target.
8830 (print-utils.o): New target.
8831 (IPA_OBJS): Add print-utils-ipa.o.
8832
e99dc820
TT
88332014-02-06 Tom Tromey <tromey@redhat.com>
8834
8835 * Makefile.in (SFILES): Fix indentation.
8836
ee1e2d4f
DE
88372014-02-05 Doug Evans <dje@google.com>
8838
8839 * linux-low.c (linux_wait_for_event): Improve comment.
8840 (linux_wait_1): Keep current_inferior in sync with event_child.
8841
f5a02773
DE
88422014-01-22 Doug Evans <dje@google.com>
8843
8844 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8845
87ce2a04
DE
88462014-01-22 Doug Evans <dje@google.com>
8847
8848 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8849 * configure: Regenerate.
8850 * config.in: Regenerate.
8851 * Makefile.in (SFILES): Add debug.c.
8852 (OBS): Add debug.o.
8853 * debug.c: New file.
8854 * debug.h: New file.
8855 * linux-aarch64-low.c (*): Update all debugging printfs to use
8856 debug_printf instead of fprintf.
8857 * linux-arm-low.c (*): Ditto.
8858 * linux-cris-low.c (*): Ditto.
8859 * linux-crisv32-low.c (*): Ditto.
8860 * linux-m32r-low.c (*): Ditto.
8861 * linux-sparc-low.c (*): Ditto.
8862 * linux-x86.c (*): Ditto.
8863 * linux-low.c (*): Ditto.
8864 (linux_wait_1): Add calls to debug_enter, debug_exit.
8865 (linux_wait): Remove redundant debugging printf.
8866 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8867 (linux_resume, unstop_all_lwps): Ditto.
8868 * mem-break.c (*): Update all debugging printfs to use
8869 debug_printf instead of fprintf.
8870 * remote-utils.c (*): Ditto.
8871 * thread-db.c (*): Ditto.
8872 * server.c #include <ctype.h>, "gdb_vecs.h".
8873 (debug_threads): Moved to debug.c.
8874 (*): Update all debugging printfs to use debug_printf instead of
8875 fprintf.
8876 (start_inferior): Replace call to fflush with call to debug_flush.
8877 (monitor_show_help): Mention set debug-format.
8878 (parse_debug_format_options): New function.
8879 (handle_monitor_command): Handle "monitor set debug-format".
8880 (gdbserver_usage): Mention --debug-format.
8881 (main): Parse --debug-format.
8882 * server.h (debug_threads): Declaration moved to debug.h.
8883 #include "debug.h".
8884 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8885 trace_debug_1 that uses debug_printf.
8886 (tracepoint_look_up_symbols): Update all debugging printfs to use
8887 debug_printf instead of fprintf.
8888
e671835b
BS
88892014-01-20 Baruch Siach <baruch@tkos.co.il>
8890
8891 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8892 sys/ptrace.h.
8893
b5737fa9
PA
88942014-01-17 Pedro Alves <palves@redhat.com>
8895
ea38d2a9 8896 PR build/16445
c7faa97a
PA
8897 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8898 defined after including gdb_proc_service.h.
b5737fa9 8899
40ed484e
DE
89002014-01-16 Doug Evans <dje@google.com>
8901
8902 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8903 (match_dll): Use it.
8904
969c39fb
MM
89052014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8906
8907 * target.h (target_ops) <read_btrace>: Change parameters and
8908 return type to allow error reporting.
8909 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8910 trace reading errors on.
8911 * linux-low.c (linux_low_read_btrace): Pass trace reading
8912 errors on.
8913 (linux_low_disable_btrace): New.
8914
ab7f45ba
DE
89152014-01-15 Doug Evans <dje@google.com>
8916
8917 * inferiors.c (thread_id_to_gdb_id): Delete.
8918 * inferiors.h (thread_id_to_gdb_id): Delete.
8919
66af0f44
EZ
89202014-01-13 Eli Zaretskii <eliz@gnu.org>
8921
8922 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8923 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8924 versions.
8925
9939e131
PA
89262014-01-08 Pedro Alves <palves@redhat.com>
8927
8928 * server.c (handle_status): Don't discard previous queued stop
8929 replies or thread's pending status here.
8930 (main) <disconnection>: Do it here instead.
8931
b7ea362b
PA
89322014-01-08 Pedro Alves <palves@redhat.com>
8933
8934 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8935 * server.c (visit_actioned_threads, handle_pending_status): New
8936 function.
8937 (handle_v_cont): Factor out parts to ...
8938 (resume): ... this new function. If in all-stop, and a thread
8939 being resumed has a pending status, report it without actually
8940 resuming.
8941 (myresume): Adjust to use the new 'resume' function.
8942 (clear_pending_status_callback, set_pending_status_callback)
8943 (find_status_pending_thread_callback): New functions.
8944 (handle_status): Handle the case of multiple threads having
8945 interesting statuses to report. Report threads' real last signal
8946 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8947 with an interesting thread to report the status for, instead of
8948 always reporting the status of the first thread.
8949
28498c42
JB
89502014-01-01 Joel Brobecker <brobecker@adacore.com>
8951
8952 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8953 * gdbreplay.c (gdbreplay_version): Likewise.
8954
f45c82da
YZ
89552013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8956
8957 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8958 iov.iov_len with the real length in use.
8959
379a5e2d
JB
89602013-12-13 Joel Brobecker <brobecker@adacore.com>
8961
8962 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8963 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8964 for all targets that use win32-low.c.
8965 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8966 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8967
4210d83e
PA
89682013-12-13 Pedro Alves <palves@redhat.com>
8969
8970 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8971 if equal to TARGET_WAITKIND_LOADED.
8972 * win32-low.c (cached_status): New static global.
8973 (win32_wait): Add declaration.
8974 (do_initial_child_stuff): Flush all initial pending debug events
8975 up to the initial breakpoint.
8976 (win32_wait): If CACHED_STATUS was set, return that instead
8977 of doing a real wait. Remove the code resuming the execution
8978 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8979 during the initial phase. Also remove the code changing
8980 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8981 TARGET_WAITKIND_STOPPED.
8982
e7f0d979
YQ
89832013-12-11 Yao Qi <yao@codesourcery.com>
8984
8985 * notif.c (handle_notif_ack): Return 0 if no notification
8986 matches.
8987
ebcf782c
DE
89882013-11-20 Doug Evans <dje@google.com>
8989
8990 * linux-low.c (linux_set_resume_request): Fix comment.
8991
20ad9378
DE
89922013-11-20 Doug Evans <dje@google.com>
8993
8994 * linux-low.c (resume_status_pending_p): Tweak comment.
8995
a196ebeb
WT
89962013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8997
8998 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8999 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9000 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9001 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9002 (srv_amd64_regobj): Add amd64-mpx.o.
9003 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9004 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9005 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9006 * i387-fp.c (num_pl_bnd_register) Added constant.
9007 (num_pl_bnd_cfg_registers) Added constant.
9008 (struct i387_xsave) Added reserved area and MPX fields.
9009 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9010 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9011 function.
9012 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9013 (init_registers_amd64_mpx_linux): Declare new function.
9014 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9015 (x86_64_regmap): Add MPX registers.
9016 (x86_linux_read_description): Add MPX case.
9017 (initialize_low_arch): Initialize MPX targets.
9018
0080a2f6
TT
90192013-11-18 Tom Tromey <tromey@redhat.com>
9020
9021 * configure: Rebuild.
9022 * configure.ac: Don't check for stdlib.h.
9023 * gdbreplay.c: Unconditionally include stdlib.h.
9024
2978b111
TT
90252013-11-18 Tom Tromey <tromey@redhat.com>
9026
9027 * config.in: Rebuild.
9028 * configure: Rebuild.
9029 * configure.ac: Don't use AC_HEADER_DIRENT.
9030
a3d08894
TT
90312013-11-18 Tom Tromey <tromey@redhat.com>
9032
9033 * server.h: Don't check HAVE_STRING_H.
9034 * gdbreplay.c: Don't check HAVE_STRING_H.
9035 * configure: Rebuild.
9036
0a5dd17d
TT
90372013-11-18 Tom Tromey <tromey@redhat.com>
9038
9039 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9040 LIBGNU.
9041
1bd2f0ba
TT
90422013-11-08 Tom Tromey <tromey@redhat.com>
9043
9044 * configure, config.in: Rebuild.
9045 * configure.ac: Remove unused configury.
9046
3266f10b
TT
90472013-11-08 Tom Tromey <tromey@redhat.com>
9048
9049 * acinclude.m4: Include common.m4, codeset.m4.
9050 * configure, config.in: Rebuild.
9051 * configure.ac: Use GDB_AC_COMMON.
9052
6682d959
AA
90532013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9054
9055 * linux-s390-low.c (HWCAP_S390_TE): New define.
9056 (s390_arch_setup): Consider the TE field in the HWCAP for
9057 determining 'have_regset_tdb'.
9058
fd0a4d76
SDJ
90592013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9060
9061 PR gdb/16014
9062 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9063 call to sizeof.
9064
1a3d890b
PA
90652013-10-02 Pedro Alves <palves@redhat.com>
9066
9067 * server.c (process_serial_event): Don't output "GDBserver
9068 exiting" if GDB is connected through stdio.
9069 * target.c (mywait): Likewise, be silent if GDB is connected
9070 through stdio.
9071
97ad4581
JB
90722013-10-01 Joel Brobecker <brobecker@adacore.com>
9073
9074 * lynx-low.c (lynx_add_threads_after_attach): New function.
9075 (lynx_attach): Remove call to add_thread. Add call to
9076 lynx_add_threads_after_attach instead.
9077
5b4e221c
MF
90782013-09-28 Mike Frysinger <vapier@gentoo.org>
9079
9080 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9081 * config.in, configure: Regenerated.
9082
ee47b2f8
YQ
90832013-09-18 Yao Qi <yao@codesourcery.com>
9084
9085 PR server/15959
9086 * server.c (start_inferior): Clear 'resume_info'.
9087
d6707650 90882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9089
d6707650
JW
9090 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9091 for each register.
9092
9243dd0e 90932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9094
9243dd0e
JW
9095 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9096 linux-tile-low.o to srv_tgtobj.
9097
c623a6ef
WN
90982013-09-16 Will Newton <will.newton@linaro.org>
9099
9100 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9101 out regs.
9102
fb71d39e
PA
91032013-09-06 Pedro Alves <palves@redhat.com>
9104
9105 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9106 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9107 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9108 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9109 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9110 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9111
8e7e9910
PA
91122013-09-06 Pedro Alves <palves@redhat.com>
9113
9114 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9115 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9116
7c3a12ca
PA
91172013-09-06 Pedro Alves <palves@redhat.com>
9118
9119 * linux-amd64-ipa.c: Include tracepoint.h.
9120 * linux-i386-ipa.c: Include tracepoint.h.
9121
8eb3d7b6
RW
91222013-09-06 Ricard Wanderlof <ricardw@axis.com>
9123
9124 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9125 (ps_get_thread_area): New function.
9126
eddddb9d
RW
91272013-09-06 Ricard Wanderlof <ricardw@axis.com>
9128
9129 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9130 (initialize_low_arch): Call init_registers_crisv32 rather than
9131 init_register_crisv32.
9132
533b0600
PA
91332013-09-05 Pedro Alves <palves@redhat.com>
9134
9135 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9136 to ...
9137 * hostio.h: ... this new file.
9138 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9139 win32-low.c: Include hostio.h.
9140
0ce3d3b5
PA
91412013-09-05 Pedro Alves <palves@redhat.com>
9142
9143 * server.h (gdb_client_data, handler_func, callback_handler_func)
9144 (delete_file_handler, add_file_handler, append_callback_event)
9145 (delete_callback_event, start_event_loop, initialize_event_loop):
9146 Move to event-loop.h and include it.
9147 * event-loop.h: New file.
9148
799cdc37
PA
91492013-09-05 Pedro Alves <palves@redhat.com>
9150
9151 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9152 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9153 (loaded_dll, unloaded_dll): Move to ...
9154 * dll.h: ... this new file.
9155 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9156
6a6bbd9d
PA
91572013-09-05 Pedro Alves <palves@redhat.com>
9158
9159 * server.h (current_process, get_thread_process, all_processes)
9160 (add_inferior_to_list, for_each_inferior, current_inferior)
9161 (remove_inferior, add_process, remove_process, find_process_pid)
9162 (have_started_inferiors_p, have_attached_inferiors_p)
9163 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9164 (clear_inferiors, find_inferior, find_inferior_id)
9165 (inferior_target_data, set_inferior_target_data)
9166 (inferior_regcache_data, set_inferior_regcache_data): Move to
9167 inferiors.h, and include it.
9168 * inferiors.h: New file.
9169
f699aaba
PA
91702013-09-05 Pedro Alves <palves@redhat.com>
9171
9172 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9173 Move ...
72f4393d 9174 * ax.h: ... here.
f699aaba 9175
c144c7a0
PA
91762013-09-05 Pedro Alves <palves@redhat.com>
9177
9178 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9179 tracepoint.h.
9180 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9181 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9182 (handle_tracepoint_general_set, handle_tracepoint_query)
9183 (tracepoint_finished_step, tracepoint_was_hit)
9184 (release_while_stepping_state_list, current_traceframe)
9185 (in_readonly_region, traceframe_read_mem)
9186 (fetch_traceframe_registers, traceframe_read_sdata)
9187 (traceframe_read_info, struct fast_tpoint_collect_status)
9188 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9189 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9190 (supply_fast_tracepoint_registers)
9191 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9192 (ipa_tdesc, claim_trampoline_space)
9193 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9194 (agent_mem_read, agent_get_trace_state_variable_value)
9195 (agent_set_trace_state_variable_value, agent_tsv_read)
9196 (agent_mem_read_string, get_raw_reg_func_addr)
9197 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9198 * tracepoint.h: ... this new file.
9199
ff42e6ab
PA
92002013-09-05 Pedro Alves <palves@redhat.com>
9201
9202 * server.h (perror_with_name, error, fatal, warning, paddress)
9203 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9204 include it.
9205 * utils.h: New file.
9206
541af0f4
PA
92072013-09-05 Pedro Alves <palves@redhat.com>
9208
9209 * server.h (remote_debug, noack_mode, transport_is_reliable)
9210 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9211 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9212 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9213 (write_enn, initialize_async_io, enable_async_io)
9214 (disable_async_io, check_remote_input_interrupt_request)
9215 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9216 (dead_thread_notify, prepare_resume_reply)
9217 (decode_address_to_semicolon, decode_address, decode_m_packet)
9218 (decode_M_packet, decode_X_packet, decode_xfer_write)
9219 (decode_search_memory_packet, unhexify, hexify)
9220 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9221 (look_up_one_symbol, relocate_instruction)
9222 (monitor_output): Move to remote-utils.h, and include it.
9223 * remote-utils.h: New file.
9224
eebdf26b
PA
92252013-09-05 Pedro Alves <palves@redhat.com>
9226
9227 * server.h (_): Delete.
9228
3aafd2ff
PA
92292013-09-02 Pedro Alves <palves@redhat.com>
9230
9231 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9232 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9233 allocated.
9234 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9235
cee83bcb
PM
92362013-09-02 Pierre Muller <muller@sourceware.org>
9237
9238 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9239 or WriteProcessMemory complete successfully and handle
9240 ERROR_PARTIAL_COPY error.
9241
9a13b2fa
PA
92422013-09-02 Pedro Alves <palves@redhat.com>
9243
9244 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9245 error instead of EIO.
9246
602e3198
JK
92472013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9248
9249 PR server/15604
9250 * linux-low.c: Include filestuff.h.
9251 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9252 * lynx-low.c: Include filestuff.h.
9253 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9254 * server.c: Include filestuff.h.
9255 (main): Call notice_open_fds.
9256 * spu-low.c: Include filestuff.h.
9257 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9258
96d7229d
LM
92592013-08-22 Luis Machado <lgustavo@codesourcery.com>
9260
9261 * Makefile.in: Explain why ../target and ../nat are not
9262 listed as include file search paths.
9263 (linux-waitpid.o): New object file rule.
9264 * configure.srv (srv_native_linux_obj): New variable.
9265 Replace all occurrences of linux native object files with
9266 $srv_native_linux_obj.
9267 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9268 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9269 (linux_enable_event_reporting): Remove declaration.
9270 (my_waitpid): Moved to common/linux-waitpid.c.
9271 (linux_wait_for_event): Pass ptid when calling
9272 linux_enable_event_reporting.
9273 (linux_supports_tracefork_flag): Remove.
9274 (linux_enable_event_reporting): Likewise.
9275 (linux_tracefork_grandchild): Remove.
9276 (STACK_SIZE): Moved to common/linux-ptrace.c.
9277 (linux_tracefork_child): Remove.
9278 (linux_test_for_tracefork): Remove.
9279 (linux_look_up_symbols): Call linux_supports_traceclone.
9280 (initialize_low): Remove call to linux_test_for_tracefork.
9281 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9282 common/linux-ptrace.h.
9283 (PTRACE_TYPE_ARG4): Likewise.
9284 Include linux-ptrace.h.
9285
32940073
PA
92862013-08-21 Pedro Alves <palves@redhat.com>
9287
9288 * config.in: Renegerate.
9289
33b60d58 92902013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9291
33b60d58
LM
9292 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9293 (SFILES): Remove $(srcdir)/common/target-common.c and
9294 add $(srcdir)/target/waitstatus.c.
9295 (OBS): Remove target-common.o and add waitstatus.o.
9296 (server_h): Remove $(srcdir)/../common/target-common.h and
9297 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9298 and $(srcdir)/../target/waitstatus.h.
9299 (target-common.o): Remove.
9300 (waitstatus.o): New target object file.
9301 * target.h: Do not include target-common.h and
9302 include target/resume.h, target/wait.h and
9303 target/waitstatus.h.
9304
b8e1b30e
LM
93052013-08-13 Luis Machado <lgustavo@codesourcery.com>
9306
9307 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9308 to PTRACE_TYPE_ARG3.
9309 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9310 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9311 PTRACE_TYPE_ARG4.
9312 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9313 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9314
7a60ad40
YQ
93152013-07-27 Jie Zhang <jie@codesourcery.com>
9316 Daniel Jacobowitz <dan@codesourcery.com>
9317 Yao Qi <yao@codesourcery.com>
9318
9319 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9320 (mips-linux-watch.o): New rule.
9321 (mips_linux_watch_h): New variable.
9322 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9323 srv_tgtobj.
9324 * linux-mips-low.c: Include mips-linux-watch.h.
9325 (struct arch_process_info, struct arch_lwp_info): New.
9326 (update_watch_registers_callback): New function.
9327 (mips_linux_new_process, mips_linux_new_thread) New functions.
9328 (mips_linux_prepare_to_resume, mips_insert_point): New
9329 functions.
9330 (mips_remove_point, mips_stopped_by_watchpoint): New
9331 functions.
9332 (rsp_bp_type_to_target_hw_bp_type): New function.
9333 (mips_stopped_data_address): New function.
9334 (the_low_target): Add watchpoint support functions.
9335
de6f69ad
YQ
93362013-07-27 Yao Qi <yao@codesourcery.com>
9337
9338 * i386-low.c: Include break-common.h.
9339 (enum target_hw_bp_type): Remove.
9340
3360c0bf
LM
93412013-07-24 Luis Machado <lgustavo@codesourcery.com>
9342
9343 * Makefile.in (SFILES): /common/target-common.c.
9344 (OBS): Add target-common.o.
9345 (server_h): Add $(srcdir)/../common/target-common.h.
9346 (target-common.o): New target.
9347 * server.c (queue_stop_reply_callback): Free
9348 status string after use.
9349 * target.c (target_waitstatus_to_string): Remove.
9350 * target.h: Include target-common.h.
9351 (resume_kind): Likewise.
9352 (target_waitkind): Likewise.
9353 (target_waitstatus): Likewise.
9354 (TARGET_WNOHANG): Likewise.
9355
bd885420
YQ
93562013-07-04 Yao Qi <yao@codesourcery.com>
9357
9358 * Makefile.in (host_alias): Use @host_noncanonical@.
9359 (target_alias): Use @target_noncanonical@.
9360 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9361 ACX_NONCANONICAL_HOST.
9362 * configure: Regenerated.
9363
9364 Revert:
9365 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9366
9367 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9368 * configure: Rebuild.
9369 * Makefile.in (version_host, version_target): Get from configure.
9370 (version.c): Use $(version_host) and $(version_target).
9371
17ef446e
PA
93722013-07-03 Pedro Alves <palves@redhat.com>
9373
9374 * Makefile.in (config.status): Depend on development.sh.
9375 * acinclude.m4: Include libmcheck.m4.
9376 * configure: Regenerate.
9377
7a9a7487
MG
93782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9379
9380 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9381 attribute inside the parentheses.
9382 (winapi_DebugSetProcessKillOnExit): Ditto.
9383 (winapi_DebugBreakProcess): Ditto.
9384 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9385
49b64de6
MG
93862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9387
9388 * notif.h (notif_event): Add a dummy member to avoid compiler
9389 errors.
9390
d5749ee7
PA
93912013-07-01 Pedro Alves <palves@redhat.com>
9392
9393 * hostio.c (HOSTIO_PATH_MAX): Define.
9394 (require_filename, handle_open, handle_unlink, handle_readlink):
9395 Use it.
9396
d8d2a3ee
PA
93972013-07-01 Pedro Alves <palves@redhat.com>
9398
9399 * server.h: Include "pathmax.h".
9400 * linux-low.c: Don't include sys/param.h.
9401 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9402 MAXPATHLEN.
9403 * win32-low.c: Don't include sys/param.h.
9404 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9405
bc7dea8d
PA
94062013-07-01 Pedro Alves <palves@redhat.com>
9407
9408 * event-loop.c: Don't check HAVE_UNISTD_H before including
9409 <unistd.h>.
9410 * gdbreplay.c: Likewise.
9411 * remote-utils.c: Likewise.
9412 * server.c: Likewise.
9413 * configure.ac: Don't check for unistd.h.
9414 * configure: Regenerate.
9415
d6c2da54
TT
94162013-06-28 Tom Tromey <tromey@redhat.com>
9417
9418 * Makefile.in (version.c): Use version.in, not
9419 common/version.in.
9420
257b6bec
MG
94212013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9422
9423 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9424 * configure: Rebuild.
9425 * Makefile.in (version_host, version_target): Get from configure.
9426 (version.c): Use $(version_host) and $(version_target).
9427
86ebe149
DK
94282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9429
9430 Fix trace-status to output user name without trailing colon.
9431 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9432
f30aa5af
DK
94332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9434
9435 Fix trace-status to output proper start-time and stop-time.
9436 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9437 output start time and stop time in hex as gdb expects.
9438
28a93511
YQ
94392013-06-26 Pedro Alves <pedro@codesourcery.com>
9440
9441 * tracepoint.c (build_traceframe_info_xml): Output trace state
9442 variables present in the trace buffer.
9443
01208463
TT
94442013-06-24 Tom Tromey <tromey@redhat.com>
9445
9446 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9447 create-version.sh.
9448 (version.o): Remove.
9449 * gdbreplay.c: Include version.h.
9450 (version, host_name): Don't declare.
9451 * server.h: Include version.h.
9452 (version, host_name): Don't declare.
9453
760256f9
PA
94542013-06-12 Pedro Alves <palves@redhat.com>
9455
9456 * linux-x86-low.c (linux_is_elf64): Delete global.
9457 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9458 with local linux_pid_exe_is_elf_64_file use.
9459
030031ee
PA
94602013-06-11 Pedro Alves <palves@redhat.com>
9461
9462 * linux-low.c (regset_disabled, disable_regset): New functions.
9463 (regsets_fetch_inferior_registers)
9464 (regsets_store_inferior_registers): Use them.
9465 (initialize_regsets_info); Don't allocate the disabled_regsets
9466 array here.
9467 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9468 comment.
9469
5da6eb0a
PA
94702013-06-11 Pedro Alves <palves@redhat.com>
9471
9472 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9473 xmalloc.
9474
7e5aaa09
PA
94752013-06-11 Pedro Alves <palves@redhat.com>
9476
9477 * linux-x86-low.c (initialize_low_arch): Call
9478 init_registers_x32_avx_linux.
9479
d878444c
JK
94802013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9481
9482 Fix compatibility with Android Bionic.
9483 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9484 it is not empty.
9485
3aee8918
PA
94862013-06-07 Pedro Alves <palves@redhat.com>
9487
5f2b57b5 9488 PR server/14823
3aee8918
PA
9489 * Makefile.in (OBS): Add tdesc.o.
9490 (IPA_OBJS): Add tdesc-ipa.o.
9491 (tdesc-ipa.o): New rule.
9492 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9493 interface.
9494 * linux-low.c (new_inferior): Delete.
9495 (disabled_regsets, num_regsets): Delete.
9496 (linux_add_process): Adjust to set the new per-process
9497 new_inferior flag.
9498 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9499 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9500 was a stop. When calling arch_setup, switch the current inferior
9501 to the thread that got an event.
9502 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9503 (regsets_fetch_inferior_registers)
9504 (regsets_store_inferior_registers): New regsets_info parameter.
9505 Adjust to use it.
9506 (linux_register_in_regsets): New regs_info parameter. Adjust to
9507 use it.
9508 (register_addr, fetch_register, store_register): New usrregs_info
9509 parameter. Adjust to use it.
9510 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9511 parameter regs_info. Adjust to use it.
9512 (linux_fetch_registers): Get the current inferior's regs_info, and
9513 adjust to use it.
9514 (linux_store_registers): Ditto.
9515 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9516 (initialize_low): Don't initialize the target_regsets here. Call
9517 initialize_low_arch.
9518 * linux-low.h (target_regsets): Delete declaration.
9519 (struct regsets_info): New.
9520 (struct usrregs_info): New.
9521 (struct regs_info): New.
9522 (struct process_info_private) <new_inferior>: New field.
9523 (struct linux_target_ops): Delete the num_regs, regmap, and
9524 regset_bitmap fields. New field regs_info.
9525 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9526 * i387-fp.c (num_xmm_registers): Delete.
9527 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9528 calls to new interface.
9529 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9530 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9531 Infer the number of xmm registers from the regcache's target
9532 description.
9533 * i387-fp.h (num_xmm_registers): Delete.
9534 * inferiors.c (add_thread): Don't install the thread's regcache
9535 here.
9536 * proc-service.c (gregset_info): Fetch the current inferior's
9537 regs_info. Adjust to use it.
9538 * regcache.c: Include tdesc.h.
9539 (register_bytes, reg_defs, num_registers)
9540 (gdbserver_expedite_regs): Delete.
9541 (get_thread_regcache): If the thread doesn't have a regcache yet,
9542 create one, instead of aborting gdbserver.
9543 (regcache_invalidate_one): Rename to ...
9544 (regcache_invalidate_thread): ... this.
9545 (regcache_invalidate_one): New.
9546 (regcache_invalidate): Only invalidate registers of the current
9547 process.
9548 (init_register_cache): Add target_desc parameter, and use it.
9549 (new_register_cache): Ditto. Assert the target description has a
9550 non zero registers_size.
9551 (regcache_cpy): Add assertions. Adjust.
9552 (realloc_register_cache, set_register_cache): Delete.
9553 (registers_to_string, registers_from_string): Adjust.
9554 (find_register_by_name, find_regno, find_register_by_number)
9555 (register_cache_size): Add target_desc parameter, and use it.
9556 (free_register_cache_thread, free_register_cache_thread_one)
9557 (regcache_release, register_cache_size): New.
9558 (register_size): Add target_desc parameter, and use it.
9559 (register_data, supply_register, supply_register_zeroed)
9560 (supply_regblock, supply_register_by_name, collect_register)
9561 (collect_register_as_string, collect_register_by_name): Adjust.
9562 * regcache.h (struct target_desc): Forward declare.
9563 (struct regcache) <tdesc>: New field.
9564 (init_register_cache, new_register_cache): Add target_desc
9565 parameter.
9566 (regcache_invalidate_thread): Declare.
9567 (regcache_invalidate_one): Delete declaration.
9568 (regcache_release): Declare.
9569 (find_register_by_number, register_cache_size, register_size)
9570 (find_regno): Add target_desc parameter.
9571 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9572 declarations.
9573 * remote-utils.c: Include tdesc.h.
9574 (outreg, prepare_resume_reply): Adjust.
9575 * server.c: Include tdesc.h.
9576 (gdbserver_xmltarget): Delete declaration.
9577 (get_features_xml, process_serial_event): Adjust.
9578 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9579 declare.
9580 (struct process_info) <tdesc>: New field.
9581 (ipa_tdesc): Declare.
9582 * tdesc.c: New file.
9583 * tdesc.h: New file.
9584 * tracepoint.c: Include tdesc.h.
9585 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9586 (get_context_regcache): Adjust to pass ipa_tdesc down.
9587 (do_action_at_tracepoint): Adjust to get the register cache size
9588 from the context regcache's description.
9589 (traceframe_walk_blocks): Adjust to get the register cache size
9590 from the current trace frame's description.
9591 (traceframe_get_pc): Adjust to get current trace frame's
9592 description and pass it down.
9593 (gdb_collect): Adjust to get the register cache size from the
9594 IPA's description.
9595 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9596 (gdbserver_xmltarget): Delete.
9597 (initialize_low_tracepoint): Set the ipa's target description.
9598 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9599 (initialize_low_tracepoint): Set the ipa's target description.
9600 * linux-x86-low.c: Include tdesc.h.
9601 [__x86_64__] (is_64bit_tdesc): New.
9602 (ps_get_thread_area, x86_get_thread_area): Use it.
9603 (i386_cannot_store_register): Rename to ...
9604 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9605 (i386_cannot_fetch_register): Rename to ...
9606 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9607 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9608 to new interface.
9609 (target_regsets): Rename to ...
9610 (x86_regsets): ... this.
9611 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9612 interface.
9613 (x86_siginfo_fixup): Use is_64bit_tdesc.
9614 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9615 (tdesc_x32_avx_linux, tdesc_x32_linux)
9616 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9617 Declare.
9618 (x86_linux_update_xmltarget): Delete.
9619 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9620 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9621 (AMD64_LINUX_USER64_CS): New.
9622 (x86_linux_read_description): New, based on
9623 x86_linux_update_xmltarget.
9624 (same_process_callback): New.
9625 (x86_arch_setup_process_callback): New.
9626 (x86_linux_update_xmltarget): New.
9627 (x86_regsets_info): New.
9628 (amd64_linux_regs_info): New.
9629 (i386_linux_usrregs_info): New.
9630 (i386_linux_regs_info): New.
9631 (x86_linux_regs_info): New.
9632 (x86_arch_setup): Reimplement.
9633 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9634 (x86_emit_ops): Ditto.
9635 (the_low_target): Adjust. Install x86_linux_regs_info,
9636 x86_cannot_fetch_register, and x86_cannot_store_register.
9637 (initialize_low_arch): New.
9638 * linux-ia64-low.c (tdesc_ia64): Declare.
9639 (ia64_fetch_register): Adjust.
9640 (ia64_usrregs_info, regs_info): New globals.
9641 (ia64_regs_info): New function.
9642 (the_low_target): Adjust.
9643 (initialize_low_arch): New function.
9644 * linux-sparc-low.c (tdesc_sparc64): Declare.
9645 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9646 Adjust.
9647 (sparc_arch_setup): New function.
9648 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9649 (the_low_target): Adjust.
9650 (initialize_low_arch): New function.
9651 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9652 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9653 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9654 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9655 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9656 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9657 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9658 (tdesc_powerpc_isa205_vsx64l): Declare.
9659 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9660 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9661 (ppc_set_pc, ppc_get_hwcap): Adjust.
9662 (ppc_usrregs_info): Forward declare.
9663 (!__powerpc64__) ppc_regmap_adjusted: New global.
9664 (ppc_arch_setup): Adjust to the current process'es target
9665 description.
9666 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9667 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9668 (ppc_store_evrregset): Adjust.
9669 (target_regsets): Rename to ...
9670 (ppc_regsets): ... this, and make static.
9671 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9672 (ppc_regs_info): New function.
9673 (the_low_target): Adjust.
9674 (initialize_low_arch): New function.
9675 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9676 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9677 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9678 (tdesc_s390x_linux64v2): Declare.
9679 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9680 (s390_fill_gregset, s390_store_last_break): Adjust.
9681 (target_regsets): Rename to ...
9682 (s390_regsets): ... this, and make static.
9683 (s390_get_pc, s390_set_pc): Adjust.
9684 (s390_get_hwcap): New target_desc parameter, and use it.
9685 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9686 (s390_arch_setup): Adjust to set the current process'es target
9687 description. Don't adjust the regmap.
9688 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9689 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9690 (regs_info_3264): New globals.
9691 (s390_regs_info): New function.
9692 (the_low_target): Adjust.
9693 (initialize_low_arch): New function.
9694 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9695 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9696 [__mips64] (init_registers_mips_linux)
9697 (init_registers_mips_dsp_linux): Delete defines.
9698 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9699 (have_dsp): New global.
9700 (mips_read_description): New, based on mips_arch_setup.
9701 (mips_arch_setup): Reimplement.
9702 (get_usrregs_info): New function.
9703 (mips_cannot_fetch_register, mips_cannot_store_register)
9704 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9705 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9706 (target_regsets): Rename to ...
9707 (mips_regsets): ... this, and make static.
9708 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9709 (dsp_regs_info, regs_info): New globals.
9710 (mips_regs_info): New function.
9711 (the_low_target): Adjust.
9712 (initialize_low_arch): New function.
9713 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9714 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9715 Declare.
9716 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9717 (arm_read_description): New, with bits factored from
9718 arm_arch_setup.
9719 (arm_arch_setup): Reimplement.
9720 (target_regsets): Rename to ...
9721 (arm_regsets): ... this, and make static.
9722 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9723 (arm_regs_info): New function.
9724 (the_low_target): Adjust.
9725 (initialize_low_arch): New function.
9726 * linux-m68k-low.c (tdesc_m68k): Declare.
9727 (target_regsets): Rename to ...
9728 (m68k_regsets): ... this, and make static.
9729 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9730 (m68k_regs_info): New function.
9731 (m68k_arch_setup): New function.
9732 (the_low_target): Adjust.
9733 (initialize_low_arch): New function.
9734 * linux-sh-low.c (tdesc_sharch): Declare.
9735 (target_regsets): Rename to ...
9736 (sh_regsets): ... this, and make static.
9737 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9738 (sh_regs_info, sh_arch_setup): New functions.
9739 (the_low_target): Adjust.
9740 (initialize_low_arch): New function.
9741 * linux-bfin-low.c (tdesc_bfin): Declare.
9742 (bfin_arch_setup): New function.
9743 (bfin_usrregs_info, regs_info): New globals.
9744 (bfin_regs_info): New function.
9745 (the_low_target): Adjust.
9746 (initialize_low_arch): New function.
9747 * linux-cris-low.c (tdesc_cris): Declare.
9748 (cris_arch_setup): New function.
9749 (cris_usrregs_info, regs_info): New globals.
9750 (cris_regs_info): New function.
9751 (the_low_target): Adjust.
9752 (initialize_low_arch): New function.
9753 * linux-cris-low.c (tdesc_crisv32): Declare.
9754 (cris_arch_setup): New function.
9755 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9756 (cris_regs_info): New function.
9757 (the_low_target): Adjust.
9758 (initialize_low_arch): New function.
9759 * linux-m32r-low.c (tdesc_m32r): Declare.
9760 (m32r_arch_setup): New function.
9761 (m32r_usrregs_info, regs_info): New globals.
9762 (m32r_regs_info): Adjust.
9763 (initialize_low_arch): New function.
9764 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9765 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9766 (tic6x_usrregs_info): Forward declare.
9767 (tic6x_read_description): New function, based on ...
9768 (tic6x_arch_setup): ... this. Reimplement.
9769 (target_regsets): Rename to ...
9770 (tic6x_regsets): ... this, and make static.
9771 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9772 (tic6x_regs_info): New function.
9773 (the_low_target): Adjust.
9774 (initialize_low_arch): New function.
9775 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9776 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9777 (target_regsets): Rename to ...
9778 (xtensa_regsets): ... this, and make static.
9779 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9780 globals.
9781 (xtensa_arch_setup, xtensa_regs_info): New functions.
9782 (the_low_target): Adjust.
9783 (initialize_low_arch): New function.
9784 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9785 (nios2_arch_setup): Set the current process'es tdesc.
9786 (target_regsets): Rename to ...
9787 (nios2_regsets): ... this.
9788 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9789 (nios2_regs_info): New function.
9790 (the_low_target): Adjust.
9791 (initialize_low_arch): New function.
a261b8f5
PA
9792 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9793 (aarch64_arch_setup): Set the current process'es tdesc.
9794 (target_regsets): Rename to ...
9795 (aarch64_regsets): ... this.
9796 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9797 (aarch64_regs_info): New function.
9798 (the_low_target): Adjust.
9799 (initialize_low_arch): New function.
3aee8918
PA
9800 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9801 globals.
9802 (target_regsets): Rename to ...
9803 (tile_regsets): ... this.
9804 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9805 (tile_regs_info): New function.
9806 (tile_arch_setup): Set the current process'es tdesc.
9807 (the_low_target): Adjust.
9808 (initialize_low_arch): New function.
9809 * spu-low.c (tdesc_spu): Declare.
9810 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9811 * win32-arm-low.c (tdesc_arm): Declare.
9812 (arm_arch_setup): New function.
9813 (the_low_target): Install arm_arch_setup instead of
9814 init_registers_arm.
9815 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9816 (init_windows_x86): Rename to ...
9817 (i386_arch_setup): ... this. Set `win32_tdesc'.
9818 (the_low_target): Adjust.
9819 * win32-low.c (win32_tdesc): New global.
9820 (child_add_thread): Don't create the thread cache here.
9821 (do_initial_child_stuff): Set the new process'es tdesc.
9822 * win32-low.h (struct target_desc): Forward declare.
9823 (win32_tdesc): Declare.
9824 * lynx-i386-low.c (tdesc_i386): Declare global.
9825 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9826 * lynx-low.c (lynx_tdesc): New global.
9827 (lynx_add_process): Set the new process'es tdesc.
9828 * lynx-low.h (struct target_desc): Forward declare.
9829 (lynx_tdesc): Declare global.
9830 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9831 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9832 * nto-low.c (nto_tdesc): New global.
9833 (do_attach): Set the new process'es tdesc.
9834 * nto-low.h (struct target_desc): Forward declare.
9835 (nto_tdesc): Declare.
9836 * nto-x86-low.c (tdesc_i386): Declare.
9837 (nto_x86_arch_setup): Set `nto_tdesc'.
9838
b1fbec62
GB
98392013-06-04 Gary Benson <gbenson@redhat.com>
9840
9841 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9842 to qSupported response when appropriate.
9843 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9844 with nonzero-length annex.
9845 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9846 arguments supplied in annex.
9847
d1ec4ce7
DE
98482013-05-31 Doug Evans <dje@google.com>
9849
ac44adcb 9850 PR server/15594
d1ec4ce7
DE
9851 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9852 64 bits in 64-cross-32 environment.
9853
9b25f2d3
PA
98542013-05-28 Pedro Alves <palves@redhat.com>
9855
9856 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9857 (aarch64-without-fpu.c): Delete rule.
9858 * configure.srv (aarch64*-*-linux*): Remove references to
9859 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9860 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9861 declaration.
9862
6740dc9c
PA
98632013-05-24 Pedro Alves <palves@redhat.com>
9864
9865 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9866 instead of strchr/decode_address. Error if the range isn't split
9867 with a ','. Don't assume there's be a ':' in the action.
9868
c2d6af84
PA
98692013-05-23 Yao Qi <yao@codesourcery.com>
9870 Pedro Alves <palves@redhat.com>
9871
9872 * linux-low.c (lwp_in_step_range): New function.
9873 (linux_wait_1): If the thread was range stepping and stopped
9874 outside the stepping range, report the stop to GDB. Otherwise,
9875 continue stepping. Add range stepping debug output.
9876 (linux_set_resume_request): Copy the step range from the resume
9877 request to the lwp.
9878 (linux_supports_range_stepping): New.
9879 (linux_target_ops) <supports_range_stepping>: Set to
9880 linux_supports_range_stepping.
9881 * linux-low.h (struct linux_target_ops)
9882 <supports_range_stepping>: New field.
9883 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9884 * linux-x86-low.c (x86_supports_range_stepping): New.
9885 (the_low_target) <supports_range_stepping>: Set to
9886 x86_supports_range_stepping.
9887 * server.c (handle_v_cont): Handle 'r' action.
9888 (handle_v_requests): Append ";r" if the target supports range
9889 stepping.
9890 * target.h (struct thread_resume) <step_range_start,
9891 step_range_end>: New fields.
9892 (struct target_ops) <supports_range_stepping>:
9893 New field.
9894 (target_supports_range_stepping): New macro.
9895
58794e1a
JB
98962013-05-17 Joel Brobecker <brobecker@adacore.com>
9897
9898 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9899 confusion in comment.
9900
d631c5a7
JB
99012013-05-17 Joel Brobecker <brobecker@adacore.com>
9902
9903 * lynx-low.c (struct process_info_private): New type.
9904 (lynx_add_process): New function.
9905 (lynx_create_inferior, lynx_attach): Replace calls to
9906 add_process by calls to lynx_add_process.
9907 (lynx_resume): If PTID is null, then try using
9908 current_process()->private->last_wait_event_ptid.
9909 Add comments.
9910 (lynx_clear_inferiors): Delete. The contents of that function
9911 has been inlined in lynx_mourn;
9912 (lynx_wait_1): Save the ptid in the process's private data.
9913 (lynx_mourn): Free the process' private data. Replace call
9914 to lynx_clear_inferiors by call to clear_inferiors.
9915
96f7a20f
YQ
99162013-05-17 Yao Qi <yao@codesourcery.com>
9917
9918 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9919 the right place.
9920
db0dfaa0
LM
99212013-05-16 Luis Machado <lgustavo@codesourcery.com>
9922
9923 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9924 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9925 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9926 PT_TEXT_END_ADDR guards. Update comments.
9927 (linux_target_op) <read_offsets>: Conditionally define to
9928 linux_read_offsets if the target is UCLIBC and if it defines
9929 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9930
68f5f838
SL
99312013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9932 Andrew Jenner <andrew@codesourcery.com>
9933
9934 * Makefile.in (SFILES): Add linux-nios2-low.c.
9935 (clean): Add action to delete nios2-linux.c.
9936 (nios2-linux.c): New rule.
9937 * configure.srv: Add nios2*-*-linux*.
9938 * linux-nios2-low.c: New.
9939
1ebff1fd
HAQ
99402013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9941
9942 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9943
f6150862
HZ
99442013-04-25 Hui Zhu <hui@codesourcery.com>
9945
9946 PR gdb/15186
f6150862
HZ
9947 * ax.c (ax_printf): Add fflush.
9948
614c279d
TT
99492013-04-22 Tom Tromey <tromey@redhat.com>
9950
9951 * Makefile.in (SFILES): Add filestuff.c.
9952 (OBS): Add filestuff.o.
9953 (filestuff.o): New target.
9954 * config.in, configure: Rebuild.
9955 * configure.ac: Check for fdwalk, pipe2.
9956
7d4e5717
PA
99572013-04-17 Pedro Alves <palves@redhat.com>
9958
9959 * configure.ac (USE_THREAD_DB): Delete variable.
9960 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9961 Don't AC_SUBST USE_THREAD_DB.
9962 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9963 * config.in, configure: Regenerate.
9964
d5c93e41
PA
99652013-04-16 Pedro Alves <palves@redhat.com>
9966
9967 * linux-low.h (struct lwp_info) <thread_known>: Move under
9968 the USE_THREAD_DB #ifdef.
9969
04f5fe89
PA
99702013-04-16 Pedro Alves <palves@redhat.com>
9971
9972 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9973 (linux-low.o): Delete rule.
9974 * linux-low.h: Always include "gdb_thread_db.h" instead of
9975 conditionally including thread_db.h.
9976 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9977 HAVE_THREAD_DB_H.
9978
480b27bf
JK
99792013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9980
9981 * Makefile.in (install-only): Fix make install regression.
9982
43662968
JK
99832013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9984
9985 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9986 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9987 installation.
9988 * gdbserver.1: Remove.
9989
3e74e146
PA
99902013-03-22 Pedro Alves <palves@redhat.com>
9991
9992 * linux-low.c (handle_extended_wait): Don't call
9993 linux_enable_event_reporting.
9994
a8347a2a
TT
99952013-03-15 Tony Theodore <tonyt@logyst.com>
9996
9997 PR build/9098:
9998 * Makefile.in (SHELL): Use @SHELL@.
9999
eeb56fa7
SDJ
100002013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10001
10002 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10003 compiler warning.
10004
4fa7e2ff
JB
100052013-03-13 Joel Brobecker <brobecker@adacore.com>
10006
10007 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10008 Remove extraneous NULL element.
10009
8ddb1965
YQ
100102013-03-13 Yao Qi <yao@codesourcery.com>
10011
10012 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10013 'V' block in trace frame.
10014
9accd112
MM
100152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10016
10017 * target.h (struct target_ops): Add btrace ops.
10018 (target_supports_btrace): New macro.
10019 (target_enable_btrace): New macro.
10020 (target_disable_btrace): New macro.
10021 (target_read_btrace): New macro.
10022 * gdbthread.h (struct thread_info): Add btrace field.
10023 * server.c: Include btrace-common.h.
10024 (handle_btrace_general_set): New function.
10025 (handle_btrace_enable): New function.
10026 (handle_btrace_disable): New function.
10027 (handle_general_set): Call handle_btrace_general_set.
10028 (handle_qxfer_btrace): New function.
10029 (struct qxfer qxfer_packets[]): Add btrace entry.
10030 * inferiors.c (remove_thread): Disable btrace.
10031 * linux-low: Include linux-btrace.h.
10032 (linux_low_enable_btrace): New function.
10033 (linux_low_read_btrace): New function.
10034 (linux_target_ops): Add btrace ops.
10035 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10036 Add srv_linux_btrace=yes.
10037 (x86_64-*-linux*): Add linux-btrace.o.
10038 Add srv_linux_btrace=yes.
10039 * configure.ac: Define HAVE_LINUX_BTRACE.
10040 * config.in: Regenerated.
10041 * configure: Regenerated.
10042
5cc22e4c
MM
100432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10044
10045 * server.c (handle_qxfer): Preserve error message if -3 is
10046 returned.
10047 (qxfer): Document the -3 return value.
10048
7c97f91e
MM
100492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10050
10051 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10052 (linux_btrace_h): New variable.
10053 (linux-btrace.o): New rule.
10054
be9a119c 100552013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10056 Hafiz Abid Qadeer <abidh@codesourcery.com>
10057
10058 * tracepoint.c (trace_buffer_size): New global.
10059 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10060 (init_trace_buffer): Change to one-argument function. Allocate
10061 trace buffer memory.
10062 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10063 handle QTBuffer:size packet.
10064 (cmd_bigqtbuffer_size): New function.
10065 (initialize_tracepoint): Call init_trace_buffer with
10066 DEFAULT_TRACE_BUFFER_SIZE.
10067 * server.c (handle_query): Add QTBuffer:size in the
10068 supported packets.
10069
e64f7499
YQ
100702013-03-07 Yao Qi <yao@codesourcery.com>
10071
10072 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10073 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10074 of -1.
10075 (cmd_qtsp): Adjust condition. Do post increment.
10076 Set cur_action and cur_step_action back to 0.
10077
f0ae6fc3
PA
100782013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10079
10080 PR server/15236
10081 * linux-low.c (linux_write_memory): Return early success if LEN is
10082 zero.
10083
b5b0b0af
CV
100842013-03-05 Corinna Vinschen <vinschen@redhat.de>
10085
334ad4a8 10086 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10087
589bc927
TT
100882013-02-28 Tom Tromey <tromey@redhat.com>
10089
10090 * configure.ac: Invoke AC_SYS_LARGEFILE.
10091 * configure, config.in: Rebuild.
10092
dfe07582
CV
100932013-02-28 Corinna Vinschen <vinschen@redhat.com>
10094
10095 * win32-low.c: Throughout, fix format strings and casts of
10096 printf-like functions to avoid type related warnings on all
10097 platforms.
10098 (get_child_debug_event): Print dwDebugEventCode as hex since
10099 that's how it's usually documented.
10100
736cd585
YQ
101012013-02-28 Yao Qi <yao@codesourcery.com>
10102
10103 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10104 pulongest.
10105
e1f58301
JW
101062013-02-27 Jiong Wang <jiwang@tilera.com>
10107
10108 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10109 (reg-tilegx32.c): New rule.
10110 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10111 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10112 different register info initializer according to elf class.
10113 (init_registers_tilgx32): New function. The tilegx32 register info
10114 initializer.
10115 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10116 (tile_store_gregset): Likewise.
10117
d171ca78
YQ
101182013-02-27 Yao Qi <yao@codesourcery.com>
10119
10120 * server.c (process_point_options): Print debug message when
10121 debug_threads is true.
10122
282bbdf3
YQ
101232013-02-26 Yao Qi <yao@codesourcery.com>
10124
10125 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10126
aca22551
PA
101272013-02-19 Pedro Alves <palves@redhat.com>
10128 Kai Tietz <ktietz@redhat.com>
10129
10130 PR gdb/15161
10131
10132 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10133 instead of strtoul to extract address from packet.
10134 (process_serial_event) <'z'>: Likewise.
10135
4f3cee1c
YQ
101362013-02-18 Yao Qi <yao@codesourcery.com>
10137
10138 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10139
8e1d55a3
PA
101402013-02-14 Pedro Alves <palves@redhat.com>
10141
10142 Plug memory leak.
10143
10144 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10145 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10146
458820da
PA
101472013-02-14 Pedro Alves <palves@redhat.com>
10148
10149 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10150
baea0dae
PA
101512013-02-14 Pedro Alves <palves@redhat.com>
10152
10153 * tracepoint.c (save_string): Delete.
10154 (add_tracepoint_action): Use savestring instead of save_string.
10155
0b1afbb3
PA
101562013-02-12 Pedro Alves <palves@redhat.com>
10157
10158 * linux-xtensa-low.c: Ditto.
10159 * xtensa-xtregs.c: Ditto.
10160
8a4ac37e
PA
101612013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10162
10163 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10164 thread_db.
10165
148de6bb
MS
101662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10167
10168 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10169 aarch64_num_wp_regs and aarch64_num_bp_regs to
10170 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10171
55fac6e0
MS
101722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10173
10174 * linux-aarch64-low.c (ps_get_thread_area): Replace
10175 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10176
176eb98c
MS
101772013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10178 Marcus Shawcroft <marcus.shawcroft@arm.com>
10179 Nigel Stephens <nigel.stephens@arm.com>
10180 Yufeng Zhang <yufeng.zhang@arm.com>
10181
10182 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10183 (aarch64.c, aarch64-without-fpu.c): New targets.
10184 * configure.srv (aarch64*-*-linux*): New.
10185 * linux-aarch64-low.c: New file.
10186
56f7af9c
MS
101872013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10188
43aaf8b6 10189 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10190 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10191 (dequeue_one_deferred_signal, linux_resume_one_thread)
10192 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10193 (linux_tracefork_grandchild, linux_test_for_tracefork)
10194 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10195 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10196 where the argument is 0.
10197
60f662b0
YQ
101982013-01-25 Yao Qi <yao@codesourcery.com>
10199
10200 * event-loop.c: Include "queue.h".
10201 (gdb_event_p): New typedef.
10202 (struct gdb_event) <next_event>: Remove.
10203 (event_queue): Change to QUEUE(gdb_event_p).
10204 (async_queue_event): Remove.
10205 (gdb_event_xfree): New.
10206 (initialize_event_loop): New.
10207 (process_event): Use API from QUEUE.
10208 (wait_for_event): Likewise.
10209 * server.c (main): Call initialize_event_loop.
10210 * server.h (initialize_event_loop): Declare.
10211
5ae4861a
YQ
102122013-01-18 Yao Qi <yao@codesourcery.com>
10213
10214 * ax.h (struct eval_agent_expr_context): New.
10215 (gdb_eval_agent_expr): Update declaration.
10216 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10217 TFRAME. Add new argument CTX.
10218 * server.h (struct eval_agent_expr_context): Declare.
10219 (agent_mem_read, agent_tsv_read): Update declaration.
10220 (agent_mem_read_string): Likewise.
10221 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10222 (add_traceframe_block): Add new argument TPOINT.
10223 Increase TPOINT->traceframe_usage.
10224 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10225 eval_tracepoint_agent_expr.
10226 (condition_true_at_tracepoint): Likewise.
10227 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10228 (agent_mem_read_string, agent_tsv_read): Likewise.
10229
85e00e85
YQ
102302013-01-16 Yao Qi <yao@codesourcery.com>
10231
10232 * linux-low.c (linux_resume_one_lwp): Don't check
10233 'lwp->bp_reinsert != 0'.
10234
4039cf45
JB
102352013-01-07 Joel Brobecker <brobecker@adacore.com>
10236 Pedro Alves <palves@redhat.com>
10237
10238 * lynx-low.c (ptrace_request_to_str): Define a temporary
10239 macro and use it to simplify this function's implementation.
10240
9044dee2
JB
102412013-01-07 Joel Brobecker <brobecker@adacore.com>
10242
10243 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10244 sets errno.
10245
e6352c8f
JB
102462013-01-07 Joel Brobecker <brobecker@adacore.com>
10247
10248 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10249
50681a27
JB
102502013-01-07 Joel Brobecker <brobecker@adacore.com>
10251
10252 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10253
3f6e77ef
JB
102542013-01-07 Joel Brobecker <brobecker@adacore.com>
10255
10256 * lynx-low.c (lynx_resume): Use the resume_info parameter
10257 to determine the ptid for the lynx_ptrace call, unless
10258 it is equal to minus_one_ptid, in which case we use the
10259 ptid of the current_inferior.
10260 (lynx_wait_1): After having received a thread create/exit
10261 event, resume the inferior's execution using the signaling
10262 thread's ptid, rather than the old ptid.
10263
7fda33ae
JB
102642013-01-07 Joel Brobecker <brobecker@adacore.com>
10265
10266 * lynx-low.c (lynx_resume): Delete variable ret.
10267
b9786c74
JB
102682013-01-01 Joel Brobecker <brobecker@adacore.com>
10269
10270 * gdbreplay.c (gdbreplay_version): Update copyright year.
10271 * server.c (gdbserver_version): Likewise.
10272
8b93d60f
JB
102732012-12-17 Joel Brobecker <brobecker@adacore.com>
10274
10275 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10276 new thread.
10277
037335a7
JB
102782012-12-17 Joel Brobecker <brobecker@adacore.com>
10279
10280 * lynx-low.c (ptrace_request_to_str): Add handling for
10281 PTRACE_GETTRACESIG.
10282
52d4cbd8
JB
102832012-12-17 Joel Brobecker <brobecker@adacore.com>
10284
10285 * lynx-low.c (lynx_attach): Delete variable new_process.
10286
ab8f6ca9
JB
102872012-12-17 Joel Brobecker <brobecker@adacore.com>
10288
10289 * lynx-low.c (lynx_create_inferior): Delete variable
10290 new_process.
10291
78cbc024
JB
102922012-12-17 Joel Brobecker <brobecker@adacore.com>
10293
10294 * lynx-low.c (ptrace_request_to_str): Do not handle
10295 PTRACE_GETTHREADLIST if this macro does not exist.
10296
14a00470
YQ
102972012-12-15 Yao Qi <yao@codesourcery.com>
10298
10299 * Makefile.in (OBS): Add notif.o.
10300 * notif.c, notif.h: New.
10301 * server.c: Include "notif.h".
10302 (struct vstop_notif) <next>: Remove.
10303 <base>: New field.
10304 (queue_stop_reply): Update.
10305 (push_event, send_next_stop_reply): Remove.
10306 (discard_queued_stop_replies): Update.
10307 (notif_stop): New variable.
10308 (handle_v_stopped): Remove.
10309 (handle_v_requests): Don't call handle_v_stopped. Call
10310 handle_ack_notif instead.
10311 (queue_stop_reply_callback): Call notif_event_enque instead
10312 of queue_stop_reply.
10313 (handle_status): Don't call send_next_stop_reply, call
10314 notif_write_event instead.
10315 (kill_inferior_callback): Likewise.
10316 (detach_or_kill_inferior_callback): Likewise.
10317 (main): Call initialize_notif.
10318 (process_serial_event): Call QUEUE_is_empty.
10319 (handle_target_event): Call notif_push instead of push event.
10320 * server.h (push_event): Remove declaration.
10321
61c125b9
TT
103222012-12-10 Tom Tromey <tromey@redhat.com>
10323
10324 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10325 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10326 macros.
10327 (.c.o): Rewrite.
10328 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10329 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10330 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10331 (amd64-linux-ipa.o, ax.o): Rewrite.
10332 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10333 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10334 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10335 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10336 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10337 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10338 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10339 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10340 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10341 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10342 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10343 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10344 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10345 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10346 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10347 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10348 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10349 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10350 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10351 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10352 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10353 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10354 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10355 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10356 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10357 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10358 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10359 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10360 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10361 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10362 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10363 (reg-tilegx.o): Remove.
10364 (all_object_files): New macro.
10365 Include .deps files.
10366 * aclocal.m4, configure: Rebuild.
10367 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10368 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10369 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10370
e90e9ad9
TT
103712012-12-05 Tom Tromey <tromey@redhat.com>
10372
10373 PR gdb/14917:
10374 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10375
02d403bf 103762012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10377
10378 * configure.ac: Check for linux/perf_event.h.
10379 * config.in: Regenerated.
10380 * configure: Regenerated.
10381
0270a750
PA
103822012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10383
10384 * hostio.c (handle_readlink): Decrease buffer size
10385 parameter passed to readlink by one byte.
10386
8c29b58e
YQ
103872012-11-26 Yao Qi <yao@codesourcery.com>
10388
10389 * configure.ac (build_warnings): Append '-Wempty-body'.
10390 * configure: Regenerated.
10391 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10392 body.
10393
8bdce1ff
PM
103942012-11-15 Pierre Muller <muller@sourceware.org>
10395
10396 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10397 * config.in: Regenerate.
10398 * configure: Regenerate.
10399 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10400 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10401 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10402 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10403 header.
10404 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10405 instead of <sys/wait.h> header.
10406 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10407
02d403bf 104082012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10409
10410 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10411 (various make rules): Remove -DGDBSERVER
10412
fbd5db48
YQ
104132012-11-09 Yao Qi <yao@codesourcery.com>
10414
10415 * spu-low.c (current_ptid): Move it to ..
10416 * gdbthread.h: ... here. New.
10417 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10418 * server.c (myresume, process_serial_event): Likewise.
10419 * thread-db.c (thread_db_find_new_threads): Likewise.
10420 * tracepoint.c (run_inferior_command): Likewise.
10421
b3dc46ff
AB
104222012-10-01 Andrew Burgess <aburgess@broadcom.com>
10423
10424 * server.c (handle_search_memory_1): Include access length in
10425 warning message.
10426
07c04788
HPN
104272012-09-05 Michael Brandt <michael.brandt@axis.com>
10428
10429 * linux-crisv32-low.c: Fix compile errors.
10430
918d227b
YQ
104312012-09-04 Yao Qi <yao@codesourcery.com>
10432
10433 * tracepoint.c (cmd_qtsv): Adjust debug message.
10434 Don't check CUR_TPOINT.
10435
18c1b81a
YQ
104362012-08-28 Yao Qi <yao@codesourcery.com>
10437
10438 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10439 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10440 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10441 Remove declarations of xmalloc, xreallloc, xstrdup and
10442 freeargv.
10443 * Makefile.in (libiberty_h): New.
10444 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10445 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10446
dc82f37b
YQ
104472012-08-23 Yao Qi <yao@codesourcery.com>
10448
10449 * server.h: Remove declaration of 'xsnprintf'.
10450
406b1477
KS
104512012-08-22 Keith Seitz <keiths@redhat.com>
10452
10453 * server.h: Include build-gnulib-gbserver/config.h.
10454 * gdbreplay.c: Likewise.
10455
e6712ff1
DE
104562012-08-08 Doug Evans <dje@google.com>
10457
10458 * Makefile.in (SFILES): Add gdb_vecs.c.
10459 (OBS): Add gdb_vecs.o.
10460 (gdb_vecs_h, host_defs_h): New variables.
10461 (thread-db.o): Add $(gdb_vecs_h) dependency.
10462 (gdb_vecs.o): New rule.
10463 * thread-db.c: #include "gdb_vecs.h".
10464 (thread_db_load_search): Use a vector to iterate over path elements.
10465 Handle text appearing after "$pdir".
10466
10467 * configure.ac: Add check for strstr.
10468 * config.in: Regenerate.
10469 * configure: Regenerate.
10470
7c3270ae
UW
104712012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10472
10473 * hostio.c (handle_pread): If pread fails, fall back to attempting
10474 lseek/read.
10475 (handle_pwrite): Likewise for pwrite.
10476
b62e2b27
UW
104772012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10478
10479 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10480 between unsupported TYPE and unimplementable ADDR/LEN combination.
10481 (arm_insert_point): Act on new return value.
10482
78a99e91
PA
104832012-07-31 Pedro Alves <palves@redhat.com>
10484
10485 * server.c (process_point_options): Only skip tokens if we find
10486 one that is unrecognized. Don't treat 'X' specially while
10487 skipping unrecognized tokens.
10488
fcf303ab
UW
104892012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10490
10491 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10492 to 4-byte-align HW breakpoint addresses for Thumb.
10493
7255706c
YQ
104942012-07-27 Yao Qi <yao@codesourcery.com>
10495
10496 PR remote/14161.
10497
10498 * server.h: Declare gdb_agent_about_to_close.
10499 * target.c (kill_inferior): Include "agent.h".
10500 New. Send command 'kill'.
10501 * target.h (kill_inferior): Removed macro.
10502 * tracepoint.c (gdb_agent_about_to_close): New.
10503 (gdb_agent_helper_thread): Handle command 'close'.
10504 Wait endlessly until the inferior stops.
10505 Install gdb_agent_remove_socket to atexit hook.
10506 (agent_socket_name): New static variable.
10507 (gdb_agent_socket_init): Replace local variable 'name' with
10508 'agent_socket_name'.
10509 (gdb_agent_remove_socket): New.
10510
5a3f286f
YQ
105112012-07-27 Yao Qi <yao@codesourcery.com>
10512
10513 * server.c (process_point_options): Stop at 'X' when parsing.
10514
961bd387
ME
105152012-07-19 Michael Eager <eager@eagercon.com>
10516
a261b8f5 10517 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10518 to hw_execute.
10519 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10520 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10521 hardware breakpoint.
10522
aa7c7447
JK
105232012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10524
10525 * gdbserver/linux-low.c (initialize_low): Call
10526 linux_ptrace_init_warnings.
10527
7f216e7c
DE
105282012-07-02 Doug Evans <dje@google.com>
10529
10530 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10531 pointer to int.
10532
d3ce09f5
SS
105332012-07-02 Stan Shebs <stan@codesourcery.com>
10534
10535 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10536 (ax.o): Add it to build rule.
10537 (ax-ipa.o): Ditto.
10538 (OBS): Add format.o.
10539 (IPA_OBS): Add format.o.
10540 * server.c (handle_query): Claim support for breakpoint commands.
10541 (process_point_options): Add command case.
10542 (process_serial_event): Leave running if there are printfs in
10543 effect.
10544 * mem-break.h (any_persistent_commands): Declare.
10545 (add_breakpoint_commands): Declare.
10546 (gdb_no_commands_at_breakpoint): Declare.
10547 (run_breakpoint_commands): Declare.
10548 * mem-break.c (struct point_command_list): New struct.
10549 (struct breakpoint): New field command_list.
10550 (any_persistent_commands): New function.
10551 (add_commands_to_breakpoint): New function.
10552 (add_breakpoint_commands): New function.
10553 (gdb_no_commands_at_breakpoint): New function.
10554 (run_breakpoint_commands): New function.
10555 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10556 locally.
10557 * ax.c: Include format.h.
10558 (ax_printf): New function.
10559 (gdb_eval_agent_expr): Add printf opcode.
10560
2f8f6aed
YQ
105612012-06-13 Yao Qi <yao@codesourcery.com>
10562
10563 * server.c (start_inferior): Remove duplicated writes to fields
10564 'last_resume_kind' and 'last_status' of 'current_inferior'.
10565
0c9070b3
YQ
105662012-06-12 Yao Qi <yao@codesourcery.com>
10567 Pedro Alves <palves@redhat.com>
10568
10569 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10570 comment.
10571 * server.c (handle_v_cont): Extend comment.
10572
c52daf70
YQ
105732012-06-11 Yao Qi <yao@codesourcery.com>
10574
10575 * linux-low.c (linux_attach): Add 'static'.
10576
d38bbb0a
YQ
105772012-06-06 Yao Qi <yao@codesourcery.com>
10578
10579 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10580
89dc0afd
JK
105812012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10582
10583 Fix gcc -flto compilation warning.
10584 * server.c (main): Make variable multi_mode and attach volatile.
10585
75f62ce7
TJB
105862012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10587
10588 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10589 if the platform doesn't know about it.
10590
65f479b6
PA
105912012-05-30 Jeff Kenton <jkenton@tilera.com>
10592
10593 * Makefile.in (SFILES): Add linux-tile-low.c.
10594 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10595 * configure.srv: Handle tilegx-*-linux*.
10596 * linux-tile-low.c: New file.
10597
0c5bf5a9
JK
105982012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10599
10600 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10601
a493e3e2
PA
106022012-05-24 Pedro Alves <palves@redhat.com>
10603
10604 PR gdb/7205
10605
43aaf8b6 10606 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10607
2ea28649
PA
106082012-05-24 Pedro Alves <palves@redhat.com>
10609
10610 PR gdb/7205
10611
10612 Replace target_signal with gdb_signal throughout.
10613
8d409d16
MR
106142012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10615
10616 * linux-low.c (linux_store_registers): Avoid the copying sequence
10617 when no data has been retrieved by ptrace.
10618
23512c01
MGD
106192012-05-22 Will Deacon <will.deacon@arm.com>
10620
10621 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10622 Include asm/ptrace.h.
10623 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10624 already defined.
10625
4934b29e
MR
106262012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10627
10628 * linux-low.c (linux_store_registers): Don't re-retrieve data
10629 with ptrace that has already been obtained from /proc. Always
10630 copy any data retrieved with ptrace to the buffer supplied.
10631
bde24c0a
PA
106322012-05-11 Yao Qi <yao@codesourcery.com>
10633 Pedro Alves <palves@redhat.com>
10634
10635 * linux-low.c (enum stopping_threads_kind): New.
10636 (stopping_threads): Change type to `enum stopping_threads_kind'.
10637 (handle_extended_wait): If stopping and suspending threads, leave
10638 the new_lwp suspended too.
10639 (linux_wait_for_event): Adjust.
10640 (stop_all_lwps): Set `stopping_threads' to
10641 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10642 whether we're suspending threads or just stopping them. Assert no
10643 recursion happens.
10644
623b6bdf
YQ
106452012-04-29 Yao Qi <yao@codesourcery.com>
10646
10647 * server.h: Move some code to ...
10648 * gdbthread.h: ... here. New.
10649 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10650 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10651 (nto-low.o, win32-low.o): Likewise.
10652 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10653 * regcache.c, remote-utils.c, server.c: Likewise.
10654 * target.c, tracepoint.c, win32-low.c: Likewise.
10655
f15f9948
TJB
106562012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10657
10658 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10659 (PTRACE_ARG4_TYPE): Likewise.
10660 (PTRACE_XFER_TYPE): Likewise.
10661 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10662 ptrace to PTRACE_ARG3_TYPE.
10663 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10664 (PTRACE_ARG4_TYPE): Likewise.
10665 (PTRACE_XFER_TYPE): Likewise.
10666 (linux_detach_one_lwp): Cast fourth argument of
10667 ptrace to long then PTRACE_ARG4_TYPE.
10668 (regsets_fetch_inferior_registers): Cast third argument of
10669 ptrace to long then PTRACE_ARG3_TYPE.
10670 (regsets_store_inferior_registers): Likewise.
10671
38ea300a
PA
106722012-04-20 Pedro Alves <palves@redhat.com>
10673
10674 * configure: Regenerate.
10675
c971b7fa
PA
106762012-04-19 Pedro Alves <palves@redhat.com>
10677
43aaf8b6 10678 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10679 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10680 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10681 (all, install-only, uninstall, clean-info, all-lib, clean): No
10682 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10683 (maintainer-clean realclean distclean): Use subdir_do.
10684 (subdir_do): New.
10685 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10686 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10687 * acinclude.m4: Include acx_configure_dir.m4.
10688 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10689 calls. Call AC_PROG_RANLIB. Configure gnulib using
10690 ACX_CONFIGURE_DIR.
10691 (GNULIB): New.
10692 (GNULIB_STDINT_H): Adjust.
10693 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10694 * gdbreplay.c: Include build-gnulib/config.h.
10695 * server.h: Likewise.
10696 * aclocal.m4: Regenerate.
10697 * config.in: Regenerate.
10698 * configure: Regenerate.
c971b7fa 10699
809277f8
PA
107002012-04-19 Pedro Alves <palves@redhat.com>
10701
10702 * Makefile.in (LIBGNU, INCGNU): Adjust.
10703 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10704 (all, install-only, uninstall, clean-info, all-lib, clean)
10705 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10706 * configure.ac: Adjust AC_OUTPUT output.
10707 * aclocal.m4: Regenerate.
10708 * configure: Regenerate.
10709
fd9bb8b8
PA
107102012-04-19 Pedro Alves <palves@redhat.com>
10711
10712 * Makefile.in (generated_files): New.
10713 (server_h): Remove the explicit dependency on config.h, and depend
10714 on $generated_files.
10715
1c298c66
PA
107162012-04-19 Pedro Alves <palves@redhat.com>
10717
10718 * Makefile.in (INCGNU): Add -Ignulib.
10719
57c4b50b
PA
107202012-04-19 Pedro Alves <palves@redhat.com>
10721
10722 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10723 (INCGNU): ... this, and spell out -I here.
10724 (GNULIB_LIB): Rename to ...
10725 (LIBGNU): ... this.
10726 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10727
1030e047
PA
107282012-04-19 Pedro Alves <palves@redhat.com>
10729
10730 * config.in: Regenerate.
10731
447d4319
PA
107322012-04-19 Pedro Alves <palves@redhat.com>
10733
10734 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10735 * server.h (memmem): Remove declaration.
10736 * config.in: Regenerate.
10737 * configure: Regenerate.
10738
aad9eab9
YQ
107392012-04-19 Yao Qi <yao@codesourcery.com>
10740
10741 * Makefile.in (SFILES): Add common/vec.c.
10742 (OBS): Add vec.o.
10743 (vec.o): New rule.
10744
3e10640f
YQ
107452012-04-19 Yao Qi <yao@codesourcery.com>
10746
10747 * remote-utils.c (prepare_resume_reply): Replace with macro
10748 target_core_of_thread.
10749 * server.c (handle_qxfer_threads_proper): Likewise.
10750 * target.h (traget_core_of_thread): New macro.
10751
71622373
PA
107522012-04-18 Pedro Alves <palves@redhat.com>
10753
10754 * aclocal.m4: Regenerate.
10755 * configure: Regenerate.
10756
80d26939
YQ
107572012-04-16 Yao Qi <yao@codesourcery.com>
10758
10759 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10760 duplicated on address.
10761
42476b70
YQ
107622012-04-16 Yao Qi <yao@codesourcery.com>
10763
10764 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10765 (struct tracepoint_action_ops) <send>: New field.
10766 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10767 (agent_expr_send, x_tracepoint_action_send): New.
10768 (l_tracepoint_action_send): New.
10769 (cmd_qtdp): Download and install tracepoint
10770 according to `use_agent'.
10771 (run_inferior_command): Add one more parameter `len'.
10772 Update callers.
10773 (tracepoint_send_agent): New.
10774 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10775
7bc83639
YQ
107762012-04-16 Yao Qi <yao@codesourcery.com>
10777
10778 * tracepoint.c (download_tracepoints): Moved to ...
10779 (cmd_qtstart): ... here.
10780
5f18041e
YQ
107812012-04-14 Yao Qi <yao@codesourcery.com>
10782
10783 * tracepoint.c: Include inttypes.h.
10784 (struct collect_memory_action): Use sized types.
10785 (struct tracepoint): Likewise.
10786 (cmd_qtdp, stop_tracing): Update print specifiers.
10787 (cmd_qtp, response_tracepoint): Likewise.
10788 (collect_data_at_tracepoint): Likewise.
10789 (collect_data_at_step): Likewise.
10790
55a8c076
YQ
107912012-04-14 Yao Qi <yao@codesourcery.com>
10792
10793 Import gnulib module inttypes.
10794 * aclocal.m4, config.in, configure: Regenerated.
10795
dc750257
YQ
107962012-04-14 Yao Qi <yao@codesourcery.com>
10797
10798 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10799 Makefile and config.status at last.
10800
0ab5faf9
YQ
108012012-04-13 Yao Qi <yao@codesourcery.com>
10802
10803 * tracepoint.c: Include stdint.h unconditionally.
10804
18f5fd81
TJB
108052012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10806
10807 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10808 on BFD_HAVE_SYS_PROCFS_TYPE.
10809 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10810 * configure: Regenerate.
10811 * config.in: Likewise.
10812
4d47af5c
L
108132012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10814
10815 * Makefile.in (clean): Also remove x32.c x32-linux.c
10816 x32-avx.c x32-avx-linux.c.
10817 (x32.o): New target.
10818 (x32.c): Likewise.
10819 (x32-linux.o): Likewise.
10820 (x32-linux.c): Likewise.
10821 (x32-avx.o): Likewise.
10822 (x32-avx.c): Likewise.
10823 (x32-avx-linux.o): Likewise.
10824 (x32-avx-linux.c): Likewise.
10825
10826 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10827 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10828 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10829 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10830 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10831 i386/x32-avx-linux.xml.
10832
10833 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10834 (init_registers_x32_avx_linux): Likwise.
10835 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10836 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10837
ecedbe58
PA
108382012-04-13 Pedro Alves <palves@redhat.com>
10839
10840 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10841 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10842 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10843 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10844 the sub-make.
10845
c92b5177
L
108462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10847
10848 * linux-x86-low.c (compat_x32_clock_t): New.
10849 (compat_x32_siginfo_t): Likewise.
10850 (compat_x32_siginfo_from_siginfo): Likewise.
10851 (siginfo_from_compat_x32_siginfo): Likewise.
10852 (linux_is_elf64): Likewise.
10853 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10854 and siginfo_from_compat_x32_siginfo for x32.
10855 (x86_arch_setup): Set linux_is_elf64.
10856
214d508e
L
108572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10858
10859 PR gdb/13969
10860 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10861 e_machine field.
10862 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10863 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10864 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10865 compatible with process.
10866
c9a1864a
YQ
108672012-04-12 Yao Qi <yao@codesourcery.com>
10868
10869 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10870 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10871 (install-only, install-info, clean): Handle sub dir gnulib.
10872 (all-lib, am--refresh): New targets.
10873 (memmem.o): Remove target.
10874 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10875 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10876 (AC_REPLACE_FUNCS): Remove memmem.
10877 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10878 (AC_OUTPUT): Generate Makefile in gnulib/.
10879 * aclocal.m4, config.in, configure: Regenerated.
10880
367ba2c2
MR
108812012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10882
10883 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10884
9d236627
PA
108852012-04-05 Pedro Alves <palves@redhat.com>
10886
10887 -Werror=strict-aliasing
10888
10889 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10890 pointer.
10891
111217b3
PA
108922012-04-04 Pedro Alves <palves@redhat.com>
10893
10894 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10895 (sparc_store_gregset_from_stack, sparc_store_gregset)
10896 (sparc_breakpoint_at): Fix formatting.
10897
8365dcf5
TJB
108982012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10899
10900 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10901 are available.
10902 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10903 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10904 * config.in: Regenerate.
10905 * configure: Likewise.
10906
689cc2ae
PA
109072012-03-29 Pedro Alves <palves@redhat.com>
10908
10909 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10910 Correct ptrace arguments.
10911
c14dfd32
PA
109122012-03-28 Pedro Alves <palves@redhat.com>
10913
10914 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10915 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10916 (IA64_FR1_REGNUM): New defines.
10917 (ia64_fetch_register): New.
10918 (the_low_target): Install it.
10919 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10920 field.
10921 * linux-low.c (linux_fetch_registers): Try the
10922 the_low_target.fetch_register hook first.
10923
10924 * linux-arm-low.c (the_low_target): Adjust.
10925 * linux-bfin-low.c (the_low_target): Adjust.
10926 * linux-cris-low.c (the_low_target): Adjust.
10927 * linux-crisv32-low.c (the_low_target): Adjust.
10928 * linux-m32r-low.c (the_low_target): Adjust.
10929 * linux-m68k-low.c (the_low_target): Adjust.
10930 * linux-mips-low.c (the_low_target): Adjust.
10931 * linux-ppc-low.c (the_low_target): Adjust.
10932 * linux-s390-low.c (the_low_target): Adjust.
10933 * linux-sh-low.c (the_low_target): Adjust.
10934 * linux-sparc-low.c (the_low_target): Adjust.
10935 * linux-tic6x-low.c (the_low_target): Adjust.
10936 * linux-x86-low.c (the_low_target): Adjust.
10937 * linux-xtensa-low.c (the_low_target): Adjust.
10938
63c88e13
PA
109392012-03-26 Pedro Alves <palves@redhat.com>
10940
10941 * server.c (handle_qxfer_libraries): Don't bail early if
10942 the_target->qxfer_libraries_svr4 is not NULL.
10943
fb723180
PA
109442012-03-26 Pedro Alves <palves@redhat.com>
10945
10946 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10947
0afae3cf
PA
109482012-03-23 Pedro Alves <palves@redhat.com>
10949
10950 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10951 "library-list-svr4" element's start tag when the the DSO list is
10952 empty.
10953
485f1ee4
PA
109542012-03-23 Pedro Alves <palves@redhat.com>
10955
10956 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10957 a variable whose type size is the same as the inferior's pointer
10958 size.
10959
a5362b9a
TS
109602012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10961
10962 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10963 struct siginfo.
10964 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10965 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10966 * linux-low.h: Include <signal.h>.
10967 (struct siginfo): Remove forward declaration.
10968 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10969 struct siginfo.
10970
d226c142
MF
109712012-03-21 Mike Frysinger <vapier@gentoo.org>
10972
10973 * .gitignore: Ignore more files.
10974
122f36ef
PA
109752012-03-19 Pedro Alves <palves@redhat.com>
10976 Jan Kratochvil <jan.kratochvil@redhat.com>
10977
10978 * server.c (cont_thread, general_thread): Add describing comments.
10979 (start_inferior): Clear `cont_thread'.
10980 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10981 of a process.
10982
fc3e5175
YQ
109832012-03-15 Yao Qi <yao@codesourcery.com>
10984
10985 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10986 handling to ...
10987 (cmd_qtdp): ... here.
10988
8d0d92cd
YQ
109892012-03-15 Yao Qi <yao@codesourcery.com>
10990
10991 * tracepoint.c (struct tracepoint_action_ops): New.
10992 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10993 (m_tracepoint_action_download): New.
10994 (r_tracepoint_action_download): New.
10995 (x_tracepoint_action_download): New.
10996 (l_tracepoint_action_download): New.
10997 (add_tracepoint_action): Install `action->ops' according type.
10998 (download_tracepoint_1): Move code `download' function pointer
10999 of various tracepoint_action_ops.
11000
87b0bb13
JK
110012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11002
11003 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11004 linux_ptrace_attach_warnings.
11005
5f572dec
JK
110062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11007
11008 * Makefile.in (linux-ptrace.o): New.
11009 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11010 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11011 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11012 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11013 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11014 of these targets.
11015 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11016
f4647387
YQ
110172012-03-08 Yao Qi <yao@codesourcery.com>
11018 Pedro Alves <palves@redhat.com>
11019
11020 Fix PR server/13392.
11021 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11022 offset of JMP insn.
11023 * tracepoint.c (remove_tracepoint): New.
11024 (cmd_qtdp): Call remove_tracepoint when failed to install.
11025
9b224c5e
PA
110262012-03-07 Pedro Alves <palves@redhat.com>
11027
11028 * linux-low.c (get_detach_signal): New.
11029 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11030 Pass on pending signals to PTRACE_DETACH. Check the result of the
11031 ptrace call.
11032 * server.c (program_signals, program_signals_p): New.
11033 (handle_general_set): Handle QProgramSignals.
11034 * server.h (program_signals, program_signals_p): Declare.
11035
e237a7e2
JK
110362012-03-05 Pedro Alves <palves@redhat.com>
11037 Jan Kratochvil <jan.kratochvil@redhat.com>
11038
11039 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11040 New comment why.
11041
5808517f
YQ
110422012-03-03 Yao Qi <yao@codesourcery.com>
11043
11044 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11045 agent_look_up_symbols.
11046
58b4daa5
YQ
110472012-03-03 Yao Qi <yao@codesourcery.com>
11048
11049 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11050 (linux-x86-low.o): Likewise.
11051 * server.h: Remove in_process_agent_loaded.
11052 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11053 common/agent.c.
11054 Update callers.
11055
8ffcbaaf
YQ
110562012-03-03 Yao Qi <yao@codesourcery.com>
11057
11058 * tracepoint.c (gdb_agent_capability): New global.
11059 (in_process_agent_loaded_ust): Renamed to
11060 `in_process_agent_supports_ust'.
11061 Update callers.
11062 (in_process_agent_supports_ust): Call agent_capability_check.
11063 (clear_installed_tracepoints): Assert that agent supports
11064 agent.
11065
d1feda86
YQ
110662012-03-03 Yao Qi <yao@codesourcery.com>
11067
11068 * linux-low.c (linux_supports_agent): New.
11069 (linux_target_ops): Initialize field `supports_agent' with
11070 linux_supports_agent.
11071 * target.h (struct target_ops) <supports_agent>: New.
11072 (target_supports_agent): New macro.
11073 * server.c (handle_general_set): Handle packet 'QAgent'.
11074 (handle_query): Send `QAgent+'.
11075 * Makefile.in (server.o): Depends on agent.h.
11076
2fa291ac
YQ
110772012-03-03 Yao Qi <yao@codesourcery.com>
11078
11079 * Makefile.in (OBS): Add agent.o.
11080 Add new rule for agent.o.
11081 Track dependence of tracepoint.c on agent.h.
11082 * tracepoint.c (run_inferior_command_1):
11083 (run_inferior_command): Call agent_run_command.
11084 (gdb_ust_connect_sync_socket): Deleted. Move it to
11085 common/agent.c.
11086 (resume_thread, stop_thread): Likewise.
11087 (gdb_ust_socket_init): Renamed to ...
11088 (gdb_agent_socket_init): ... New.
11089 (gdb_ust_thread): Renamed to ...
11090 (gdb_agent_helper_thread): ... New.
11091 (gdb_ust_init): Move some code to ...
11092 (gdb_agent_init): ... here. New.
11093 [HAVE_UST]: Call gdb_ust_init.
11094 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11095 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11096 * config.in, configure: Regenerated.
11097
05044653
PA
110982012-03-02 Pedro Alves <palves@redhat.com>
11099
11100 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11101 * linux-low.c (struct simple_pid_list): New.
11102 (stopped_pids): New a struct simple_pid_list pointer.
11103 (add_to_pid_list, pull_pid_from_list): New.
11104 (handle_extended_wait): Don't assume the first signal new children
11105 report is SIGSTOP. Adjust call to pull_pid_from_list.
11106 (linux_wait_for_lwp): Adjust.
11107
8d00225b
YQ
111082012-03-02 Yao Qi <yao@codesourcery.com>
11109
11110 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11111 debug log.
11112
19560ba5
YQ
111132012-03-02 Yao Qi <yao@codesourcery.com>
11114
11115 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11116 `stop_pc' and `tpoint'. Update caller.
11117
1faeff08
MR
111182012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11119
11120 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11121 * linux-low.c (use_linux_regsets): New macro.
11122 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11123 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11124 (linux_register_in_regsets): New function.
11125 (usr_fetch_inferior_registers): Skip registers covered by
11126 regsets.
11127 (usr_store_inferior_registers): Likewise.
11128 (usr_fetch_inferior_registers): New macro.
11129 (usr_store_inferior_registers): Likewise.
11130 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11131 (linux_store_registers): Likewise.
11132 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11133 prototype.
11134 (init_registers_mips64_dsp_linux): Likewise.
11135 (init_registers_mips_linux): New macro.
11136 (init_registers_mips_dsp_linux): Likewise.
11137 (mips_dsp_num_regs): Likewise.
11138 (DSP_BASE, DSP_CONTROL): New fallback macros.
11139 (mips_base_regs): New macro.
11140 (mips_regmap): Use it. Fix the size.
11141 (mips_dsp_regmap): New variable.
11142 (mips_dsp_regset_bitmap): Likewise.
11143 (mips_arch_setup): New function.
11144 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11145 than mips_regmap.
11146 (mips_cannot_store_register): Likewise.
11147 (the_low_target): Update .arch_setup, .num_regs and .regmap
11148 initializers. Add .regset_bitmap initializer.
11149 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11150 initializer.
11151 * linux-bfin-low.c (the_low_target): Likewise.
11152 * linux-cris-low.c (the_low_target): Likewise.
11153 * linux-crisv32-low.c (the_low_target): Likewise.
11154 * linux-ia64-low.c (the_low_target): Likewise.
11155 * linux-m32r-low.c (the_low_target): Likewise.
11156 * linux-m68k-low.c (the_low_target): Likewise.
11157 * linux-ppc-low.c (the_low_target): Likewise.
11158 * linux-s390-low.c (the_low_target): Likewise.
11159 * linux-sh-low.c (the_low_target): Likewise.
11160 * linux-sparc-low.c (the_low_target): Likewise.
11161 * linux-tic6x-low.c (the_low_target): Likewise.
11162 * linux-x86-low.c (the_low_target): Likewise.
11163 * linux-xtensa-low.c (the_low_target): Likewise.
11164 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11165 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11166 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11167 srv_xmlfiles.
11168 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11169 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11170
c03e6ccc
YQ
111712012-02-29 Yao Qi <yao@codesourcery.com>
11172 Pedro Alves <palves@redhat.com>
11173
11174 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11175 `step_over_finished' is true.
11176
644cebc9
PA
111772012-02-27 Pedro Alves <palves@redhat.com>
11178
11179 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11180 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11181
c14d7ab2
PA
111822012-02-27 Pedro Alves <palves@redhat.com>
11183
11184 PR server/9684
11185 * linux-low.c (pid_is_stopped): New.
11186 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11187
412c89dd
LM
111882012-02-25 Luis Machado <lgustavo@codesourcery.com>
11189
11190 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11191 of conditions.
11192
b745defe
MR
111932012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11194
11195 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11196
9f3a5c85
LM
111972012-02-24 Luis Machado <lgustavo@codesourcery>
11198
11199 * server.c (handle_query): Advertise support for target-side
11200 breakpoint condition evaluation.
11201 (process_point_options): New function.
11202 (process_serial_event): When inserting a breakpoint, check for
11203 a target-side condition that should be evaluated.
11204
11205 * mem-break.c: Include regcache.h and ax.h.
11206 (point_cond_list_t): New data structure.
11207 (breakpoint) <cond_list>: New field.
11208 (find_gdb_breakpoint_at): Make non-static.
11209 (delete_gdb_breakpoint_at): Clear any target-side
11210 conditions.
11211 (clear_gdb_breakpoint_conditions): New function.
11212 (add_condition_to_breakpoint): Likewise.
11213 (add_breakpoint_condition): Likewise.
11214 (gdb_condition_true_at_breakpoint): Likewise.
11215 (gdb_breakpoint_here): Return result directly instead
11216 of going through a local variable.
11217
11218 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11219 (clear_gdb_breakpoint_conditions): Likewise.
11220 (add_breakpoint_condition): Likewise.
11221 (gdb_condition_true_at_breakpoint): Likewise.
11222
11223 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11224 (need_step_over_p): Take target-side breakpoint condition into
11225 consideration.
11226
5e1dc496
LM
112272012-02-24 Luis Machado <lgustavo@codesourcery>
11228
11229 * server.h: Include tracepoint.h.
11230 (agent_mem_read, agent_get_trace_state_variable_value,
11231 agent_set_trace_state_variable_value,
11232 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11233 get_set_tsv_func_addr): New prototypes.
11234
11235 * ax.h: New include file.
11236 * ax.c: New source file.
11237
11238 * tracepoint.c: Include ax.h.
11239 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11240 agent_expr, eval_result_type): Move to ax.h.
11241 (parse_agent_expr): Rename to ...
11242 (gdb_parse_agent_expr): ... this, make it non-static and move
11243 to ax.h.
11244 (unparse_agent_expr) Rename to ...
11245 (gdb_unparse_agent_expr): ... this, make it non-static and move
11246 to ax.h.
11247 (eval_agent_expr): Rename to ...
11248 (eval_tracepoint_agent_expr): ... this.
11249 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11250 forward declarations.
11251 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11252 (agent_get_trace_state_variable_value): New function.
11253 (agent_set_trace_state_variable_value): New function.
11254 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11255 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11256 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11257 (condition_true_at_tracepoint): Likewise.
11258 (parse_agent_expr): Rename to ...
11259 (gdb_parse_agent_expr): ... this and move to ax.c.
11260 (unparse_agent_expr): Rename to ...
11261 (gdb_unparse_agent_expr): ... this and move to ax.c.
11262 (gdb_agent_op_name): Move to ax.c.
11263 (eval_agent_expr): Rename to ...
11264 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11265 and move to ax.c.
11266 (eval_tracepoint_agent_expr): New function.
11267 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11268 non-static.
5e1dc496
LM
11269 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11270 ax.c.
11271 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11272 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11273 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11274 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11275 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11276 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11277 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11278 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11279 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11280 (compile_bytecodes): Remove forward declaration.
11281 (is_goto_target): Move to ax.c.
11282 (compile_bytecodes): Move to ax.c and call
11283 agent_get_trace_state_variable_value (...) and
11284 agent_set_trace_state_variable_value (...).
11285
11286 * Makefile.in: Update ax.c and IPA dependencies.
11287
277e4e52
PA
112882012-02-24 Pedro Alves <palves@redhat.com>
11289
11290 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11291 (cmd_bigqtbuffer_circular): ... this. Only handle
11292 'QTBuffer:circular:'.
11293 (handle_tracepoint_general_set): Adjust.
11294
bf4c19f7
YQ
112952012-02-16 Yao Qi <yao@codesourcery.com>
11296
11297 * inferiors.c: Move code to ...
11298 * dll.c: .... here. New.
11299 * server.h: Declare clear_dlls.
11300 * Makefile.in (SFILES): Add dll.c.
11301 (OBS): Add dll.o
11302 (dll.o): New rule.
11303
d73f2619
YQ
113042012-02-11 Yao Qi <yao@codesourcery.com>
11305
11306 * server.c: (handle_monitor_command): Add a new parameter
11307 `own_buf'.
11308 (handle_query): Update caller.
11309
f8255c2a
JB
113102012-02-09 Joel Brobecker <brobecker@adacore.com>
11311
11312 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11313 * configure, config.in: Regenerate.
11314 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11315 is not defined.
11316
da84f473
PA
113172012-02-02 Pedro Alves <palves@redhat.com>
11318
11319 Try SIGKILL first, then PTRACE_KILL.
11320 * linux-low.c (linux_kill_one_lwp): New.
11321 (linux_kill_one_lwp): Rename to ...
11322 (kill_one_lwp_callback): ... this. Use the new
11323 linux_kill_one_lwp.
11324
e886a173
PA
113252012-02-02 Pedro Alves <palves@redhat.com>
11326
11327 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11328 inferior.
11329
be07f1a2
PA
113302012-01-27 Pedro Alves <palves@redhat.com>
11331
11332 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11333 (elf_64_file_p): Make static.
11334 (linux_pid_exe_is_elf_64_file): New.
11335 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11336 Delete declarations.
11337 (linux_pid_exe_is_elf_64_file): Declare.
11338 * linux-x86-low.c (x86_arch_setup): Use
11339 linux_pid_exe_is_elf_64_file.
11340
d8301ad1
JK
113412012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11342
11343 * linux-low.c (linux_wait_for_event_1): Rename to ...
11344 (linux_wait_for_event): ... here and merge it with former
11345 linux_wait_for_event - new variable wait_ptid, use it.
11346 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11347
01b17894
PA
113482012-01-23 Pedro Alves <palves@redhat.com>
11349
11350 * server.c (main): Avoid yet another case of infinite loop while
11351 detaching/killing after a longjmp.
11352
e825046f
JK
113532012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11354
11355 Code cleanup.
11356 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11357
b9e7b9c3
UW
113582012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11359
11360 * hostio.c (handle_readlink): New function.
11361 (handle_vFile): Call it to handle "vFile:readlink" packets.
11362
901f9912
UW
113632012-01-20 Pedro Alves <palves@redhat.com>
11364 Ulrich Weigand <ulrich.weigand@linaro.org>
11365
11366 * server.c (handle_v_requests): Only support vAttach and vRun to
11367 start multiple processes when in extended protocol mode.
11368
fc1ab1a0
PA
113692012-01-17 Pedro Alves <palves@redhat.com>
11370
11371 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11372 memalign plus mprotect to allocate the scratch buffer.
11373
7d5d4e98
PA
113742012-01-13 Pedro Alves <palves@redhat.com>
11375
11376 * server.c (attach_inferior): Clear `cont_thread'.
11377
f128d5e9
PA
113782012-01-13 Pedro Alves <palves@redhat.com>
11379
11380 * server.c (main): Avoid infinite loop while detaching/killing
11381 after a longjmp.
11382
06db92f0
DE
113832012-01-09 Doug Evans <dje@google.com>
11384
11385 * server.c (start_inferior): Set last_ptid in --wrapper case.
11386
32d92999
YQ
113872012-01-06 Yao Qi <yao@codesourcery.com>
11388
11389 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11390 defined.
11391 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11392
5e0a92a9
YQ
113932012-01-04 Yao Qi <yao@codesourcery.com>
11394
11395 * tracepoint.c (cmd_qtdp): Print debug message
11396 for static tracepoint.
11397
ae639e8c
YQ
113982012-01-04 Yao Qi <yao@codesourcery.com>
11399
11400 * tracepoint.c (trace_vdebug): Differentiate debug message
11401 between gdbserver and IPA.
11402
f72429c5
YQ
114032012-01-03 Yao Qi <yao@codesourcery.com>
11404
11405 * tracepoint.c (tracepoint_was_hit): Don't collect for
11406 static tracepoint.
11407
12c3e59c
JB
114082012-01-02 Joel Brobecker <brobecker@adacore.com>
11409
11410 * terminal.h: Reformat copyright header.
11411
67827812
JB
114122012-01-02 Joel Brobecker <brobecker@adacore.com>
11413
11414 * server.c (gdbserver_version): Update copyright year.
11415 * gdbreplay.c (gdbreplay_version): Likewise.
11416
3e52c33d
JK
114172011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11418
11419 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11420
11421 Revert:
11422 2011-12-18 Hui Zhu <teawater@gmail.com>
11423 * linux-low.c (linux_create_inferior): Save return value to ret.
11424
66f1260e
HZ
114252011-12-18 Hui Zhu <teawater@gmail.com>
11426
11427 * linux-low.c (linux_create_inferior): Save return value to ret.
11428
e77616d7
DE
114292011-12-16 Doug Evans <dje@google.com>
11430
e7b06c57
DE
11431 * linux-low.c (linux_create_inferior): If stdio connection,
11432 redirect stdin from /dev/null, stdout to stderr.
11433 * remote-utils.c (remote_is_stdio): New static global.
11434 (remote_connection_is_stdio): New function.
11435 (remote_prepare): Handle stdio connection.
11436 (remote_open): Ditto.
11437 (remote_close): Don't close stdin for stdio connections.
11438 (read_prim,write_prim): New functions. Replace all calls to
11439 read/write to these.
11440 * server.c (main): Watch for "-" argument. Move call to
11441 remote_prepare before start_inferior.
11442 * server.h (STDIO_CONNECTION_NAME): New macro.
11443 (remote_connection_is_stdio): Declare.
11444
e77616d7
DE
11445 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11446 in debugging output.
11447
82067193
YQ
114482011-12-15 Yao Qi <yao@codesourcery.com>
11449
11450 * tracepoint.c: Include sys/syscall.h.
11451 (gdb_ust_thread): Remove preprocessor conditional.
11452
82bfbe7e
PA
114532011-12-14 Pedro Alves <pedro@codesourcery.com>
11454
11455 * linux-low.c (linux_detach_one_lwp): Call
11456 the_low_target.prepare_to_resume before detaching.
11457
712c6575
YQ
114582011-12-14 Yao Qi <yao@codesourcery.com>
11459
11460 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11461 of write.
11462
d54d1edf
YQ
114632011-12-14 Yao Qi <yao@codesourcery.com>
11464
11465 * i386-low.c (i386_low_stopped_data_address): Initialize local
11466 variable `control'.
11467
6210a125
PA
114682011-12-13 Pedro Alves <pedro@codesourcery.com>
11469
11470 PR remote/13492
11471
11472 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11473 DR_CONTROL unless necessary. Extend comments.
11474 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11475 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11476
2ece8244
YQ
114772011-12-13 Yao Qi <yao@codesourcery.com>
11478
11479 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11480 macros.
11481 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11482
784867a5
JK
114832011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11484
11485 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11486 Print new debug message for such case.
11487
6bf36717
JK
114882011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11489
11490 Fix overlapping memcpy.
11491 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11492 the read_inferior_memory transfer.
11493 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11494 write_inferior_memory transfer.
11495 (set_fast_tracepoint_jump): New variable buf. Use it for the
11496 read_inferior_memory and write_inferior_memory transfers.
11497 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11498 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11499 Use it for the write_inferior_memory transfer.
11500 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11501 buffers.
11502
50275556
MR
115032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11504
11505 * linux-low.c (fetch_register, store_register): Make code
11506 consistent, fix formatting.
11507
7325beb4
MR
115082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11509
11510 * linux-low.c (usr_store_inferior_registers): Factor out code
11511 to handle individual registers into...
11512 (store_register): ... this new function.
11513
c642a434
UW
115142011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11515
11516 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11517 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11518 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11519 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11520 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11521 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11522 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11523 (srv_xmlfiles): Add new XML files.
11524
11525 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11526 and <sys/uio.h>.
11527 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11528 (init_registers_s390_linux32v1): Add prototype.
11529 (init_registers_s390_linux32v2): Likewise.
11530 (init_registers_s390_linux64v1): Likewise.
11531 (init_registers_s390_linux64v2): Likewise.
11532 (init_registers_s390x_linux64v1): Likewise.
11533 (init_registers_s390x_linux64v2): Likewise.
11534 (s390_num_regs): Increment to 52.
11535 (s390_regmap): Add orig_r2 register.
11536 (s390_num_regs_3264): Increment to 68.
11537 (s390_regmap_3264): Add orig_r2 register.
11538 (s390_collect_ptrace_register): Handle orig_r2 register.
11539 (s390_supply_ptrace_register): Likewise.
11540 (s390_fill_last_break): New function.
11541 (s390_store_last_break): Likewise.
11542 (s390_fill_system_call): New function.
11543 (s390_store_system_call): Likewise.
11544 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11545 register sets.
11546 (s390_check_regset): New function.
11547 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11548 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11549 Update target_regsets for available register sets.
11550
2268b414
JK
115512011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11552 Jan Kratochvil <jan.kratochvil@redhat.com>
11553
11554 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11555 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11556 New.
11557 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11558 * linux-low.h (struct process_info_private): New member r_debug.
11559 * server.c (handle_qxfer_libraries): Call
11560 the_target->qxfer_libraries_svr4.
11561 (handle_qxfer_libraries_svr4): New function.
11562 (qxfer_packets): New entry "libraries-svr4".
11563 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11564 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11565 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11566 PACKET_qXfer_libraries_svr4.
11567
d6db1fab
UW
115682011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11569
11570 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11571 PSW address/mask between 8-byte and 16-byte formats.
11572 (s390_supply_ptrace_register): Likewise.
11573 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11574 basic addressing mode bit.
11575
242f5f1c
SS
115762011-11-24 Stan Shebs <stan@codesourcery.com>
11577
11578 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11579
f196051f
SS
115802011-11-17 Stan Shebs <stan@codesourcery.com>
11581
11582 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11583 (tracing_start_time): New global.
11584 (tracing_stop_time): New global.
11585 (tracing_user_name): New global.
11586 (tracing_notes): New global.
11587 (tracing_stop_note): New global.
11588 (cmd_qtstart): Set traceframe_usage, start_time.
11589 (stop_tracing): Set stop_time.
11590 (cmd_qtstatus): Report additional status.
11591 (cmd_qtp): New function.
11592 (handle_tracepoint_query): Call it.
11593 (cmd_qtnotes): New function.
11594 (handle_tracepoint_general_set): Call it.
11595 (get_timestamp): Rename from tsv_get_timestamp.
11596
405f8e94
SS
115972011-11-14 Stan Shebs <stan@codesourcery.com>
11598 Kwok Cheung Yeung <kcy@codesourcery.com>
11599
11600 * linux-x86-low.c (small_jump_insn): New.
11601 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11602 trampoline and error message, build a trampoline and issue a small
11603 jump instruction to it.
11604 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11605 trampoline and error message.
11606 (x86_get_min_fast_tracepoint_insn_len): New.
11607 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11608 * linux-low.h (struct linux_target_ops): Add arguments to
11609 install_fast_tracepoint_jump_pad operation, add new operation.
11610 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11611 arguments.
11612 (linux_get_min_fast_tracepoint_insn_len): New function.
11613 (linux_target_op): Add new operation.
11614 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11615 (gdb_trampoline_buffer_end): Ditto.
11616 (gdb_trampoline_buffer_error): Ditto.
11617 (struct ipa_sym_addresses): Add fields for new IPA variables.
11618 (symbol_list): Add entries for new IPA variables.
11619 (struct tracepoint): Add fields to hold the address range of the
11620 trampoline used by the tracepoint.
11621 (trampoline_buffer_head): New static variable.
11622 (trampoline_buffer_tail): Ditto.
11623 (claim_trampoline_space): New function.
11624 (have_fast_tracepoint_trampoline_buffer): New function.
11625 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11626 structure.
11627 (install_fast_tracepoint): Ditto, also add error buffer argument.
11628 (cmd_qtminftpilen): New function.
11629 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11630 (fast_tracepoint_from_trampoline_address): New function.
11631 (fast_tracepoint_collecting): Handle trampoline as part of jump
11632 pad space.
11633 (set_trampoline_buffer_space): New function.
11634 (initialize_tracepoint): Initialize new IPA variables.
11635 * target.h (struct target_ops): Add arguments to
11636 install_fast_tracepoint_jump_pad operation, add new
11637 get_min_fast_tracepoint_insn_len operation.
11638 (target_get_min_fast_tracepoint_insn_len): New.
11639 (install_fast_tracepoint_jump_pad): Add arguments.
11640 * server.h (IPA_BUFSIZ): Define.
11641 * linux-i386-ipa.c: Include extra header files.
11642 (initialize_fast_tracepoint_trampoline_buffer): New function.
11643 (initialize_low_tracepoint): Call it.
11644 * server.h (set_trampoline_buffer_space): Declare.
11645 (claim_trampoline_space): Ditto.
11646 (have_fast_tracepoint_trampoline_buffer): Ditto.
11647
1e4d1764
YQ
116482011-11-14 Yao Qi <yao@codesourcery.com>
11649
11650 * server.c (handle_query): Handle InstallInTrace for qSupported.
11651 * tracepoint.c (add_tracepoint): Sort list.
11652 (install_tracepoint, download_tracepoint): New.
11653 (cmd_qtdp): Call them to install and download tracepoints.
11654 (sort_tracepoints): Removed.
11655 (cmd_qtstart): Update.
11656
5c73ff4e
YQ
116572011-11-14 Yao Qi <yao@codesourcery.com>
11658
11659 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11660 * mem-break.h: Declare.
11661 * tracepoint.c (cmd_qtstart): Move some code to ...
11662 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11663 New.
11664 (download_tracepoints): Move some code to ...
11665 (download_tracepoint_1): ... here. New.
11666
86a30030
YQ
116672011-11-08 Yao Qi <yao@codesourcery.com>
11668
11669 * remote-utils.c (relocate_instruction): A comment fix.
11670
8d26e50c
JB
116712011-11-07 Joel Brobecker <brobecker@adacore.com>
11672
11673 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11674 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11675 dr_status_mirror and dr_control_mirror from debug_reg_state.
11676 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11677 (i386_initial_stuff): Remove use of deleted globals.
11678 (i386_get_thread_context, i386_set_thread_context,
11679 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11680 from debug_reg_state.
11681
a59306a3
YQ
116822011-11-05 Yao Qi <yao@codesourcery.com>
11683
11684 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11685 address as TPOINT's.
11686
3065dfb6
SS
116872011-11-02 Stan Shebs <stan@codesourcery.com>
11688
11689 * tracepoint.c (agent_mem_read_string): New function.
11690 (eval_agent_expr): Call it for tracenz.
11691 * server.c (handle_query): Report support for tracenz.
11692
fd0d8c7c
YQ
116932011-11-02 Yao Qi <yao@codesourcery.com>
11694
11695 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11696
609086b1
YQ
116972011-11-02 Yao Qi <yao@codesourcery.com>
11698
11699 * target.h: Fix a typo in comment.
11700
b9fd1791
PA
117012011-10-31 Pedro Alves <pedro@codesourcery.com>
11702
11703 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11704 clobber the breakpoints' shadows with fast tracepoint jumps.
11705 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11706 * target.c (write_inferior_memory): Also pass MYADDR down to
11707 check_mem_write.
11708
03583c20
UW
117092011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11710
11711 * configure.ac: Check support for personality routine.
11712 * configure: Regenerate.
11713 * config.in: Likewise.
11714 * linux-low.c: Include <sys/personality.h>.
11715 Define ADDR_NO_RANDOMIZE if necessary.
11716 (linux_create_inferior): Disable address space randomization when
11717 forking inferior, if requested.
11718 (linux_supports_disable_randomization): New function.
11719 (linux_target_ops): Install it.
11720 * server.h (disable_randomization): Declare.
11721 * server.c (disable_randomization): New global variable.
11722 (handle_general_set): Handle QDisableRandomization.
11723 (handle_query): Likewise for qSupported.
11724 (main): Support --disable-randomization and --no-disable-randomization
11725 command line arguments.
11726 * target.h (struct target_ops): Add supports_disable_randomization.
11727 (target_supports_disable_randomization): New macro.
11728
723b724b
MF
117292011-09-29 Mike Frysinger <vapier@gentoo.org>
11730
11731 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11732 ifdef check.
11733 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11734 [!PT_GETDSBT] (target_loadmap): New definition.
11735 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11736 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11737 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11738 and PT_GETDSBT to LINUX_LOADMAP.
11739 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11740 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11741
55329a5c 117422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11743
11744 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11745 (arm_linux_hwbp_cap): New static variable.
11746 (arm_linux_get_hwbp_cap): Replace by ...
11747 (arm_linux_init_hwbp_cap): ... this new function.
11748 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11749 (arm_linux_get_hw_watchpoint_count): Likewise.
11750 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11751 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11752 (arm_prepare_to_resume): Use perror_with_name instead of error.
11753
55329a5c 117542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11755
11756 * linux-arm-low.c: Include <signal.h>.
11757 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11758 (struct arm_linux_hwbp_cap): New data type.
11759 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11760 (struct arm_linux_hw_breakpoint): New data type.
11761 (MAX_BPTS, MAX_WPTS): Define.
11762 (struct arch_process_info, struct arch_lwp_info): New data types.
11763 (arm_linux_get_hwbp_cap): New function.
11764 (arm_linux_get_hw_breakpoint_count): Likewise.
11765 (arm_linux_get_hw_watchpoint_count): Likewise.
11766 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11767 (arm_hwbp_control_initialize): Likewise.
11768 (arm_hwbp_control_is_enabled): Likewise.
11769 (arm_hwbp_control_is_initialized): Likewise.
11770 (arm_hwbp_control_disable): Likewise.
11771 (arm_linux_hw_breakpoint_equal): Likewise.
11772 (arm_linux_hw_point_initialize): Likewise.
11773 (struct update_registers_data): New data structure.
11774 (update_registers_callback: New function.
11775 (arm_insert_point): Likewise.
11776 (arm_remove_point): Likewise.
11777 (arm_stopped_by_watchpoint): Likewise.
11778 (arm_stopped_data_address): Likewise.
11779 (arm_new_process): Likewise.
11780 (arm_new_thread): Likewise.
11781 (arm_prepare_to_resume): Likewise.
11782 (the_low_target): Register arm_insert_point, arm_remove_point,
11783 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11784 arm_new_thread, and arm_prepare_to_resume.
11785
6b9801d4
SS
117862011-09-15 Stan Shebs <stan@codesourcery.com>
11787
11788 * server.h (struct emit_ops): Add compare-goto fields.
11789 * tracepoint.c (gdb_agent_op_sizes): New table.
11790 (emit_eq_goto): New function.
11791 (emit_ne_goto): New function.
11792 (emit_lt_goto): New function.
11793 (emit_le_goto): New function.
11794 (emit_gt_goto): New function.
11795 (emit_ge_goto): New function.
11796 (is_goto_target): New function.
11797 (compile_bytecodes): Recognize special cases of compare-goto
11798 combinations and call specialized emitters for them.
11799 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11800 (amd64_emit_ne_goto): New function.
11801 (amd64_emit_lt_goto): New function.
11802 (amd64_emit_le_goto): New function.
11803 (amd64_emit_gt_goto): New function.
11804 (amd64_emit_ge_goto): New function.
11805 (amd64_emit_ops): Add the new functions.
11806 (i386_emit_eq_goto): New function.
11807 (i386_emit_ne_goto): New function.
11808 (i386_emit_lt_goto): New function.
11809 (i386_emit_le_goto): New function.
11810 (i386_emit_gt_goto): New function.
11811 (i386_emit_ge_goto): New function.
11812 (i386_emit_ops): Add the new functions.
11813
bf15cbda
SS
118142011-09-08 Stan Shebs <stan@codesourcery.com>
11815
11816 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11817 (i386_emit_epilogue): Restore %ebx.
11818
943ca1dd
JZ
118192011-08-31 Jie Zhang <jzhang918@gmail.com>
11820
11821 * server.c (step_thread): Remove definition.
11822 (process_serial_event): Don't handle Hs.
11823 * server.h (step_thread): Remove declaration.
11824 * target.c (set_desired_inferior): Remove use of step_thread.
11825
e3deef73
LM
118262011-08-24 Luis Machado <lgustavo@codesourcery.com>
11827
11828 * linux-low.c: Include linux-procfs.h.
11829 (linux_attach_lwp_1): Update comments.
11830 (linux_attach): Scan for existing threads when attaching to a
11831 process that is the tgid.
11832 * Makefile.in: Update dependencies.
11833
13da1c97
LM
118342011-08-24 Luis Machado <lgustavo@codesourcery.com>
11835
11836 * configure.srv: Add linux-procfs.o dependencies.
11837
881127c9
YQ
118382011-08-14 Yao Qi <yao@codesourcery.com>
11839
11840 * target.h (struct target_ops): Fix indent.
11841 * win32-low.c (win32_target_ops): Fix comment.
11842
58dbd541
YQ
118432011-08-14 Andrew Jenner <andrew@codesourcery.com>
11844 Yao Qi <yao@codesourcery.com>
11845
11846 * Makefile.in (clean): Remove tic6x-*.c files.
11847 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11848 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11849 (tic6x-c64xp-linux.c): Likewise.
11850 * configure.srv: Add support for tic6x-*-uclinux.
11851 * linux-tic6x-low.c: New.
11852 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11853
78d85199
YQ
118542011-08-14 Andrew Stubbs <ams@codesourcery.com>
11855 Yao Qi <yao@codesourcery.com>
11856
11857 * target.h (struct target_ops): Add read_loadmap.
11858 * linux-low.c (struct target_loadseg): New type.
11859 (struct target_loadmap): New type.
11860 (linux_read_loadmap): New function.
11861 (linux_target_ops): Add linux_read_loadmap.
11862 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11863 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11864 to NULL.
78d85199 11865
a959a88d
EZ
118662011-08-05 Eli Zaretskii <eliz@gnu.org>
11867
11868 * win32-low.c: Include <stdint.h>.
11869
1ced966e
PA
118702011-07-22 Pedro Alves <pedro@codesourcery.com>
11871
11872 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11873 to the inferior here.
11874 (i386_remove_aligned_watchpoint): Ditto.
11875 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11876 fit part of the watchpoint in the debug registers.
11877 (i386_update_inferior_debug_regs): New.
11878 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11879 registers, and only update the inferior on success.
11880 (i386_low_remove_watchpoint): Ditto.
11881
d26e3629
KY
118822011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11883
11884 * linux-low.c (compare_ints, unique, list_threads, show_process,
11885 linux_core_of_thread): Delete.
11886 (linux_target_ops): Change linux_core_of_thread to
11887 linux_common_core_of_thread.
11888 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11889 * utils.c (malloc_failure): Change type of argument.
11890 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11891 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11892 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11893 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11894 (IPA_OBJS): Add common-utils-ipa.o.
11895 (ptid_h, linux_osdata_h): New macros.
11896 (server_h): Add common/common-utils.h, common/xml-utils.h,
11897 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11898 common/ptid.h.
11899 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11900 ptid.o, buffer.o): New rules.
11901 (linux-low.o): Add common/linux-osdata.h as a dependency.
11902 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11903 * configure.ac: Add AC_HEADER_DIRENT check.
11904 * config.in: Regenerate.
11905 * configure: Regenerate.
11906 * remote-utils.c (xml_escape_text): Delete.
11907 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11908 buffer_xml_printf): Move to common/buffer.c.
11909 * server.c (main): Remove call to initialize_inferiors.
11910 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11911 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11912 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11913 internal_error, gdb_assert, gdb_assert_fail): Delete.
11914 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11915 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11916 common/buffer.h.
11917 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11918 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11919 initialize_inferiors): Delete.
11920
2275a1a7
PA
119212011-07-20 Pedro Alves <pedro@codesourcery.com>
11922
11923 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11924 symbol error.
11925
0a5b1e09
PA
119262011-05-31 Pedro Alves <pedro@codesourcery.com>
11927
11928 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11929 assertion.
11930 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11931
6938fd34
YQ
119322011-05-26 Yao Qi <yao@codesourcery.com>
11933
11934 * Makefile.in (thread-db.o): Track dependence to
11935 common/gdb_thread_db.h.
11936 * thread-db.c: include gdb_thread_db.h from right place.
11937
b481f9e0
TT
119382011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11939
11940 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11941 __FILE__ and __LINE__ to internal_error.
11942
98a5dd13
DE
119432011-05-13 Doug Evans <dje@google.com>
11944
11945 * thread-db.c (try_thread_db_load_from_sdir): New function.
11946 (try_thread_db_load_from_dir): New function.
11947 (thread_db_load_search): Handle $sdir, ignore $pdir.
11948 Remove trying of system directories if search of
11949 libthread-db-search-path fails, that is now done via $sdir.
11950
d248b706
KY
119512011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11952
11953 * server.c (handle_query): Add EnableDisableTracepoints to the list
11954 of supported features.
43aaf8b6 11955 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11956 tracepoints.
43aaf8b6
PA
11957 (cmd_qtenable_disable): New.
11958 (cmd_qtstart): Install tracepoints even if disabled.
11959 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11960 receiving a QTEnable or QTDisable packet.
11961 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11962 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11963 tracepoints.
11964 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11965
84e578fb
DE
119662011-05-10 Doug Evans <dje@google.com>
11967
11968 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11969
71f55dd8
DE
119702011-05-04 Doug Evans <dje@google.com>
11971
11972 * linux-low.c (linux_join): Skip process lookup.
11973 * spu-low.c (spu_join): Ditto.
11974 * server.c (join_inferiors_callback): Delete.
11975 (process_serial_event): For 'D' packet (detach) call join_inferior
11976 directly.
11977
4d393d60
JM
119782011-05-04 Joseph Myers <joseph@codesourcery.com>
11979
11980 * README: Don't mention xscale*-*-linux*.
11981 * configure.srv (xscale*-*-linux*): Don't handle target.
11982
b00ad6ff
NF
119832011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11984
11985 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11986 casting pointers.
11987 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11988 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11989 (i386_emit_void_call_2): Likewise.
11990
af96c192
YQ
119912011-04-26 Yao Qi <yao@codesourcery.com>
11992
43aaf8b6
PA
11993 * linux-low.c: Move common macros to linux-ptrace.h.
11994 Include linux-ptrace.h.
af96c192
YQ
11995 * Makefile.in (linux_ptrace_h): New.
11996 (linux-low.o): Depends on linux-ptrace.h.
11997
03f2bd59
JK
119982011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11999
12000 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12001 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12002 (remote_prepare): New function with most of the TCP code from ...
12003 (remote_open): ... here. Detect PORT here unconditionally. Move also
12004 setting transport_is_reliable.
12005 * server.c (run_once): New variable.
12006 (gdbserver_usage): Document it.
12007 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12008 the first run if RUN_ONCE.
12009 * server.h (run_once, remote_prepare): New declarations.
12010
7a9dd1b2
TT
120112011-04-19 Tom Tromey <tromey@redhat.com>
12012
12013 * win32-low.c (handle_load_dll): Remove duplicate "the".
12014
81239425
PM
120152011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12016
12017 Remove support for old Cygwin 1.5 versions.
12018 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12019 function to avoid warning.
12020 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12021 warning.
12022
9e0627f1
PM
120232011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12024
12025 * gdbserver/server.h (Macro _): Define it if not available.
12026
588eebee
MS
120272011-03-14 Michael Snyder <msnyder@vmware.com>
12028
348af9f7 12029 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12030
43f70d4c
JB
120312011-03-10 Joel Brobecker <brobecker@adacore.com>
12032
12033 * Makefile.in (maintainer-clean realclean distclean): Remove
12034 "make ... subdir_do" command.
12035
348af9f7
MS
120362011-03-10 Michael Snyder <msnyder@vmware.com>
12037
12038 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12039
12040 * server.c (handle_v_run): Free alloced buffer on early return.
12041
e637a4f5
YQ
120422011-03-09 Yao Qi <yao@codesourcery.com>
12043
12044 Revert:
12045 2011-03-04 Yao Qi <yao@codesourcery.com>
12046
12047 * Makefile.in: Remove GNU make feature --directory.
12048
12049 2011-03-05 Yao Qi <yao@codesourcery.com>
12050
12051 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12052 (subdir_do): New make target. Copied from gdb/Makefile.
12053 (maintainer-clean, realclean, distclean, clean): Call corresponding
12054 make targets in common/Makefile.
12055
12056 2011-02-11 Yao Qi <yao@codesourcery.com>
12057
12058 * configure.ac: Call AC_PROG_RANLIB.
12059 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12060 * configure: Regenerate.
12061
e6edda56
JK
120622011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12063
12064 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12065
e5141119
JB
120662011-03-06 Yao Qi <yao@codesourcery.com>
12067
12068 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12069
64794aa4
JB
120702011-03-05 Yao Qi <yao@codesourcery.com>
12071
12072 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12073 (subdir_do): New make target. Copied from gdb/Makefile.
12074 (maintainer-clean, realclean, distclean, clean): Call corresponding
12075 make targets in common/Makefile.
12076
7a762829
YQ
120772011-03-04 Yao Qi <yao@codesourcery.com>
12078
12079 * Makefile.in: Remove GNU make feature --directory.
12080
348af9f7
MS
120812011-03-04 Michael Snyder <msnyder@vmware.com>
12082
12083 * server.c (queue_stop_reply): Call xmalloc not malloc.
12084
120852011-03-02 Michael Snyder <msnyder@vmware.com>
12086
12087 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12088
9f72fee2
MS
120892011-02-28 Michael Snyder <msnyder@vmware.com>
12090
588eebee
MS
12091 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12092 (cmd_qtframe): Ditto.
12093 (cmd_qtbuffer): Ditto.
12094 (cmd_bigqtbuffer): Ditto.
12095
9f72fee2
MS
12096 * utils.c (decimal2str): Initialize 'width' to nine, then
12097 don't mess with it.
12098
8040bd49
UW
120992011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12100
12101 * hostio.c (require_data): Free *data, not data.
12102
7e52cbd0
JK
121032011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12104
12105 * hostio.c (require_data): Use free, not xfree.
12106
9130f83e
MS
121072011-02-27 Michael Snyder <msnyder@vmware.com>
12108
4b812f4e
MS
12109 * server.c (handle_query): Discard unused value.
12110
9130f83e
MS
12111 * hostio.c (require_data): Free malloc memory before returning
12112 error.
12113
69d37113
MS
121142011-02-26 Michael Snyder <msnyder@vmware.com>
12115
12116 * linux-low.c (list_threads): Call closedir for dirent.
12117
35f5825a
MS
121182011-02-27 Michael Snyder <msnyder@vmware.com>
12119
2a589cef
MS
12120 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12121 a case statement falls through.
12122
0adea5f7
MS
12123 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12124
35f5825a
MS
12125 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12126 in comparison.
12127
238f1c74
MS
121282011-02-26 Michael Snyder <msnyder@vmware.com>
12129
12130 * utils.c (decimal2str): Eliminate dead code and dead param.
12131 (pulongest): Drop dead param from call to decimal2str.
12132 (plongest): Ditto.
12133
633ff500
JB
121342011-02-24 Joel Brobecker <brobecker@adacore.com>
12135
12136 Revert the following patch (not approved yet):
12137 2011-02-21 Hui Zhu <teawater@gmail.com>
12138 * tracepoint.c (tp_printf): New function.
12139 (eval_agent_expr): Handle gdb_agent_op_printf.
12140
f9c6ff72
HZ
121412011-02-21 Hui Zhu <teawater@gmail.com>
12142
12143 * tracepoint.c (tp_printf): New function.
12144 (eval_agent_expr): Handle gdb_agent_op_printf.
12145
94d5e490
TT
121462011-02-18 Tom Tromey <tromey@redhat.com>
12147
12148 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12149 (tracepoint.o): Likewise.
12150 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12151 (gdb_agent_op_names): Likewise.
12152
c7f96d2b
TT
121532011-02-18 Tom Tromey <tromey@redhat.com>
12154
12155 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12156 gdb_agent_op_rot>: New constants.
12157 (gdb_agent_op_names): Add pick and roll.
12158 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12159 cases.
12160
0feedb2c
JK
121612011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12162
12163 * aclocal.m4: Regenerated with aclocal-1.11.1.
12164
b3b9301e
PA
121652011-02-14 Pedro Alves <pedro@codesourcery.com>
12166
12167 * server.c (handle_qxfer_traceframe_info): New.
12168 (qxfer_packets): Register "traceframe-info".
12169 (handle_query): Report support for qXfer:traceframe-info:read+.
12170 * tracepoint.c (match_blocktype): New.
12171 (traceframe_find_block_type): Rename to ...
12172 (traceframe_walk_blocks): ... this. Add callback filter argument,
12173 and use it.
12174 (traceframe_find_block_type): New, reimplemented on top of
12175 traceframe_walk_blocks.
12176 (build_traceframe_info_xml): New.
12177 (traceframe_read_info): New.
12178 * server.h (traceframe_read_info): Declare.
12179
4f3e6fb7
YQ
121802011-02-11 Yao Qi <yao@codesourcery.com>
12181
12182 * configure.ac: Call AC_PROG_RANLIB.
12183 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12184 * configure: Regenerate.
12185
764880b7
PA
121862011-02-07 Pedro Alves <pedro@codesourcery.com>
12187
12188 * server.c (gdb_read_memory): Change return semantics to allow
12189 partial transfers.
12190 (handle_search_memory_1): Adjust.
12191 (process_serial_event) <'m' packet>: Handle partial transfers.
12192 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12193
1c79eb8a
PA
121942011-01-28 Pedro Alves <pedro@codesourcery.com>
12195
12196 * regcache.c (init_register_cache): Initialize
12197 regcache->register_status.
12198 (free_register_cache): Release regcache->register_status.
12199 (regcache_cpy): Copy register_status.
12200 (registers_to_string): Print 'x's for unavailable registers.
12201 (supply_register): Mark the register's status valid or
12202 unavailable, depending on whether a buffer was passed in or not.
12203 (supply_register_zeroed): New.
12204 (supply_regblock): Mark the registers' status valid or
12205 unavailable, depending on whether a buffer was passed in or not.
12206 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12207 (struct regcache): New `register_status' field.
12208 (supply_register_zeroed): Declare.
12209 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12210 supply_register_zeroed, rather than passing a NULL buffer to
12211 supply_register.
12212 * tracepoint.c (fetch_traceframe_registers): Update comment.
12213
85724a0e
PA
122142011-01-28 Pedro Alves <pedro@codesourcery.com>
12215
12216 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12217 buffer explicit.
12218
d08aafef
PA
122192011-01-25 Pedro Alves <pedro@codesourcery.com>
12220
12221 * server.h (decode_xfer_write): Change prototype.
12222 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12223 and don't extract the annex here.
12224 * server.c (decode_xfer_read): Remove `annex' parameter,
12225 and don't extract the annex here.
12226 (decode_xfer): New.
12227 (struct qxfer): New.
12228 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12229 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12230 (handle_qxfer_statictrace): New functions, abstracted out from
12231 handle_query, and made to use the struct qxfer interface.
12232 (handle_threads_qxfer_proper): Rename to ...
12233 (handle_qxfer_threads_proper): ... this.
12234 (handle_threads_qxfer): Rename to ...
12235 (handle_qxfer_threads): ... this. Adjust.
12236 (qxfer_packets): New array.
12237 (handle_qxfer): New function.
12238 (handle_query): Use handle_qxfer.
12239
493e2a69
MS
122402011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12241
12242 * gdbreplay.c: Shorten lines of >= 80 columns.
12243 * linux-low.c: Ditto.
12244 * linux-ppc-low.c: Ditto.
12245 * linux-s390-low.c: Ditto.
12246 * linux-sparc-low.c: Ditto.
12247 * linux-x86-low.c: Ditto.
12248 * linux-xtensa-low.c: Ditto.
12249 * mem-break.c: Ditto.
12250 * nto-low.c: Ditto.
12251 * regcache.h: Ditto.
12252 * remote-utils.c: Ditto.
12253 * server.c: Ditto.
12254 * server.h: Ditto.
12255 * thread-db.c: Ditto.
12256 * tracepoint.c: Ditto.
12257 * utils.c: Ditto.
12258 * win32-low.h: Ditto.
12259
44944448
JB
122602011-01-05 Joel Brobecker <brobecker@adacore.com>
12261
12262 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12263 update.
12264
71ce852c
JB
122652011-01-01 Joel Brobecker <brobecker@adacore.com>
12266
12267 * server.c (gdbserver_version): Update copyright year in version
12268 output.
12269 * gdbreplay.c (gdbreplay_version): Ditto.
12270
eb826dc6
MF
122712010-12-29 Jie Zhang <jie.zhang@analog.com>
12272
12273 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12274 * linux-bfin-low.c: New file.
12275 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12276 PT_DATA_ADDR for BFIN targets.
12277 * Makefile.in (SFILES): Add linux-bfin-low.c.
12278 (clean): Remove reg-bfin.c.
12279 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12280 * README: Mention supported Blackfin targets.
12281
39ab222a
MF
122822010-12-23 Mike Frysinger <vapier@gentoo.org>
12283
12284 * .gitignore: New file.
12285
a1f2ce7d
MF
122862010-11-16 Mike Frysinger <vapier@gentoo.org>
12287
12288 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12289
f474844c
JZ
122902010-10-22 Jie Zhang <jie@codesourcery.com>
12291
12292 * Makefile.in: Add FLAGS_TO_PASS variable.
12293 (install): Remove dependency of install-only and recursively
12294 invoke make for install-only.
12295
f1048712
DE
122962010-10-04 Doug Evans <dje@google.com>
12297
12298 * Makefile.in (uninstall): Use $(DESTDIR).
12299
b53a1623
PA
123002010-09-24 Pedro Alves <pedro@codesourcery.com>
12301
e6ee044d
PA
12302 PR gdb/11842
12303
b53a1623
PA
12304 * linux-x86-low.c (compat_siginfo_from_siginfo)
12305 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12306 si_code is < 0. Check for si_code == SI_TIMER before checking for
12307 si_code < 0.
12308
fa1bd1e4
JB
123092010-09-13 Joel Brobecker <brobecker@adacore.com>
12310
12311 * lynx-i386-low.c: New file.
12312 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12313
47fac8f8
JB
123142010-09-13 Joel Brobecker <brobecker@adacore.com>
12315
12316 * lynx-low.c (ptrace_request_to_str): Remove handling for
12317 request values that have been removed in LynxOS 5.x.
12318
1adfc54d
JB
123192010-09-13 Joel Brobecker <brobecker@adacore.com>
12320
12321 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12322 <ptrace.h>
12323
c2a66c29
NS
123242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12325
12326 * configure.ac: Add --enable-inprocess-agent option.
12327 * configure: Rebuilt.
12328
32fcada3
YQ
123292010-09-06 Yao Qi <yao@codesourcery.com>
12330
12331 * linux-low.c (linux_kill): Remove unused variable.
12332 (linux_stabilize_threads): Likewise.
12333 * server.c (start_inferior): Likewise.
12334 (queue_stop_reply_callback): Likewise.
12335 * tracepoint.c (do_action_at_tracepoint): Likewise.
12336
0cccb683
YQ
123372010-09-06 Yao Qi <yao@codesourcery.com>
12338
12339 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12340 on return.
12341
423ec54c
JK
123422010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12343
12344 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12345
12ac6819
PA
123462010-09-06 Pedro Alves <pedro@codesourcery.com>
12347
12348 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12349 "$(IPA_DEPFILES)".
12350
8ed54b31
JB
123512010-09-01 Joel Brobecker <brobecker@adacore.com>
12352
12353 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12354 gdbserver/lynx-ppc-low.c: New files.
12355 * Makefile.in (lynx_low_h): New variable.
12356 (lynx-low.o, lynx-ppc-low.o): New rules.
12357 * configure.ac: On LynxOS, link with -lnetinet.
12358 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12359 * configure: regenerate.
12360
bb0116a4
JB
123612010-09-01 Joel Brobecker <brobecker@adacore.com>
12362
12363 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12364 * configure.ac: Add check for vasprintf and vsnprintf.
12365 * configure, config.in: Regenerate.
12366 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12367
a778ab81 123682010-09-01 Joel Brobecker <brobecker@adacore.com>
12369
12370 * gdbreplay.c: Move include of alloca.h up, next to include of
12371 malloc.h.
12372 * server.h: Add include of malloc.h.
12373 * mem-break.c: Remove include of malloc.h.
12374 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12375
8b034a19 123762010-09-01 Joel Brobecker <brobecker@adacore.com>
12377
12378 * Makefile.in (memmem.o): Build with -Wno-error.
12379
123802010-09-01 Joel Brobecker <brobecker@adacore.com>
12381
12382 * utils.c (xsnprintf): Make non-static.
12383 * server.h: Add xsnprintf declaration.
12384 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12385 replace calls to snprintf by calls to xsnprintf throughout.
12386
123872010-09-01 Joel Brobecker <brobecker@adacore.com>
12388
12389 * configure.ac: Add configure check for alloca.
12390 * configure, config.in: Regenerate.
12391 * server.h: Include alloca.h if it exists.
12392 * gdbreplay.c: Include alloca.h if it exists.
12393
1a981360
PA
123942010-08-28 Pedro Alves <pedro@codesourcery.com>
12395
12396 * linux-low.c (__SIGRTMIN): Define if not already defined.
12397 (linux_create_inferior): Check for __ANDROID__ rather than
12398 __SIGRTMIN.
12399 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12400 are already deferred.
12401 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12402 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12403 stopped and already has a pending signal to report.
12404 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12405 a pending signal to report or is moving out of a jump pad.
12406 (linux_init_signals): Check for __ANDROID__ rather than
12407 __SIGRTMIN.
12408
b4d51a55
PA
124092010-08-28 Pedro Alves <pedro@codesourcery.com>
12410
12411 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12412 debug_threads check. Avoid a linear search when not doing debug
12413 output.
12414
ec48365d
PA
124152010-08-27 Pedro Alves <pedro@codesourcery.com>
12416
12417 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12418 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12419 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12420 (process_event): Change local fd's type to gdb_fildes_t.
12421 (create_file_handler): Adjust prototype.
12422 (delete_file_handler): Adjust prototype.
12423 (handle_file_event): Adjust prototype. Use pfildes.
12424 (create_file_event): Adjsut prototype.
12425 * remote-utils.c (remote_desc, listen_desc): Change type to
12426 gdb_fildes_t.
12427 * server.h: New gdb_fildes_t typedef.
12428 [USE_WIN32API]: Include winsock2.h.
12429 (delete_file_handler, add_file_handler): Adjust prototypes.
12430 (pfildes): Declare.
12431 * utils.c (pfildes): New.
12432
854d88f0
PA
124332010-08-27 Pedro Alves <pedro@codesourcery.com>
12434
12435 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12436 * configure: Regenerate.
12437
0146f85b
PA
124382010-08-27 Pedro Alves <pedro@codesourcery.com>
12439
12440 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12441 (linux_done_accessing_memory): ... this.
12442 (linux_target_ops): Adjust.
12443 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12444 * nto-low.c (nto_target_ops): Adjust comment.
12445 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12446 * spu-low.c (spu_target_ops): Adjust comment.
12447 * target.h (target_ops): Rename unprepare_to_access_memory field
12448 to done_accessing_memory.
12449 (unprepare_to_access_memory): Rename to ...
12450 (done_accessing_memory): ... this.
12451
90d74c30
PA
124522010-08-26 Pedro Alves <pedro@codesourcery.com>
12453
12454 * linux-low.c (linux_prepare_to_access_memory): New.
12455 (linux_unprepare_to_access_memory): New.
12456 (linux_target_ops): Install them.
12457 * server.c (read_memory): Rename to ...
12458 (gdb_read_memory): ... this. Use
12459 prepare_to_access_memory/prepare_to_access_memory.
12460 (write_memory): Rename to ...
12461 (gdb_write_memory): ... this. Use
12462 prepare_to_access_memory/prepare_to_access_memory.
12463 (handle_search_memory_1): Adjust.
12464 (process_serial_event): Adjust.
12465 * target.h (struct target_ops): New fields
12466 prepare_to_access_memory and unprepare_to_access_memory.
12467 (prepare_to_access_memory, unprepare_to_access_memory): New.
12468 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12469 prepare_to_access_memory/prepare_to_access_memory.
12470 * nto-low.c (nto_target_ops): Adjust.
12471 * spu-low.c (spu_target_ops): Adjust.
12472 * win32-low.c (win32_target_ops): Adjust.
12473
fd467969
PA
124742010-08-26 Pedro Alves <pedro@codesourcery.com>
12475
12476 * Makefile.in (WARN_CFLAGS): Get it from configure.
12477 (WERROR_CFLAGS): New.
12478 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12479 * configure.ac: Introduce --enable-werror, which adds -Werror to
12480 the compiler command line. Enabled by default. Disable with
12481 --disable-werror. Add -Wdeclaration-after-statement
12482 Wpointer-arith and -Wformat-nonliteral to warning flags.
12483 * configure: Regenerate.
12484
331e2f5f
PA
124852010-08-26 Pedro Alves <pedro@codesourcery.com>
12486
12487 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12488
e581f2b4
PA
124892010-08-26 Pedro Alves <pedro@codesourcery.com>
12490
12491 * gdbreplay.c (remote_error): New.
12492 (gdbchar): New.
12493 (expect): Use gdbchar. Check for error reading from GDB.
12494 Clarify sync error output.
12495 (play): Check for errors writing to GDB.
12496 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12497 * remote-utils.c (getpkt): Check for errors writing to the remote
12498 descriptor.
12499
3c11dd79
PA
125002010-08-25 Pedro Alves <pedro@codesourcery.com>
12501
12502 * linux-low.c (linux_wait_1): Move non-debugging code out of
12503 `debug_threads' control.
12504
d20a8ad9
PA
125052010-08-25 Pedro Alves <pedro@codesourcery.com>
12506
12507 * linux-low.c (linux_wait_1): Don't set last_status here.
12508 * server.c (push_event, queue_stop_reply_callback): Assert we're
12509 not pushing a TARGET_WAITKIND_IGNORE event.
12510 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12511 (myresume, handle_target_event): Set the thread's last_resume_kind
12512 and last_status from the target returned status.
12513
964e4306
PA
125142010-08-25 Pedro Alves <pedro@codesourcery.com>
12515
12516 PR threads/10729
12517
12518 * linux-x86-low.c (update_debug_registers_callback): New.
12519 (i386_dr_low_set_addr): Use it.
12520 (i386_dr_low_get_addr): New.
12521 (i386_dr_low_set_control): Use update_debug_registers_callback.
12522 (i386_dr_low_get_control): New.
12523 (i386_dr_low_get_status): Adjust.
12524 * linux-low.c (linux_stop_lwp): New.
12525 * linux-low.h (linux_stop_lwp): Declare.
12526
12527 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12528 argument instead of a i386_debug_reg_state.
12529 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12530 a i386_debug_reg_state.
12531 (i386_insert_aligned_watchpoint): Adjust.
12532 (i386_remove_aligned_watchpoint): Adjust.
12533 (i386_low_stopped_data_address): Read the debug registers from the
12534 inferior instead of from the mirrors.
12535 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12536 (i386_dr_low_get_addr): Declare.
12537 (i386_dr_low_get_control): Declare.
12538 (i386_dr_low_get_status): Change prototype.
12539
12540 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12541 (i386_dr_low_get_addr): New.
12542 (i386_dr_low_get_control): New.
12543 (i386_dr_low_get_status): Adjust prototype. Return
12544 dr_status_mirror.
12545 (i386_initial_stuff): Clear dr_status_mirror and
12546 dr_control_mirror.
12547 (i386_get_thread_context): Adjust.
12548 (i386_set_thread_context): Adjust.
12549 (i386_thread_added): Adjust.
12550
5f21a75b
PA
125512010-08-24 Pedro Alves <pedro@codesourcery.com>
12552
12553 * linux-low.h (linux_thread_area): Delete declaration.
12554
3e4c1235
TS
125552010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12556
12557 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12558 after its termination.
12559
1971b033
PA
125602010-08-09 Pedro Alves <pedro@codesourcery.com>
12561
12562 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12563 (gdb_wants_all_stopped): Delete.
12564 (linux_wait_1): Don't call them.
12565 * server.c (handle_v_cont): Tag all threads as want-stopped.
12566 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12567 stopped as "client-wants-stopped".
12568
310444ac
PA
125692010-07-31 Pedro Alves <pedro@codesourcery.com>
12570
12571 * Makefile.in (signals_h): New.
12572 (server_h): Depend on it.
12573 (server.o): Don't depend on $(signals_def).
12574 (signals.o): Depend on $(signals_def).
12575
a19cae16
JK
125762010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12577
12578 * Makefile.in (signals_def): New.
12579 (server_h): Append include/gdb/signals.h and signals_def.
12580 (server.o): Append signals_def.
12581
30d50328
JK
125822010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12583
12584 * server.c (handle_target_event): Use target_signal_to_host for
12585 resume_info.sig initialization.
12586 * target.h (struct thread_resume) <sig>: New comment.
12587
5c3216e2
OS
125882010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12589
c6f46ca0
OS
12590 * server.c (handle_query): strcpy() the returned string from paddress()
12591 instead of sprintf().
5c3216e2
OS
12592 * utils.c (paddress): Return phex_nz().
12593
6bd31874
JB
125942010-07-07 Joel Brobecker <brobecker@adacore.com>
12595
12596 * server.c (handle_v_cont): Call mourn_inferior if process
12597 just exited.
12598 (myresume): Likewise.
12599
0fb4aa4b
PA
126002010-07-01 Pedro Alves <pedro@codesourcery.com>
12601
12602 Static tracepoints, and integration with UST.
12603
12604 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12605 * mem-break.c (uninsert_all_breakpoints)
12606 (reinsert_all_breakpoints): New.
12607 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12608 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12609 (gdb_agent_ust_loaded, helper_thread_id)
12610 (gdb_agent_helper_thread_id): New macros.
12611 (struct ipa_sym_addresses): Add addr_ust_loaded,
12612 addr_helper_thread_id, addr_cmd_buf.
12613 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12614 (in_process_agent_loaded_ust): New.
12615 (write_e_ust_not_loaded): New.
12616 (maybe_write_ipa_ust_not_loaded): New.
12617 (struct collect_static_trace_data_action): New.
12618 (enum tracepoint_type) <static_tracepoint>: New.
12619 (struct tracepoint) <handle>: Mention static tracepoints.
12620 (struct static_tracepoint_ctx): New.
12621 (CMD_BUF_SIZE): New.
12622 (add_tracepoint_action): Handle static tracepoint actions.
12623 (unprobe_marker_at): New.
12624 (clear_installed_tracepoints): Handle static tracepoints.
12625 (cmd_qtdp): Handle static tracepoints.
12626 (probe_marker_at): New.
12627 (cmd_qtstart): Handle static tracepoints.
12628 (response_tracepoint): Handle static tracepoints.
12629 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12630 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12631 (get_context_regcache): Handle static tracepoints.
12632 (do_action_at_tracepoint): Handle static tracepoint actions.
12633 (traceframe_find_block_type): Handle static trace data blocks.
12634 (traceframe_read_sdata): New.
12635 (download_tracepoints): Download static tracepoint actions.
12636 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12637 (GDB_PROBE_NAME): New.
12638 (ust_ops): New.
12639 (GET_UST_SYM): New.
12640 (USTF): New.
12641 (dlsym_ust): New.
12642 (ust_marker_to_static_tracepoint): New.
12643 (gdb_probe): New.
12644 (collect_ust_data_at_tracepoint): New.
12645 (gdb_ust_probe): New.
12646 (UNIX_PATH_MAX, SOCK_DIR): New.
12647 (gdb_ust_connect_sync_socket): New.
12648 (resume_thread, stop_thread): New.
12649 (run_inferior_command): New.
12650 (init_named_socket): New.
12651 (gdb_ust_socket_init): New.
12652 (cstr_to_hexstr): New.
12653 (next_st): New.
12654 (first_marker, next_marker): New.
12655 (response_ust_marker): New.
12656 (cmd_qtfstm, cmd_qtsstm): New.
12657 (unprobe_marker_at, probe_marker_at): New.
12658 (cmd_qtstmat, gdb_ust_thread): New.
12659 (gdb_ust_init): New.
12660 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12661 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12662 (ST_REGENTRY): New.
12663 (x86_64_st_collect_regmap): New.
12664 (X86_64_NUM_ST_COLLECT_GREGS): New.
12665 (AMD64_RIP_REGNUM): New.
12666 (supply_static_tracepoint_registers): New.
12667 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12668 (ST_REGENTRY): New.
12669 (i386_st_collect_regmap): New.
12670 (i386_NUM_ST_COLLECT_GREGS): New.
12671 (supply_static_tracepoint_registers): New.
12672 * server.c (handle_query): Handle qXfer:statictrace:read.
12673 <qSupported>: Report support for StaticTracepoints, and
12674 qXfer:statictrace:read features.
12675 * server.h (traceframe_read_sdata)
12676 (supply_static_tracepoint_registers): Declare.
12677 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12678 (unpack_varlen_hex): Include in IPA build.
12679 * Makefile.in (ustlibs, ustinc): New.
12680 (IPA_OBJS): Add remote-utils-ipa.o.
12681 ($(IPA_LIB)): Link -ldl and -lpthread.
12682 (UST_CFLAGS): New.
12683 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12684 * config.in, configure: Regenerate.
12685
9e4344e5
PA
126862010-06-20 Ian Lance Taylor <iant@google.com>
12687 Pedro Alves <pedro@codesourcery.com>
12688
12689 * linux-x86-low.c (always_true): Delete.
12690 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12691 trying to fool the compiler with always_true.
12692
c6beb2cb
PA
126932010-06-20 Pedro Alves <pedro@codesourcery.com>
12694
12695 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12696 conditions in gdbserver.
12697
d2ed6730
UW
126982010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12699
12700 * spu-low.c (spu_read_memory): Wrap around local store limit.
12701 (spu_write_memory): Likewise.
12702
4e29fb54
PA
127032010-06-15 Pedro Alves <pedro@codesourcery.com>
12704
12705 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12706 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12707 LONGEST uses.
12708 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12709 uses.
12710 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12711 uses with LONGEST uses.
12712
6a271cae
PA
127132010-06-14 Stan Shebs <stan@codesourcery.com>
12714 Pedro Alves <pedro@codesourcery.com>
12715
12716 Bytecode compiler.
12717
12718 * linux-x86-low.c: Include limits.h.
12719 (add_insns): New.
12720 (always_true): New.
12721 (EMIT_ASM): New.
12722 (EMIT_ASM32): New.
12723 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12724 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12725 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12726 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12727 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12728 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12729 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12730 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12731 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12732 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12733 (amd64_emit_void_call_2): New.
12734 (amd64_emit_ops): New.
12735 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12736 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12737 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12738 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12739 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12740 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12741 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12742 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12743 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12744 (i386_emit_stack_adjust, i386_emit_int_call_1)
12745 (i386_emit_void_call_2): New.
12746 (i386_emit_ops): New.
12747 (x86_emit_ops): New.
12748 (the_low_target): Install x86_emit_ops.
12749 * server.h (struct emit_ops): New.
12750 (get_raw_reg_func_addr): Declare.
12751 (current_insn_ptr, emit_error): Declare.
12752 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12753 (set_trace_state_variable_value): New defines.
12754 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12755 addr_get_trace_state_variable_value and
12756 addr_set_trace_state_variable_value.
12757 (symbol_list): New fields for get_raw_reg,
12758 get_trace_state_variable_value and set_trace_state_variable_value.
12759 (condfn): New typedef.
12760 (struct tracepoint): New field `compiled_cond'.
12761 (do_action_at_tracepoint): Clear compiled_cond.
12762 (get_trace_state_variable_value, set_trace_state_variable_value):
12763 Export in the IPA.
12764 (condition_true_at_tracepoint): If there's a compiled condition,
12765 run that.
12766 (current_insn_ptr, emit_error): New globals.
12767 (struct bytecode_address): New.
12768 (get_raw_reg_func_addr): New.
12769 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12770 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12771 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12772 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12773 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12774 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12775 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12776 (compile_tracepoint_condition, compile_bytecodes): New.
12777 * target.h (emit_ops): Forward declare.
12778 (struct target_ops): New field emit_ops.
12779 (target_emit_ops): New.
12780 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12781 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12782 * linux-low.c (linux_emit_ops): New.
12783 (linux_target_ops): Install it.
12784 * linux-low.h (struct linux_target_ops): New field emit_ops.
12785
92b72907
UW
127862010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12787
12788 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12789 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12790
fa593d66
PA
127912010-06-01 Pedro Alves <pedro@codesourcery.com>
12792 Stan Shebs <stan@codesourcery.com>
12793
12794 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12795 (all): Depend on $(extra_libraries).
12796 (install-only): Install the IPA.
12797 (IPA_OBJS, IPA_LIB): New.
12798 (clean): Remove the IPA lib.
12799 (IPAGENT_CFLAGS): New.
12800 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12801 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12802 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12803 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12804 * configure.ac: Check for atomic builtins support in the compiler.
12805 (IPA_DEPFILES, extra_libraries): Define.
12806 * configure.srv (ipa_obj): Add description.
12807 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12808 (i[34567]86-*-linux*): Set ipa_obj.
12809 (x86_64-*-linux*): Set ipa_obj.
12810 * linux-low.c (stabilizing_threads): New.
12811 (supports_fast_tracepoints): New.
12812 (linux_detach): Stabilize threads before detaching.
12813 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12814 the lwp is either not stabilizing, or is moving out of a jump pad.
12815 (linux_fast_tracepoint_collecting): New.
12816 (maybe_move_out_of_jump_pad): New.
12817 (enqueue_one_deferred_signal): New.
12818 (dequeue_one_deferred_signal): New.
12819 (linux_wait_for_event_1): If moving out of a jump pad, defer
12820 pending signals to later.
12821 (linux_stabilize_threads): New.
12822 (linux_wait_1): Check if threads need moving out of jump pads, and
12823 do it if so.
12824 (stuck_in_jump_pad_callback): New.
12825 (move_out_of_jump_pad_callback): New.
12826 (lwp_running): New.
12827 (linux_resume_one_lwp): Handle moving out of jump pads.
12828 (linux_set_resume_request): Dequeue deferred signals.
12829 (need_step_over_p): Also step over fast tracepoint jumps.
12830 (start_step_over): Also uninsert fast tracepoint jumps.
12831 (finish_step_over): Also reinsert fast tracepoint jumps.
12832 (linux_install_fast_tracepoint_jump): New.
12833 (linux_target_ops): Install linux_stabilize_threads and
12834 linux_install_fast_tracepoint_jump_pad.
12835 * linux-low.h (linux_target_ops) <get_thread_area,
12836 install_fast_tracepoint_jump_pad>: New fields.
12837 (struct lwp_info) <collecting_fast_tracepoint,
12838 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12839 (linux_get_thread_area): Declare.
12840 * linux-x86-low.c (jump_insn): New.
12841 (x86_get_thread_area): New.
12842 (append_insns): New.
12843 (push_opcode): New.
12844 (amd64_install_fast_tracepoint_jump_pad): New.
12845 (i386_install_fast_tracepoint_jump_pad): New.
12846 (x86_install_fast_tracepoint_jump_pad): New.
12847 (the_low_target): Install x86_get_thread_area and
12848 x86_install_fast_tracepoint_jump_pad.
12849 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12850 (struct fast_tracepoint_jump): New.
12851 (fast_tracepoint_jump_insn): New.
12852 (fast_tracepoint_jump_shadow): New.
12853 (find_fast_tracepoint_jump_at): New.
12854 (fast_tracepoint_jump_here): New.
12855 (delete_fast_tracepoint_jump): New.
12856 (set_fast_tracepoint_jump): New.
12857 (uninsert_fast_tracepoint_jumps_at): New.
12858 (reinsert_fast_tracepoint_jumps_at): New.
12859 (set_breakpoint_at): Use write_inferior_memory.
12860 (uninsert_raw_breakpoint): Use write_inferior_memory.
12861 (check_mem_read): Mask out fast tracepoint jumps.
12862 (check_mem_write): Mask out fast tracepoint jumps.
12863 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12864 (set_fast_tracepoint_jump): Declare.
12865 (delete_fast_tracepoint_jump)
12866 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12867 (reinsert_fast_tracepoint_jumps_at): Declare.
12868 * regcache.c: Don't compile many functions when building the
12869 in-process agent library.
12870 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12871 the register buffer in the heap.
12872 (free_register_cache): If the register buffer isn't owned by the
12873 regcache, don't free it.
12874 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12875 pre-existing register caches.
12876 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12877 type.
12878 (convert_ascii_to_int): : Constify `from' parameter type.
12879 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12880 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12881 the needed buffer in-place.
12882 (relocate_instruction): New.
12883 * server.c (handle_query) <qSymbols>: If the target supports
12884 tracepoints, give it a chance of looking up symbols. Report
12885 support for fast tracepoints.
12886 (handle_status): Stabilize threads.
12887 (process_serial_event): Adjust.
12888 * server.h (struct fast_tracepoint_jump): Forward declare.
12889 (struct process_info) <fast_tracepoint_jumps>: New field.
12890 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12891 (decode_X_packet, decode_M_packet): Adjust.
12892 (relocate_instruction): Declare.
12893 (in_process_agent_loaded): Declare.
12894 (tracepoint_look_up_symbols): Declare.
12895 (struct fast_tpoint_collect_status): Declare.
12896 (fast_tracepoint_collecting): Declare.
12897 (force_unlock_trace_buffer): Declare.
12898 (handle_tracepoint_bkpts): Declare.
12899 (initialize_low_tracepoint)
12900 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12901 * target.h (struct target_ops) <stabilize_threads,
12902 install_fast_tracepoint_jump_pad>: New fields.
12903 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12904 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12905 [HAVE_STDINT_H]: Include stdint.h.
12906 (trace_debug_1): Rename to ...
12907 (trace_vdebug): ... this.
12908 (trace_debug): Rename to ...
12909 (trace_debug_1): ... this. Add `level' parameter.
12910 (trace_debug): New.
12911 (ATTR_USED, ATTR_NOINLINE): New.
12912 (IP_AGENT_EXPORT): New.
12913 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12914 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12915 (about_to_request_buffer_space, trace_buffer_is_full)
12916 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12917 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12918 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12919 (traceframe_write_count, traceframes_created)
12920 (trace_state_variables)
12921 New renaming defines.
12922 (struct ipa_sym_addresses): New.
12923 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12924 (symbol_list): New.
12925 (ipa_sym_addrs): New.
12926 (all_tracepoint_symbols_looked_up): New.
12927 (in_process_agent_loaded): New.
12928 (write_e_ipa_not_loaded): New.
12929 (maybe_write_ipa_not_loaded): New.
12930 (tracepoint_look_up_symbols): New.
12931 (debug_threads) [IN_PROCESS_AGENT]: New.
12932 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12933 (UNKNOWN_SIDE_EFFECTS): New.
12934 (stop_tracing): New.
12935 (flush_trace_buffer): New.
12936 (stop_tracing_bkpt): New.
12937 (flush_trace_buffer_bkpt): New.
12938 (read_inferior_integer): New.
12939 (read_inferior_uinteger): New.
12940 (read_inferior_data_pointer): New.
12941 (write_inferior_data_pointer): New.
12942 (write_inferior_integer): New.
12943 (write_inferior_uinteger): New.
12944 (struct collect_static_trace_data_action): Delete.
12945 (enum tracepoint_type): New.
12946 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12947 <actions_str, step_actions, step_actions_str>: Only include in
12948 GDBserver.
fa593d66
PA
12949 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12950 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12951 (tracepoints): Use IP_AGENT_EXPORT.
12952 (last_tracepoint): Don't include in the IPA.
12953 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12954 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12955 (alloced_trace_state_variables): New.
12956 (trace_state_variables): Use IP_AGENT_EXPORT.
12957 (traceframe_t): Delete unused variable.
12958 (circular_trace_buffer): Don't include in the IPA.
12959 (trace_buffer_start): Delete.
12960 (struct trace_buffer_control): New.
12961 (trace_buffer_free): Delete.
12962 (struct ipa_trace_buffer_control): New.
12963 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12964 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12965 New.
12966 (trace_buffer_ctrl): New.
12967 (TRACE_BUFFER_CTRL_CURR): New.
12968 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12969 Reimplement as macros.
12970 (trace_buffer_wrap): Delete.
12971 (traceframe_write_count, traceframe_read_count)
12972 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12973 (struct tracepoint_hit_ctx) <type>: New field.
12974 (struct fast_tracepoint_ctx): New.
12975 (memory_barrier): New.
12976 (cmpxchg): New.
12977 (record_tracepoint_error): Update atomically in the IPA.
12978 (clear_inferior_trace_buffer): New.
12979 (about_to_request_buffer_space): New.
12980 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12981 updating the same buffer.
12982 (add_tracepoint): Default the tracepoint's type to trap
12983 tracepoint, and orig_size to -1.
12984 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12985 internal variables.
12986 (create_trace_state_variable): New parameter `gdb'. Handle it.
12987 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12988 (cmd_qtdp): Handle fast tracepoints.
12989 (cmd_qtdv): Adjust.
12990 (max_jump_pad_size): New.
12991 (gdb_jump_pad_head): New.
12992 (get_jump_space_head): New.
12993 (claim_jump_space): New.
12994 (sort_tracepoints): New.
12995 (MAX_JUMP_SIZE): New.
12996 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12997 IPA.
12998 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12999 support. Upload fast traceframes, and delete internal IPA
13000 breakpoints.
13001 (stop_tracing_handler): New.
13002 (flush_trace_buffer_handler): New.
13003 (cmd_qtstop): Upload fast tracepoints.
13004 (response_tracepoint): Handle fast tracepoints.
13005 (tracepoint_finished_step): Upload fast traceframes. Set the
13006 tracepoint hit context's tracepoint type.
13007 (handle_tracepoint_bkpts): New.
13008 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13009 type. Add comment about fast tracepoints.
13010 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13011 non-existing action_str field.
13012 (get_context_regcache): Handle fast tracepoints.
13013 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13014 to the regcache.
13015 (fast_tracepoint_from_jump_pad_address): New.
13016 (fast_tracepoint_from_ipa_tpoint_address): New.
13017 (collecting_t): New.
13018 (force_unlock_trace_buffer): New.
13019 (fast_tracepoint_collecting): New.
13020 (collecting): New.
13021 (gdb_collect): New.
13022 (write_inferior_data_ptr): New.
13023 (target_tp_heap): New.
13024 (target_malloc): New.
13025 (download_agent_expr): New.
13026 (UALIGN): New.
13027 (download_tracepoints): New.
13028 (download_trace_state_variables): New.
13029 (upload_fast_traceframes): New.
13030 (IPA_FIRST_TRACEFRAME): New.
13031 (IPA_NEXT_TRACEFRAME_1): New.
13032 (IPA_NEXT_TRACEFRAME): New.
13033 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13034 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13035 (gdb_jump_pad_buffer_end): New.
13036 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13037 (initialize_tracepoint): Adjust.
13038 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13039 buffer. Initialize the low module.
13040 * utils.c (PREFIX, TOOLNAME): New.
13041 (malloc_failure): Use PREFIX.
13042 (error): In the IPA, an error causes an exit.
13043 (fatal, warning): Use PREFIX.
13044 (internal_error): Use TOOLNAME.
13045 (NUMCELLS): Increase to 10.
13046 * configure, config.in: Regenerate.
13047
d149dd1d
PA
130482010-06-01 Pedro Alves <pedro@codesourcery.com>
13049
13050 * server.c (handle_query) <qSupported>: Do two passes over the
13051 qSupported string to avoid nesting strtok.
13052
f6528abd
JK
130532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13054
13055 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13056 (CDEPS): New.
13057 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13058 -Wl,--dynamic-list.
13059 * configure: Regenerate.
13060 * proc-service.list: New.
13061
ca2a87a0
JK
130622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13063
13064 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13065 New comment.
13066
363a6e9f
OS
130672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13068
13069 * gdbreplay.c (remote_open): Check error return from socket() call by
13070 its equality to -1 not by it being negative.
13071 * remote-utils.c (remote_open): Likewise.
13072
d23b6cb1
PA
130732010-05-23 Pedro Alves <pedro@codesourcery.com>
13074
13075 * config.h: Regenerate.
13076
28d3cf85
MK
130772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13078
13079 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13080 doesn't provide PTRACE_GET_THREAD_AREA.
13081
fea36a59
MK
130822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13083
13084 * linux-m68k-low.c: Include <asm/ptrace.h>
13085 (ps_get_thread_area): Implement.
13086
24b066ba
DE
130872010-05-03 Doug Evans <dje@google.com>
13088
13089 * event-loop.c (struct callback_event): New struct.
13090 (callback_list): New global.
13091 (append_callback_event, delete_callback_event): New functions.
13092 (process_callback): New function.
13093 (start_event_loop): Call it.
13094 * remote-utils.c (NOT_SCHEDULED): Define.
13095 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13096 moved out of readchar.
13097 (readchar): Rewrite. Call reschedule before returning.
13098 (reset_readchar): New function.
13099 (remote_close): Call it.
13100 (process_remaining, reschedule): New functions.
13101 * server.h (callback_handler_func): New typedef.
13102 (append_callback_event, delete_callback_event): Declare.
13103
9836d6ea
PA
131042010-05-03 Pedro Alves <pedro@codesourcery.com>
13105
13106 * proc-service.c (ps_pglobal_lookup): Use
13107 thread_db_look_up_one_symbol.
13108 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13109 parameter. Use it instead of all_symbols_looked_up.
13110 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13111 field.
13112 (all_symbols_looked_up): Don't declare.
13113 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13114 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13115 field.
13116 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13117 Set all_symbols_looked_up here.
13118 (thread_db_look_up_one_symbol): New.
13119 (thread_db_get_tls_address): Adjust.
13120 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13121 thread_db object on the heap, and tentatively set it in the
13122 process structure.
13123 (thread_db_init): Don't set all_symbols_looked_up here.
13124 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13125
7984d532
PA
131262010-05-03 Pedro Alves <pedro@codesourcery.com>
13127
13128 * linux-low.c (linux_kill, linux_detach): Adjust.
13129 (status_pending_p_callback): Remove redundant statement. Check
13130 for !TARGET_WAITIKIND_IGNORE, instead of
13131 TARGET_WAITKIND_STOPPED.
13132 (handle_tracepoints): Make sure LWP is locked. Adjust.
13133 (linux_wait_for_event_1): Adjust.
13134 (linux_cancel_breakpoints): New.
13135 (unsuspend_one_lwp): New.
13136 (unsuspend_all_lwps): New.
13137 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13138 (send_sigstop_callback): Change return type to int, add new
13139 `except' parameter and handle it.
13140 (suspend_and_send_sigstop_callback): New.
13141 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13142 pass them down. If SUSPEND, also increment the lwp's suspend
13143 count.
13144 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13145 (need_step_over_p): Don't consider suspended LWPs.
13146 (start_step_over): Adjust.
13147 (proceed_one_lwp): Change return type to int, add new `except'
13148 parameter and handle it.
13149 (unsuspend_and_proceed_one_lwp): New.
13150 (proceed_all_lwps): Use find_inferior instead of
13151 for_each_inferior.
13152 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13153 also decrement the suspend count of LWPs. Pass `except' down,
13154 instead of hacking its suspend count.
13155 (linux_pause_all): Add `freeze' parameter. Adjust.
13156 (linux_unpause_all): New.
13157 (linux_target_ops): Install linux_unpause_all.
13158 * server.c (handle_status): Adjust.
13159 * target.h (struct target_ops): New fields `unpause_all' and
13160 `cancel_breakpoints'. Add new parameter to `pause_all'.
13161 (pause_all): Add new `freeze' parameter.
13162 (unpause_all): New.
13163 (cancel_breakpoints): New.
13164 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13165 cancel breakpoints.
13166 (cmd_qtstart): Pause threads.
13167 (stop_tracing): Pause threads, and cancel breakpoints.
13168 * win32-low.c (win32_target_ops): Adjust.
13169
e471f25b
PA
131702010-05-03 Pedro Alves <pedro@codesourcery.com>
13171
13172 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13173 the inferior right away from here...
13174 (linux_wait_1): ... to here, and adjust to check the thread's
13175 last_resume_kind instead of the lwp's step or stop_expected flags.
13176
1915ef4f
PA
131772010-05-02 Pedro Alves <pedro@codesourcery.com>
13178
13179 * README: Use consistent `GDB' and `GDBserver' spellings.
13180
f9e39928
PA
131812010-05-02 Pedro Alves <pedro@codesourcery.com>
13182
13183 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13184 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13185 (linux_detach_one_lwp): Assume the lwp is stopped.
13186 (any_thread_of): Delete.
13187 (linux_detach): Stop all lwps here. Don't blindly delete all
13188 breakpoints.
13189 (delete_lwp_callback): New.
13190 (linux_mourn): Delete all lwps of the process that is gone.
13191 (linux_wait_1): Don't delete the last lwp of the process here.
13192 * mem-break.h (mark_breakpoints_out): Declare.
13193 * mem-break.c (mark_breakpoints_out): New.
13194 (free_all_breakpoints): Use it.
13195 * server.c (handle_target_event): If the process is gone, mark
13196 breakpoints out.
13197 * thread-db.c (struct thread_db) <create_bp>: New field.
13198 (thread_db_enable_reporting): Fix prototype. Store a thread event
13199 breakpoint reference in the thread_db struct.
13200 (thread_db_load_search): Clear the thread_db object.
13201 (try_thread_db_load_1): Ditto.
13202 (switch_to_process): New.
13203 (disable_thread_event_reporting): Use it.
13204 (remove_thread_event_breakpoints): New.
13205 (thread_db_detach, thread_db_mourn): Use it.
13206
1e7fc18c
PA
132072010-05-01 Pedro Alves <pedro@codesourcery.com>
13208
13209 * linux-low.c (linux_enable_event_reporting): New.
13210 (linux_wait_for_event_1, handle_extended_wait): Use it.
13211
02fc4de7
PA
132122010-04-30 Pedro Alves <pedro@codesourcery.com>
13213
13214 * linux-low.c (linux_kill_one_lwp, linux_kill)
13215 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13216 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13217 SIGSTOP even if the LWP is stopped.
13218 (send_sigstop_callback): New.
13219 (stop_all_lwps): Use send_sigstop_callback instead.
13220 (linux_resume_one_thread): Adjust.
13221 (proceed_one_lwp): Still proceed an LWP that the client has
13222 requested to stop, if we haven't reported it as stopped yet. Make
13223 sure that LWPs the client want stopped, have a pending SIGSTOP.
13224
bc3b5632
DE
132252010-04-26 Doug Evans <dje@google.com>
13226
ae1ada35
DE
13227 * server.c (handle_general_set): Make static.
13228
bc3b5632
DE
13229 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13230 Print received char after testing for error/eof instead of before.
13231 (input_interrupt): Tweak comment.
13232
65730243
DE
132332010-04-23 Doug Evans <dje@google.com>
13234
13235 * server.c (start_inferior): Print inferior argv if --debug.
13236
a8ae7dc0
AR
132372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13238
13239 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13240 * nto-x86-low.c: Include server.h
13241
1c07cc19
PM
132422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13243
13244 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13245 be consistent with other sources of this directory.
13246 (init_registers_amd64): Correct name of source file of this function
13247 in the comment.
13248
e0a61e09
PM
132492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13250
13251 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13252 64-bit executables.
13253
54709339
PM
132542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13255
13256 * win32-i386-low.c: Add 64-bit support.
13257 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13258 (init_registers_amd64): Declare.
13259 (mappings): Add 64-bit version of array.
13260 (init_windows_x86): New function.
13261 (the_low_target): Change init_arch field to init_windows_x86.
13262
e8f0053d
PM
132632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13264
13265 * win32-low.c: Adapt to support also 64-bit architecture.
13266 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13267 (get_image_name): Use SIZE_T type for local variable `done'.
13268 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13269 (toolhelp_get_dll_name): Idem.
13270 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13271 Use uintptr_t typecast to avoid warning.
13272 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13273 (handle_exception): Use phex_nz to avoid warning.
13274 (win32_wait): Remove unused local variable `process'.
13275
c481e77e
PM
132762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13277
13278 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13279 `amd64-avx.o'.
13280
12ea4b69
PM
132812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13282
13283 * configure.ac: Use `ws2_32' library for srv_mingw.
13284 * configure: Regenerate.
13285 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13286 * remote-utils.c: Likewise.
13287
f6d1620c
L
132882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13289
13290 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13291 if __x86_64__ is defined.
13292
8e642873
PM
132932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13294
13295 * configure: Regenerate.
13296
711e434b
PM
132972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13298
13299 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13300 * target.h (target_ops): New get_tib_address field.
13301 * win32-low.h (win32_thread_info): Add thread_local_base field.
13302 * win32-low.c (child_add_thread): Add tlb argument.
13303 Set thread_local_base field to TLB.
13304 (get_child_debug_event): Adapt to child_add_thread change.
13305 (win32_get_tib_address): New function.
13306 (win32_target_ops): Set get_tib_address field to
13307 win32_get_tib_address.
13308 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13309
505106cd
PA
133102010-04-12 Pedro Alves <pedro@codesourcery.com>
13311
505106cd
PA
13312 * linux-low.c (linux_mourn): Also remove the process.
13313 * server.c (handle_target_event): Don't remove the process here.
13314 * nto-low.c (nto_mourn): New.
13315 (nto_target_ops): Install it.
13316 * spu-low.c (spu_mourn): New.
13317 (spu_target_ops): Install it.
13318 * win32-low.c (win32_mourn): New.
13319 (win32_target_ops): Install it.
13320
e8470a06
PA
133212010-04-12 Pedro Alves <pedro@codesourcery.com>
13322
13323 * server.h (buffer_xml_printf): Remove redundant `;'.
13324
45ba0d02
PA
133252010-04-12 Pedro Alves <pedro@codesourcery.com>
13326
13327 * regcache.c (set_register_cache): Invalidate regcaches before
13328 changing the register cache layout.
13329 (regcache_invalidate_one): Allow a NULL regcache.
13330 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13331 regcaches before changing the register cache layout or the target
13332 regsets.
13333
59e04013
L
133342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13335
13336 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13337 variable warning on Linux/x86-64.
13338
8336d594
PA
133392010-04-11 Pedro Alves <pedro@codesourcery.com>
13340
13341 GDBserver disconnected tracing support.
13342
13343 * linux-low.c (linux_remove_process): Delete.
13344 (add_lwp): Don't set last_resume_kind here.
13345 (linux_kill): Use `mourn'.
13346 (linux_detach): Use `thread_db_detach', and `mourn'.
13347 (linux_mourn): New.
13348 (linux_attach_lwp_1): Adjust comment.
13349 (linux_attach): last_resume_kind moved the thread_info; adjust.
13350 (status_pending_p_callback): Adjust.
13351 (linux_wait_for_event_1): Adjust.
13352 (count_events_callback, select_singlestep_lwp_callback)
13353 (select_event_lwp_callback, cancel_breakpoints_callback)
13354 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13355 (proceed_one_lwp): Adjust.
13356 (linux_async): Add debug output.
13357 (linux_thread_stopped): New.
13358 (linux_pause_all): New.
13359 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13360 linux_pause_all.
13361 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13362 (thread_db_free): Delete declaration.
13363 (thread_db_detach, thread_db_mourn): Declare.
13364 * thread-db.c (thread_db_init): Use thread_db_mourn.
13365 (thread_db_free): Delete, split in two.
13366 (disable_thread_event_reporting): New.
13367 (thread_db_detach): New.
13368 (thread_db_mourn): New.
13369
13370 * server.h (struct thread_info) <last_resume_kind>: New field.
13371 <attached>: Add comment.
13372 <gdb_detached>: New field.
13373 (handler_func): Change return type to int.
13374 (handle_serial_event, handle_target_event): Ditto.
13375 (gdb_connected): Declare.
13376 (tracing): Delete.
13377 (disconnected_tracing): Declare.
13378 (stop_tracing): Declare.
13379
13380 * server.c (handle_query) <qSupported>: Report support for
13381 disconnected tracing.
13382 (queue_stop_reply_callback): Account for running threads.
13383 (gdb_wants_thread_stopped): New.
13384 (gdb_wants_all_threads_stopped): New.
13385 (gdb_reattached_process): New.
13386 (handle_status): Clear the `gdb_detached' flag of all processes.
13387 In all-stop, stop all threads.
13388 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13389 (process_serial_event): If the remote connection breaks, or if an
13390 exit was forced with "monitor exit", force an event loop exit.
13391 Handle disconnected tracing on detach.
13392 (handle_serial_event): Adjust.
13393 (handle_target_event): If GDB isn't connected, forward events back
13394 to the inferior, unless the last process exited, in which case,
13395 exit gdbserver. Adjust interface.
13396
13397 * remote-utils.c (remote_open): Don't block in accept. Instead
13398 register an event loop source on the listen socket file
13399 descriptor. Refactor bits into ...
13400 (listen_desc): ... this new global.
13401 (gdb_connected): ... this new function.
13402 (enable_async_notification): ... this new function.
13403 (handle_accept_event): ... this new function.
13404 (remote_close): Clear remote_desc.
13405
13406 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13407
13408 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13409 New fields.
13410 (mourn_inferior): Define.
13411 (target_process_qsupported): Avoid the dangling else problem.
13412 (thread_stopped): Define.
13413 (pause_all): Define.
13414 (target_waitstatus_to_string): Declare.
13415 * target.c (target_waitstatus_to_string): New.
13416
13417 * tracepoint.c (tracing): Make extern.
13418 (disconnected_tracing): New.
13419 (stop_tracing): Make extern. Handle tracing stops due to GDB
13420 disconnecting.
13421 (cmd_qtdisconnected): New.
13422 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13423 (handle_tracepoint_general_set): Handle QTDisconnected.
13424
13425 * event-loop.c (event_handler_func): Change return type to int.
13426 (process_event): Bail out if the event handler wants the event
13427 loop to stop.
13428 (handle_file_event): Ditto.
13429 (start_event_loop): Bail out if the event handler wants the event
13430 loop to stop.
13431
13432 * nto-low.c (nto_target_ops): Adjust.
13433 * spu-low.c (spu_wait): Don't remove the process here.
13434 (spu_target_ops): Adjust.
13435 * win32-low.c (win32_wait): Don't remove the process here.
13436 (win32_target_ops): Adjust.
13437
5d267c4c
PA
134382010-04-11 Pedro Alves <pedro@codesourcery.com>
13439
13440 * regcache.c (realloc_register_cache): Invalidate inferior's
13441 regcache before recreating it.
13442
623ccd72
PA
134432010-04-09 Pedro Alves <pedro@codesourcery.com>
13444
13445 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13446
219f2f23
PA
134472010-04-09 Stan Shebs <stan@codesourcery.com>
13448 Pedro Alves <pedro@codesourcery.com>
13449
13450 * server.h (LONGEST): New.
13451 (struct thread_info) <while_stepping>: New field.
13452 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13453 Declare.
13454 (initialize_tracepoint, handle_tracepoint_general_set)
13455 (handle_tracepoint_query, tracepoint_finished_step)
13456 (tracepoint_was_hit, release_while_stepping_state_list):
13457 (current_traceframe): Declare.
13458 * server.c (handle_general_set): Handle tracepoint packets.
13459 (read_memory): New.
13460 (write_memory): New.
13461 (handle_search_memory_1): Use read_memory.
13462 (handle_query): Report support for conditional tracepoints, trace
13463 state variables, and tracepoint sources. Handle tracepoint
13464 queries.
13465 (main): Initialize the tracepoints module.
13466 (process_serial_event): Handle traceframe reads/writes.
13467
13468 * linux-low.c (handle_tracepoints): New.
13469 (linux_wait_1): Call it.
13470 (linux_resume_one_lwp): Handle while-stepping.
13471 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13472 (linux_target_ops): Install them.
13473 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13474 New field.
13475 * linux-x86-low.c (x86_supports_tracepoints): New.
13476 (the_low_target). Install it.
13477
13478 * mem-break.h (delete_breakpoint): Declare.
13479 * mem-break.c (delete_breakpoint): Make external.
13480
13481 * target.h (struct target_ops): Add `supports_tracepoints',
13482 `read_pc', and `write_pc' fields.
13483 (target_supports_tracepoints): Define.
13484 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13485 (phex_nz): New.
13486
13487 * regcache.h (struct regcache) <registers_owned>: New field.
13488 (init_register_cache, regcache_cpy): Declare.
13489 (regcache_read_pc, regcache_write_pc): Declare.
13490 (register_cache_size): Declare.
13491 (supply_regblock): Declare.
13492 * regcache.c (init_register_cache): New.
13493 (new_register_cache): Use it.
13494 (regcache_cpy): New.
13495 (register_cache_size): New.
13496 (supply_regblock): New.
13497 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13498
219f2f23
PA
13499 * tracepoint.c: New.
13500
13501 * Makefile.in (OBS): Add tracepoint.o.
13502 (tracepoint.o): New rule.
13503
3a13a53b
L
135042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13505
13506 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13507 (i386-mmx.o): New.
13508 (i386-mmx.c): Likewise.
13509 (i386-mmx-linux.o): Likewise.
13510 (i386-mmx-linux.c): Likewise.
13511
13512 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13513 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13514 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13515 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13516
13517 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13518 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13519 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13520
1570b33e
L
135212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13522
13523 * Makefile.in (clean): Updated.
13524 (i386-avx.o): New.
13525 (i386-avx.c): Likewise.
13526 (i386-avx-linux.o): Likewise.
13527 (i386-avx-linux.c): Likewise.
13528 (amd64-avx.o): Likewise.
13529 (amd64-avx.c): Likewise.
13530 (amd64-avx-linux.o): Likewise.
13531 (amd64-avx-linux.c): Likewise.
13532
13533 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13534 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13535 (srv_amd64_regobj): Add amd64-avx.o.
13536 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13537 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13538 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13539 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13540 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13541 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13542 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13543
13544 * i387-fp.c: Include "i386-xstate.h".
13545 (i387_xsave): New.
13546 (i387_cache_to_xsave): Likewise.
13547 (i387_xsave_to_cache): Likewise.
13548 (x86_xcr0): Likewise.
13549
13550 * i387-fp.h (i387_cache_to_xsave): Likewise.
13551 (i387_xsave_to_cache): Likewise.
13552 (x86_xcr0): Likewise.
13553
13554 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13555 * linux-crisv32-low.c (target_regsets): Likewise.
13556 * linux-m68k-low.c (target_regsets): Likewise.
13557 * linux-mips-low.c (target_regsets): Likewise.
13558 * linux-ppc-low.c (target_regsets): Likewise.
13559 * linux-s390-low.c (target_regsets): Likewise.
13560 * linux-sh-low.c (target_regsets): Likewise.
13561 * linux-sparc-low.c (target_regsets): Likewise.
13562 * linux-xtensa-low.c (target_regsets): Likewise.
13563
13564 * linux-low.c: Include <sys/uio.h>.
13565 (regsets_fetch_inferior_registers): Support nt_type.
13566 (regsets_store_inferior_registers): Likewise.
13567 (linux_process_qsupported): New.
13568 (linux_target_ops): Add linux_process_qsupported.
13569
13570 * linux-low.h (regset_info): Add nt_type.
13571 (linux_target_ops): Add process_qsupported.
13572
13573 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13574 and <sys/uio.h>.
13575 (init_registers_i386_avx_linux): New.
13576 (init_registers_amd64_avx_linux): Likewise.
13577 (xmltarget_i386_linux_no_xml): Likewise.
13578 (xmltarget_amd64_linux_no_xml): Likewise.
13579 (PTRACE_GETREGSET): Likewise.
13580 (PTRACE_SETREGSET): Likewise.
13581 (x86_fill_xstateregset): Likewise.
13582 (x86_store_xstateregset): Likewise.
13583 (use_xml): Likewise.
13584 (x86_linux_update_xmltarget): Likewise.
13585 (x86_linux_process_qsupported): Likewise.
13586 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13587 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13588 init_registers_i386_linux here. Call
13589 x86_linux_update_xmltarget.
13590 (the_low_target): Add x86_linux_process_qsupported.
13591
13592 * server.c (handle_query): Call target_process_qsupported.
13593
13594 * target.h (target_ops): Add process_qsupported.
13595 (target_process_qsupported): New.
13596
fc7238bb
PA
135972010-04-03 Pedro Alves <pedro@codesourcery.com>
13598
13599 * inferiors.c (add_thread): Set last_status kind to
13600 TARGET_WAITKIND_IGNORE.
13601 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13602 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13603 (linux_wait_1): Move `thread' local definition to block that uses
13604 it. Don't NULL initialize `event_child'.
13605 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13606 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13607 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13608
bdabb078
PA
136092010-04-01 Pedro Alves <pedro@codesourcery.com>
13610
13611 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13612 an extended waitstatus, or by a watchpoint.
13613 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13614 thread was stepping or has been stopped by a watchpoint.
13615
d3bbe7a0
PA
136162010-04-01 Pedro Alves <pedro@codesourcery.com>
13617
13618 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13619 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13620 of another, then delete the previous, and validate all
13621 breakpoints.
13622 (validate_inserted_breakpoint): New.
13623 (delete_disabled_breakpoints): New.
13624 (validate_breakpoints): New.
13625 (check_mem_read): Validate breakpoints before trusting their
13626 shadow. Delete disabled breakpoints.
13627 (check_mem_write): Validate breakpoints before trusting they
13628 should be inserted. Delete disabled breakpoints.
13629 * mem-break.h (validate_breakpoints):
13630 * server.c (handle_query): Validate breakpoints when we see a
13631 qSymbol query.
13632
8b07ae33
PA
136332010-04-01 Pedro Alves <pedro@codesourcery.com>
13634
13635 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13636 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13637 if we could tell there's a GDB breakpoint at stop_pc.
13638 (need_step_over_p): Don't do a step over if we find a GDB
13639 breakpoint at the resume PC.
13640
13641 * mem-break.c (struct raw_breakpoint): New.
13642 (enum bkpt_type): New type `gdb_breakpoint'.
13643 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13644 fields. New field `raw'.
13645 (find_raw_breakpoint_at): New.
13646 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13647 breakpoint instead.
13648 (set_breakpoint_at): Adjust.
13649 (delete_raw_breakpoint): New.
13650 (release_breakpoint): New.
13651 (delete_breakpoint): Rename to...
13652 (delete_breakpoint_1): ... this. Add proc parameter. Use
13653 release_breakpoint. Return ENOENT.
13654 (delete_breakpoint): Reimplement.
13655 (find_breakpoint_at): Delete.
13656 (find_gdb_breakpoint_at): New.
13657 (delete_breakpoint_at): Delete.
13658 (set_gdb_breakpoint_at): New.
13659 (delete_gdb_breakpoint_at): New.
13660 (gdb_breakpoint_here): New.
13661 (set_reinsert_breakpoint): Use release_breakpoint.
13662 (uninsert_breakpoint): Rename to ...
13663 (uninsert_raw_breakpoint): ... this.
13664 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13665 (reinsert_raw_breakpoint): Change parameter type to
13666 raw_breakpoint.
13667 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13668 instead.
13669 (check_breakpoints): Adjust. Use release_breakpoint.
13670 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13671 (breakpoint_inserted_here): Ditto.
13672 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13673 Don't trust the breakpoint's shadow if it is not inserted.
13674 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13675 (delete_all_breakpoints): Adjust.
13676 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13677 use delete_breakpoint_1.
13678
13679 * mem-break.h (breakpoints_supported): Delete declaration.
13680 (set_gdb_breakpoint_at): Declare.
13681 (gdb_breakpoint_here): Declare.
13682 (delete_breakpoint_at): Delete.
13683 (delete_gdb_breakpoint_at): Declare.
13684
13685 * server.h (struct raw_breakpoint): Forward declare.
13686 (struct process_info): New field `raw_breakpoints'.
13687
13688 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13689 breakpoints.
13690
6bf5e0ba
PA
136912010-03-24 Pedro Alves <pedro@codesourcery.com>
13692
13693 * linux-low.c (status_pending_p_callback): Fix comment.
13694 (linux_wait_for_event_1): Move most of the internal breakpoint
13695 handling from here...
13696 (linux_wait_1): ... to here.
13697 (count_events_callback): New.
13698 (select_singlestep_lwp_callback): New.
13699 (select_event_lwp_callback): New.
13700 (cancel_breakpoints_callback): New.
13701 (select_event_lwp): New.
13702 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13703 priority to all LWPs that have had events that should be reported
13704 to the client. Cancel breakpoints when about to reporting the
13705 event to the client, not while stopping lwps. No longer cancel
13706 finished single-steps here.
13707 (cancel_finished_single_step): Delete.
13708 (cancel_finished_single_steps): Delete.
13709
414a389f
PA
137102010-03-24 Pedro Alves <pedro@codesourcery.com>
13711
13712 * mem-break.c (enum bkpt_type): New.
13713 (struct breakpoint): New field `type'.
13714 (set_breakpoint_at): Change return type to struct breakpoint
13715 pointer. Set type to `other_breakpoint' by default.
13716 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13717 in the breakpoint list.
13718 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13719 (reinsert_breakpoint): Rename to ...
13720 (reinsert_raw_breakpoint): ... this.
13721 (reinsert_breakpoints_at): Adjust.
13722 * mem-break.h (struct breakpoint): Declare.
13723 (set_breakpoint_at): Change return type to struct breakpoint
13724 pointer.
13725
2280c721
PA
137262010-03-24 Pedro Alves <pedro@codesourcery.com>
13727
13728 * server.c (handle_query): Assign, not compare.
13729
d50171e4
PA
137302010-03-24 Pedro Alves <pedro@codesourcery.com>
13731
13732 Teach linux gdbserver to step-over-breakpoints.
13733
13734 * linux-low.c (can_hardware_single_step): New.
13735 (supports_breakpoints): New.
13736 (handle_extended_wait): If stopping threads, read the stop pc of
13737 the new cloned LWP.
13738 (get_pc): New.
13739 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13740 low target doesn't support retrieving the PC.
13741 (add_lwp): Set last_resume_kind to resume_continue.
13742 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13743 (linux_attach): Don't clear stop_expected. Set the lwp's
13744 last_resume_kind to resume_stop.
13745 (linux_detach_one_lwp): Don't check for removed breakpoints.
13746 (check_removed_breakpoint): Delete.
13747 (status_pending_p): Rename to ...
13748 (status_pending_p_callback): ... this. Don't check for removed
13749 breakpoints. Don't consider threads that are stopped from GDB's
13750 perspective.
13751 (linux_wait_for_lwp): Always read the stop_pc here.
13752 (cancel_breakpoint): New.
13753 (step_over_bkpt): New global.
13754 (linux_wait_for_event_1): Implement stepping over breakpoints.
13755 (gdb_wants_lwp_stopped): New.
13756 (gdb_wants_all_stopped): New.
13757 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13758 single-step traps here. Store the thread's last reported target
13759 wait status.
13760 (send_sigstop): Don't clear stop_expected. Always set it,
13761 instead.
13762 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13763 (cancel_finished_single_step): New.
13764 (cancel_finished_single_steps): New.
13765 (wait_for_sigstop): Don't cancel finished single-step traps here.
13766 (linux_resume_one_lwp): Don't check for removed breakpoints.
13767 Don't set `step' on non-hardware step archs.
13768 (linux_set_resume_request): Ignore resume_stop requests if already
13769 stopping or stopped. Set the lwp's last_resume_kind.
13770 (resume_status_pending_p): Don't check for removed breakpoints.
13771 (need_step_over_p): New.
13772 (start_step_over): New.
13773 (finish_step_over): New.
13774 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13775 requests. Clear the thread's last reported target waitstatus.
13776 Don't use the `suspended' flag. Don't consider pending breakpoints.
13777 (linux_resume): Start a step-over if necessary.
13778 (proceed_one_lwp): New.
13779 (proceed_all_lwps): New.
13780 (unstop_all_lwps): New.
13781 * linux-low.h (struct lwp_info): Rewrite comment for the
13782 `suspended' flag. Add the `stop_pc' field. Delete the
13783 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13784 Add `'last_resume_kind' and `need_step_over' fields.
13785 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13786 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13787 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13788 (set_raw_breakpoint_at): New.
13789 (set_breakpoint_at): Rewrite to use it.
13790 (reinsert_breakpoint_handler): Delete.
13791 (set_reinsert_breakpoint): New.
13792 (reinsert_breakpoint_by_bp): Delete.
13793 (delete_reinsert_breakpoints): New.
13794 (uninsert_breakpoint): Rewrite.
13795 (uninsert_breakpoints_at): New.
13796 (reinsert_breakpoint): Rewrite.
13797 (reinsert_breakpoints_at): New.
13798 (check_breakpoints): Rewrite.
13799 (breakpoint_here): New.
13800 (breakpoint_inserted_here): New.
13801 (check_mem_read): Adjust.
13802 * mem-break.h (breakpoints_supported, breakpoint_here)
13803 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13804 (reinsert_breakpoint_by_bp): Delete declaration.
13805 (delete_reinsert_breakpoints): Declare.
13806 (reinsert_breakpoint): Delete declaration.
13807 (reinsert_breakpoints_at): Declare.
13808 (uninsert_breakpoint): Delete declaration.
13809 (uninsert_breakpoints_at): Declare.
13810 (check_breakpoints): Adjust prototype.
13811 * server.h: Adjust include order.
13812 (struct thread_info): Declare here. Add a `last_status' field.
13813
30ba68cb
MS
138142010-03-23 Michael Snyder <msnyder@vmware.com>
13815
13816 * server.c (crc32): New function.
13817 (handle_query): Add handling for 'qCRC:' request.
13818
b9a881c2
PA
138192010-03-23 Pedro Alves <pedro@codesourcery.com>
13820
13821 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13822 lwp had been stopped by a watchpoint.
13823
e92d13d5
PA
138242010-03-16 Pedro Alves <pedro@codesourcery.com>
13825
13826 * server.h (internal_error): Declare.
13827 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13828 * utils.c (internal_error): New function.
13829
64daa791
AS
138302010-03-15 Andreas Schwab <schwab@redhat.com>
13831
13832 * configure.srv: Fix typo setting srv_regobj.
13833
f52cd8cd
PA
138342010-03-15 Pedro Alves <pedro@codesourcery.com>
13835
13836 * linux-low.c (fetch_register): Avoid passing a non string literal
13837 format to `error'.
13838 (usr_store_inferior_registers): Ditto.
13839
93ae6fdc
PA
138402010-03-14 Pedro Alves <pedro@codesourcery.com>
13841
13842 * linux-low.c (linux_write_memory): Bail out early if peeking
13843 memory failed.
13844
c3adc08c
PA
138452010-03-14 Pedro Alves <pedro@codesourcery.com>
13846
13847 * linux-low.h (struct lwp_info): New fields
13848 `stopped_by_watchpoint' and `stopped_data_address'.
13849 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13850 here, and cache them in the lwp object.
13851 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13852 directly.
13853 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13854 field.
13855 (linux_stopped_by_watchpoint): Rewrite.
13856 (linux_stopped_data_address): Rewrite.
13857
bce522a2
PA
138582010-03-06 Simo Melenius <simo.melenius@iki.fi>
13859
13860 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13861 switching the current inferior, not before.
13862
90884b2b
L
138632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13864
13865 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13866 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13867 i386-linux.c and amd64-linux.c.
13868 (reg-i386.o): Removed.
13869 (reg-i386.c): Likewise.
13870 (reg-i386-linux.o): Likewise.
13871 (reg-i386-linux.c): Likewise.
13872 (reg-x86-64.o): Likewise.
13873 (reg-x86-64.c): Likewise.
13874 (reg-x86-64-linux.o): Likewise.
13875 (reg-x86-64-linux.c): Likewise.
13876 (i386.o): New.
13877 (i386.c): Likewise.
13878 (i386-linux.o): Likewise.
13879 (i386-linux.c): Likewise.
13880 (amd64.o): Likewise.
13881 (amd64.c): Likewise.
13882 (amd64-linux.o): Likewise.
13883 (amd64-linux.c): Likewise.
13884
13885 * configure.srv (srv_i386_regobj): New.
13886 (srv_i386_linux_regobj): Likewise.
13887 (srv_amd64_regobj): Likewise.
13888 (srv_amd64_linux_regobj): Likewise.
13889 (srv_i386_32bit_xmlfiles): Likewise.
13890 (srv_i386_64bit_xmlfiles): Likewise.
13891 (srv_i386_xmlfiles): Likewise.
13892 (srv_amd64_xmlfiles): Likewise.
13893 (srv_i386_linux_xmlfiles): Likewise.
13894 (srv_amd64_linux_xmlfiles): Likewise.
13895 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13896 srv_xmlfiles to $srv_i386_xmlfiles.
13897 (i[34567]86-*-mingw32ce*): Likewise.
13898 (i[34567]86-*-mingw*): Likewise.
13899 (i[34567]86-*-nto*): Likewise.
13900 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13901 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13902 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13903 (x86_64-*-linux*): Likewise.
13904
13905 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13906 (init_registers_amd64_linux): New.
13907 (x86_arch_setup): Replace init_registers_x86_64_linux with
13908 init_registers_amd64_linux.
13909
193f13e6
MK
139102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13911
13912 * configure.ac: Check for libdl. If it is not available link against
13913 static libthread_db.
13914 * configure: Regenerate.
13915
85d721b8
PA
139162010-02-22 Pedro Alves <pedro@codesourcery.com>
13917
13918 PR9605
13919
13920 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13921 handing a read watchpoint.
13922 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13923
6076632b
DE
139242010-02-12 Doug Evans <dje@google.com>
13925
13926 * linux-low.c (linux_supports_tracefork_flag): Document.
13927 (linux_look_up_symbols): Add comment.
13928
3327ccf7
L
139292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13930
13931 * regcache.c (supply_register): Clear regcache if buf is NULL.
13932
0718675c 139332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13934 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13935
13936 * inferiors.c (find_inferior): Add function documentation.
13937 (unloaded_dll): Handle the case where the unloaded dll has not
13938 been previously registered in the dll list.
13939
177321bd
DJ
139402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13941
13942 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13943 (thumb2_breakpoint): New.
13944 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13945
2b009048
DJ
139462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13949 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13950 breakpoints.
13951
3be029c7
PA
139522010-01-21 Pedro Alves <pedro@codesourcery.com>
13953
13954 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13955
18f5de3b
JK
139562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13957
13958 * linux-s390-low.c (s390_collect_ptrace_register)
13959 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13960
3743bb4f
DE
139612010-01-21 Doug Evans <dje@google.com>
13962
14ce3065
DE
13963 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13964 (PTRACE_ARG4_TYPE): New macro.
13965 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13966 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13967 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13968 (usr_store_inferior_registers): Ditto.
13969 (linux_read_memory, linux_write_memory): Ditto.
13970 (linux_test_for_tracefork): Ditto.
13971
3743bb4f
DE
13972 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13973 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13974
8b315be5
PA
139752010-01-21 Pedro Alves <pedro@codesourcery.com>
13976
13977 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13978 target.
13979
85492558
PA
139802010-01-21 Pedro Alves <pedro@codesourcery.com>
13981
13982 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13983 prototype to take a regcache. Adjust.
13984
442ea881
PA
139852010-01-20 Pedro Alves <pedro@codesourcery.com>
13986
13987 * regcache.h (struct thread_info): Forward declare.
13988 (struct regcache): New.
13989 (new_register_cache): Adjust prototype.
13990 (get_thread_regcache): Declare.
13991 (free_register_cache): Adjust prototype.
13992 (registers_to_string, registers_from_string): Ditto.
13993 (supply_register, supply_register_by_name, collect_register)
13994 (collect_register_as_string, collect_register_by_name): Ditto.
13995 * regcache.c (struct inferior_regcache_data): Delete.
13996 (get_regcache): Rename to ...
13997 (get_thread_regcache): ... this. Adjust. Switch inferior before
13998 fetching registers.
13999 (regcache_invalidate_one): Adjust.
14000 (regcache_invalidate): Fix prototype.
14001 (new_register_cache): Return the new register cache.
14002 (free_register_cache): Change prototype.
14003 (realloc_register_cache): Adjust.
14004 (registers_to_string): Change prototype to take a regcache. Adjust.
14005 (registers_from_string): Ditto.
14006 (register_data): Ditto.
14007 (supply_register): Ditto.
14008 (supply_register_by_name): Ditto.
14009 (collect_register): Ditto.
14010 (collect_register_as_string): Ditto.
14011 (collect_register_by_name): Ditto.
14012 * server.c (process_serial_event): Adjust.
14013 * linux-low.h (regset_fill_func, regset_store_func): Change
14014 prototype.
14015 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14016 Change prototype.
14017 * linux-low.c (get_stop_pc): Adjust.
14018 (check_removed_breakpoint): Adjust.
14019 (linux_wait_for_event): Adjust.
14020 (linux_resume_one_lwp): Adjust.
14021 (fetch_register): Add regcache parameter. Adjust.
14022 (usr_store_inferior_registers): Ditto.
14023 (regsets_fetch_inferior_registers): Ditto.
14024 (regsets_store_inferior_registers): Ditto.
14025 (linux_fetch_registers, linux_store_registers): Ditto.
14026 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14027 regcache. Adjust.
43aaf8b6
PA
14028 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14029 Ditto.
442ea881
PA
14030 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14031 prototype to take a regcache.
14032 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14033 * remote-utils.c (convert_ascii_to_int, outreg)
14034 (prepare_resume_reply): Change prototype to take a regcache.
14035 Adjust.
14036 * target.h (struct target_ops) <fetch_registers, store_registers>:
14037 Change prototype to take a regcache.
14038 (fetch_inferior_registers, store_inferior_registers): Change
14039 prototype to take a regcache. Adjust.
14040 * proc-service.c (ps_lgetregs): Adjust.
14041 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14042 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14043 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14044 take a regcache. Adjust.
14045 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14046 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14047 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14048 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14049 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14050 (cris_cannot_fetch_register):
14051 (cris_breakpoint_at): Change prototype to take a regcache.
14052 Adjust.
14053 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14054 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14055 to take a regcache. Adjust.
14056 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14057 Adjust.
14058 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14059 take a regcache. Adjust.
14060 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14061 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14062 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14063 * linux-mips-low.c (mips_get_pc):
14064 (mips_set_pc): Change prototype to take a regcache. Adjust.
14065 (mips_reinsert_addr): Adjust.
14066 (mips_collect_register): Change prototype to take a regcache.
14067 Adjust.
14068 (mips_supply_register):
14069 (mips_collect_register_32bit, mips_supply_register_32bit)
14070 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14071 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14072 * linux-ppc-low.c (ppc_supply_ptrace_register)
14073 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14074 (parse_spufs_run): Adjust.
14075 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14076 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14077 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14078 take a regcache. Adjust.
14079 * linux-s390-low.c (s390_collect_ptrace_register)
14080 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14081 (s390_set_pc): Change prototype to take a regcache. Adjust.
14082 (s390_arch_setup): Adjust.
14083 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14084 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14085 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14086 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14087 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14088 regcache. Adjust.
14089 (sparc_breakpoint_at): Adjust.
14090 * linux-xtensa-low.c (xtensa_fill_gregset):
14091 (xtensa_store_gregset):
14092 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14093 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14094 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14095 prototype to take a regcache. Adjust.
14096 * win32-arm-low.c (arm_fetch_inferior_register)
14097 (arm_store_inferior_register): Change prototype to take a
14098 regcache. Adjust.
14099 * win32-i386-low.c (i386_fetch_inferior_register)
14100 (i386_store_inferior_register): Change prototype to take a
14101 regcache. Adjust.
14102 * win32-low.c (child_fetch_inferior_registers)
14103 (child_store_inferior_registers): Change prototype to take a
14104 regcache. Adjust.
14105 (win32_wait): Adjust.
14106 (win32_fetch_inferior_registers): Change prototype to take a
14107 regcache. Adjust.
14108 (win32_store_inferior_registers): Adjust.
14109 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14110 store_inferior_register>: Change prototype to take a regcache.
14111
60c3d7b0
DE
141122010-01-20 Doug Evans <dje@google.com>
14113
14114 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14115 #ifdef.
14116 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14117 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14118
dc146f7c
VP
141192010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14120
14121 * linux-low.c (linux_core_of_thread): New.
14122 (compare_ints, show_process, list_threads): New.
14123 (linux_qxfer_osdata): Report threads and cores.
14124 (linux_target_op): Register linux_core_of_thread.
14125 * remote-utils.c (prepare_resume_reply): Report the core.
14126 (buffer_xml_printf): Support %d specifier.
14127 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14128 New.
14129 (handle_query): Handle qXfer:threads. Announce availability
14130 thereof.
14131 * target.h (struct target_ops): New field core_of_thread.
14132
7803799a
UW
141332010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14134
14135 * Makefile.in (clean): Remove new generated files.
14136 (reg-s390.o, reg-s390.c): Remove rules.
14137 (reg-s390x.o, reg-s390x.c): Likewise.
14138 (s390-linux32.o, s390-linux32.c): Add rules.
14139 (s390-linux64.o, s390-linux64.c): Likewise.
14140 (s390x-linux64.o, s390x-linux64.c): Likewise.
14141 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14142 * linux-s390-low.c: Include <elf.h>.
14143 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14144 (init_registers_s390): Remove prototype.
14145 (init_registers_s390x): Likewise.
14146 (init_registers_s390_linux32): Add prototype.
14147 (init_registers_s390_linux64): Likewise.
14148 (init_registers_s390x_linux64): Likewise.
14149 (s390_num_regs_3264): New define.
14150 (s390_regmap_3264): New global variable.
14151 (s390_cannot_fetch_register): Remove obsolete check.
14152 (s390_cannot_store_register): Likewise.
14153 (s390_collect_ptrace_register): Handle upper/lower register halves.
14154 (s390_supply_ptrace_register): Likewise.
14155 (s390_fill_gregset): Update to register number changes.
14156 (s390_get_hwcap): New routine.
14157 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14158 Install appropriate regmap and register set.
14159
6e7ffa39
JB
141602010-01-01 Joel Brobecker <brobecker@adacore.com>
14161
14162 * server.c (gdbserver_version): Update copyright year to 2010.
14163 * gdbreplay.c (gdbreplay_version): Likewise.
14164
957f3f49
DE
141652009-12-28 Doug Evans <dje@google.com>
14166
14167 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14168 elf/external.h. Include <elf.h> instead but only if necessary.
14169
ca5c370d
PA
141702009-12-28 Pedro Alves <pedro@codesourcery.com>
14171
14172 * linux-low.c (linux_remove_process): Remove `detaching'
14173 parameter. Don't release/detach from thread_db here.
14174 (linux_kill): Release/detach from thread_db here, ...
14175 (linux_detach): ... and here, before actually detaching.
14176 (linux_wait_1): ... and here, when a process exits.
14177 * thread-db.c (any_thread_of): New.
14178 (thread_db_free): Switch the current inferior to a thread of the
14179 passed in process.
14180
4ee62156
DE
141812009-12-21 Doug Evans <dje@google.com>
14182
d90e6a88
DE
14183 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14184
c5f62d5f
DE
14185 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14186 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14187 warning ifndef __NR_tkill. Move setting of errno there too.
14188 Delete unnecessary resetting of errno after syscall.
14189 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14190
10e86dd7
DE
14191 * configure.ac: Check for dladdr.
14192 * config.in: Regenerate.
14193 * configure: Regenerate.
14194 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14195 (try_thread_db_load): Update.
14196
4ee62156
DE
14197 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14198
00f515da
DE
141992009-12-18 Doug Evans <dje@google.com>
14200
e9464885
DE
14201 * event-loop.c: Include unistd.h if it exists.
14202
07d4f67e
DE
14203 * linux-low.c (my_waitpid): Move definition away from being in
14204 between linux_tracefork_child/linux_test_for_tracefork.
14205
00f515da
DE
14206 * gdb_proc_service.h (psaddr_t): Fix type.
14207 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14208 signature to match glibc.
14209
1de1badb
DE
142102009-12-16 Doug Evans <dje@google.com>
14211
14212 * linux-low.c (linux_read_memory): Fix argument to read.
14213
aeeb81d1
PA
142142009-11-26 Pedro Alves <pedro@codesourcery.com>
14215
14216 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14217 events, don't leave current_inferior pointing at null.
14218
10357975
PA
142192009-11-26 Pedro Alves <pedro@codesourcery.com>
14220
14221 * win32-low.c (LOG): Delete.
14222 (OUTMSG): Output to stderr.
14223 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14224 on compile time LOG macro.
14225 (win32_wait): Fix debug output.
14226
cf6e3471
PA
142272009-11-26 Pedro Alves <pedro@codesourcery.com>
14228
14229 * win32-low.c (win32_add_one_solib): If the dll name is
14230 "ntdll.dll", prepend the system directory to the dll path.
14231
0c85e18e
MK
142322009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14233
14234 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14235
9ac544ce 142362009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14237 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14238
14239 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14240 * configure.ac: Check for __mcoldfire__ and set
14241 gdb_cv_m68k_is_coldfire.
14242 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14243 reg-cf.o and reg-m68k.o.
14244 * configure: Regenerated.
14245
fd7dd3e6
PA
142462009-11-16 Pedro Alves <pedro@codesourcery.com>
14247
14248 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14249 Pass it to thread_db_free.
14250 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14251 proper `detaching' argument to linux_remove_process.
14252 * linux-low.h (thread_db_free): Add `detaching' parameter.
14253 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14254 to thread_db_free.
14255 (thread_db_free): Add `detaching' parameter. Only
14256 call td_ta_clear_event if detaching from process.
14257
75aa492e
MK
142582009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14259
14260 * thread-db.c (thread_db_free): Fix typo.
14261
21e1bee4
PP
142622009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14263
14264 PR gdb/10838
14265 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14266
8838b45e
NS
142672009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14268
14269 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14270 with an i686 compiler.
14271 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14272 needed.
14273 * configure: Rebuilt.
14274
8a35fb51
SL
142752009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14276
14277 PR gdb/10783
14278
14279 * server.c (handle_search_memory_1): Correct read_addr initialization
14280 in loop for searching subsequent chunks.
14281
96f15937
PP
142822009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14283
14284 * configure.ac: New --with-libthread-db option.
14285 * thread-db.c: Allow direct dependence on libthread_db.
14286 (thread_db_free): Adjust.
14287 * config.in: Regenerate.
14288 * configure: Likewise.
889bf7c5 14289
5f7d1694
PP
142902009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14291
14292 PR gdb/10757
14293 * thread-db.c (attach_thread): New function.
14294 (maybe_attach_thread): Return success/failure.
14295 (find_new_threads_callback): Adjust.
889bf7c5
PA
14296 (thread_db_find_new_threads): Loop until no new threads.
14297
88e3b899
PA
142982009-10-13 Pedro Alves <pedro@codesourcery.com>
14299
14300 * proc-service.c (ps_lgetregs): Formatting.
14301
cdbfd419
PP
143022009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14303
14304 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14305 * configure.ac: Adjust.
14306 * linux-low.h (struct process_info_private): Move members to struct
14307 thread_db.
14308 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14309 * linux-low.c (linux_remove_process): Adjust.
14310 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14311 * server.c (handle_query): Move code ...
14312 (handle_monitor_command): ... here. New function.
14313 * target.h (struct target_ops): New member.
14314 * thread-db.c (struct thread_db): New.
14315 (libthread_db_search_path): New variable.
14316 (thread_db_create_event, thread_db_enable_reporting)
14317 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14318 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14319 (try_thread_db_load_1, dladdr_to_soname): New functions.
14320 (try_thread_db_load, thread_db_load_search): New functions.
14321 (thread_db_init): Search for libthread_db.
14322 (thread_db_free): New function.
14323 (thread_db_handle_monitor_command): Likewise.
14324 * config.in: Regenerate.
14325 * configure: Regenerate.
889bf7c5 14326
4168d2d6
UW
143272009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14328
14329 * spu-low.c (spu_kill): Wait for inferior to terminate.
14330 Call clear_inferiors.
14331 (spu_detach): Call clear_inferiors.
14332
81ecdfbb
RW
143332009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14334
14335 * aclocal.m4: Regenerate.
14336 * config.in: Likewise.
14337 * configure: Likewise.
14338
0b9ff2c0
UW
143392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14340
14341 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14342 (parse_spufs_run): New function.
14343 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14344 (ppc_breakpoint_at): Handle SPU breakpoints.
14345
efcbbd14
UW
143462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14347
14348 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14349 (SPUFS_MAGIC): Define.
14350 (spu_enumerate_spu_ids): New function.
14351 (linux_qxfer_spu): New function.
14352 (linux_target_ops): Install linux_qxfer_spu.
14353
f4d9bade
UW
143542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14355
14356 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14357 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14358 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14359 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14360 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14361 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14362 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14363 (init_registers_powerpc_cell32l): Add prototype.
14364 (init_registers_powerpc_cell64l): Likewise.
14365 (ppc_arch_setup): Detect Cell/B.E. architecture.
14366
96e946ca
RW
143672009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14368
14369 * Makefile.in (datarootdir): New variable.
14370
58d6951d
DJ
143712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * linux-low.c (linux_write_memory): Update debugging output.
14374 * Makefile.in (clean): Add new descriptions.
14375 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14376 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14377 * configure.srv: Add new files for arm*-*-linux*.
14378 * linux-arm-low.c: Add new declarations.
14379 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14380 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14381 (HWCAP_VFPv3D16): New.
14382 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14383 instead of __IWMMXT__.
14384 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14385 (arm_arch_setup): New.
14386 (target_regsets): Remove #ifdef. Add VFP regset.
14387 (the_low_target): Use arm_arch_setup.
14388
12b42a12
DJ
143892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14390
14391 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14392 the main thread again.
14393
ac8c974e
AR
143942009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14395
14396 Adding Neutrino gdbserver.
14397 * configure: Regenerated.
14398 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14399 * configure.srv (i[34567]86-*-nto*): New target.
14400 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14401 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14402 (nto_comctrl) [__QNX__]: New function.
14403 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14404
4424e0c3 144052009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14406
14407 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14408 srv_tgtobj.
14409
912cf4ba
PA
144102009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14411 Pedro Alves <pedro@codesourcery.com>
14412
14413 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14414 don't support CONTEXT_EXTENDED_REGISTERS.
14415 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14416 (the_low_target): Install them.
14417 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14418 failing with ERROR_PIPE_NOT_CONNECTED.
14419
aa5ca48f
DE
144202009-06-30 Doug Evans <dje@google.com>
14421 Pierre Muller <muller@ics.u-strasbg.fr>
14422
14423 Add h/w watchpoint support to x86-linux, win32-i386.
14424 * Makefile.in (SFILES): Add i386-low.c
14425 (i386_low_h): Define.
14426 (i386-low.o): Add dependencies.
14427 (linux-x86-low.o): Add i386-low.h dependency.
14428 (win32-i386-low.o): Ditto.
14429 * i386-low.c: New file.
14430 * i386-low.h: New file.
14431 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14432 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14433 * linux-low.c (linux_add_process): Initialize arch_private.
14434 (linux_remove_process): Free arch_private.
14435 (add_lwp): Initialize arch_private.
14436 (delete_lwp): Free arch_private.
14437 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14438 provided.
14439 * linux-low.h (process_info_private): New member arch_private.
14440 (lwp_info): New member arch_private.
14441 (linux_target_ops): New members new_process, new_thread,
14442 prepare_to_resume.
14443 (ptid_of): New macro.
14444 * linux-x86-low.c: Include stddef.h, i386-low.h.
14445 (arch_process_info): New struct.
14446 (arch_lwp_info): New struct.
14447 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14448 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14449 (i386_dr_low_get_status): New function.
14450 (x86_insert_point, x86_remove_point): New functions.
14451 (x86_stopped_by_watchpoint): New function.
14452 (x86_stopped_data_address): New function.
14453 (x86_linux_new_process, x86_linux_new_thread): New functions.
14454 (x86_linux_prepare_to_resume): New function.
14455 (the_low_target): Add entries for insert_point, remove_point,
14456 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14457 prepare_to_resume.
14458 * server.c (debug_hw_points): New global.
14459 (monitor_show_help): Document set debug-hw-points.
14460 (handle_query): Process "set debug-hw-points".
14461 * server.h (debug_hw_points): Declare.
14462 (paddress): Declare.
14463 * utils.c (NUMCELLS, CELLSIZE): New macros.
14464 (get_sell, xsnprintf, paddress): New functions.
14465 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14466 remove_point, stopped_by_watchpoint, stopped_data_address.
14467 * win32-i386-low.c: Include i386-low.h.
14468 (debug_reg_state): Replaces dr.
14469 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14470 (i386_dr_low_get_status): New function.
14471 (i386_insert_point, i386_remove_point): New functions.
14472 (i386_stopped_by_watchpoint): New function.
14473 (i386_stopped_data_address): New function.
14474 (i386_initial_stuff): Update.
14475 (get_thread_context,set_thread_context,i386_thread_added): Update.
14476 (the_low_target): Add entries for insert_point,
14477 remove_point, stopped_by_watchpoint, stopped_data_address.
14478 * win32-low.c (win32_insert_watchpoint): New function.
14479 (win32_remove_watchpoint): New function.
14480 (win32_stopped_by_watchpoint): New function.
14481 (win32_stopped_data_address): New function.
14482 (win32_target_ops): Add entries for insert_watchpoint,
14483 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14484 * win32-low.h (win32_target_ops): New members insert_point,
14485 remove_point, stopped_by_watchpoint, stopped_data_address.
14486
d993e290
PA
144872009-06-25 Pedro Alves <pedro@codesourcery.com>
14488
14489 * server.c (process_serial_event): Re-return unsupported, not
14490 error, if the type isn't recognized. Re-allow supporting only
14491 insert or remove packets. Also call require_running for
14492 breakpoints. Add missing break statement to default case. Tidy.
14493 * target.h (struct target_ops): Rename insert_watchpoint to
14494 insert_point, and remove_watchpoint to remove_point.
14495
14496 * linux-low.h (struct linux_target_ops): Likewise.
14497 * linux-low.c (linux_insert_watchpoint): Rename to ...
14498 (linux_insert_point): ... this. Adjust.
14499 (linux_remove_watchpoint): Rename to ...
14500 (linux_remove_point): ... this. Adjust.
14501 (linux_target_ops): Adjust.
14502 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14503 (cris_insert_point): ... this.
14504 (cris_remove_watchpoint): Rename to ...
14505 (cris_remove_point): ... this.
14506 (the_low_target): Adjust.
14507
0f54c268
PM
145082009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14509
14510 * server.c (handle_v_kill): Pass signal_pid to
14511 kill_inferior if multi_process is zero.
14512
c6314022
AR
145132009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14514
14515 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14516 * target.h (target_ops): Comment for *_watchpoint to make it clear
14517 the functions can get types '0' and '1'.
14518
4463ce24
AR
145192009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14520
14521 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14522 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14523 * regcache.c (get_regcache): Likewise.
14524 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14525 * win32-low.c (child_fetch_inferior_registers): Remove check for
14526 regno 0.
14527
cf8fd78b
PA
145282009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14529 Pedro Alves <pedro@codesourcery.com>
14530
14531 * target.h (struct target_ops) <supports_multi_process>: New
14532 callback.
14533 (target_supports_multi_process): New.
14534 * server.c (handle_query): Even if GDB reports support, only
14535 enable multi-process if the target also supports it. Report
14536 multi-process support only if the target backend supports it.
14537 * linux-low.c (linux_supports_multi_process): New function.
14538 (linux_target_ops): Install it as target_supports_multi_process
14539 callback.
14540
47c0c975
DE
145412009-05-24 Doug Evans <dje@google.com>
14542
e09875d4
DE
14543 Global renaming of find_thread_pid to find_thread_ptid.
14544 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14545 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14546 All callers updated.
14547
e27d73f6
DE
14548 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14549 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14550 directly.
14551
47c0c975
DE
14552 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14553 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14554 (linux_resume_one_lwp): Ditto.
14555
2acc282a
DE
145562009-05-23 Doug Evans <dje@google.com>
14557
14558 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14559 from struct inferior_list_entry * to struct lwp_info *.
14560 All callers updated.
14561
9f1036c1
DE
145622009-05-13 Doug Evans <dje@google.com>
14563
14564 * linux-x86-low.c: Don't include assert.h.
14565 (x86_siginfo_fixup): Use fatal, not assert.
14566 (x86_arch_setup): Fix comment.
14567
d0722149
DE
145682009-05-12 Doug Evans <dje@google.com>
14569
14570 Biarch support for i386/amd64 gdbserver.
14571 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14572 Add linux-x86-low.c.
14573 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14574 (linux-x86-low.o): Add.
14575 * linux-x86-64-low.c: Delete.
14576 * linux-i386-low.c: Delete.
14577 * linux-x86-low.c: New file.
14578 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14579 linux-x86-low.o.
14580 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14581 linux-x86-low.o.
14582 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14583 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14584 (linux_child_pid_to_exec_file): New function.
14585 (elf_64_header_p, elf_64_file_p): New functions.
14586 (siginfo_fixup): New function.
14587 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14588 give target a chance to convert layout.
14589 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14590 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14591
fdeb2a12
DE
145922009-05-07 Doug Evans <dje@google.com>
14593
14594 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14595 (regsets_store_inferior_registers): Ditto.
14596
a6dbe5df
PA
145972009-05-06 Pedro Alves <pedro@codesourcery.com>
14598
14599 PR server/10048
14600
14601 * linux-low.c (must_set_ptrace_flags): Delete.
14602 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14603 of the global.
14604 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14605 `lwp->must_set_ptrace_flags' instead.
ba42693b 14606 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14607 (linux_wait_1): ... not here.
14608
5091eb23
DE
146092009-04-30 Doug Evans <dje@google.com>
14610
9f767825
DE
14611 * inferiors.c (started_inferior_callback): New function.
14612 (attached_inferior_callback): New function.
14613 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14614 * server.c (print_started_pid, print_attached_pid): New functions.
14615 (detach_or_kill_for_exit): New function.
14616 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14617 * server.h (have_started_inferiors_p): Declare.
14618 (have_attached_inferiors_p): Declare.
14619
5091eb23
DE
14620 * inferiors.c (remove_process): Fix memory leak, free process.
14621 * linux-low.c (linux_remove_process): New function.
14622 (linux_kill): Call it instead of remove_process.
14623 (linux_detach, linux_wait_1): Ditto.
14624
155c8968
PA
146252009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14626
14627 * configure.srv: Add x86 Windows CE target.
14628
7fe519cb
UW
146292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14630
14631 * inferiors.c (get_thread_process): Make global.
14632 * server.h (get_thread_process): Add prototype.
14633 * thread-db.c (find_one_thread): Use get_thread_process
14634 instead of current_process.
14635 (thread_db_get_tls_address): Do not crash if called when
14636 thread layer is not yet initialized.
14637
5472f405
UW
146382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14639
14640 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14641 * spu-low.c (current_tid): Rename to ...
14642 (current_ptid): ... this.
14643 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14644 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14645 ptid_get_lwp (current_ptid) instead of current_tid.
14646 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14647 instead of current_tid. Use find_process_pid to verify pid
14648 argument is valid. Pass proper argument to remove_process.
14649 (spu_thread_alive): Compare current_ptid instead of current_tid.
14650 (spu_resume): Likewise.
14651
55ac2b99
PA
146522009-04-02 Pedro Alves <pedro@codesourcery.com>
14653
14654 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14655 variable.
14656
95954743
PA
146572009-04-01 Pedro Alves <pedro@codesourcery.com>
14658
14659 Implement the multiprocess extensions, and add linux multiprocess
14660 support.
14661
14662 * server.h (ULONGEST): Declare.
14663 (struct ptid, ptid_t): New.
14664 (minus_one_ptid, null_ptid): Declare.
14665 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14666 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14667 (struct inferior_list_entry): Change `id' type from unsigned from
14668 to ptid_t.
14669 (struct sym_cache, struct breakpoint, struct
14670 process_info_private): Forward declare.
14671 (struct process_info): Declare.
14672 (current_process): Declare.
14673 (all_processes): Declare.
14674 (initialize_inferiors): Declare.
14675 (add_thread): Adjust to use ptid_t.
14676 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14677 (add_process, remove_process, find_thread_pid): Declare.
14678 (find_inferior_id): Adjust to use ptid_t.
14679 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14680 (multi_process): Declare.
14681 (push_event): Adjust to use ptid_t.
14682 (read_ptid, write_ptid): Declare.
14683 (prepare_resume_reply): Adjust to use ptid_t.
14684 (clear_symbol_cache): Declare.
14685 * inferiors.c (all_processes): New.
14686 (null_ptid, minus_one_ptid): New.
14687 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14688 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14689 (add_thread): Change unsigned long to ptid. Remove gdb_id
14690 parameter. Adjust.
14691 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14692 (gdb_id_to_thread): Rename to ...
14693 (find_thread_pid): ... this. Change unsigned long to ptid.
14694 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14695 (loaded_dll, pull_pid_from_list): Adjust.
14696 (add_process, remove_process, find_process_pid)
14697 (get_thread_process, current_process, initialize_inferiors): New.
14698 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14699 (struct target_waitstatus) <related_pid>: Ditto.
14700 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14701 return type to int.
14702 (struct target_ops) <join>: Add `pid' argument.
14703 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14704 (struct target_ops) <wait>: Add `ptid' field. Change return type
14705 to ptid.
14706 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14707 (mywait): Add `ptid' argument. Change return type to ptid_t.
14708 (target_pid_to_str): Declare.
14709 * target.c (set_desired_inferior): Adjust to use ptids.
14710 (mywait): Add new `ptid' argument. Adjust.
14711 (target_pid_to_str): New.
14712 * mem-break.h (free_all_breakpoints): Declare.
14713 * mem-break.c (breakpoints): Delelete.
14714 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14715 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14716 to use per-process breakpoint list.
14717 (free_all_breakpoints): New.
14718 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14719 (symbol_cache, all_symbols_looked_up): Delete.
14720 (hexchars): New.
14721 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14722 read_ptid): New.
14723 (prepare_resume_reply): Change ptid argument's type from unsigned
14724 long to ptid_t. Adjust. Implement W;process and X;process.
14725 (free_sym_cache, clear_symbol_cache): New.
14726 (look_up_one_symbol): Adjust to per-process symbol cache. *
14727 * server.c (cont_thread, general_thread, step_thread): Change type
14728 to ptid_t.
14729 (attached): Delete.
14730 (multi_process): New.
14731 (last_ptid): Change type to ptid_t.
14732 (struct vstop_notif) <ptid>: Change type to ptid_t.
14733 (queue_stop_reply, push_event): Change `ptid' argument's type to
14734 ptid_t.
14735 (discard_queued_stop_replies): Add `pid' argument.
14736 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14737 changes. Don't reference the `attached' global.
14738 (attach_inferior): Adjust to mywait interface changes.
14739 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14740 features. Handle and report "multiprocess+". Handle
14741 "qAttached:PID".
14742 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14743 changes.
14744 (handle_v_kill): New.
14745 (handle_v_stopped): Adjust to use target_pid_to_str.
14746 (handle_v_requests): Allow multiple attaches and runs when
14747 multiprocess extensions are in effect. Handle "vKill".
14748 (myresume): Adjust to use ptids.
14749 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14750 (handle_status): Adjust to discard_queued_stop_replies interface
14751 change.
14752 (first_thread_of, kill_inferior_callback)
14753 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14754 (main): Call initialize_inferiors. Adjust to use ptids, killing
14755 and detaching from all inferiors. Handle multiprocess packet
14756 variants.
14757 * linux-low.h: Include gdb_proc_service.h.
14758 (struct process_info_private): New.
14759 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14760 <lwpid_of>: Use ptid_get_lwp.
14761 (get_lwp_thread): Adjust.
14762 (struct lwp_info): Add `dead' member.
14763 (find_lwp_pid): Declare.
14764 * linux-low.c (thread_db_active): Delete.
14765 (new_inferior): Adjust comment.
14766 (inferior_pid): Delete.
14767 (linux_add_process): New.
14768 (handle_extended_wait): Adjust.
14769 (add_lwp): Change unsigned long to ptid.
14770 (linux_create_inferior): Add process to processes table. Adjust
14771 to use ptids. Don't set new_inferior here.
14772 (linux_attach_lwp): Rename to ...
14773 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14774 it. Adjust to use ptids.
14775 (linux_attach_lwp): New.
14776 (linux_attach): Add process to processes table. Don't set
14777 new_inferior here.
14778 (struct counter): New.
14779 (second_thread_of_pid_p, last_thread_of_process_p): New.
14780 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14781 multiple processes.
14782 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14783 processes. Remove process from process table.
14784 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14785 to multiple processes.
14786 (any_thread_of): New.
14787 (linux_detach): Add `pid' argument, and handle it. Remove process
14788 from processes table.
14789 (linux_join): Add `pid' argument. Handle it.
14790 (linux_thread_alive): Change unsighed long argument to ptid_t.
14791 Consider dead lwps as not being alive.
14792 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14793 threads we're not interested in.
14794 (same_lwp, find_lwp_pid): New.
14795 (linux_wait_for_lwp): Change `pid' argument's type from int to
14796 ptid_t. Adjust.
14797 (linux_wait_for_event): Rename to ...
14798 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14799 from int to ptid_t. Adjust.
14800 (linux_wait_for_event): New.
14801 (linux_wait_1): Add `ptid' argument. Change return type to
14802 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14803 that exit from the process table.
14804 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14805 Adjust.
14806 (mark_lwp_dead): New.
14807 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14808 stopping all threads, mark its main lwp as dead.
14809 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14810 ptids.
14811 (fetch_register, usr_store_inferior_registers)
14812 (regsets_fetch_inferior_registers)
14813 (regsets_store_inferior_registers, linux_read_memory)
14814 (linux_write_memory): Inline `inferior_pid'.
14815 (linux_look_up_symbols): Adjust to use per-process
14816 `thread_db_active'.
14817 (linux_request_interrupt): Adjust to use ptids.
14818 (linux_read_auxv): Inline `inferior_pid'.
14819 (initialize_low): Don't reference thread_db_active.
14820 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14821 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14822 (ps_getpid): Return the pid of the current inferior.
14823 * thread-db.c (proc_handle, thread_agent): Delete.
14824 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14825 per-process data.
14826 (find_one_thread): Change argument type to ptid_t. Adjust to
14827 per-process data.
14828 (maybe_attach_thread): Adjust to per-process data and ptids.
14829 (thread_db_find_new_threads): Ditto.
14830 (thread_db_init): Ditto.
14831 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14832 processes table. Adjust to use ptids.
14833 (spu_kill, spu_detach): Adjust interface. Remove process from
14834 processes table.
14835 (spu_join, spu_thread_alive): Adjust interface.
14836 (spu_wait): Adjust interface. Remove process from processes
14837 table. Adjust to use ptids.
14838 * win32-low.c (current_inferior_tid): Delete.
14839 (current_inferior_ptid): New.
14840 (debug_event_ptid): New.
14841 (thread_rec): Take a ptid. Adjust.
14842 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14843 (child_delete_thread): Ditto.
14844 (do_initial_child_stuff): Add `attached' argument. Add process to
14845 processes table.
14846 (child_fetch_inferior_registers, child_store_inferior_registers):
14847 Adjust.
14848 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14849 (win32_attach): Pass 1 to do_initial_child_stuff.
14850 (win32_kill): Adjust interface. Remove process from processes
14851 table.
14852 (win32_detach): Ditto.
14853 (win32_join): Adjust interface.
14854 (win32_thread_alive): Take a ptid.
14855 (win32_resume): Adjust to use ptids.
14856 (get_child_debug_event): Ditto.
14857 (win32_wait): Adjust interface. Remove exiting process from
14858 processes table.
14859
bd99dc85
PA
148602009-04-01 Pedro Alves <pedro@codesourcery.com>
14861
14862 Non-stop mode support.
14863
14864 * server.h (non_stop): Declare.
14865 (gdb_client_data, handler_func): Declare.
14866 (delete_file_handler, add_file_handler, start_event_loop):
14867 Declare.
14868 (handle_serial_event, handle_target_event, push_event)
14869 (putpkt_notif): Declare.
14870 * target.h (enum resume_kind): New.
14871 (struct thread_resume): Replace `step' field by `kind' field.
14872 (TARGET_WNOHANG): Define.
14873 (struct target_ops) <wait>: Add `options' argument.
14874 <supports_non_stop, async, start_non_stop>: New fields.
14875 (target_supports_non_stop, target_async): New.
14876 (start_non_stop): Declare.
14877 (mywait): Add `options' argument.
14878 * target.c (mywait): Add `options' argument. Print child exit
14879 notifications here.
14880 (start_non_stop): New.
14881 * server.c (non_stop, own_buf, mem_buf): New globals.
14882 (struct vstop_notif): New.
14883 (notif_queue): New global.
14884 (queue_stop_reply, push_event, discard_queued_stop_replies)
14885 (send_next_stop_reply): New.
14886 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14887 interface changes.
14888 (attach_inferior): In non-stop mode, don't wait for the target
14889 here.
14890 (handle_general_set): Handle QNonStop.
14891 (handle_query): When handling qC, return the current general
14892 thread, instead of the first thread of the list.
14893 (handle_query): If the backend supports non-stop mode, include
14894 QNonStop+ in the qSupported query response.
14895 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14896 and non-stop mode.
14897 (handle_v_attach, handle_v_run): Handle non-stop mode.
14898 (handle_v_stopped): New.
14899 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14900 (myresume): Adjust to use resume_kind. Handle non-stop.
14901 (queue_stop_reply_callback): New.
14902 (handle_status): Handle non-stop mode.
14903 (main): Clear non_stop flag on reconnection. Use the event-loop.
14904 Refactor serial protocol handling from here ...
14905 (process_serial_event): ... to this new function. When GDB
14906 selects any thread, select one here. In non-stop mode, wait until
14907 GDB acks all pending events before exiting.
14908 (handle_serial_event, handle_target_event): New.
14909 * remote-utils.c (remote_open): Install remote_desc in the event
14910 loop.
14911 (remote_close): Remove remote_desc from the event loop.
14912 (putpkt_binary): Rename to...
14913 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14914 (putpkt_binary): New as wrapper around putpkt_binary_1.
14915 (putpkt_notif): New.
14916 (prepare_resume_reply): In non-stop mode, don't change the
14917 general_thread.
14918 * event-loop.c: New.
14919 * Makefile.in (OBJ): Add event-loop.o.
14920 (event-loop.o): New rule.
14921
14922 * linux-low.h (pid_of): Moved here.
14923 (lwpid_of): New.
14924 (get_lwp_thread): Use lwpid_of.
14925 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14926 * linux-low.c (pid_of): Delete.
14927 (inferior_pid): Use lwpid_of.
14928 (linux_event_pipe): New.
14929 (target_is_async_p): New.
14930 (delete_lwp): New.
14931 (handle_extended_wait): Use lwpid_of.
14932 (add_lwp): Don't set lwpid field.
14933 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14934 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14935 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14936 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14937 first. Adjust to linux_wait_for_event interface changes. Use
14938 lwpid_of.
14939 (linux_detach): Don't delete the main lwp here.
14940 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14941 (status_pending_p): Don't consider explicitly suspended lwps.
14942 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14943 pointer. Add OPTIONS argument. Change return type to int. Use
14944 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14945 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14946 pointer. Add status pointer argument. Return a pid instead of a
14947 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14948 changes. In non-stop mode, don't switch to a random thread.
14949 (linux_wait): Rename to...
14950 (linux_wait_1): ... this. Add target_options argument, and handle
14951 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14952 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14953 clean exit and signal exit code. Don't stop all threads in
14954 non-stop mode. In all-stop mode, only stop all threads when
14955 reporting a stop to GDB. Handle explicit thread stop requests.
14956 (async_file_flush, async_file_mark): New.
14957 (linux_wait): New.
14958 (send_sigstop): Use lwpid_of.
14959 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14960 interface changes. In non-stop mode, don't switch to a random
14961 thread.
14962 (linux_resume_one_lwp): Use lwpid_of.
14963 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14964 (linux_resume_one_thread): ... this. Handle resume_stop. In
14965 non-stop mode, don't look for pending flag in all threads.
14966 (resume_status_pending_p): Don't consider explicitly suspended
14967 threads.
14968 (my_waitpid): Reimplement. Emulate __WALL.
14969 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14970 Use lwpid_of.
14971 (sigchld_handler, linux_supports_non_stop, linux_async)
14972 (linux_start_non_stop): New.
14973 (linux_target_ops): Register linux_supports_non_stop, linux_async
14974 and linux_start_non_stop.
14975 (initialize_low): Install SIGCHLD handler.
14976 * thread-db.c (thread_db_create_event, find_one_thread)
14977 (thread_db_get_tls_address): Use lwpid_of.
14978 * win32-low.c (win32_detach): Adjust to use resume_kind.
14979 (win32_wait): Add `options' argument.
14980 * spu-low.c (spu_resume): Adjust to use resume_kind.
14981 (spu_wait): Add `options' argument.
14982
5b1c542e
PA
149832009-04-01 Pedro Alves <pedro@codesourcery.com>
14984
14985 Decouple target code from remote protocol.
14986
14987 * target.h (enum target_waitkind): New.
14988 (struct target_waitstatus): New.
14989 (struct target_ops) <wait>: Return an unsigned long. Take a
14990 target_waitstatus pointer instead of a char pointer.
14991 (mywait): Likewise.
14992 * target.c (mywait): Change prototype to return an unsigned long.
14993 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14994 * server.h (thread_from_wait, old_thread_from_wait): Delete
14995 declarations.
14996 (prepare_resume_reply): Change prototype to take a
14997 target_waitstatus.
14998 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14999 (last_status, last_ptid): New.
15000 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15001 pid instead of a signal.
15002 (attach_inferior): Remove "status" and "signal" parameters.
15003 Adjust.
15004 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15005 not as an address.
15006 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15007 (handle_v_requests, myresume): Remove "status" and "signal"
15008 parameters. Adjust.
15009 (handle_status): New.
15010 (main): Delete local `status'. Adjust.
15011 * remote-utils.c: Include target.h.
15012 (prepare_resume_reply): Change prototype to take a
15013 target_waitstatus. Adjust.
15014
15015 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15016 interface.
15017 * spu-low.c (spu_wait): Adjust.
15018 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15019 Delete.
15020 (win32_wait): Adjust.
15021
2bd7c093
PA
150222009-04-01 Pedro Alves <pedro@codesourcery.com>
15023
15024 * target.h (struct thread_resume): Delete leave_stopped member.
15025 (struct target_ops): Add a `n' argument to the `resume' callback.
15026 * server.c (start_inferior): Adjust.
15027 (handle_v_cont, myresume): Adjust.
15028 * linux-low.c (check_removed_breakpoint): Adjust to resume
15029 interface change, and to removed leave_stopped field.
15030 (resume_ptr): Delete.
15031 (struct thread_resume_array): New.
15032 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15033 resume interface change.
15034 (linux_continue_one_thread, linux_queue_one_thread)
15035 (resume_status_pending_p): Check if the resume field is NULL
15036 instead of checking the leave_stopped member.
15037 (linux_resume): Adjust to the target resume interface change.
15038 * spu-low.c (spu_resume): Adjust to the target resume interface
15039 change.
15040 * win32-low.c (win32_detach, win32_resume): Ditto.
15041
c35fafde
PA
150422009-04-01 Pedro Alves <pedro@codesourcery.com>
15043
15044 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15045 flag.
15046 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15047 pending.
15048 (linux_continue_one_thread): Only preserve the stepping flag if
15049 there's a pending breakpoint.
15050
0a59d50b
PA
150512009-03-31 Pedro Alves <pedro@codesourcery.com>
15052
15053 * server.c (main): After the inferior having exited, call
15054 remote_close before exiting gdbserver.
15055
f04c6d38
TJB
150562009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15057
15058 Fix size of FPSCR in Power 7 processors.
15059 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15060 (PPC_FEATURE_HAS_DFP): New #define.
15061 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15062 size of the FPSCR.
15063
78e5cee6
PA
150642009-03-23 Pedro Alves <pedro@codesourcery.com>
15065
15066 * server.c (handle_query) Whitespace and formatting.
15067
1b3f6016
PA
150682009-03-22 Pedro Alves <pedro@codesourcery.com>
15069
15070 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15071 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15072 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15073 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15074 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15075 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15076 Makefile.in, configure.ac: Fix whitespace throughout.
15077 * configure: Regenerate.
15078
a07b2135
PA
150792009-03-22 Pedro Alves <pedro@codesourcery.com>
15080
15081 * inferiors.c (find_inferior): Make it safe for the callback
15082 function to delete the currently iterated inferior.
15083
67cc2626
PA
150842009-03-22 Pedro Alves <pedro@codesourcery.com>
15085
15086 * Makefile.in (linuw_low_h): Move higher.
15087 (thread-db.o): Depend on $(linux_low_h).
15088
54a0b537
PA
150892009-03-17 Pedro Alves <pedro@codesourcery.com>
15090
15091 Rename "process" to "lwp" throughout.
15092
15093 * linux-low.c (all_processes): Rename to...
15094 (all_lwps): ... this.
15095 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15096 (add_process): Rename to ...
15097 (add_lwp): ... this. Adjust.
15098 (linux_create_inferior): Adjust.
15099 (linux_attach_lwp): Adjust.
15100 (linux_attach): Adjust.
15101 (linux_kill_one_process): Rename to ...
15102 (linux_kill_one_lwp): ... this. Adjust.
15103 (linux_kill): Adjust.
15104 (linux_detach_one_process): Rename to ...
15105 (linux_detach_one_lwp): ... this. Adjust.
15106 (linux_detach): Adjust.
15107 (check_removed_breakpoint): Adjust.
15108 (status_pending_p): Adjust.
15109 (linux_wait_for_process): Rename to ...
15110 (linux_wait_for_lwp): ... this. Adjust.
15111 (linux_wait_for_event): Adjust.
15112 (send_sigstop): Adjust.
15113 (wait_for_sigstop): Adjust.
15114 (stop_all_processes): Rename to ...
15115 (stop_all_lwps): ... this.
15116 (linux_resume_one_process): Rename to ...
15117 (linux_resume_one_lwp): ... this. Adjust.
15118 (linux_set_resume_request, linux_continue_one_thread)
15119 (linux_queue_one_thread, resume_status_pending_p)
15120 (usr_store_inferior_registers, regsets_store_inferior_registers)
15121 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15122 Adjust.
15123 * linux-low.h (get_process): Rename to ...
15124 (get_lwp): ... this. Adjust.
15125 (get_thread_process): Rename to ...
15126 (get_thread_lwp): ... this. Adjust.
15127 (get_process_thread): Rename to ...
15128 (get_lwp_thread): ... this. Adjust.
15129 (struct process_info): Rename to ...
15130 (struct lwp_info): ... this.
15131 (all_processes): Rename to ...
15132 (all_lwps): ... this.
15133 * proc-service.c (ps_lgetregs): Adjust.
15134 * thread-db.c (thread_db_create_event, find_one_thread)
15135 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15136
0b16c5cf
PA
151372009-03-14 Pedro Alves <pedro@codesourcery.com>
15138
15139 * server.c (handle_query): Handle "qAttached".
15140
32de4b9d
NS
151412009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15142
15143 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15144 GPLv3, update license URL.
15145
2aecd87f
DE
151462009-03-01 Doug Evans <dje@google.com>
15147
93efd302 15148 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15149 (server_h): Add gdb_signals.h.
15150 (signals.o): Update.
15151 * server.h (target_signal_from_host,target_signal_to_host_p)
15152 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15153
86b1f9c5
PM
151542009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15155
15156 * remote-utils.c (getpkt): Also generate remote-debug
15157 information if noack_mode is set.
15158
4aa995e1
PA
151592009-02-06 Pedro Alves <pedro@codesourcery.com>
15160
15161 * server.c (handle_query): Report qXfer:siginfo:read and
15162 qXfer:siginfo:write as supported and handle them.
15163 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15164 * linux-low.c (linux_xfer_siginfo): New.
15165 (linux_target_ops): Set it.
15166
62709adf
PA
151672009-01-26 Pedro Alves <pedro@codesourcery.com>
15168
15169 * server.c (gdbserver_usage): Mention --remote-debug.
15170 (main): Accept '--remote-debug' switch.
15171
aef93bd7
DE
151722009-01-18 Doug Evans <dje@google.com>
15173
15174 * regcache.c (new_register_cache): No need to check result of xcalloc.
15175 * server.c (handle_search_memory): Back out calls to xmalloc,
15176 result is checked and error is returned to user upon failure.
15177 (handle_query): Ditto. Add more checks for result of malloc.
15178 (handle_v_cont): Check result of malloc, report error back to
15179 user upon failure.
15180 (handle_v_run): Ditto. Call freeargv.
15181 * server.h (freeargv): Declare.
15182 * utils.c (freeargv): New fn.
15183
54363045
DE
151842009-01-15 Doug Evans <dje@google.com>
15185
f626972c
DE
15186 * gdbreplay.c (perror_with_name): Make arg const char *.
15187 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15188 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15189 * utils.c (perror_with_name): Make arg const char *.
54363045 15190
18aae699
PA
151912009-01-14 Pedro Alves <pedro@codesourcery.com>
15192
15193 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15194 when handling a EXIT_PROCESS_DEBUG_EVENT.
15195
ff703abe
JB
151962009-01-06 Joel Brobecker <brobecker@adacore.com>
15197
15198 * gdbreplay.c (gdbreplay_version): Update copyright year.
15199 * server.c (gdbserver_version): Likewise.
15200
f21cc1a2 152012009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15202
15203 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15204 (handle_extended_wait): Improve comment.
0e21c1ec 15205
bca929d3
DE
152062008-12-13 Doug Evans <dje@google.com>
15207
15208 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15209 * server.h (ATTR_MALLOC): New macro.
15210 (xmalloc,xcalloc,xstrdup): Declare.
15211 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15212 * inferiors.c: Ditto.
15213 * linux-low.c: Ditto.
15214 * mem-break.c: Ditto.
15215 * regcache.c: Ditto.
15216 * remote-utils.c: Ditto.
15217 * server.c: Ditto.
15218 * target.c: Ditto.
15219 * win32-low.c: Ditto.
15220
97438e3f
DE
152212008-12-12 Doug Evans <dje@google.com>
15222
896c7fbb
DE
15223 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15224 in debugging printf.
15225
97438e3f
DE
15226 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15227
e3b886f8
DE
152282008-12-09 Doug Evans <dje@google.com>
15229
15230 * linux-low.h (struct process_info): Delete member tid, unused.
15231 * thread-db.c (find_one_thread): Update.
15232 (maybe_attach_thread): Update.
15233
07e059b5
VP
152342008-12-02 Pedro Alves <pedro@codesourcery.com>
15235
889bf7c5
PA
15236 * target.h (struct target_ops): Add qxfer_osdata member.
15237 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15238 and dirent.h.
15239 (linux_qxfer_osdata): New functions.
15240 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15241 callback.
15242 * server.c (handle_query): Handle "qXfer:osdata:read:".
15243 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15244 (buffer_xml_printf): New functions.
15245 * server.h (struct buffer): New.
15246 (buffer_grow_str, buffer_grow_str0): New macros.
15247 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15248 (buffer_xml_printf): Declare.
07e059b5 15249
4cab47ab
DE
152502008-11-24 Doug Evans <dje@google.com>
15251
15252 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15253
f142445f
DJ
152542008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15255
15256 * server.c (handle_v_run): Always use the supplied argument list.
15257
d0107bb6 152582008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15259
d0107bb6
BW
15260 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15261 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15262
2c4ad781
TJB
152632008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15264
15265 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15266 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15267 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15268 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15269 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15270 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15271 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15272 XML target descriptions.
15273 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15274 when inferior is running on an ISA 2.05 or later processor. Add
15275 special case to return offset for full 64-bit slot of FPSCR when
15276 in 32-bits.
15277
dfb64f85
DJ
152782008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15279
15280 * Makefile.in (SFILES, clean): Added sparc64 files.
15281 (reg-sparc64.o, reg-sparc64.c): New.
15282 * configure.srv (sparc*-*-linux*): New configuration.
15283 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15284 syscall arguments for SPARC.
15285 (regsets_store_inferior_registers): Likewise.
15286 * linux-sparc-low.c: New file.
15287
66b6e1dd
DE
152882008-10-21 Doug Evans <dje@google.com>
15289
15290 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15291 (READLINE_DIR,READLINE_DEP): Delete.
15292 (INTERNAL_CFLAGS): Update.
15293 (LINTFLAGS): Update.
15294
9b710a42
PA
152952008-10-10 Pedro Alves <pedro@codesourcery.com>
15296
15297 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15298 whole argv from the last run, not just argv[0].
15299
5822d809
PA
153002008-09-08 Pedro Alves <pedro@codesourcery.com>
15301
15302 * regcache.c (new_register_cache): Return NULL if the register
15303 cache size isn't known yet.
15304 (free_register_cache): Avoid dereferencing a NULL regcache.
15305
74aac56f
DJ
153062008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15307
15308 * configure.srv: Merge MIPS and MIPS64.
15309
400b20f5
MR
153102008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15311
15312 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15313
677c5bb1
LM
153142008-08-18 Luis Machado <luisgpm@br.ibm.com>
15315
15316 * Makefile.in: Add required vsx dependencies.
15317
15318 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15319 Declare init_registers_powerpc_vsx32l.
15320 Declare init_registers_powerpc_vsx64l.
15321 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15322 (ppc_arch_setup): Check for VSX in hwcap.
15323 (ppc_fill_vsxregset): New function.
15324 (ppc_store_vsxregset): New function.
15325 Add new VSX entry in regset_info target_regsets.
15326
15327 * configure.srv: Add new VSX dependencies.
15328
a6f3e723
SL
153292008-08-12 Pedro Alves <pedro@codesourcery.com>
15330
15331 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15332 (remote_open): Set or clear transport_is_reliable.
15333 (putpkt_binary): Don't expect acks in noack mode.
15334 (getpkt): Don't send ack/nac in noack mode.
15335 * server.c (handle_general_set): Handle QStartNoAckMode.
15336 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15337 qSupported.
15338 (main): Reset noack_mode on every connection.
15339 * server.h (noack_mode): Declare.
15340
a417dc56
RW
153412008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15342
15343 * Makefile.in (GDBREPLAY_OBS): New variable.
15344 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15345
3221518c
UW
153462008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15347 Daniel Jacobowitz <dan@codesourcery.com>
15348
15349 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15350 (usr_store_inferior_registers): Likewise.
15351 (regsets_store_inferior_registers): Likewise.
15352
ec56be1b
PA
153532008-07-31 Rolf Jansen <rj@surtec.com>
15354 Pedro Alves <pedro@codesourcery.com>
15355
15356 * configure.ac: Check for memmem declaration.
15357 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15358 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15359 (disable_packet_qfThreadInfo): Unconditionally compile.
15360 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15361 * configure, config.in: Regenerate.
15362
2fe5e3ff
DE
153632008-07-28 Doug Kwan <dougkwan@google.com>
15364
15365 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15366 (linux_write_memory): Remove declaration of errno.
15367
836acd6d
UW
153682008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15369
15370 * linux-low.c (handle_extended_wait): Do not use "status"
15371 variable uninitialized.
15372
aeba519e
PA
153732008-07-07 Pedro Alves <pedro@codesourcery.com>
15374
15375 * server.c (handle_v_attach): Inhibit reporting dll changes.
15376
db42f210
PA
153772008-06-27 Pedro Alves <pedro@codesourcery.com>
15378
15379 * remote-utils.c (prepare_resume_reply): If requested, don't
15380 output "thread:TID" in the T stop reply.
15381
15382 * server.c (disable_packet_vCont, disable_packet_Tthread)
15383 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15384 (handle_query): If requested, disable support for qC, qfThreadInfo
15385 and qsThreadInfo.
15386 (handle_v_requests): If requested, disable support for vCont.
15387 (gdbserver_show_disableable): New.
15388 (main): Handle --disable-packet and --disable-packet=LIST.
15389
15390 * server.h (disable_packet_vCont, disable_packet_Tthread)
15391 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15392
8e4c5421
CD
153932008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15394
15395 * server.c (gdbserver_usage): Mention --version.
15396
6e23a804
DJ
153972008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15398
15399 * Makefile.in (gdbreplay.o): New rule.
15400
90aa6a40
JM
154012008-06-06 Joseph Myers <joseph@codesourcery.com>
15402
15403 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15404 message, not gdbserver.
15405
c16158bc 154062008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15407 Nathan Sidwell <nathan@codesourcery.com>
15408 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15409
15410 * acinclude.m4: Include ../../config/acx.m4.
15411 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15412 * configure, config.in: Regenerate.
15413 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15414 * server.c (gdbserver_version): Print PKGVERSION.
15415 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15416 (main): Adjust gdbserver_usage calls.
15417 * gdbreplay.c (version, host_name): Add declarations.
15418 (gdbreplay_version, gdbreplay_usage): New.
15419 (main): Accept --version and --help options.
15420
aeb75bf5
DJ
154212008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15422
15423 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15424 (arm_breakpoint_at): Handle Thumb.
15425 (the_low_target): Add comment.
15426
76b233dd
UW
154272008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15428
15429 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15430
08388c79
DE
154312008-05-09 Doug Evans <dje@google.com>
15432
a3c83fae
DE
15433 * server.h (decode_search_memory_packet): Declare.
15434 * remote-utils.c (decode_search_memory_packet): New fn.
15435 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15436 (handle_search_memory): New fn.
15437 (handle_query): Process qSearch:memory packets.
15438
bb9c3d36
UW
154392008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15440
15441 * regcache.c (registers_length): Remove.
15442 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15443 full register packet.
15444 * regcache.h (registers_length): Remove prototype.
15445 * server.h (PBUFSIZ): Define to 16384.
15446
7284e1be
UW
154472008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15448
15449 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15450 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15451 powerpc-64l.o, and powerpc-altivec64l.o.
15452 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15453 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15454 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15455 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15456 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15457 to srv_xmlfiles.
15458
15459 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15460 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15461 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15462 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15463 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15464 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15465 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15466 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15467 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15468 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15469 (clean): Update.
15470
15471 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15472 (init_registers_powerpc_32l): ... this new prototype.
15473 (init_registers_powerpc_32): Remove, replace by ...
15474 (init_registers_powerpc_altivec32l): ... this new prototype.
15475 (init_registers_powerpc_e500): Remove, replace by ...
15476 (init_registers_powerpc_e500l): ... this new prototype.
15477 (init_registers_ppc64): Remove, replace by ...
15478 (init_registers_powerpc_64l): ... this new prototype.
15479 (init_registers_powerpc_64): Remove, replace by ...
15480 (init_registers_powerpc_altivec64l): ... this new prototype.
15481 (ppc_num_regs): Set to 73.
15482 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15483 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15484 (ppc_cannot_store_register): Handle orig_r3 and trap.
15485 (ppc_arch_setup): Update init_registers_... calls.
15486 (ppc_fill_gregset): Handle orig_r3 and trap.
15487
15488 * inferiors.c (clear_inferiors): Reset current_inferior.
15489
fdc59709
PB
154902008-04-23 Paolo Bonzini <bonzini@gnu.org>
15491
889bf7c5
PA
15492 * acinclude.m4: Add override.m4.
15493 * configure: Regenerate.
fdc59709 15494
c9b2f845
UW
154952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15496
15497 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15498 initial call to init_register_ppc64.
15499
550512b8
UW
155002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15501
43aaf8b6
PA
15502 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15503 single powerpc*-*-linux* case.
550512b8
UW
15504 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15505
b6430ec3
UW
155062008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15507
15508 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15509 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15510 from reg_xmlfiles.
15511 * linux-ppc-low.c: Include <elf.h>.
15512 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15513 (ppc_hwcap): New global variable.
15514 (ppc_regmap): Remove __SPE__ #ifdef sections.
15515 (ppc_regmap_e500): New global variable.
15516 (ppc_cannot_store_register): Update __SPE__ special case.
15517 (ppc_get_hwcap): New function.
15518 (ppc_arch_setup): Use it to determine whether inferior supports
15519 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15520 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15521 Do not access registers if target does not support AltiVec.
15522 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15523 Do not access registers if target does not support SPE.
15524 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15525
52fa2412
UW
155262008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15527
15528 * linux-low.c (disabled_regsets, num_regsets): New.
15529 (use_regsets_p): Delete.
15530 (linux_wait_for_process): Clear disabled_regsets.
15531 (regsets_fetch_inferior_registers): Check and set it.
15532 (regsets_store_inferior_registers): Likewise.
15533 (linux_fetch_registers, linux_store_registers): Do not use
15534 use_regsets_p.
15535 (initialize_low): Allocate disabled_regsets.
15536
e28b3332
DJ
155372008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15538
15539 * Makefile.in (LIBOBJS): New.
15540 (OBS): Use LIBOBJS.
15541 (memmem.o): New rule.
15542 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15543 * configure: Regenerated.
15544
4536995d
UW
155452008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15546
15547 * server.c (handle_query): Never return "unsupported" for
15548 qXfer:features:read queries.
15549
221c031f
UW
155502008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15551
15552 * server.c (get_features_xml): Fix inverted condition.
15553 (handle_query): Always support qXfer:feature:read.
15554
ccd213ac
DJ
155552008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15556
15557 * server.c (wrapper_argv): New.
15558 (start_inferior): Handle wrapper_argv. If set, expect an extra
15559 trap.
15560 (gdbserver_usage): Document --wrapper.
15561 (main): Parse --wrapper.
15562
6fe305f7
UW
155632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15564
15565 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15566 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15567 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15568 (ppc_set_pc): Likewise.
15569 (ppc_arch_setup): New function.
15570 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15571 of collect_register.
889bf7c5 15572 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15573
5b0a002e
UW
155742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15575
15576 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15577 instead of linux-ppc64-low.o.
15578 * linux-ppc64-low.c: Remove file.
15579 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15580 (linux-ppc64-low.o): Remove rule.
15581
15582 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15583 (init_registers_powerpc_64): Likewise.
15584 (ppc_regmap): Conditionally define depending on __powerpc64__.
15585 (ppc_cannot_store_register): Do not special-case "fpscr" when
15586 compiled on __powerpc64__.
15587 (ppc_collect_ptrace_register): New function.
15588 (ppc_supply_ptrace_register): New function.
15589 (ppc_breakpoint): Change type to "unsigned int".
15590 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15591 (the_low_target): Conditionally provide initializers for the
889bf7c5 15592 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15593 collect_ptrace_register and supply_ptrace_register members.
15594
9b4b61c8
UW
155952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15596
15597 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15598 * server.c (gdbserver_xmltarget): Define.
15599 (get_features_xml): Use it to replace "target.xml" and arch_string.
15600
15601 * configure.srv: Remove srv_xmltarget. Add XML files that were
15602 mentioned there to srv_xmlfiles instead. Remove conditional tests
15603 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15604 srv_xmlfiles and srv_regobj to include all possible choices.
15605 * configure.ac (srv_xmltarget): Remove.
15606 (srv_xmlfiles): Do not add "target.xml".
15607 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15608 checks for supplementary target information.
15609 * configure: Regenerate.
15610 * Makefile.in (XML_TARGET): Remove.
15611 (target.xml): Remove rule.
15612 (clean): Do not clean up target.xml.
15613 (.PRECIOUS): Do not mention target.xml.
15614
15615 * target.h (struct target_ops): Remove arch_string member.
15616 * linux-low.c (linux_arch_string): Remove.
15617 (linux_target_ops): Remove arch_string initializer.
15618 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15619 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15620 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15621 * spu-low.c (spu_arch_string): Remove.
15622 (spu_target_ops): Remove arch_string initializer.
15623 * win32-low.c (win32_arch_string): Remove.
15624 (win32_target_ops): Remove arch_string initializer.
15625 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15626 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15627 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15628
ee1a7ae4
UW
156292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15630
15631 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15632 by collect_ptrace_register and supply_ptrace_register hooks.
15633 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15634 instead of checking for the_low_target.left_pad_xfer.
15635 (usr_store_inferior_registers): Use collect_ptrace_register callback
15636 instead of checking for the_low_target.left_pad_xfer.
15637
15638 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15639 (s390_supply_ptrace_register): Likewise.
15640 (s390_fill_gregset): Call s390_collect_ptrace_register.
15641 (the_low_target): Update.
15642
15643 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15644 (ppc_supply_ptrace_register): Likewise.
15645 (the_low_target): Update.
15646
15647 * linux-i386-low.c (the_low_target): Update.
15648 * linux-x86-64-low.c (the_low_target): Update.
15649
d61ddec4
UW
156502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15651
15652 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15653 reg-s390.o and reg-s390x.o.
15654
15655 * linux-low.c (new_inferior): New global variable.
15656 (linux_create_inferior, linux_attach): Set it.
15657 (linux_wait_for_process): Call the_low_target.arch_setup after the
15658 target has stopped for the first time.
15659 (initialize_low): Do not call the_low_target.arch_setup.
15660
15661 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15662 (s390_set_pc): Likewise.
15663 (s390_arch_setup): New function.
15664 (the_low_target): Use s390_arch_setup as arch_setup routine.
15665
15666 * regcache.c (realloc_register_cache): New function.
15667 (set_register_cache): Call it for each existing regcache.
15668
d05b4ac3
UW
156692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15670
15671 * server.h (init_registers): Remove prototype.
15672
15673 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15674 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15675 instead of init_registers ().
15676 * linux-arm-low.c (init_registers_arm): Add prototype.
15677 (init_registers_arm_with_iwmmxt): Likewise.
15678 (the_low_target): Add initializer for arch_setup field.
15679 * linux-cris-low.c (init_registers_cris): Add prototype.
15680 (the_low_target): Add initializer for arch_setup field.
15681 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15682 (the_low_target): Add initializer for arch_setup field.
15683 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15684 (the_low_target): Add initializer for arch_setup field.
15685 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15686 (the_low_target): Add initializer for arch_setup field.
15687 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15688 (the_low_target): Add initializer for arch_setup field.
15689 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15690 (the_low_target): Add initializer for arch_setup field.
15691 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15692 (init_registers_mips64_linux): Likewise.
15693 (the_low_target): Add initializer for arch_setup field.
15694 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15695 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15696 (the_low_target): Add initializer for arch_setup field.
15697 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15698 (init_registers_powerpc_64): Likewise.
15699 (the_low_target): Add initializer for arch_setup field.
15700 * linux-s390-low.c (init_registers_s390): Add prototype.
15701 (init_registers_s390x): Likewise.
15702 (the_low_target): Add initializer for arch_setup field.
15703 * linux-sh-low.c (init_registers_sh): Add prototype.
15704 (the_low_target): Add initializer for arch_setup field.
15705 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15706 (the_low_target): Add initializer for arch_setup field.
15707 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15708 (the_low_target): Add initializer for arch_setup field.
15709
15710 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15711 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15712 instead of init_registers ().
15713 * win32-arm-low.c (init_registers_arm): Add prototype.
15714 (the_low_target): Add initializer for arch_setup field.
15715 * win32-i386-low.c (init_registers_i386): Add prototype.
15716 (the_low_target): Add initializer for arch_setup field.
15717
15718 * spu-low.c (init_registers_spu): Add prototype.
15719 (initialize_low): Call initialie_registers_spu () instead of
15720 initialize_registers ().
15721
fd96d250
PA
157222008-02-19 Pedro Alves <pedro@codesourcery.com>
15723
15724 * server.c (handle_v_requests): When handling the vRun and vAttach
15725 packets, if already debugging a process, don't kill it. Return an
15726 error instead.
15727
d41b6bb4
DJ
157282008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * server.c (handle_query): Correct length check.
15731
5ac588cf
PA
157322008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15733
15734 * win32-low.c (do_initial_child_stuff): Add process handle
15735 parameter. Set current_process_handle and current_process_id from the
15736 parameters. Clear globals.
15737 (win32_create_inferior): Don't set current_process_handle and
15738 current_process_id here. Instead pass them on the call to
15739 do_initial_child_stuff.
15740 (win32_attach): Likewise.
15741 (win32_clear_inferiors): New.
15742 (win32_kill): Don't close the current process handle or the
15743 current thread handle here. Instead call win32_clear_inferiors.
15744 (win32_detach): Don't open a new handle to the process. Call
15745 win32_clear_inferiors.
15746 (win32_join): Don't rely on current_process_handle; open a new
15747 handle using the process id.
15748 (win32_wait): Call win32_clear_inferiors when the inferior process
15749 has exited.
15750
ecd7ecbc
DJ
157512008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15752
15753 * server.c (monitor_show_help): Add "exit".
15754
1525d545
MG
157552008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15756
ecd7ecbc 15757 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15758 (clean): Add reg-xtensa.c.
15759 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15760 * configure.srv (xtensa*-*-linux*) New target.
15761 * linux-xtensa-low.c: New.
15762 * xtensa-xtregs.c: New.
1525d545 15763
59a016f0
PA
157642008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15765
15766 * hostio.c: Don't include errno.h.
15767 (errno_to_fileio_errno): Move to hostio-errno.
15768 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15769 error number outputting to the target->hostio_last_error callback.
15770 (hostio_packet_error): Use FILEIO_EINVAL directly.
15771 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15772 calls to hostio_error.
15773 * hostio-errno.c: New.
15774 * server.h (hostio_last_error_from_errno): Declare.
15775 * target.h (target_ops): Add hostio_last_error member.
15776 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15777 as hostio_last_error handler.
889bf7c5 15778 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15779 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15780 (wince_hostio_last_error): New functions.
15781 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15782 as hostio_last_error handler.
15783 (win32_target_ops) [!_WIN32_WCE]: Register
15784 hostio_last_error_from_errno as hostio_last_error handler.
15785 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15786 (hostio-errno.o): New rule.
15787 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15788 * configure.srv (srv_hostio_err_objs): New variable. Default to
15789 hostio-errno.o.
15790 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15791 * configure: Regenerate.
15792
2d717e4f
DJ
157932008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15794
15795 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15796 (linux_kill, linux_detach): Clean up the process list.
15797 * remote-utils.c (remote_open): Improve port number parsing.
15798 (putpkt_binary, input_interrupt): Only send interrupts if the target
15799 is running.
15800 * server.c (extended_protocol): Make static.
15801 (attached): Define earlier.
15802 (exit_requested, response_needed, program_argv): New variables.
15803 (target_running): New.
15804 (start_inferior): Clear attached here.
15805 (attach_inferior): Set attached here.
15806 (require_running): Define.
15807 (handle_query): Use require_running and target_running. Implement
15808 "monitor exit".
15809 (handle_v_attach, handle_v_run): New.
15810 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15811 (gdbserver_usage): Update.
15812 (main): Redo argument parsing. Handle --debug and --multi. Handle
15813 --attach along with other options or after the port. Save
15814 program_argv. Support no initial program. Resynchronize
15815 communication with GDB after an error. Handle "monitor exit".
15816 Use require_running and target_running. Always allow the extended
15817 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15818 restart in extended mode.
15819 * README: Refer to the GDB manual. Update --attach usage.
15820
7407e2de
AS
158212007-12-20 Andreas Schwab <schwab@suse.de>
15822
15823 * linux-low.c (STACK_SIZE): Define.
15824 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15825 (linux_test_for_tracefork): Likewise.
15826
b65d95c5
DJ
158272007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15828
15829 * linux-low.c (linux_wait_for_event): Update messages. Do not
15830 reinsert auto-delete breakpoints.
15831 * mem-break.c (struct breakpoint): Change return type of handler to
15832 int.
15833 (set_breakpoint_at): Update handler type.
15834 (reinsert_breakpoint_handler): Return 1 instead of calling
15835 delete_breakpoint.
15836 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15837 setting a new one.
15838 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15839 * mem-break.h (set_breakpoint_at): Update handler type.
15840 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15841 * win32-low.c (auto_delete_breakpoint): New.
15842 (get_child_debug_event): Use it.
15843
4e799345
DJ
158442007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15845
15846 * configure.ac: Check for pread and pwrite.
15847 * hostio.c (handle_pread): Fall back to lseek and read.
15848 (handle_pwrite): Fall back to lseek and write.
15849 * config.in, configure: Regenerated.
15850
27524b67
DJ
158512007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15852
15853 * server.c (myresume): Add own_buf argument.
15854 (main): Update calls.
15855
a20d5e98
DJ
158562007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15857
15858 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15859 * remote-utils.c (remote_open): Do not call disable_async_io.
15860 (block_async_io): Delete.
15861 (unblock_async_io): Make static.
15862 (initialize_async_io): New.
15863 * server.c (handle_v_cont): Handle async I/O here.
15864 (myresume): Likewise. Move other common resume tasks here...
15865 (main): ... from here. Call initialize_async_io. Disable async
15866 I/O before the main loop.
15867 * server.h (initialize_async_io): Declare.
15868 (block_async_io, unblock_async_io): Delete prototypes.
15869 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15870
b79d787e
DJ
158712007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15872
15873 * remote-utils.c (readchar): Allow binary data in received messages.
15874
d97903b2
PA
158752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15876
15877 * win32-low.c (attaching): New global.
15878 (win32_create_inferior): Clear the `attaching' global.
15879 (win32_attach): Set the `attaching' global.
15880 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15881 attaching. Only set a breakpoint at the entry point if not
15882 attaching.
15883
311de423
PA
158842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15885
15886 * server.c (main): Don't report dll events on the initial
15887 connection on attaches.
15888
6c2d16d2
PA
158892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15890
15891 * server.c (main): Relax numerical bases supported for the pid of
15892 the --attach command line argument.
15893
5ca906e6
PA
158942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15895
15896 * win32-low.c (win32_attach): Call OpenProcess before
15897 DebugActiveProcess, not after. Add last error output to error
15898 call.
15899
9c6c8194
PA
159002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15901
15902 * win32-low.c (win32_get_thread_context)
15903 (win32_set_thread_context): New functions.
15904 (thread_rec): Use win32_get_thread_context.
15905 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15906 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15907 field.
15908
4d5d1aaa
PA
159092007-12-03 Leo Zayas
15910 Pedro Alves <pedro_alves@portugalmail.pt>
15911
15912 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15913 global variables.
15914 (child_add_thread): Minor cleanup.
15915 (child_continue): Resume artificially suspended threads before
15916 calling ContinueDebugEvent.
15917 (suspend_one_thread): New.
15918 (fake_breakpoint_event): New.
15919 (get_child_debug_event): Change return type to int. Check here if
15920 gdb sent an interrupt request. If a soft interrupt was requested,
15921 fake a breakpoint event. Return 0 if there is no event to handle,
15922 and 1 otherwise.
15923 (win32_wait): Don't check here if gdb sent an interrupt request.
15924 Ensure there is a valid event to handle.
15925 (win32_request_interrupt): Add soft interruption method as last
15926 resort.
15927
c436e841
PA
159282007-12-03 Leo Zayas
15929 Pedro Alves <pedro_alves@portugalmail.pt>
15930
15931 * win32-low.h (win32_thread_info): Add descriptions to the
15932 structure members. Replace `suspend_count' counter by a
15933 `suspended' flag.
15934 * win32-low.c (thread_rec): Update condition of when to get the
15935 context from the inferior. Rely on ContextFlags being set if it
15936 has already been retrieved. Only suspend the inferior thread if
15937 we haven't already. Warn if that fails.
15938 (continue_one_thread): s/suspend_count/suspended/. Only call
15939 ResumeThread once. Warn if that fails.
15940
e7b5fa67
PA
159412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15942
15943 * win32-low.c (win32_wait): Don't read from the inferior when it
15944 has already exited.
15945
a385171d
PA
159462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15947
15948 * Makefile.in (win32_low_h): New variable.
15949 (win32-low.o): Add dependency on $(win32_low_h).
15950 (win32-arm-low.o, win32-i386-low.o): New rules.
15951
f80c84b3
DJ
159522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15953
15954 * hostio.c: Correct copyright year.
15955
a6b151f1
DJ
159562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15957
15958 * Makefile.in (OBS): Add hostio.o.
15959 (hostio.o): New rule.
15960 * server.h (handle_vFile): Declare.
15961 * hostio.c: New file.
15962 * server.c (handle_v_requests): Take packet_len and new_packet_len
15963 for binary packets. Call handle_vFile.
15964 (main): Update call to handle_v_requests.
15965
f9387fc3
DJ
159662007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15967
15968 * linux-low.c: Include <sched.h>.
15969
51c2684e
DJ
159702007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15971
15972 * linux-low.c (linux_tracefork_grandchild): New.
15973 (linux_tracefork_child): Use clone.
15974 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15975
75f83163
JB
159762007-10-31 Joel Brobecker <brobecker@adacore.com>
15977
15978 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15979
da5898ce
DJ
159802007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15981
15982 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15983
24a09b5f
DJ
159842007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * inferiors.c (change_inferior_id): Delete.
15987 (add_pid_to_list, pull_pid_from_list): New.
15988 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15989 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15990 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15991 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15992 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15993 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15994 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15995 (using_threads): Always set to 1.
15996 (handle_extended_wait): New.
15997 (add_process): Do not set TID.
15998 (linux_create_inferior): Set must_set_ptrace_flags.
15999 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16000 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16001 (linux_thread_alive): Rename TID argument to LWPID.
16002 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16003 (linux_wait_for_event): Do not use TID or check using_threads. Update
16004 call to dead_thread_notify. Call handle_extended_wait.
16005 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16006 (send_sigstop): Delete sigstop_sent.
16007 (wait_for_sigstop): Avoid TID.
16008 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16009 (linux_test_for_tracefork): New.
16010 (linux_lookup_signals): Use thread_db_active and
16011 linux_supports_tracefork_flag.
16012 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16013 * linux-low.h (get_process_thread): Avoid TID.
16014 (struct process_ifo): Move thread_known and tid to the end. Remove
16015 sigstop_sent.
16016 (linux_attach_lwp, thread_db_init): Update prototypes.
16017 * server.h (change_inferior_id): Delete prototype.
16018 (add_pid_to_list, pull_pid_from_list): New prototypes.
16019 * thread-db.c (thread_db_use_events): New.
16020 (find_first_thread): Rename to...
16021 (find_one_thread): ...this. Update callers and messages. Do not
16022 call fatal. Check thread_db_use_events. Do not call
16023 change_inferior_id or new_thread_notify.
16024 (maybe_attach_thread): Update. Do not call new_thread_notify.
16025 (thread_db_init): Set thread_db_use_events. Check use_events.
16026 * utils.c (fatal, warning): Correct message prefix.
16027
30ed0a8f
DJ
160282007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16029
16030 * Makefile.in (clean): Remove new files.
16031 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16032 (powerpc-64.o, powerpc-64.c): New rules.
16033 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16034 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16035 with SPE.
16036 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16037 SPE targets.
16038 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16039 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16040 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16041 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16042 (target_regsets): Add AltiVec and SPE register sets.
16043 * configure.ac: Check for AltiVec and SPE.
16044 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16045 (ppc_fill_vrregset, ppc_store_vrregset): New.
16046 (target_regsets): Add AltiVec register set.
16047 * configure: Regenerated.
16048
fd462a61
DJ
160492007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16050
16051 * linux-low.c (O_LARGEFILE): Define.
16052 (linux_read_memory): Use /proc/PID/mem.
16053 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16054 * configure, config.in: Regenerated.
16055
69f223ed
DJ
160562007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16057
16058 * linux-low.c (linux_wait_for_event): Do not pass signals while
16059 single-stepping.
16060
aec18585
PA
160612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16062
16063 * win32-low.c (create_process): New.
16064 (win32_create_inferior): Use create_process instead of
16065 CreateProcess. If create_process failed retry appending an ".exe"
16066 suffix. Store the GetLastError result immediatelly after
16067 create_process calls and use it on the call to error.
16068
34d86ddd
PA
160692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16070
16071 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16072
5a0e3bd0
JB
160732007-08-23 Joel Brobecker <brobecker@adacore.com>
16074
16075 * configure.ac: Switch license to GPLv3.
16076
f88c79e6
MS
160772007-08-01 Michael Snyder <msnyder@access-company.com>
16078
16079 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16080
6b3d9b83
PA
160812007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16082
16083 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16084 typedef.
16085 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16086 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16087 CloseToolhelp32Snapshot.
16088 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16089 CloseToolhelp32Snapshot.
16090
c588c53c
MS
160912007-07-27 Michael Snyder <michael.snyder@access-company.com>
16092
16093 * server.c (main): Check for inferior exit before main loop.
16094
aa0403d9
PA
160952007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16096
16097 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16098 instead of on tmp_desc.
16099
255e7678
DJ
161002007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16101 Daniel Jacobowitz <dan@codesourcery.com>
16102
16103 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16104 (add_thread): Minor cleanups.
16105 (clear_inferiors): Move lower in the file. Clear the DLL
16106 list.
16107 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16108 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16109 (xml_escape_text): New.
16110 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16111 for qSupported.
16112 (handle_v_cont): Report errors.
16113 (gdbserver_version): Update.
16114 (main): Correct size of own_buf. Do not report initial DLL events.
16115 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16116 (unloaded_dll, xml_escape_text): New.
16117 * win32-low.c (enum target_waitkind): Update comments.
16118 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16119 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16120 (win32_EnumProcessModules, win32_GetModuleInformation)
16121 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16122 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16123 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16124 (win32_Module32First, win32_Module32Next, load_toolhelp)
16125 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16126 (get_child_debug_event): Handle DLL events.
16127 (win32_wait): Likewise.
16128
0d37add9
DJ
161292007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16130
16131 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16132 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16133
45e2715e
PA
161342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16135
16136 * win32-low.c (handle_output_debug_string): Ignore event if not
16137 waiting.
16138
c5674cf1
PA
161392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16140
16141 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16142
2bbe3cc1
DJ
161432007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16144
16145 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16146
ae13219e
DJ
161472007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16148
16149 * inferiors.c (change_inferior_id): Add comment.
16150 * linux-low.c (check_removed_breakpoint): Add an early
16151 prototype. Improve debug output.
16152 (linux_attach): Doc update.
16153 (linux_detach_one_process, linux_detach): Clean up before releasing
16154 each process.
16155 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16156 * linux-low.h (struct process_info): Doc improvement.
16157 * mem-break.c (delete_all_breakpoints): New.
16158 * mem-break.h (delete_all_breakpoints): New prototype.
16159 * thread-db.c (find_first_thread): New.
16160 (thread_db_create_event): Call it instead of
16161 thread_db_find_new_threads. Clean up unused variables.
16162 (maybe_attach_thread): Remove first thread handling.
16163 (thread_db_find_new_threads): Use find_first_thread.
16164 (thread_db_get_tls_address): Likewise.
16165
4105de34
DJ
161662007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16167
16168 * thread-db.c (thread_db_find_new_threads): Add prototype.
16169 (thread_db_create_event): Check for the main thread before adding
16170 a new thread.
16171 (maybe_attach_thread): Only enable event reporting if TID == 0.
16172 (thread_db_get_tls_address): Check for new threads.
16173
2b876972
DJ
161742007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16175
16176 * linux-low.c (linux_create_inferior): Try execv before execvp.
16177 * spu-low.c (spu_create_inferior): Likewise.
16178
7a245884
DJ
161792007-06-13 Mike Frysinger <vapier@gentoo.org>
16180
16181 * linux-low.c (linux_create_inferior): Change execv to execvp.
16182 * spu-low.c (spu_create_inferior): Likewies.
16183
117ce543
DJ
161842007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16185
16186 * Makefile.in (clean): Clean new files instead of deleted ones.
16187 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16188 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16189 rules.
16190 * configure.srv: Specify XML files and new regformats for MIPS and
16191 MIPS64 GNU/Linux.
16192 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16193 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16194 an entry for the restart register.
16195 (mips_cannot_fetch_register, mips_cannot_store_register)
16196 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16197 register names to match the XML descriptions.
16198 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16199 restart register instead of $0.
16200
0e7f50da
UW
162012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16202 Markus Deuling <deuling@de.ibm.com>
16203
16204 * remote-utils.c (decode_xfer_write): New function.
16205 * server.h (decode_xfer_write): Add prototype.
16206 * server.c (handle_query): Add PACKET_LEN argument. Support
16207 qXfer:spu:read and qXfer:spu:write packets.
16208 (main): Pass packet_len to handle_query.
16209 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16210 * target.h (target_ops): Add qxfer_spu.
16211
374c1d38
UW
162122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16213
16214 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16215 accessing non-seekable spufs files.
16216
bb63802a
UW
162172007-05-16 Markus Deuling <deuling@de.ibm.com>
16218
889bf7c5 16219 * server.c (handle_query): Add reply for qC packet.
bb63802a 16220
7390519e
PA
162212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16222 Leo Zayas <lerele@champenstudios@com>
16223
16224 * server.h (check_remote_input_interrupt_request): New function.
16225 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16226 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16227 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16228 (check_remote_input_interrupt_request): New function.
16229 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16230 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16231 winapi_GenerateConsoleCtrlEvent): New typedefs.
16232 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16233 to 250 ms.
16234 (win32_wait): Check for remote interrupt request
16235 with check_remote_input_interrupt_request.
16236 (win32_request_interrupt): New function.
16237 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16238
34b34921
PA
162392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16240
16241 * win32-low.c (debug_registers_changed,
16242 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16243 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16244 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16245 (thread_rec): Get context using the low target.
16246 (child_add_thread): Call thread_added on the low target,
16247 which does the same thing.
16248 (regptr): Delete.
16249 (do_initial_child_stuff): Remove debug registers references.
16250 Set context using the low target. Resume threads after
16251 setting the contexts.
16252 (child_continue): Remove dead variable. Remove debug
16253 registers references.
16254 (child_fetch_inferior_registers): Go through the low target.
16255 (do_child_store_inferior_registers): Remove.
16256 (child_store_inferior_registers): Go through the low target.
16257 (win32_resume): Remove debug registers references.
16258 Set context using the low target.
16259 (handle_exception): Change return type to void. Don't record
16260 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16261 first chance exception.
889bf7c5 16262 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16263 goto loop. Always return after waiting for debug event.
16264 (win32_wait): Convert to switch statement. Handle spurious
16265 events.
16266
16267 * win32-i386-low.c (debug_registers_changed,
16268 debug_registers_used): New.
16269 (initial_stuff): Rename to ...
16270 (i386_initial_stuff): ... this. Clear debug registers
16271 state variables.
16272 (store_debug_registers): Delete.
16273 (i386_get_thread_context): New.
16274 (load_debug_registers): Delete.
16275 (i386_set_thread_context): New.
16276 (i386_thread_added): New.
16277 (single_step): Rename to ...
16278 (i386_single_step): ... this.
16279 (do_fetch_inferior_registers): Rename to ...
16280 (i386_fetch_inferior_register): ... this.
16281 (i386_store_inferior_register): New.
16282 (the_low_target): Adapt to new interface.
16283
16284 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16285 (arm_get_thread_context): New.
16286 (arm_set_thread_context): New.
16287 (regptr): New.
16288 (do_fetch_inferior_registers): Rename to ...
16289 (arm_fetch_inferior_register): ... this.
16290 (arm_store_inferior_register): New.
16291 (arm_wince_breakpoint): Reimplement as unsigned long.
16292 (arm_wince_breakpoint_len): Define.
16293 (the_low_target): Adapt to new interface.
16294
16295 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16296 load_debug_registers. Add get_thread_context, set_thread_context,
16297 thread_added and store_inferior_register. Rename
16298 fetch_inferior_registers to fetch_inferior_register.
16299 (regptr): Remove declaration.
16300
dd6953e1
PA
163012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16302
16303 * linux-low.c (linux_detach): Change return type to int. Return 0.
16304 * spu-low.c (spu_detach): Likewise.
16305
444d6139
PA
163062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16307
16308 * target.h (target_ops): Change return type of detach to int.
16309 Add join.
16310 (join_inferior): New.
16311 * server.c (main): Don't skip detach support on mingw32.
16312 If the inferior doesn't support detaching return error.
16313 Call join_inferior instead of using waitpid.
16314 * linux-low.c (linux_join): New.
16315 (linux_target_op): Add linux_join.
16316 * spu-low.c (spu_join): New.
16317 (spu_target_ops): Add spu_join.
16318 * win32-low.c (win32_detach): Adapt to new interface.
16319 Reopen current_process_handle before detaching. Issue a child
16320 resume before detaching.
16321 (win32_join): New.
16322 (win32_target_op): Add win32_join.
16323
1d5315fe
PA
163242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16325
16326 * win32-low.c (win32-attach): Fix return value.
16327 * target.h (target_ops): Describe ATTACH return values.
16328
bf914831
PA
163292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16330
16331 * win32-low.c (GETPROCADDRESS): Define.
16332 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16333 (winapi_DebugSetProcessKillOnExit): Likewise.
16334 (win32_create_inferior): Force usage of ansi CreateProcessA.
16335 (win32_attach): Use GETPROCADDRESS.
16336 (win32_detach): Likewise.
16337
f72f3e60
PA
163382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16339
16340 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16341
ed50f18f
PA
163422007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16343
16344 * win32-low.c: Commit leftover changes from 2007-03-29.
16345
0c2ead7e
DJ
163462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16347
16348 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16349 fields short instead of int. Add explicit padding.
16350 (i387_cache_to_fsave): Remove unnecessary casts.
16351 (i387_fsave_to_cache): Doc fix.
16352 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16353
73725ff3
DJ
163542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16355
16356 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16357 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16358
d99f33d8
PA
163592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16360
16361 * configure.srv (arm*-*-mingw32ce*): Move near the other
16362 arm targets.
16363
68070c10
PA
163642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16365
2482afc6 16366 * configure.ac: Add errno checking.
68070c10
PA
16367 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16368 sys/file.h and malloc.h.
16369 (AC_CHECK_DECLS): Add perror.
16370 (srv_mingwce): Handle.
2482afc6 16371 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16372 win32-i386-low.o to srv_tgtobj.
16373 (i[34567]86-*-mingw*): Likewise.
16374 (arm*-*-mingw32ce*): Add case.
16375 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16376 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16377 [__MINGW32CE__] (strerror): New function.
16378 [__MINGW32CE__] (errno): Define to GetLastError.
16379 [__MINGW32CE__] (COUNTOF): New macro.
16380 (remote_open): Remove extra close call.
16381 * mem-break.c (delete_breakpoint_at): New function.
16382 * mem-break.h (delete_breakpoint_at): Declare.
16383 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16384 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16385 [USE_WIN32API] (read, write): Add char* casts.
16386 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16387 * server.h: Include wincecompat.h on Windows CE.
16388 [HAVE_ERRNO_H]: Check.
16389 (perror): Declare if not declared.
16390 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16391 (perror_with_name): Remove errno declaration.
16392 * wincecompat.h: New.
16393 * wincecompat.c: New.
16394 * win32-low.h: New.
16395 * win32-arm-low.c: New.
16396 * win32-i386-low.c: New.
16397 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16398 (OUTMSG2): Make it safe.
16399 (_T): New macro.
16400 (COUNTOF): New macro.
16401 (NUM_REGS): Get it from the low target.
16402 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16403 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16404 (thread_rec): Let low target handle debug registers.
16405 (child_add_thread): Likewise.
16406 (child_init_thread_list): Likewise.
16407 (continue_one_thread): Likewise.
16408 (regptr): New.
16409 (do_child_fetch_inferior_registers): Move to ...
16410 * win32-i386-low.c: ... here, and rename to ...
16411 (do_fetch_inferior_registers): ... this.
889bf7c5 16412 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16413 Go through the low target.
16414 (do_child_store_inferior_registers): Use regptr.
16415 (strwinerror): New function.
16416 (win32_create_inferior): Handle Windows CE.
16417 Use strwinerror instead of strerror on Windows error
16418 codes. Add program to the error output.
16419 Don't close the main thread handle on Windows CE.
16420 (win32_attach): Use coredll.dll on Windows CE.
16421 (win32_kill): Close current process and current
16422 thread handles.
16423 (win32_detach): Use coredll.dll on Windows CE.
16424 (win32_resume): Let low target handle debug registers, and
16425 step request.
16426 (handle_exception): Add/Remove initial breakpoint. Avoid
16427 non-existant WSTOPSIG on Windows CE.
16428 (win32_read_inferior_memory): Cast to remove warning.
16429 (win32_arch_string): Go through the low target.
16430 (initialize_low): Call set_breakpoint_data with the low
16431 target's breakpoint.
16432 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16433 FOP_REGNUM, mappings): Move to ...
16434 * win32-i386-low.c: ... here.
16435 * win32-low.c (win32_thread_info): Move to ...
16436 * win32-low.h: ... here.
16437 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16438 win32-arm-low.c and wincecompat.c.
16439 (all:): Add $EXEEXT.
16440 (install-only:): Likewise.
16441 (gdbserver:): Likewise.
16442 (gdbreplay:): Likewise.
16443 * config.in: Regenerate.
16444 * configure: Regenerate.
16445
41093d81
PA
164462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16447
16448 * win32-low.c: Rename typedef thread_info to
16449 win32_thread_info throughout.
16450
544afa54
PA
164512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16452
16453 * win32-i386-low.c: Rename to ...
16454 * win32-low.c: ... this.
16455 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16456 * Makefile.in: Likewise.
16457
bce7165d
PA
164582007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16459
16460 * remote-utils.c (monitor_output): Constify msg parameter.
16461 * server.h (monitor_output): Likewise.
16462 * win32-i386-low.c (handle_output_debug_string): New.
16463 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16464 handle_output_debug_string.
16465 (get_child_debug_event): Likewise.
16466
506c7aa0
DJ
164672007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16468
16469 * server.c (main): Correct strtoul check.
16470
42c81e2a
DJ
164712007-03-27 Jon Ringle <jon@ringle.org>
16472
16473 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16474
9453113a
DJ
164752007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16476
16477 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16478
64a69107
DJ
164792007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16480
16481 * terminal.h: Check HAVE_SGTTY_H.
16482
164832007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16484
16485 * remote-utils.c (remote_open): Print out the assigned port number.
16486
c74d0ad8
DJ
164872007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16488
16489 * remote-utils.c (monitor_output): New function.
16490 * server.c (debug_threads): Define here.
16491 (monitor_show_help): New function.
16492 (handle_query): Handle qRcmd.
16493 (main): Do not handle 'd' packet.
16494 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16495 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16496 of debug_threads.
16497
de7c3b4a
PA
164982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16499
16500 * Makefile.in (EXEEXT): New.
16501 (clean): Use $(EXEEXT).
16502
ef57601b
PA
165032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16504
16505 * target.h (target_ops): Rename send_signal to request_interrupt,
16506 and remove enum target_signal parameter.
16507 * linux-low.c (linux_request_interrupt): Rename from
16508 linux_send_signal, and always send SIGINT.
16509 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16510 and always send SIGINT.
16511 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16512 of send_signal.
16513 (input_interrupt): Likewise.
16514
820f2bda
PA
165152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16516
16517 * server.c (get_features_xml): Check if target implemented
16518 arch_string.
16519 * win32-i386-low.c (win32_arch_string): New.
16520 (win32_target_ops): Add win32_arch_string as arch_string member.
16521
ab39bf24
UW
165222007-02-22 Markus Deuling <deuling@de.ibm.com>
16523
16524 * spu-low.c (spu_arch_string): New.
16525 (spu_target_ops): Add spu_arch_string.
16526
61ff6e04
DJ
165272007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16528
16529 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16530 * configure.ac: Do not check for terminal.h.
16531 * configure, config.in: Regenerated.
16532
fb1e4ffc
DJ
165332007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * Makefile.in (OBS): Add $(XML_BUILTIN).
16536 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16537 (clean): Update.
16538 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16539 (arm-with-iwmmxt.c): New.
16540 * config.in, configure: Regenerate.
16541 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16542 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16543 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16544 (arm*-*-linux*): Add iWMMXt and regset support.
16545 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16546 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16547 (arm_store_wmmxregset, target_regsets): New.
16548 * server.c (get_features_xml): Take annex argument. Check builtin
16549 XML documents.
16550 (handle_query): Handle multiple annexes.
16551
0f48aa01
DJ
165522007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16553
16554 * remote-utils.c [USE_WIN32API] (read, write): Define.
16555 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16556 write.
16557
23181151
DJ
165582007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16559
16560 * linux-i386-low.c (the_low_target): Set arch_string.
16561 * linux-x86-64-low.c (the_low_target): Likewise.
16562 * linux-low.c (linux_arch_string): New.
16563 (linux_target_ops): Add it.
16564 * linux-low.h (struct linux_target_ops): Add arch_string.
16565 * server.c (write_qxfer_response): Use const void * for DATA.
16566 (get_features_xml): New.
16567 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16568 * target.h (struct target_ops): Add arch_string method.
16569
9d606399
DJ
165702007-01-03 Denis Pilat <denis.pilat@st.com>
16571 Daniel Jacobowitz <dan@codesourcery.com>
16572
16573 * linux-low.c (linux_kill): Handle being called with no threads.
16574 * win32-i386-low.c (win32_kill): Likewise.
16575 (get_child_debug_event): Clear current_process_handle.
16576
165772006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16578 Daniel Jacobowitz <dan@codesourcery.com>
16579
16580 * remote-utils.c (remote_open): Check the type of specified
16581 serial port devices before opening them.
16582 * server.c (main): Kill the inferior if an error occurs during
16583 the first remote_open.
16584
a5e13d24
DJ
165852006-12-05 Markus Deuling <deuling@de.ibm.com>
16586
16587 * README: Update supported targets.
16588
186947f7
DJ
165892006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16590
16591 * Makefile.in (clean): Remove reg-mips64.c.
16592 (reg-mips64.c, reg-mips64.o): New rules.
16593 * configure.srv: Handle mips64. Include regset support for mips.
16594 * linux-mips-low.c (union mips_register): New.
16595 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16596 (mips_breakpoint, mips_breakpoint_at): Use int.
16597 (mips_collect_register, mips_supply_register)
16598 (mips_collect_register_32bit, mips_supply_register_32bit)
16599 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16600 (mips_store_fpregset, target_regsets): New.
16601 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16602
a13e2c95
UW
166032006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16604
16605 * configure.srv: Add target "spu*-*-*".
16606 * Makefile.in (clean): Remove reg-spu.c.
16607 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16608 * spu-low.c: New file.
16609
cb7283db
DJ
166102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16611
16612 * configure.ac: Correct td_thr_tls_get_addr test.
16613 * configure: Regenerated.
16614
89be2091
DJ
166152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16616
16617 * linux-low.c (linux_wait_for_event): Reformat. Use the
16618 pass_signals array.
16619 * remote-utils.c (decode_address_to_semicolon): New.
16620 * server.c (pass_signals, handle_general_set): New.
16621 (handle_query): Mention QPassSignals for qSupported.
16622 (main): Call handle_general_set.
16623 * server.h (pass_signals, decode_address_to_semicolon): New.
16624
000ef4f0
DJ
166252006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16626
16627 * server.c (handle_query): Correct error handling for read_auxv.
16628
b7149293
UW
166292005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16630
16631 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16632 and srv_linux_thread_db to yes.
16633 * linux-s390-low.c (s390_fill_gregset): New function.
16634 (target_regsets): Define data structure.
16635
dae5f5cf
DJ
166362006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16637
16638 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16639 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16640 * config.in, configure: Regenerated.
16641 * inferiors.c (gdb_id_to_thread): New function.
16642 (gdb_id_to_thread_id): Use it.
16643 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16644 * linux-low.h (struct process_info): Add th member.
16645 (thread_db_get_tls_address): New prototype.
16646 * remote-utils.c (decode_address): Make non-static.
16647 * server.c (handle_query): Handle qGetTLSAddr.
16648 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16649 * target.h (struct target_ops): Add get_tls_address.
16650 * thread-db.c (maybe_attach_thread): Save the thread handle.
16651 (thread_db_get_tls_address): New.
16652
32ca6d61
DJ
166532006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16654
16655 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16656 (linux_resume_one_process): Take a siginfo_t *. Update all
16657 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16658 (struct pending_signals): Add a siginfo_t.
16659 (linux_wait_for_process): Always set last_status.
16660 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16661 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16662 * linux-low.h (struct process_info): Add last_status.
16663
5ffff7c1
DJ
166642006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16665
16666 * remote-utils.c (try_rle): New function.
16667 (putpkt_binary): Use it.
16668
8695c747
DJ
166692006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16672 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16673 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16674 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16675 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16676 point registers.
16677
290fadea
RS
166782006-08-08 Richard Sandiford <richard@codesourcery.com>
16679
16680 * server.c (terminal_fd): New variable.
16681 (old_foreground_pgrp): Likewise.
16682 (restore_old_foreground_pgrp): New function.
16683 (start_inferior): Record the terminal file descriptor in terminal_fd
16684 and its original foreground group in old_foreground_pgrp. Register
16685 restore_old_foreground_pgrp with atexit().
16686
9f2e1e63
DJ
166872006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16688
16689 * server.c (handle_query): Correct qPart to qXfer.
16690
b80864fb
DJ
166912006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16692
16693 * configure.ac: Check for more headers which are missing on
16694 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16695 * configure.srv: Add Cygwin and mingw32.
16696 * remote-utils.c: Don't include headers unconditionally which
16697 are missing on mingw32. Include <winsock.h> for mingw32.
16698 (remote_open): Adjust for mingw32 support. Flush
16699 standard error after writing to it.
16700 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16701 (unblock_async_io, enable_async_io, disable_async_io)
16702 (readchar, getpkt): Update for Winsock support.
16703 (prepare_resume_reply): Expect a protocol signal number.
16704 * server.c: Disable <sys/wait.h> on mingw32.
16705 (start_inferior): Adjust for mingw32 support. Flush
16706 standard error after writing to it.
16707 (attach_inferior): Likewise. Use protocol signal
16708 numbers.
16709 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16710 and names.
16711 * win32-i386-low.c: New file.
16712 * Makefile.in (XM_CLIBS): Set.
16713 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16714 (win32-i386-low.o): New dependency rule.
16715 * linux-low.c (linux_wait): Use target signal numbers.
16716 * target.h (struct target_ops): Doc fix.
16717 * server.h (target_signal_to_name): New prototype.
16718 * gdbreplay.c: Don't include headers unconditionally which
16719 are missing on mingw32. Include <winsock.h> for mingw32.
16720 (remote_close, remote_open): Adjust for Winsock support.
16721 * configure, config.in: Regenerated.
16722
0876f84a
DJ
167232006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16724
16725 * server.c (decode_xfer_read, write_qxfer_response): New.
16726 (handle_query): Take a packet length argument. Handle
16727 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16728 the qSupported response.
16729 (main): Update call to handle_query.
16730
01f9e8fa
DJ
167312006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16732
16733 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16734 (putpkt_binary): Renamed from putpkt and adjusted for binary
16735 data.
16736 (putpkt): New wrapper for putpkt_binary.
16737 (readchar): Don't mask off the high bit.
16738 (decode_X_packet): New function.
16739 * server.c (main): Call putpkt_binary if a handler sets the packet
16740 length. Save the length of the incoming packet. Handle 'X'.
16741 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16742
be2a5f71
DJ
167432006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16744
16745 * server.c (handle_query): Handle qSupported.
16746
ea025f5f
DJ
167472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16748
16749 * remote-utils.c (all_symbols_looked_up): New variable.
16750 (look_up_one_symbol): Check it.
16751 * server.h (look_up_one_symbol): New declaration.
16752 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16753
9308fc88
DJ
167542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16755
16756 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16757 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16758 (PTRACE_GET_THREAD_AREA): Define.
16759 (ps_get_thread_area): New function.
16760
52fb6437
NS
167612006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16762
16763 * configure.srv (m68k*-*-uclinux*): New target.
16764 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16765 (linux_resume_one_process): Remove extraneous cast.
16766 (linux_read_offsets): New.
16767 (linux_target_op): Add linux_read_offsets on mmuless systems.
16768 * server.c (handle_query): Add qOffsets logic.
16769 * target.h (struct target_ops): Add read_offsets.
16770
21b0f40c
DJ
167712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16772
16773 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16774 (PTRACE_GET_THREAD_AREA): Define.
16775 (ps_get_thread_area): New function.
16776 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16777 (linux-x86-64-low.o): Update.
16778
0050a760
DJ
167792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16780
16781 * configure.ac: Remove checks for prfpregset_t.
16782 * gdb_proc_service.h: New file.
16783 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16784 new "gdb_proc_service.h".
16785 * proc-service.c: Likewise.
16786 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16787 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16788 * Makefile.in (gdb_proc_service_h): Updated.
16789 * configure, config.in: Regenerated.
16790
b92a518e
DJ
167912006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16792
16793 * remote-utils.c (prepare_resume_reply): Move declaration
16794 of gdb_id_from_wait to the top of the block.
16795
545587ee
DJ
167962006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16797
16798 * linux-low.c (regsets_store_inferior_registers): Read the regset
16799 from the target before filling it.
16800
9db87ebd
DJ
168012006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16802
16803 * server.c (attach_inferior): Return SIGTRAP for a successful
16804 attach.
16805
dd24457d
DJ
168062006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16807
16808 * Makefile.in (OBS): Add version.o.
16809 (STAGESTUFF): Delete.
16810 (version.o): Add dependencies.
16811 (version.c): Replace rule.
16812 (clean): Remove version.c.
16813 * server.c (gdbserver_version): New.
16814 (gdbserver_usage): Use printf.
16815 (main): Handle --version and --help.
16816 * server.h (version, host_name): Add declarations.
16817
6f0f660e
EZ
168182005-12-23 Eli Zaretskii <eliz@gnu.org>
16819
889bf7c5
PA
16820 * linux-arm-low.c:
16821 * linux-arm-low.c:
16822 * inferiors.c:
16823 * i387-fp.h:
16824 * i387-fp.c:
16825 * gdbreplay.c:
16826 * regcache.c:
16827 * proc-service.c:
16828 * mem-break.h:
16829 * mem-break.c:
16830 * linux-x86-64-low.c:
16831 * linux-sh-low.c:
16832 * linux-s390-low.c:
16833 * linux-ppc64-low.c:
16834 * linux-ppc-low.c:
16835 * linux-mips-low.c:
16836 * linux-m68k-low.c:
16837 * linux-m32r-low.c:
16838 * linux-low.h:
16839 * linux-low.c:
16840 * linux-ia64-low.c:
16841 * linux-i386-low.c:
16842 * linux-crisv32-low.c:
16843 * thread-db.c:
16844 * terminal.h:
16845 * target.h:
16846 * target.c:
16847 * server.h:
16848 * server.c:
16849 * remote-utils.c:
16850 * regcache.h:
16851 * utils.c:
16852 * Makefile.in:
16853 * configure.ac:
6f0f660e
EZ
16854 * gdbserver.1: Add (C) after Copyright. Update the FSF
16855 address.
16856
9d1fb177
DJ
168572005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16858
16859 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16860 (arm_breakpoint_at): Recognize both breakpoints.
16861 (the_low_target): Use the correct breakpoint instruction.
16862
011a70c2
DJ
168632005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16864
16865 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16866 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16867 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16868 (the_low_target): Update.
16869
7fb85e41
AS
168702005-10-25 Andreas Schwab <schwab@suse.de>
16871
16872 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16873
16874 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16875 (ia64_num_regs): Reduce to 462.
16876
3db0444b
DJ
168772005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16878
16879 * acinclude.m4: Correct quoting.
16880 * aclocal.m4: Regenerated.
16881
16882 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16883 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16884 (thread_db_init): Call thread_db_err_str.
16885 * configure.ac: Check for TD_VERSION.
16886 * config.in, configure: Regenerated.
16887
bee0189a
DJ
168882005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16889
16890 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16891
e9d25b98
DJ
168922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16893
16894 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16895 is not available. Define HAVE_PTRACE_GETREGS if it is.
16896 * config.in, configure: Regenerated.
16897 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16898 * linux-i386-low.c, linux-m68k-low.c: Update to use
16899 HAVE_PTRACE_GETREGS.
16900 * linux-low.c (regsets_fetch_inferior_registers)
16901 (regsets_store_inferior_registers): Only return 0 if we processed
16902 GENERAL_REGS.
16903 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16904 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16905
a06660f7
DJ
169062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16907
16908 * inferiors.c (struct thread_info): Add gdb_id.
16909 (add_thread): Add gdb_id argument.
16910 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16911 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16912 calls to add_thread.
16913 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16914 * server.c (handle_query): Use thread_to_gdb_id.
16915 (handle_v_cont, main): Use gdb_id_to_thread_id.
16916 * server.h (add_thread): Update prototype.
16917 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16918 prototypes.
16919
5a1f5858
DJ
169202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16921
16922 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16923 left-padded registers.
16924 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16925 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16926
e122f1f5
SE
169272005-07-01 Steve Ellcey <sje@cup.hp.com>
16928
16929 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16930 * configure: Regenerate.
16931 * config.in: Regenerate.
16932 * server.h (NEED_DECLARATION_STRERROR):
16933 Replace with !HAVE_DECL_STRERROR.
16934
d592fa2f
DJ
169352005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16936
16937 * linux-low.c (linux_wait, linux_send_signal): Don't test
16938 an unsigned long variable for > 0 if it could be MAX_ULONG.
16939 * server.c (myresume): Likewise.
16940 * target.c (set_desired_inferior): Likewise.
16941
ccbd4912
MK
169422005-06-13 Mark Kettenis <kettenis@gnu.org>
16943
16944 * configure.ac: Simplify and improve check for socklen_t.
16945 * configure, config.in: Regenerate.
16946
f450004a
DJ
169472005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16948
16949 * acconfig.h: Remove.
16950 * configure.ac: Add a test for socklen_t. Use three-argument
16951 AC_DEFINE throughout.
16952 * config.in: Regenerated using autoheader 2.59.
16953 * configure: Regenerated.
16954
16955 * gdbreplay.c (socklen_t): Provide a default.
16956 (remote_open): Use socklen_t.
16957 * remote-utils.c (socklen_t): Provide a default.
16958 (remote_open): Use socklen_t.
16959 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16960 unsigned char.
16961
16962 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16963 char for buffers.
16964 * linux-low.c (linux_read_memory, linux_write_memory)
16965 (linux_read_auxv): Likewise.
16966 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16967 (check_mem_write): Likewise.
16968 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16969 Likewise.
16970 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16971 (registers_from_string, register_data): Likewise.
16972 * server.c (handle_query, main): Likewise.
16973 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16974 (decode_M_packet): Likewise.
16975 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16976 * target.h (struct target_ops): Update read_memory, write_memory,
16977 and read_auxv.
16978 (read_inferior_memory, write_inferior_memory): Update.
16979 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16980 to unsigned char *.
16981 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16982 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16983 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16984 linux-s390-low.c, linux-sh-low.c: Update for changes in
16985 read_inferior_memory and the_low_target->breakpoint.
16986
eee84df1
DJ
169872005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16988
16989 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16990 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16991 * configure.srv: Add powerpc64-*-linux*.
16992 * linux-ppc64-low.c: New file.
16993
45b134e5
OF
169942005-05-23 Orjan Friberg <orjanf@axis.com>
16995
16996 * linux-cris-low.c: New file with support for CRIS.
16997 * linux-crisv32-low.c: Ditto for CRISv32.
16998 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16999 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17000 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17001 reg-crisv32.o, and reg-crisv32.c to make rules.
17002 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17003 recognized targets.
17004
48d93c75
UW
170052005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17006
17007 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17008 of sizeof (PTRACE_XFER_TYPE).
17009 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17010
e013ee27
OF
170112005-05-12 Orjan Friberg <orjanf@axis.com>
17012
889bf7c5 17013 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17014 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17015 pointers for hardware watchpoint support.
17016 * linux-low.h (struct linux_target_ops): Ditto.
17017 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17018 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17019 to linux_target_ops.
17020 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17021 reply packet.
17022 * server.c (main): Recognize 'Z' and 'z' packets.
17023
b0ded00b
UW
170242005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17025
17026 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17027 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17028 (the_low_target): Add new members.
17029
8643e2ad
DJ
170302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17031
17032 * proc-service.c (ps_lgetregs): Search all_processes instead of
17033 all_threads.
17034
fc620387
DJ
170352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17036
17037 * server.c (start_inferior): Change return type to int.
17038 (attach_inferior): Change sigptr to int *.
17039 (handle_v_cont, handle_v_requests): Change signal to int *.
17040 (main): Change signal to int.
17041
170422005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17043
17044 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17045 * configure.srv: Add m32r*-*-linux*.
17046 * linux-m32r-low.c: New file.
17047
e0e76420
DJ
170482005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17049
17050 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17051
a1928bad
DJ
170522005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17053
17054 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17055 Take unsigned long arguments for PIDs.
17056 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17057 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17058 (wait_for_sigstop, linux_resume_one_process)
17059 (regsets_fetch_inferior_registers, linux_send_signal)
17060 (linux_read_auxv): Likewise. Update the types of variables holding
17061 PIDs. Update format string specifiers.
17062 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17063 * remote-utils.c (prepare_resume_reply): Likewise.
17064 * server.c (cont_thread, general_thread, step_thread)
17065 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17066 unsigned long.
17067 (handle_query): Update format specifiers.
17068 (handle_v_cont, main): Use strtoul for thread IDs.
17069 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17070 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17071 (general_thread, step_thread, thread_from_wait)
17072 (old_thread_from_wait): Update.
17073 * target.h (struct thread_resume): Use unsigned long for THREAD.
17074 (struct target_ops): Use unsigned long for arguments to attach and
17075 thread_alive.
17076
dcdb98d2
DJ
170772005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17078
17079 * acinclude.m4: Include bfd/bfd.m4 directly.
17080 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17081 <agriffis@toolchain.org>.
17082 * aclocal.m4, configure: Regenerated.
17083
bec39cab
AC
170842005-01-07 Andrew Cagney <cagney@gnu.org>
17085
17086 * configure.ac: Rename configure.in, require autoconf 2.59.
17087 * configure: Re-generate.
17088
434c4c77
DJ
170892004-12-08 Daniel Jacobowitz <dan@debian.org>
17090
17091 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17092 LIBS when finished.
17093 * aclocal.m4: Regenerated.
17094 * configure: Regenerated.
17095
db1d3e1b
AS
170962004-11-21 Andreas Schwab <schwab@suse.de>
17097
17098 * linux-m68k-low.c (m68k_num_gregs): Define.
17099 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17100 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17101 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17102 (m68k_breakpoint_at): New. Add to the_low_target.
17103
17104 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17105 srv_linux_thread_db to yes.
17106
43360365
JB
171072004-10-20 Joel Brobecker <brobecker@gnat.com>
17108
17109 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17110 (ARCH_SET_FS): Likewise.
17111 (ARCH_GET_FS): Likewise.
17112 (ARCH_GET_GS): Likewise.
17113
fd500816
DJ
171142004-10-16 Daniel Jacobowitz <dan@debian.org>
17115
17116 * linux-i386-low.c (ps_get_thread_area): New.
17117 * linux-x86-64-low.c (ps_get_thread_area): New.
17118 * linux-low.c: Include <sys/syscall.h>.
17119 (linux_kill_one_process): Don't kill the first thread here.
17120 (linux_kill): Kill the first thread here.
17121 (kill_lwp): New function.
17122 (send_sigstop, linux_send_signal): Use it.
17123 * proc-service.c: Clean up #ifdefs.
17124 (fpregset_info): Delete.
17125 (ps_lgetregs): Update and enable implementation.
17126 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17127 implementations.
17128 * remote-utils.c (struct sym_cache, symbol_cache): New.
17129 (input_interrupt): Print a clearer message.
17130 (async_io_enabled): New variable.
17131 (enable_async_io, disable_async_io): Use it. Update comments.
17132 (look_up_one_symbol): Use the symbol cache.
17133 * thread-db.c (thread_db_look_up_symbols): New function.
17134 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17135
f6de3c42
DJ
171362004-10-16 Daniel Jacobowitz <dan@debian.org>
17137
17138 * configure.in: Test for -rdynamic.
17139 * configure: Regenerated.
17140 * Makefile (INTERNAL_LDFLAGS): New.
17141 (gdbserver, gdbreplay): Use it.
17142
2c0fc042
AC
171432004-09-02 Andrew Cagney <cagney@gnu.org>
17144
17145 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17146
075b3282
DJ
171472004-03-23 Daniel Jacobowitz <drow@mvista.com>
17148
17149 * linux-low.c (linux_wait): Clear all_processes list also.
17150
fa6a77dc
DJ
171512004-03-12 Daniel Jacobowitz <drow@mvista.com>
17152
17153 * linux-low.c: Include <errno.h>. Remove extern declaration of
17154 errno.
17155
6d782a97
DJ
171562004-03-12 Daniel Jacobowitz <drow@mvista.com>
17157
17158 * gdbreplay.c, server.h, utils.c: Update copyright years.
17159
3a7fb99b
DJ
171602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17161
17162 * server.c (main): Print child status or termination signal from
17163 variable 'signal', not 'sig'.
17164
c3e735a6
DJ
171652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17166
17167 * linux-low.c (linux_read_memory): Change return type to
17168 int. Check for and return error from ptrace().
17169 * target.c (read_inferior_memory): Change return type to int. Pass
17170 back return status from the_target->read_memory().
17171 * target.h (struct target_ops): Adapt *read_memory() prototype.
17172 Update comment.
17173 (read_inferior_memory): Adapt prototype.
17174 * server.c (main): Return an error packet if
17175 read_inferior_memory() returns an error.
17176
a59d1c82
DJ
171772004-03-04 Daniel Jacobowitz <drow@mvista.com>
17178
17179 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17180 Unify with other clean targets.
17181
dc3f8883
DJ
171822004-02-29 Daniel Jacobowitz <drow@mvista.com>
17183
17184 * server.c (handle_v_cont): Call set_desired_inferior.
17185
89a208da
DJ
171862004-02-29 Daniel Jacobowitz <drow@mvista.com>
17187
17188 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17189
62ea82f5
DJ
171902004-02-29 Daniel Jacobowitz <drow@mvista.com>
17191
17192 * linux-low.c (linux_wait): Unblock async I/O.
17193 (linux_resume): Block and enable async I/O.
17194 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17195 * server.h (block_async_io, unblock_async_io): Add prototypes.
17196
6910d122
DJ
171972004-02-29 Daniel Jacobowitz <drow@mvista.com>
17198
17199 * remote-utils.c (remote_open): Print a status notice after
17200 opening a TCP port.
17201 * server.c (attach_inferior): Print a status notice after
17202 attaching.
17203
172042004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17205
17206 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17207
c89dc5d4
DJ
172082004-02-26 Daniel Jacobowitz <drow@mvista.com>
17209
17210 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17211 error packet.
17212 * server.c, target.h: Update copyright years.
17213
4b8dad4a
RM
172142004-02-25 Roland McGrath <roland@redhat.com>
17215
17216 * target.h (struct target_ops): New member `read_auxv'.
17217 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17218 * linux-low.c (linux_read_auxv): New function.
17219 (linux_target_ops): Initialize `read_auxv' member to that.
17220
d7446758
JB
172212004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17222
17223 Committed by Jim Blandy <jimb@redhat.com>.
17224
17225 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17226 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17227 instead of GPR_SIZE to distiguish s390 and s390x targets.
17228
5544ad89
DJ
172292004-01-31 Daniel Jacobowitz <drow@mvista.com>
17230
17231 * linux-low.c: Update copyright year.
17232 (check_removed_breakpoint): Clear pending_is_breakpoint.
17233 (linux_set_resume_request, linux_queue_one_thread)
17234 (resume_status_pending_p): New functions.
17235 (linux_continue_one_thread): Use process->resume.
17236 (linux_resume): Only resume threads if there are no pending events.
17237 * linux-low.h (struct process_info): Add resume request
17238 pointer.
17239
2a68b70e
DJ
172402004-01-30 Daniel Jacobowitz <drow@mvista.com>
17241
17242 * regcache.c (new_register_cache): Clear the allocated register
17243 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17244
64386c31
DJ
172452003-10-13 Daniel Jacobowitz <drow@mvista.com>
17246
17247 * linux-low.c (linux_resume): Take a struct thread_resume *
17248 argument.
17249 (linux_wait): Update call.
17250 (resume_ptr): New static variable.
17251 (linux_continue_one_thread): Renamed from
17252 linux_continue_one_process. Use resume_ptr.
17253 (linux_resume): Use linux_continue_one_thread.
17254 * server.c (handle_v_cont, handle_v_requests): New functions.
17255 (myresume): New function.
17256 (main): Handle 'v' case.
17257 * target.h (struct thread_resume): New type.
17258 (struct target_ops): Change argument of "resume" to struct
17259 thread_resume *.
17260 (myresume): Delete macro.
17261
c938e9b0
L
172622003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17263
17264 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17265 (uninstall): Support DESTDIR.
17266
7f313d07
BC
17267Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17268
17269 * configure.srv: Add xscale*linux copy of arm*linux entry.
17270
3b2fc2ea
DJ
172712003-07-24 Daniel Jacobowitz <drow@mvista.com>
17272
17273 * linux-arm-low.c (arm_reinsert_addr): New function.
17274 (the_low_target): Add arm_reinsert_addr.
17275
1c0a559e
MK
172762003-07-08 Mark Kettenis <kettenis@gnu.org>
17277
17278 * mem-break.c: Remove whitespace at end of file.
17279
43d5792c
DJ
172802003-06-28 Daniel Jacobowitz <drow@mvista.com>
17281
17282 * configure.in: Check whether we need to prototype strerror.
17283 * server.h: Optionally prototype strerror.
17284 * gdbreplay.c (perror_with_name): Use strerror.
17285 * linux-low.c (linux_attach_lwp): Use strerror.
17286 * utils.c (perror_with_name): Use strerror.
17287 * config.in, configure: Regenerated.
17288
c8a86edf
DJ
172892003-06-28 Daniel Jacobowitz <drow@mvista.com>
17290
17291 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17292 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17293
73d37363
DJ
172942003-06-20 Daniel Jacobowitz <drow@mvista.com>
17295
17296 * Makefile.in (SFILES): Update.
17297 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17298 low-sun3.c: Remove files.
17299
6ad8ae5c
DJ
173002003-06-17 Daniel Jacobowitz <drow@mvista.com>
17301
17302 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17303 (linux_detach_one_process, linux_detach): New functions.
17304 (linux_target_ops): Add linux_detach.
17305 * server.c (main): Handle 'D' packet.
17306 * target.h (struct target_ops): Add "detach" member.
17307 (detach_inferior): Define.
17308
1581182a
MK
173092003-06-13 Mark Kettenis <kettenis@gnu.org>
17310
17311 From Kelley Cook <kelleycook@wideopenwest.com>:
17312 * configure.srv: Accept i[34567]86 variants.
17313
e5379b03
DJ
173142003-06-05 Daniel Jacobowitz <drow@mvista.com>
17315
17316 * linux-low.c (linux_wait_for_event): Correct comment typos.
17317 (linux_resume_one_process): Call check_removed_breakpoint.
17318 (linux_send_signal): New function.
17319 (linux_target_ops): Add linux_send_signal.
17320 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17321 of kill.
17322 * target.h (struct target_ops): Add send_signal.
17323
2ff29de4
JB
173242003-05-29 Jim Blandy <jimb@redhat.com>
17325
17326 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17327 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17328 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17329 away part of the register's value.
17330
254787d4
DJ
173312003-03-26 Daniel Jacobowitz <drow@mvista.com>
17332
17333 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17334 (linux_wait_for_event, linux_init_signals): Likewise.
17335
94e10508
DJ
173362003-03-17 Daniel Jacobowitz <drow@mvista.com>
17337
17338 * configure.in: Check for stdlib.h.
17339 * configure: Regenerated.
17340 * config.in: Regenerated.
17341
4c0711e0
DJ
173422003-01-04 Andreas Schwab <schwab@suse.de>
17343
17344 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17345
ef66e766
AC
173462003-01-02 Andrew Cagney <ac131313@redhat.com>
17347
17348 * Makefile.in: Remove obsolete code.
17349
a1358604
DJ
173502002-11-20 Daniel Jacobowitz <drow@mvista.com>
17351
17352 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17353 defined(PT_FPR0_HI).
17354
23ce3b1c
DJ
173552002-11-17 Stuart Hughes <seh@zee2.com>
17356
17357 * linux-arm-low.c (arm_num_regs): Increase.
17358 (arm_regmap): Include status register.
17359
173602002-11-17 Daniel Jacobowitz <drow@mvista.com>
17361
17362 * linux-low.c (register_addr): Remove incorrect -1 check.
17363
a9fa9f7d
DJ
173642002-08-29 Daniel Jacobowitz <drow@mvista.com>
17365
17366 * linux-low.c (linux_create_inferior): Call setpgid. Return
17367 the new PID.
17368 (unstopped_p, linux_signal_pid): Remove.
17369 (linux_target_ops): Remove linux_signal_pid.
17370 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17371 global instead of target method.
17372 * target.h (struct target_ops): Remove signal_pid. Update comment
17373 for create_inferior.
17374 * server.c (signal_pid): New variable.
17375 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17376 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17377 (attach_inferior): Set signal_pid.
17378
17574093
DJ
173792002-08-23 Daniel Jacobowitz <drow@mvista.com>
17380
17381 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17382
173832002-08-20 Jim Blandy <jimb@redhat.com>
17384
17385 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17386 default for this.
17387
173882002-08-01 Andrew Cagney <cagney@redhat.com>
17389
17390 * Makefile.in: Make chill references obsolete.
17391
173922002-07-24 Kevin Buettner <kevinb@redhat.com>
17393
17394 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17395 * configure: Regenerate.
17396 * config.in: Regenerate.
17397
173982002-07-09 David O'Brien <obrien@FreeBSD.org>
17399
17400 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17401 (perror_with_name, remote_close, remote_open, expect, play): Static.
17402
174032002-07-04 Michal Ludvig <mludvig@suse.cz>
17404
4b8dad4a 17405 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17406 byte offsets instead of an array of indexes.
17407 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17408
174092002-06-13 Daniel Jacobowitz <drow@mvista.com>
17410
17411 * regcache.c: Add comment.
17412
174132002-06-11 Daniel Jacobowitz <drow@mvista.com>
17414
17415 * thread-db.c: New file.
17416 * proc-service.c: New file.
17417 * acinclude.m4: New file.
17418 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17419 proc-service.o, and thread-db.o.
17420 (linux-low.o): Add USE_THREAD_DB.
17421 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17422 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17423 * aclocal.m4: Regenerated.
17424 * config.in: Regenerated.
17425 * configure: Regenerated.
17426 * configure.in: Check for proc_service.h, sys/procfs.h,
17427 thread_db.h, and linux/elf.h headrs.
17428 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17429 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17430 Check for -lthread_db and thread support.
17431 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17432 PowerPC, and SuperH.
17433 * i387-fp.c: Constify arguments.
17434 * i387-fp.h: Likewise.
17435 * inferiors.c: (struct thread_info): Renamed from
17436 `struct inferior_info'. Remove PID member. Use generic inferior
17437 list header. All uses updated.
17438 (inferiors, signal_pid): Removed.
17439 (all_threads): New variable.
17440 (get_thread): Define.
17441 (add_inferior_to_list): New function.
17442 (for_each_inferior): New function.
17443 (change_inferior_id): New function.
17444 (add_inferior): Removed.
17445 (remove_inferior): New function.
17446 (add_thread): New function.
17447 (free_one_thread): New function.
17448 (remove_thread): New function.
17449 (clear_inferiors): Use for_each_inferior and free_one_thread.
17450 (find_inferior): New function.
17451 (find_inferior_id): New function.
17452 (inferior_target_data): Update argument type.
17453 (set_inferior_target_data): Likewise.
17454 (inferior_regcache_data): Likewise.
17455 (set_inferior_regcache_data): Likewise.
17456 * linux-low.c (linux_bp_reinsert): Remove.
17457 (all_processes, stopping_threads, using_thrads)
17458 (struct pending_signals, debug_threads, pid_of): New.
17459 (inferior_pid): Replace with macro.
17460 (struct inferior_linux_data): Remove.
17461 (get_stop_pc, add_process): New functions.
17462 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17463 Use add_process and add_thread.
17464 (linux_attach_lwp): New function, based on old linux_attach. Use
17465 add_process and add_thread. Set stop_expected for new threads.
17466 (linux_attach): New function.
17467 (linux_kill_one_process): New function.
17468 (linux_kill): Kill all LWPs.
17469 (linux_thread_alive): Use find_inferior_id.
17470 (check_removed_breakpoints, status_pending_p): New functions.
17471 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17472 Update. Use WNOHANG. Wait for cloned processes also. Update process
17473 struct for the found process.
17474 (linux_wait_for_event): New function.
17475 (linux_wait): Use it. Support LWPs.
17476 (send_sigstop, wait_for_sigstop, stop_all_processes)
17477 (linux_resume_one_process, linux_continue_one_process): New functions.
17478 (linux_resume): Support LWPs.
17479 (REGISTER_RAW_SIZE): Remove.
17480 (fetch_register): Use register_size instead. Call supply_register.
17481 (usr_store_inferior_registers): Likewise. Call collect_register.
17482 Fix recursive case.
17483 (regsets_fetch_inferior_registers): Improve error message.
17484 (regsets_store_inferior_registers): Add debugging.
17485 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17486 (unstopped_p, linux_signal_pid): New functions.
17487 (linux_target_ops): Add linux_signal_pid.
17488 (linux_init_signals): New function.
17489 (initialize_low): Call it. Initialize using_threads.
17490 * regcache.c (inferior_regcache_data): Add valid
17491 flag.
17492 (get_regcache): Fetch registers lazily. Add fetch argument
17493 and update all callers.
17494 (regcache_invalidate_one, regcache_invalidate): New
17495 functions.
17496 (new_register_cache): Renamed from create_register_cache.
17497 Return the new regcache.
17498 (free_register_cache): Change argument to a void *.
17499 (registers_to_string, registers_from_string): Call get_regcache
17500 with fetch flag set.
17501 (register_data): Make static. Pass fetch flag to get_regcache.
17502 (supply_register): Call get_regcache with fetch flag clear.
17503 (collect_register): Call get_regcache with fetch flag set.
17504 (collect_register_as_string): New function.
17505 * regcache.h: Update.
17506 * remote-utils.c (putpkt): Flush after debug output and use
17507 stderr.
17508 Handle input interrupts while waiting for an ACK.
17509 (input_interrupt): Use signal_pid method.
17510 (getpkt): Flush after debug output and use stderr.
17511 (outreg): Use collect_register_as_string.
17512 (new_thread_notify, dead_thread_notify): New functions.
17513 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17514 and general_thread.
17515 (look_up_one_symbol): Flush after debug output.
17516 * server.c (step_thread, server_waiting): New variables.
17517 (start_inferior): Don't use signal_pid. Update call to mywait.
17518 (attach_inferior): Update call to mywait.
17519 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17520 (main): Don't fetch/store registers explicitly. Use
17521 set_desired_inferior. Support proposed ``Hs'' packet. Update
17522 calls to mywait.
17523 * server.h: Update.
17524 (struct inferior_list, struct_inferior_list_entry): New.
17525 * target.c (set_desired_inferior): New.
17526 (write_inferior_memory): Constify.
17527 (mywait): New function.
17528 * target.h: Update.
17529 (struct target_ops): New signal_pid method.
17530 (mywait): Removed macro, added prototype.
17531
17532 * linux-low.h (regset_func): Removed.
17533 (regset_fill_func, regset_store_func): New.
17534 (enum regset_type): New.
17535 (struct regset_info): Add type field. Use new operation types.
17536 (struct linux_target_ops): stop_pc renamed to get_pc.
17537 Add decr_pc_after_break and breakpoint_at.
17538 (get_process, get_thread_proess, get_process_thread)
17539 (strut process_info, all_processes, linux_attach_lwp)
17540 (thread_db_init): New.
17541
17542 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17543 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17544 (the_low_target): Add new members.
17545 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17546 (i386_store_fpxregset): Constify.
17547 (target_regsets): Add new kind identifier.
17548 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17549 (i386_set_pc): Add debugging.
17550 (i386_breakpoint_at): New function.
17551 (the_low_target): Add new members.
17552 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17553 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17554 (mips_breakpoint_at): New.
17555 (the_low_target): Add new members.
17556 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17557 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17558 (the_low_target): Add new members.
17559 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17560 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17561 (the_low_target): Add new members.
17562 * linux-x86-64-low.c (target_regsets): Add new kind
17563 identifier.
17564
175652002-05-15 Daniel Jacobowitz <drow@mvista.com>
17566
17567 From Martin Pool <mbp@samba.org>:
17568 * server.c (gdbserver_usage): New function.
17569 (main): Call it.
17570
175712002-05-14 Daniel Jacobowitz <drow@mvista.com>
17572
17573 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17574 stop_at -> stop_pc.
17575
175762002-05-04 Andrew Cagney <ac131313@redhat.com>
17577
17578 * Makefile.in: Remove obsolete code.
17579
175802002-04-24 Michal Ludvig <mludvig@suse.cz>
17581
17582 * linux-low.c (regsets_fetch_inferior_registers),
17583 (regsets_store_inferior_registers): Removed cast to int from
17584 ptrace() calls.
17585 * regcache.h: Added declaration of struct inferior_info.
17586
175872002-04-20 Daniel Jacobowitz <drow@mvista.com>
17588
17589 * inferiors.c (struct inferior_info): Add regcache_data.
17590 (add_inferior): Call create_register_cache.
17591 (clear_inferiors): Call free_register_cache.
17592 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17593 * regcache.c (struct inferior_regcache_data): New.
17594 (registers): Remove.
17595 (get_regcache): New function.
17596 (create_register_cache, free_register_cache): New functions.
17597 (set_register_cache): Don't initialize the register cache here.
17598 (registers_to_string, registers_from_string, register_data): Call
17599 get_regcache.
17600 * regcache.h: Add prototypes.
17601 * server.h: Likewise.
17602
176032002-04-20 Daniel Jacobowitz <drow@mvista.com>
17604
17605 * mem-break.c: New file.
17606 * mem-break.h: New file.
17607 * Makefile.in: Add mem-break.o rule; update server.h
17608 dependencies.
17609 * inferiors.c (struct inferior_info): Add target_data
17610 member.
17611 (clear_inferiors): Free target_data member if set.
17612 (inferior_target_data, set_inferior_target_data): New functions.
17613 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17614 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17615 * linux-low.c (linux_bp_reinsert): New variable.
17616 (struct inferior_linux_data): New.
17617 (linux_create_inferior): Use set_inferior_target_data.
17618 (linux_attach): Likewise. Call add_inferior.
17619 (linux_wait_for_one_inferior): New function.
17620 (linux_wait): Call it.
17621 (linux_write_memory): Add const.
17622 (initialize_low): Call set_breakpoint_data.
17623 * linux-low.h (struct linux_target_ops): Add breakpoint
17624 handling members.
17625 * server.c (attach_inferior): Remove extra add_inferior
17626 call.
17627 * server.h: Include mem-break.h. Update inferior.c
17628 prototypes.
17629 * target.c (read_inferior_memory)
17630 (write_inferior_memory): New functions.
17631 * target.h (read_inferior_memory)
17632 (write_inferior_memory): Change macros to prototypes.
17633 (struct target_ops): Update comments. Add const to write_memory
17634 definition.
17635
176362002-04-11 Daniel Jacobowitz <drow@mvista.com>
17637
17638 * linux-low.c (usr_store_inferior_registers): Support
17639 registers which are allowed to fail to store.
17640 * linux-low.h (linux_target_ops): Likewise.
17641 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17642 (ppc_cannot_store_register): FPSCR may not be storable.
17643
176442002-04-09 Daniel Jacobowitz <drow@mvista.com>
17645
17646 * server.h: Include <string.h> if HAVE_STRING_H.
17647 * ChangeLog: Correct paths in last ChangeLog entry.
17648
176492002-04-09 Daniel Jacobowitz <drow@mvista.com>
17650
17651 * linux-low.h: Remove obsolete prototypes.
17652 (struct linux_target_ops): New.
17653 (extern the_low_target): New.
17654 * linux-low.c (num_regs, regmap): Remove declarations.
17655 (register_addr): Use the_low_target explicitly.
17656 (fetch_register): Likewise.
17657 (usr_fetch_inferior_registers): Likewise.
17658 (usr_store_inferior_registers): Likewise.
17659 * linux-arm-low.c (num_regs): Remove.
17660 (arm_num_regs): Define.
17661 (arm_regmap): Renamed from regmap, made static.
17662 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17663 made static.
17664 (arm_cannot_store_register): Renamed from cannot_store_register,
17665 made static.
17666 (the_low_target): New.
17667 * linux-i386-low.c (num_regs): Remove.
17668 (i386_num_regs): Define.
17669 (i386_regmap): Renamed from regmap, made static.
17670 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17671 made static.
17672 (i386_cannot_store_register): Renamed from cannot_store_register,
17673 made static.
17674 (the_low_target): New.
17675 * linux-ia64-low.c (num_regs): Remove.
17676 (ia64_num_regs): Define.
17677 (ia64_regmap): Renamed from regmap, made static.
17678 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17679 made static.
17680 (ia64_cannot_store_register): Renamed from cannot_store_register,
17681 made static.
17682 (the_low_target): New.
17683 * linux-m68k-low.c (num_regs): Remove.
17684 (m68k_num_regs): Define.
17685 (m68k_regmap): Renamed from regmap, made static.
17686 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17687 made static.
17688 (m68k_cannot_store_register): Renamed from cannot_store_register,
17689 made static.
17690 (the_low_target): New.
17691 * linux-mips-low.c (num_regs): Remove.
17692 (mips_num_regs): Define.
17693 (mips_regmap): Renamed from regmap, made static.
17694 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17695 made static.
17696 (mips_cannot_store_register): Renamed from cannot_store_register,
17697 made static.
17698 (the_low_target): New.
17699 * linux-ppc-low.c (num_regs): Remove.
17700 (ppc_num_regs): Define.
17701 (ppc_regmap): Renamed from regmap, made static.
17702 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17703 made static.
17704 (ppc_cannot_store_register): Renamed from cannot_store_register,
17705 made static.
17706 (the_low_target): New.
17707 * linux-s390-low.c (num_regs): Remove.
17708 (s390_num_regs): Define.
17709 (s390_regmap): Renamed from regmap, made static.
17710 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17711 made static.
17712 (s390_cannot_store_register): Renamed from cannot_store_register,
17713 made static.
17714 (the_low_target): New.
17715 * linux-sh-low.c (num_regs): Remove.
17716 (sh_num_regs): Define.
17717 (sh_regmap): Renamed from regmap, made static.
17718 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17719 made static.
17720 (sh_cannot_store_register): Renamed from cannot_store_register,
17721 made static.
17722 (the_low_target): New.
17723 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17724 (the_low_target): New.
17725
177262002-04-09 Daniel Jacobowitz <drow@mvista.com>
17727
17728 * Makefile.in: Add stamp-h target.
17729 * configure.in: Create stamp-h.
17730 * configure: Regenerated.
17731
177322002-04-09 Daniel Jacobowitz <drow@mvista.com>
17733
17734 * inferiors.c: New file.
17735 * target.c: New file.
17736 * target.h: New file.
17737 * Makefile.in: Add target.o and inferiors.o. Update
17738 dependencies.
17739 * linux-low.c (inferior_pid): New static variable,
17740 moved from server.c.
17741 (linux_create_inferior): Renamed from create_inferior.
17742 Call add_inferior. Return 0 on success instead of a PID.
17743 (linux_attach): Renamed from myattach.
17744 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17745 (linux_thread_alive): Renamed from mythread_alive.
17746 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17747 child dies.
17748 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17749 (regsets_store_inferior_registers): Correct error message.
17750 Add missing ``return 0''.
17751 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17752 (linux_store_registers): Renamed from store_inferior_registers.
17753 (linux_read_memory): Renamed from read_inferior_memory.
17754 (linux_write_memory): Renamed from write_inferior_memory.
17755 (linux_target_ops): New structure.
17756 (initialize_low): Call set_target_ops ().
17757 * remote-utils.c (unhexify): New function.
17758 (hexify): New function.
17759 (input_interrupt): Send signals to ``signal_pid''.
17760 * server.c (inferior_pid): Remove.
17761 (start_inferior): Update create_inferior call.
17762 (attach_inferior): Call add_inferior.
17763 (handle_query): New function.
17764 (main): Call handle_query for `q' packets.
17765 * server.h: Include "target.h". Remove obsolete prototypes.
17766 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17767
177682002-04-09 Daniel Jacobowitz <drow@mvista.com>
17769
17770 * Makefile.in: Add WARN_CFLAGS. Update configury
17771 dependencies.
17772 * configure.in: Check for <string.h>
17773 * configure: Regenerate.
17774 * config.in: Regenerate.
17775 * gdbreplay.c: Include needed system headers.
17776 (remote_open): Remove strchr prototype.
17777 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17778 * regcache.c (supply_register): Change buf argument to const void *.
17779 (supply_register_by_name): Likewise.
17780 (collect_register): Change buf argument to void *.
17781 (collect_register_by_name): Likewise.
17782 * regcache.h: Add missing prototypes.
17783 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17784 * server.c (handle_query): New function.
17785 (attached): New static variable, moved out of main.
17786 (main): Quiet longjmp clobber warnings.
17787 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17788 * utils.c (error): Remove NORETURN.
17789 (fatal): Likewise.
This page took 2.052285 seconds and 4 git commands to generate.