gdbserver: make some functions static in linux-x86-low.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
df4a0200
SM
12020-01-13 Simon Marchi <simon.marchi@efficios.com>
2
3 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
5 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
6 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
7 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
8 static.
9
89e94ec9
SM
102020-01-13 Simon Marchi <simon.marchi@efficios.com>
11
12 * inferiors.c: Include gdbsupport/common-inferior.h.
13
2552728a
SM
142020-01-13 Simon Marchi <simon.marchi@efficios.com>
15
16 * hostio-errno.c: Include hostio.h.
17
4025fa09
SM
182020-01-13 Simon Marchi <simon.marchi@efficios.com>
19
20 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
21 prerequisite.
22
c0b0a142
SM
232020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
24
25 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
26 * linux-arm-tdesc.h: Include arch/arm.h.
27
bb1183e2
SM
282020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
29
30 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
31
f5df0b5f
SM
322020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
33
34 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
35 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
36
5b6d1e4f
PA
372020-01-10 Pedro Alves <palves@redhat.com>
38
39 * fork-child.c (post_fork_inferior): Pass target down to
40 startup_inferior.
41 * inferiors.c (switch_to_thread): Add process_stratum_target
42 parameter.
43 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
44 * nto-low.c (nto_target_ops): Now a process_stratum_target.
45 * linux-low.c (linux_target_ops): Now a process_stratum_target.
46 * remote-utils.c (prepare_resume_reply): Pass the target to
47 switch_to_thread.
48 * target.c (the_target): Now a process_stratum_target.
49 (done_accessing_memory): Pass the target to switch_to_thread.
50 (set_target_ops): Ajust to use process_stratum_target.
51 * target.h (struct target_ops): Rename to ...
52 (struct process_stratum_target): ... this.
53 (the_target, set_target_ops): Adjust.
54 (prepare_to_access_memory): Adjust comment.
55 * win32-low.c (child_xfer_memory): Adjust to use
56 process_stratum_target.
57 (win32_target_ops): Now a process_stratum_target.
58
559e7e50
EZ
592020-01-06 Eli Zaretskii <eliz@gnu.org>
60 Pedro Alves <palves@redhat.com>
61
62 * win32-low.c (get_child_debug_event): Extract the fatal exception
63 from the exit status and convert to the equivalent Posix signal
64 number.
65 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
66 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
67
48189bec
HD
682020-01-01 Hannes Domani <ssbssa@yahoo.de>
69
70 * Makefile.in: Use INSTALL_PROGRAM_ENV.
71
5dd8bf88
JB
722020-01-01 Joel Brobecker <brobecker@adacore.com>
73
74 * server.c (gdbserver_version): Change copyright year to 2020.
75 * gdbreplay.c (gdbreplay_version): Likewise.
76
0ad6b8ee
CB
772019-12-19 Christian Biesinger <cbiesinger@google.com>
78
79 * configure: Regenerate.
80 * configure.ac: Quote variable arguments of test.
81
1ee7b812
BE
822019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
83
84 * Makefile.in: Fix build with GNU Make 3.81
85
d9fa87f4
TT
862019-12-16 Tom Tromey <tromey@adacore.com>
87
88 * server.c (get_exec_file): Constify result.
89
ab7d13f0
CB
902019-12-10 Christian Biesinger <cbiesinger@google.com>
91
92 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
93 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
94 * config.in: Regenerate.
95 * configure: Regenerate.
96 * configure.ac: Don't check for strerror.
97 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
98 Call safe_strerror instead of strerror.
99 * server.h (strerror): Remove this now-unnecessary declaration.
100 * tracepoint.c (init_named_socket): Call safe_strerror instead of
101 strerror.
102 (gdb_agent_helper_thread): Likewise.
103 * utils.c (perror_with_name): Likewise.
104
4da8c3a8
TT
1052019-11-26 Tom Tromey <tom@tromey.com>
106
107 * configure, config.in: Rebuild.
108
21987b9c
TT
1092019-11-26 Tom Tromey <tom@tromey.com>
110
111 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
112 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
113 gdb_sigmask.
114 * configure, config.in: Rebuild.
115
5e030278
TT
1162019-11-26 Tom Tromey <tom@tromey.com>
117
118 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
119 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
120 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
121 * acinclude.m4: Include ax_pthread.m4.
122 * config.in, configure: Rebuild.
123
6d91ce9a
CB
1242019-11-26 Christian Biesinger <cbiesinger@google.com>
125
126 * debug.c (debug_set_output): Call safe_strerror instead of
127 strerror.
128 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
129 (linux_kill_one_lwp): Likewise.
130 (linux_detach_one_lwp): Likewise.
131 (linux_wait_for_event_filtered): Likewise.
132 (store_register): Likewise.
133 * lynx-low.c (lynx_attach): Likewise.
134 * mem-break.c (insert_memory_breakpoint): Likewise.
135 (remove_memory_breakpoint): Likewise.
136 (delete_fast_tracepoint_jump): Likewise.
137 (set_fast_tracepoint_jump): Likewise.
138 (uninsert_fast_tracepoint_jumps_at): Likewise.
139 (reinsert_fast_tracepoint_jumps_at): Likewise.
140 * nto-low.c (nto_xfer_memory): Likewise.
141 (nto_resume): Likewise.
142
6cdd651f
LM
1432019-11-20 Luis Machado <luis.machado@linaro.org>
144
145 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
146 instead of register count.
147 * tdesc.c (tdesc_contains_feature): New function.
148 * tdesc.h (tdesc_contains_feature): New prototype.
149
cd850b40
CB
1502019-11-15 Christian Biesinger <cbiesinger@google.com>
151
152 * Makefile.in: Add safe-strerror.c.
153 * configure: Regenerate.
154 * configure.ac: Don't source common.host.
155
5abebf3c
CB
1562019-11-15 Christian Biesinger <cbiesinger@google.com>
157
158 * config.in: Regenerate.
159 * configure: Regenerate.
160
e06f3d6e
AB
1612019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
162
163 * ax.c (ax_printf): Handle size_t_arg.
164
ca3a04f6
CB
1652019-11-06 Christian Biesinger <cbiesinger@google.com>
166
167 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
168 * mi/mi-main.c (output_cores): Likewise.
169 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
170 (linux_xfer_osdata_modules): Likewise.
171 * remote.c (register_remote_support_xml): Likewise.
172 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
173 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
174
e48f6033
CB
1752019-11-01 Christian Biesinger <cbiesinger@google.com>
176
177 * configure: Regenerate.
178 * configure.ac: Remove check for strerror_r.
179
e7e97a2e
CB
1802019-10-31 Christian Biesinger <cbiesinger@google.com>
181
182 * config.in: Regenerate.
183 * configure: Regenerate.
184 * configure.ac: Also check for strerror_r.
185
75cafaa6
CB
1862019-10-31 Christian Biesinger <cbiesinger@google.com>
187
188 * ax.h (debug_agent): Remove duplicate declaration.
189
30baf67b
TV
1902019-10-26 Tom de Vries <tdevries@suse.de>
191
192 * linux-aarch64-low.c: Fix typos in comments.
193 * linux-arm-low.c: Same.
194 * linux-low.c: Same.
195 * linux-ppc-low.c: Same.
196 * proc-service.c: Same.
197 * regcache.h: Same.
198 * server.c: Same.
199 * tracepoint.c: Same.
200 * win32-low.c: Same.
201
52c64cf7
TT
2022019-10-25 Tom Tromey <tromey@adacore.com>
203
204 * utils.c (xstrdup): Remove.
205
c12d372d
TT
2062019-10-23 Tom Tromey <tom@tromey.com>
207
208 * configure, config.in: Rebuild.
209
4d0b984b
TT
2102019-10-23 Tom Tromey <tom@tromey.com>
211
212 * configure: Rebuild.
213 * acinclude.m4: Use m4_include, not sinclude.
214
c5adaa19
TT
2152019-10-17 Tom Tromey <tromey@adacore.com>
216
217 * configure: Rebuild.
218 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
219 in AC_CONFIG_FILES invocation.
220 * Makefile.in (stamp-h, Makefile): Use new-style config.status
221 invocation.
222
fec4e896
CB
2232019-10-16 Christian Biesinger <cbiesinger@google.com>
224
225 * server.c: Include xml-builtin.h.
226 (get_xml_features): Don't declare xml_builtins here.
227
00975ff6
AB
2282019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
229
230 * Makefile.in: Remove references to vec-ipa.o.
231
0dc32745
AB
2322019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
233
234 * Makefile.in: Remove references to vec.c.
235
3e6ec53a
CB
2362019-10-02 Christian Biesinger <cbiesinger@google.com>
237
238 * server.c (server_waiting): Change to bool.
239 (extended_protocol): Likewise.
240 (response_needed): Likewise.
241 (exit_requested): Likewise.
242 (run_once): Likewise.
243 (report_no_resumed): Likewise.
244 (non_stop): Likewise.
245 (disable_packet_vCont): Likewise.
246 (disable_packet_Tthread): Likewise.
247 (disable_packet_qC): Likewise.
248 (disable_packet_qfThreadInfo): Likewise.
249 (handle_general_set): Update.
250 (handle_detach): Update.
251 (handle_monitor_command): Update.
252 (handle_query): Update.
253 (captured_main): Update.
254 (process_serial_event): Update.
255 * server.h (server_waiting): Change to bool.
256 (disable_packet_vCont): Likewise.
257 (disable_packet_Tthread): Likewise.
258 (disable_packet_qC): Likewise.
259 (disable_packet_qfThreadInfo): Likewise.
260 (run_once): Likewise.
261 (non_stop): Likewise.
262 * target.c (target_stop_and_wait): Update.
263
80fd2826
TT
2642019-10-02 Tom Tromey <tromey@adacore.com>
265
266 * Makefile.in (SFILES): Add common-inferior.c.
267 (OBS): Add common-inferior.o.
268 * server.c (startup_with_shell): Don't define.
269
46f29a9a
AB
2702019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
271
272 * linux-low.c (linux_low_read_btrace): Update for change to
273 std::vector.
274
f9d949fb
CB
2752019-09-20 Christian Biesinger <cbiesinger@google.com>
276
277 * debug.c (debug_threads): Remove comment in favor of the header.
278 * debug.h (using_threads): Add declaration.
279 (debug_threads): Add comment.
280 * linux-aarch64-low.c: Include debug.h and remove declaration of
281 debug_threads.
282 * nto-low.c: Likewise.
283 * remote-utils.c: Likewise.
284 * thread-db.c: Likewise.
285
abf516c6
UW
2862019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
287
288 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
289 and powerpc-cell64l-ipa.o.
290 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
291 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
292 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
293 (spu*-*-*): Remove.
294
295 * spu-low.c: Remove file.
296
297 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
298 (parse_spufs_run): Remove.
299 (ppc_get_pc): Remove Cell/B.E. support.
300 (ppc_set_pc): Likewise.
301 (ppc_breakpoint_at): Likewise.
302 (ppc_arch_setup): Likewise.
303 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
304 tdesc_powerpc_cell32l.
305 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
306 or init_registers_powerpc_cell32l.
307 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
308 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
309 or init_registers_powerpc_cell32l.
310 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
311 (init_registers_powerpc_cell32l): Remove prototype.
312 (init_registers_powerpc_cell64l): Likewise.
313
314 * target.h (struct target_ops): Remove qxfer_spu member.
315 * server.c (handle_qxfer_spu): Remove.
316 (qxfer_packets): Remove entry for "spu".
317 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
318 * linux-low.c (SPUFS_MAGIC): Remove.
319 (spu_enumerate_spu_ids): Remove.
320 (linux_qxfer_spu): Remove.
321 (linux_target_ops): Remove qxfer_spu member.
322 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
323 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
324 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
325
2d41fa11
SDJ
3262019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
327
328 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
329 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
330 * config.in: Regenerate.
331 * configure: Regenerate.
332
d59b55f0
TT
3332019-08-15 Tom Tromey <tromey@adacore.com>
334
335 * target.c (target_write_memory): Use gdb::byte_vector.
336
4196ab2a
TT
3372019-08-15 Tom Tromey <tromey@adacore.com>
338
339 * tracepoint.c (write_inferior_data_pointer)
340 (write_inferior_integer, write_inferior_int8)
341 (write_inferior_uinteger, m_tracepoint_action_download)
342 (r_tracepoint_action_download, x_tracepoint_action_download)
343 (l_tracepoint_action_download, clear_inferior_trace_buffer)
344 (download_agent_expr, download_tracepoint_1)
345 (download_trace_state_variables, upload_fast_traceframes): Update.
346 * server.c (gdb_write_memory): Update.
347 * remote-utils.c (relocate_instruction): Update.
348 * proc-service.c (ps_pdwrite): Update.
349 * mem-break.c (remove_memory_breakpoint)
350 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
351 (uninsert_fast_tracepoint_jumps_at)
352 (reinsert_fast_tracepoint_jumps_at): Update.
353 * linux-x86-low.c (append_insns)
354 (i386_install_fast_tracepoint_jump_pad)
355 (amd64_write_goto_address, i386_write_goto_address): Update.
356 * linux-s390-low.c (append_insns, s390_write_goto_address):
357 Update.
358 * linux-ppc-low.c (ppc_relocate_instruction)
359 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
360 (ppc_write_goto_address): Update.
361 * linux-aarch64-low.c (append_insns): Update.
362 * target.h (struct target_ops): Update.
363 (write_inferior_memory): Don't declare.
364 * target.c (target_write_memory): Rename from
365 write_inferior_memory. Remove old target_write_memory.
366
c6778d00
TT
3672019-08-15 Tom Tromey <tromey@adacore.com>
368
369 * target.c (write_inferior_memory): Use std::vector.
370
404f2902
FCE
3712019-08-06 Frank Ch. Eigler <fche@redhat.com>
372
373 PR build/24886
374 * configure.ac: Drop enable-libmcheck support.
375 * configure, config.in: Rebuild.
376 * acinclude.m4: Don't include it.
377
4c5aa8e0
AH
3782019-07-19 Alan Hayward <alan.hayward@arm.com>
379
380 * configure.srv: Remove Arm xml files.
381
7cc17433
AH
3822019-07-19 Alan Hayward <alan.hayward@arm.com>
383
384 * configure.srv: Add new files. Remove xml generated files.
385 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
386 registers.
387 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
388 * linux-aarch32-tdesc.c: New file.
389 * linux-aarch32-tdesc.h: New file.
390 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
391 * linux-arm-low.c (init_registers_arm, tdesc_arm)
392 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
393 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
394 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
395 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
396 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
397 (arm_read_description): Call arm_linux_read_description.
398 (initialize_low_arch): Don't init registers.
399 * linux-arm-tdesc.c: New file.
400 * linux-arm-tdesc.h: New file.
401
166a82be
AH
4022019-07-10 Alan Hayward <alan.hayward@arm.com>
403
404 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
405 Move counter inside for.
406 (arm_read_description): Check ptrace earlier.
407 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
408
268a13a5
TT
4092019-07-09 Tom Tromey <tom@tromey.com>
410
411 * configure: Rebuild.
412 * configure.ac: Change common to gdbsupport.
413 * acinclude.m4: Change common to gdbsupport.
414 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
415 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
416 common to gdbsupport.
417 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
418 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
419 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
420 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
421 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
422 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
423 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
424 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
425 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
426 common to gdbsupport.
427
350fab54
AH
4282019-07-04 Alan Hayward <alan.hayward@arm.com>
429
430 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
431 defines.
432 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
433
2b40fda7
AH
4342019-07-04 Alan Hayward <alan.hayward@arm.com>
435
436 * configure.srv: Remove legacy xml.
437 * linux-aarch64-low.c (initialize_low_arch): Remove
438 initialize_low_tdesc call.
439 * linux-aarch64-tdesc-selftest.c: Remove file.
440 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
441 * linux-x86-low.c (initialize_low_arch): Remove
442 initialize_low_tdesc call.
443 * linux-x86-tdesc-selftest.c: Remove file.
444 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
445
7d10623d
TV
4462019-06-20 Tom de Vries <tdevries@suse.de>
447
448 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
449 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
450
8d6a48df
TV
4512019-06-19 Tom de Vries <tdevries@suse.de>
452
453 * debug.h (debug_write): Change return type to ssize_t.
454 * debug.c (debug_write): Same.
455
73cc7272
TT
4562019-06-14 Tom Tromey <tom@tromey.com>
457
458 * configure.ac: Use new path to gnulib.
459 * configure: Rebuild.
460 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
461 to gnulib.
462
08f10e02
TT
4632019-06-11 Tom Tromey <tom@tromey.com>
464
465 * Makefile.in (SFILES): Add alloc.c.
466 (OBS): Add alloc.o.
467 (IPA_OBJS): Add alloc-ipa.o.
468 (alloc-ipa.o): New target.
469 (%.o: ../%.c): New pattern rule.
470
422186a9
TT
4712019-06-10 Tom Tromey <tromey@adacore.com>
472
473 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
474 end warning with a newline.
475 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
476 newline.
477 * thread-db.c (attach_thread): Don't end warning with a newline.
478 (thread_db_notice_clone): Likewise.
479 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
480 newline.
481 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
482 end warning with a newline.
483
b02f78f9
PA
4842019-06-04 Pedro Alves <palves@redhat.com>
485
486 * server.c (captured_main): Use make_unique_xstrdup.
487
88ed7edb
TT
4882019-06-02 Tom Tromey <tom@tromey.com>
489
490 * gdbreplay.c (fromhex): Remove.
491 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
492
33a6bc35
TT
4932019-05-29 Tom Tromey <tromey@adacore.com>
494
495 * configure: Rebuild.
496
e90a813d
KB
4972019-05-06 Kevin Buettner <kevinb@redhat.com>
498
499 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
500 sign extension code on 32-bit builds.
501
353ea2d1
EZ
5022019-05-03 Eli Zaretskii <eliz@gnu.org>
503
504 * remote-utils.c:
505 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
506
b494cdff
TT
5072019-04-19 Tom Tromey <tom@tromey.com>
508
509 * server.c (struct vstop_notif): Derive from notif_event.
510 <base>: Remove.
511 (queue_stop_reply): Update.
512 (remove_all_on_match_ptid): Change type. Rewrite.
513 (discard_queued_stop_replies): Rewrite.
514 (in_queued_stop_replies_ptid): Change type.
515 (in_queued_stop_replies): Rewrite.
516 (notif_stop): Update.
517 (queue_stop_reply_callback): Update.
518 (captured_main): Don't call initialize_notif.
519 (push_stop_notification): Update.
520 * notif.c (notif_write_event, handle_notif_ack)
521 (notif_event_enque, notif_push): Update.
522 (notif_event_xfree, initialize_notif): Remove.
523 * notif.h (struct notif_event): Include <list>, not
524 "common/queue.h".
525 (struct notif_server) <queue>: Now a std::list.
526 (notif_event_p): Remove typedef.
527 (initialize_notif): Don't declare.
528 (struct notif_event): Add virtual destructor.
529
a7e559cc
AH
5302019-04-17 Alan Hayward <alan.hayward@arm.com>
531
532 * ax.c (ax_vdebug): Call debug_printf.
533 * debug.c (debug_write): New function.
534 * debug.h (debug_write): New declaration.
535 * linux-low.c (sigchld_handler): Call debug_write.
536
aeb2e706
AH
5372019-04-17 Alan Hayward <alan.hayward@arm.com>
538
539 * debug.c (debug_set_output): New function.
540 (debug_vprintf): Send output to debug_file.
541 (debug_flush): Likewise.
542 * debug.h (debug_set_output): New declaration.
543 * server.c (handle_monitor_command): Add debug-file option.
544 (captured_main): Likewise.
545
c1bc0935
AH
5462019-04-17 Alan Hayward <alan.hayward@arm.com>
547
548 * debug.c (remote_debug): Add definition.
549 * debug.h (remote_debug): Add declaration.
550 * hostio.c (remote_debug): Remove declaration.
551 * remote-utils.c (struct ui_file): Likewise.
552 (remote_debug): Likewise.
553 * remote-utils.h (remote_debug): Likewise,
554 * server.c (remote_debug): Remove definition.
555
3f52fdbc
KB
5562019-04-10 Kevin Buettner <kevinb@redhat.com>
557
558 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
559 when using a 64-bit gdbserver.
560
b0319eaa
TT
5612019-04-09 Tom Tromey <tromey@adacore.com>
562
563 * linux-low.c (select_event_lwp): Use find_thread_in_random.
564
eedc3f4f
TT
5652019-04-08 Tom Tromey <tom@tromey.com>
566
567 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
568 throw.
569 (linux_resume_one_lwp): Likewise.
570
230d2906
TT
5712019-04-08 Tom Tromey <tom@tromey.com>
572
573 * gdbreplay.c: Update.
574 * linux-low.c: Update.
575 * server.c: Update.
576
a70b8144
TT
5772019-04-08 Tom Tromey <tom@tromey.com>
578
579 * server.c: Use C++ exception handling.
580 * linux-low.c: Use C++ exception handling.
581 * gdbreplay.c: Use C++ exception handling.
582
3d6e9d23
TT
5832019-04-08 Tom Tromey <tom@tromey.com>
584
585 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
586 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
587 (captured_main, main): Update.
588 * gdbreplay.c (main): Update.
589
0570503d
PFC
5902019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
591
592 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
593 value in argument pointer, return 1 if the entry is found and 0
594 otherwise. Move comment.
595 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
596 * linux-low.h (linux_get_auxv): Declare.
597 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
598
227a9e65
TT
5992019-04-05 Tom Tromey <tromey@adacore.com>
600
601 * server.c (gdbserver_usage): Use upper-case for metasyntactic
602 variables.
603
69f4c9cc
AH
6042019-03-28 Alan Hayward <alan.hayward@arm.com>
605
606 * linux-low.c (AT_HWCAP2): Add define if not already included.
607
974c89e0
AH
6082019-03-26 Alan Hayward <alan.hayward@arm.com>
609
610 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
611 (aarch64_arch_setup): Call linux_get_hwcap.
612 * linux-arm-low.c (arm_get_hwcap): Remove function.
613 (arm_read_description): Call linux_get_hwcap.
614 * linux-low.c (linux_get_auxv): New function.
615 (linux_get_hwcap): Likewise.
616 (linux_get_hwcap2): Likewise.
617 * linux-low.h (linux_get_hwcap): New declaration.
618 (linux_get_hwcap2): Likewise.
619 * linux-ppc-low.c (ppc_get_auxv): Remove function.
620 (ppc_arch_setup): Call linux_get_hwcap.
621 * linux-s390-low.c (s390_get_hwcap): Remove function.
622 (s390_arch_setup): Call linux_get_hwcap.
623
1ef53e6b
AH
6242019-03-22 Alan Hayward <alan.hayward@arm.com>
625 Jiong Wang <jiong.wang@arm.com>
626
627 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
628 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
629 to fail.
630 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
631
ee4fbcfa
AH
6322019-03-22 Alan Hayward <alan.hayward@arm.com>
633 Jiong Wang <jiong.wang@arm.com>
634
635 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
636 (aarch64_get_hwcap): New function.
637 (aarch64_arch_setup): Read APIA hwcap.
638
6dc0ebde
AH
6392019-03-22 Alan Hayward <alan.hayward@arm.com>
640 Jiong Wang <jiong.wang@arm.com>
641
642 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
643 (initialize_low_tracepoint): Likewise.
644 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
645 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
646 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
647 (aarch64_linux_read_description): Likewise.
648 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
649
1163a4b7
JB
6502019-03-12 John Baldwin <jhb@FreeBSD.org>
651
652 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
653 i386_create_target_description for 'segments' parameter.
654 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
655 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
656 * win32-i386-low.c (i386_arch_setup): Likewise.
657
d3a70e03
TT
6582019-03-12 Tom Tromey <tromey@adacore.com>
659
660 * linux-low.c (iterate_over_lwps): Update.
661
37991b4f
TT
6622019-03-06 Tom Tromey <tom@tromey.com>
663
664 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
665 (captured_main): Use SCOPE_EXIT.
666
45950eb6
SDJ
6672019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
668
669 * configure.srv: Use '$enable_unittest' instead of '$development'
670 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
671 case.
672
43ac54fc
TT
6732019-02-27 Tom Tromey <tromey@adacore.com>
674
675 * gdbreplay.c (logchar): Handle \r\n.
676
df0da8a2
AH
6772019-02-07 Alan Hayward <alan.hayward@arm.com>
678
679 * linux-low.c (linux_attach): Add process before lwp.
680 * server.c (attach_inferior): Check if already attached.
681
1a5c2598
TT
6822019-02-07 Tom Tromey <tom@tromey.com>
683
684 * x86-tdesc.h: Rename include guard.
685 * x86-low.h: Add include guard.
686 * wincecompat.h: Rename include guard.
687 * win32-low.h: Add include guard.
688 * utils.h: Rename include guard.
689 * tracepoint.h: Rename include guard.
690 * tdesc.h: Rename include guard.
691 * target.h: Rename include guard.
692 * server.h: Rename include guard.
693 * remote-utils.h: Rename include guard.
694 * regcache.h: Rename include guard.
695 * nto-low.h: Rename include guard.
696 * notif.h: Add include guard.
697 * mem-break.h: Rename include guard.
698 * lynx-low.h: Add include guard.
699 * linux-x86-tdesc.h: Add include guard.
700 * linux-s390-tdesc.h: Add include guard.
701 * linux-ppc-tdesc-init.h: Add include guard.
702 * linux-low.h: Add include guard.
703 * linux-aarch64-tdesc.h: Add include guard.
704 * linux-aarch32-low.h: Add include guard.
705 * inferiors.h: Rename include guard.
706 * i387-fp.h: Rename include guard.
707 * hostio.h: Rename include guard.
708 * gdbthread.h: Rename include guard.
709 * gdb_proc_service.h: Rename include guard.
710 * event-loop.h: Rename include guard.
711 * dll.h: Rename include guard.
712 * debug.h: Rename include guard.
713 * ax.h: Rename include guard.
714
956cc47c
SN
7152018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
716
717 PR gdb/23985
718 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
719 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
720
a0707f3c
TT
7212019-01-25 Tom Tromey <tom@tromey.com>
722
723 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
724
0747795c
TT
7252019-01-25 Tom Tromey <tom@tromey.com>
726
727 * win32-low.c: Fix common/ includes.
728 * win32-i386-low.c: Fix common/ includes.
729 * tracepoint.c: Fix common/ includes.
730 * thread-db.c: Fix common/ includes.
731 * target.h: Fix common/ includes.
732 * symbol.c: Fix common/ includes.
733 * spu-low.c: Fix common/ includes.
734 * server.h: Fix common/ includes.
735 * server.c: Fix common/ includes.
736 * remote-utils.c: Fix common/ includes.
737 * regcache.h: Fix common/ includes.
738 * regcache.c: Fix common/ includes.
739 * nto-x86-low.c: Fix common/ includes.
740 * notif.h: Fix common/ includes.
741 * mem-break.h: Fix common/ includes.
742 * lynx-low.c: Fix common/ includes.
743 * lynx-i386-low.c: Fix common/ includes.
744 * linux-x86-tdesc-selftest.c: Fix common/ includes.
745 * linux-x86-low.c: Fix common/ includes.
746 * linux-low.c: Fix common/ includes.
747 * inferiors.h: Fix common/ includes.
748 * i387-fp.c: Fix common/ includes.
749 * hostio.c: Fix common/ includes.
750 * hostio-errno.c: Fix common/ includes.
751 * gdbthread.h: Fix common/ includes.
752 * gdbreplay.c: Fix common/ includes.
753 * fork-child.c: Fix common/ includes.
754 * event-loop.c: Fix common/ includes.
755 * ax.c:
756 (enum gdb_agent_op): Fix common/ includes.
757
be6d4f74
TT
7582019-01-21 Tom Tromey <tom@tromey.com>
759
760 * tracepoint.c: Fix includes.
761 * remote-utils.c: Fix includes.
762 * linux-x86-low.c: Fix includes.
763
66d91b39
JB
7642019-01-01 Joel Brobecker <brobecker@adacore.com>
765
766 * gdbreplay.c (gdbreplay_version): Update copyright year in
767 version message.
768 * server.c (gdbserver_version): Likewise.
769
754e3168
AH
7702018-12-05 Alan Hayward <alan.hayward@arm.com>
771
772 * linux-low.c (add_lwp): Switch ordering.
773
d105de22
TT
7742018-11-29 Tom Tromey <tom@tromey.com>
775
776 * win32-low.c (win32_join): Take pid, not process.
777 * target.h (struct target_ops) <join>: Change argument type.
778 (join_inferior): Change argument name.
779 * spu-low.c (spu_join): Take pid, not process.
780 * server.c (handle_detach): Preserve pid before destroying
781 process.
782 * lynx-low.c (lynx_join): Take pid, not process.
783 * linux-low.c (linux_join): Take pid, not process.
784
50138245
AH
7852018-11-23 Alan Hayward <alan.hayward@arm.com>
786
787 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
788 (aarch64_cannot_fetch_register): Likewise.
789 (struct linux_target_ops): Update references.
790
64f57f3d
PFC
7912018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
792
793 * linux-ppc-low.c: Include nat/linux-ptrace.h.
794
8d619c01
EBM
7952018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
796
797 * configure.srv (ipa_ppc_linux_regobj): Add
798 powerpc-isa207-htm-vsx32l-ipa.o and
799 powerpc-isa207-htm-vsx64l-ipa.o.
800 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
801 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
802 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
803 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
804 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
805 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
806 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
807 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
808 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
809 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
810 (init_registers_powerpc_isa207_htm_vsx32l)
811 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
812 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
813 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
814 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
815 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
816 (ppc_store_tm_ctarregset): New functions.
817 (ppc_regsets): Add entries for HTM regsets.
818 (ppc_arch_setup): Set htm in features struct when needed. Set
819 sizes for the HTM regsets.
820 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
821 (initialize_low_arch): Call
822 init_registers_powerpc_isa207_htm_vsx32l and
823 init_registers_powerpc_isa207_htm_vsx64l.
824 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
825 PPC_TDESC_ISA207_HTM_VSX.
826 (initialize_low_tracepoint): Call
827 init_registers_powerpc_isa207_htm_vsx32l and
828 init_registers_powerpc_isa207_htm_vsx64l.
829
232bfb86
EBM
8302018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
831
832 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
833 rs6000/power-linux-pmu.xml to srv_xmlfiles.
834 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
835 (ppc_store_pmuregset): New functions.
836 (ppc_regsets): Add entries for ebb and pmu regsets.
837 (ppc_arch_setup): Set isa207 in features struct if the ebb and
838 pmu regsets are available. Set sizes for these regsets.
839
f2cf6173
EBM
8402018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
841
842 * configure.srv (ipa_ppc_linux_regobj): Add
843 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
844 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
845 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
846 rs6000/powerpc-isa207-vsx32l.xml, and
847 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
848 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
849 <PPC_TDESC_ISA207_VSX>: New enum value.
850 (init_registers_powerpc_isa207_vsx32l): Declare.
851 (init_registers_powerpc_isa207_vsx64l): Declare.
852 * linux-ppc-low.c (ppc_fill_tarregset): New function.
853 (ppc_store_tarregset): New function.
854 (ppc_regsets): Add entry for the TAR regset.
855 (ppc_arch_setup): Set isa207 in features struct when needed. Set
856 size for the TAR regsets.
857 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
858 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
859 and init_registers_powerpc_isa207_vsx64l.
860 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
861 (initialize_low_tracepoint): Call
862 init_registers_powerpc_isa207_vsx32l and
863 init_registers_powerpc_isa207_vsx64l.
864
7ca18ed6
EBM
8652018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
866 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
867
868 * configure.srv (ipa_ppc_linux_regobj): Add
869 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
870 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
871 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
872 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
873 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
874 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
875 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
876 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
877 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
878 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
879 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
880 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
881 (ppc_hwcap): Add comment.
882 (ppc_hwcap2): New global.
883 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
884 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
885 (ppc_regsets): Add entries for the DSCR and PPR regsets.
886 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
887 when needed. Set sizes for the the DSCR and PPR regsets.
888 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
889 (initialize_low_arch): Call
890 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
891 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
892 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
893 PPC_TDESC_ISA205_PPR_DSCR_VSX.
894 (initialize_low_tracepoint): Call
895 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
896 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
897
5c849b22
PFC
8982018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
899
900 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
901
8ecfd7bd
SDJ
9022018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
903 Simon Marchi <simark@simark.ca>
904
905 * acinclude.m4: Include "../selftest.m4".
906 * configure: Regenerate.
907 * configure.ac: Use "GDB_AC_SELFTEST".
908 * configure.srv: Use "$enable_unittests" instead of
909 "$development" when checking whether unit tests have been
910 enabled.
911 * server.c (captured_main): Update message informing that
912 selftests have been disabled.
913
96643e35
TT
9142018-10-04 Tom Tromey <tom@tromey.com>
915
916 * configure: Rebuild.
917
da4ae14a
TT
9182018-10-04 Tom Tromey <tom@tromey.com>
919
920 * server.c (handle_status): Rename inner "thread".
921 (process_serial_event): Declare "res" in 'm' case.
922 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
923 (iterate_over_lwps): Rename inner "thread".
924 (linux_qxfer_libraries_svr4): Rename inner "len".
925 * gdbthread.h (find_thread_in_random): Rename inner "thread".
926
7c619dbd
GB
9272018-10-01 Gary Benson <gbenson@redhat.com>
928
929 * gdb_proc_service.h: Moved common code to
930 common/gdb_proc_service.h.
931
3795e814
GB
9322018-10-01 Gary Benson <gbenson@redhat.com>
933
934 * gdb_proc_service.h: Synchronize comments and whitespace with
935 GDB's version of this file.
936
49b036f1
TT
9372018-09-25 Tom Tromey <tom@tromey.com>
938
939 * configure: Rebuild.
940 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
941
8ff03f0b
SM
9422018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
943
944 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
945 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
946 ($(IPA_LIB)): Sort IPA_OBJS.
947
a1cd91dc
SM
9482018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
949
950 * Makefile.in: Remove references to $(ADD_DEPS).
951
752312ba
TT
9522018-09-16 Tom Tromey <tom@tromey.com>
953
954 * remote-utils.c (remote_open): Use GNU style for metasyntactic
955 variables.
956 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
957 variables.
958
f1628857
TT
9592018-09-05 Tom Tromey <tom@tromey.com>
960
961 * configure: Rebuild.
962
ad202fcc
SM
9632018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
964
965 PR build/23399
966 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
967
d3d8724a
TT
9682018-08-27 Tom Tromey <tom@tromey.com>
969
970 PR build/23087:
971 * configure: Rebuild.
972
b4f183d2
TT
9732018-08-27 Tom Tromey <tom@tromey.com>
974
975 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
976 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
977 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
978 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
979 (s390x_emit_stack_adjust): Add casts to unsigned char.
980
4e2aa472
SM
9812018-08-22 Simon Marchi <simon.marchi@ericsson.com>
982
983 PR gdb/23374
984 PR gdb/23375
985 * server.h (struct client_state) <disable_randomization>:
986 Initialize to 1.
987
cf4088a9
SM
9882018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
989
990 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
991 variable.
992 (mips_supply_ptrace_register): Likewise.
993
a0de763e
TT
9942018-07-22 Tom Tromey <tom@tromey.com>
995
996 * configure: Rebuild.
997
b0a7723d
TT
9982018-07-22 Tom Tromey <tom@tromey.com>
999
1000 * win32-low.c (win32_create_inferior): Remove unused variables.
1001 * gdbreplay.c (remote_open): Remove unused variable.
1002 * remote-utils.c (remote_prepare): Remove unused variable.
1003 * x86-tdesc.h (X86_TDESC_H): Define.
1004 (amd64_expedite_regs): Define conditionally.
1005 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1006 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1007 * remote-utils.c (readchar): Remove unused variable.
1008
a780ef4f
PA
10092018-07-13 Pedro Alves <palves@redhat.com>
1010
1011 * linux-low.c (linux_kill): Change parameter to process_info
1012 pointer instead of pid. Adjust.
1013 * lynx-low.c (lynx_kill): Likewise.
1014 * nto-low.c (nto_kill): Likewise.
1015 * spu-low.c (spu_kill): Likewise.
1016 * win32-low.c (win32_kill): Likewise.
1017 * server.c (handle_v_kill, kill_inferior_callback)
1018 (detach_or_kill_for_exit): Adjust.
1019 * target.c (kill_inferior): Change parameter to process_info
1020 pointer instead of pid. Adjust.
1021 * target.h (struct target_ops) <kill>: Change parameter to
1022 process_info pointer instead of pid. Adjust all implementations
1023 and callers.
1024 (kill_inferior): Likewise.
1025
ef2ddb33
PA
10262018-07-13 Pedro Alves <palves@redhat.com>
1027
1028 * linux-low.c (linux_detach, linux_join): Change parameter to
1029 process_info pointer instead of pid. Adjust.
1030 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1031 * nto-low.c (nto_detach): Likewise.
1032 * spu-low.c (spu_detach, spu_join): Likewise.
1033 * win32-low.c (win32_detach, win32_join): Likewise.
1034 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1035 * target.h (struct target_ops) <detach, join>: Change parameter to
1036 process_info pointer instead of pid. Adjust all implementations
1037 and callers.
1038 (detach_inferior, join_inferior): Rename 'pid' parameter to
1039 'proc'.
1040
c7ab0aef
SDJ
10412018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1042 Jan Kratochvil <jan.kratochvil@redhat.com>
1043 Paul Fertser <fercerpav@gmail.com>
1044 Tsutomu Seki <sekiriki@gmail.com>
1045
1046 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1047 (OBS): Add 'common/netstuff.o'.
1048 (GDBREPLAY_OBS): Likewise.
1049 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1050 (remote_open): Implement support for IPv6
1051 connections.
1052 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1053 and 'wspiapi.h'.
1054 (handle_accept_event): Accept connections from IPv6 sources.
1055 (remote_prepare): Handle IPv6-style hostnames; implement
1056 support for IPv6 connections.
1057 (remote_open): Implement support for printing connections from
1058 IPv6 sources.
1059
31445d10
PA
10602018-07-11 Pedro Alves <palves@redhat.com>
1061
1062 PR gdb/23377
1063 * mem-break.c (any_persistent_commands): Add process_info
1064 parameter and use it instead of relying on the current process.
1065 Change return type to bool.
1066 * mem-break.h (any_persistent_commands): Add process_info
1067 parameter and change return type to bool.
1068 * server.c (handle_detach): Remove require_running_or_return call.
1069 Look up the process_info for the process we're about to detach.
1070 If not found, return back error to GDB. Adjust
1071 any_persistent_commands call to pass down a process pointer.
1072
cb197132
PA
10732018-07-11 Pedro Alves <palves@redhat.com>
1074
1075 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1076 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1077 instead of collect_register_by_name.
1078 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1079 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1080
1b919490
VB
10812018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1082 Pedro Alves <palves@redhat.com>
1083
1084 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1085
d7e15655
TT
10862018-07-03 Tom Tromey <tom@tromey.com>
1087
1088 * linux-low.c: Update.
1089 * lynx-low.c: Update.
1090 * mem-break.c: Update.
1091 * nto-low.c: Update.
1092 * remote-utils.c: Update.
1093 * server.c: Update.
1094 * spu-low.c: Update.
1095 * target.c: Update.
1096 * win32-low.c: Update.
1097
26a57c92
TT
10982018-07-03 Tom Tromey <tom@tromey.com>
1099
1100 * server.c: Update.
1101
0e998d96
TT
11022018-07-03 Tom Tromey <tom@tromey.com>
1103
1104 * linux-low.c: Update.
1105
cc6bcb54
TT
11062018-07-03 Tom Tromey <tom@tromey.com>
1107
1108 * target.c: Update.
1109
e38504b3
TT
11102018-07-03 Tom Tromey <tom@tromey.com>
1111
1112 * linux-low.c: Update.
1113 * linux-mips-low.c: Update.
1114 * lynx-low.c: Update.
1115 * nto-low.c: Update.
1116 * remote-utils.c: Update.
1117 * server.c: Update.
1118 * spu-low.c: Update.
1119 * target.c: Update.
1120 * thread-db.c: Update.
1121
e99b03dc
TT
11222018-07-03 Tom Tromey <tom@tromey.com>
1123
1124 * linux-low.c: Update.
1125 * linux-mips-low.c: Update.
1126 * lynx-low.c: Update.
1127 * mem-break.c: Update.
1128 * nto-low.c: Update.
1129 * remote-utils.c: Update.
1130 * server.c: Update.
1131 * spu-low.c: Update.
1132 * target.c: Update.
1133 * tracepoint.c: Update.
1134
f2907e49
TT
11352018-07-03 Tom Tromey <tom@tromey.com>
1136
1137 * linux-low.c: Update.
1138 * linux-ppc-low.c: Update.
1139 * linux-x86-low.c: Update.
1140 * proc-service.c: Update.
1141 * server.c: Update.
1142 * spu-low.c: Update.
1143 * thread-db.c: Update.
1144 * win32-low.c: Update.
1145
fd79271b
TT
11462018-07-03 Tom Tromey <tom@tromey.com>
1147
1148 * linux-low.c: Update.
1149 * lynx-low.c: Update.
1150 * nto-low.c: Update.
1151 * remote-utils.c: Update.
1152 * spu-low.c: Update.
1153 * thread-db.c: Update.
1154 * win32-low.c: Update.
1155
c0867626
SDJ
11562018-06-29 Joel Brobecker <brobecker@adacore.com>
1157
1158 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1159 parameter in call to 'amd64_create_target_description'.
1160
2512d7ef
JK
11612018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1162
1163 * x86-tdesc.h: Remove executable permission flag.
1164
d0ac1c44
SM
11652018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1166
1167 * configure.ac: Remove AC_PREREQ, add missing quoting.
1168 * configure: Re-generate.
1169 * config.in: Re-generate.
1170 * aclocal.m4: Re-generate.
1171
c4eb05ff
SM
11722018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1173
1174 * tracepoint.h (current_traceframe): Remove declaration.
1175
02895270
AH
11762018-06-18 Alan Hayward <alan.hayward@arm.com>
1177
1178 * linux-aarch64-low.c (is_sve_tdesc): New function.
1179 (aarch64_sve_regs_copy_to_regcache): Likewise.
1180 (aarch64_sve_regs_copy_from_regcache): Likewise.
1181 (aarch64_regs_info): Add SVE checks.
1182 (initialize_low_arch): Initialize SVE.
1183
e9902bfc
AH
11842018-06-18 Alan Hayward <alan.hayward@arm.com>
1185
1186 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1187
fefa175e
AH
11882018-06-11 Alan Hayward <alan.hayward@arm.com>
1189
1190 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1191 (initialize_low_tracepoint): Likewise
1192 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1193 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1194 param.
1195 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1196 checks.
1197 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1198
b91ad3ff
AH
11992018-06-11 Alan Hayward <alan.hayward@arm.com>
1200
1201 * server.h (PBUFSIZ): Increase size
1202
f868386e
AH
12032018-06-11 Alan Hayward <alan.hayward@arm.com>
1204
1205 * regcache.c (regcache::raw_compare): New function.
1206 * regcache.h (regcache::raw_compare): New declaration.
1207
9c861883
AH
12082018-06-11 Alan Hayward <alan.hayward@arm.com>
1209
1210 * regcache.c (new_register_cache): Use new.
1211 (free_register_cache): Use delete.
1212 (register_data): Use const.
1213 (supply_register): Move body inside regcache.
1214 (regcache::raw_supply): New override function.
1215 (collect_register): Move body inside regcache.
1216 (regcache::raw_collect): New override function.
1217 (regcache::get_register_status): New override function.
1218 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1219
40591844
TT
12202018-06-09 Tom Tromey <tom@tromey.com>
1221
1222 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1223 declare queue.
1224 (event_queue): Use std::queue.
1225 (gdb_event_xfree): Remove.
1226 (initialize_event_loop, process_event, wait_for_event): Update.
1227
6341380d
SC
12282018-06-08 Stan Cox <scox@redhat.com>
1229
1230 * win32-low.c (win32_create_inferior): last_ptid and last_status
1231 moved to client_state.
1232
03349c93
PA
12332018-06-08 Pedro Alves <palves@redhat.com>
1234
1235 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1236 common/common-exceptions.o, common/common-utils.o,
1237 common/errors.o, common/print-utils.o and utils.o.
1238 * gdbreplay.c: Include "common-defs.h" instead of the two
1239 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1240 string.h or alloca.h.
1241 (perror_with_name): Delete.
1242 (remote_open): Use xstrdup instead of strdup.
1243 (main): Rename to ...
1244 (captured_main): ... this.
1245 (main): New.
1246
8dcc53b3
TT
12472018-06-08 Tom Tromey <tom@tromey.com>
1248
1249 * linux-low.c (linux_low_read_btrace): Update.
1250
c12a5089
SC
12512018-06-04 Stan Cox <scox@redhat.com>
1252
1253 * server.h (struct client_state): New.
1254 * server.c (cont_thread, general_thread, multi_process)
1255 (report_fork_events, report_vfork_events, report_exec_events)
1256 (report_thread_events, swbreak_feature, hwbreak_feature)
1257 (vCont_supported, disable_randomization, pass_signals)
1258 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1259 Moved to client_state.
1260 * remote-utils.c (remote_debug, noack_mode)
1261 (transport_is_reliable): Moved to client_state.
1262 * tracepoint.c (current_traceframe): Moved to client_state.
1263
1264 Update all callers.
1265 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1266 linux-low.c, remote-utils.h, target.c: Use client_state.
1267
122394f1
AH
12682018-05-31 Alan Hayward <alan.hayward@arm.com>
1269
1270 * configure.srv: Add new c/h file.
1271
95228a0d
AH
12722018-05-31 Alan Hayward <alan.hayward@arm.com>
1273
1274 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1275 null VQ.
1276
d8dab6c3
MR
12772018-05-25 Maciej W. Rozycki <macro@mips.com>
1278
1279 * gdb.arch/mips-fpregset-core.exp: New test.
1280 * gdb.arch/mips-fpregset-core.c: New test source.
1281
81e25b7c
EK
12822018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1283
1284 PR server/23198
1285 * hostio.c (require_int): Do not report overflow for integers
1286 between 0xfffffff and 0x7fffffff.
1287
7e947ad3
MR
12882018-05-22 Maciej W. Rozycki <macro@mips.com>
1289
1290 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1291 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1292 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1293 functions.
1294 (the_low_target): Wire them.
1295
1d75a658
PFC
12962018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1297
1298 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1299 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1300 mode. Call collect_register_by_name with vscr using
1301 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1302 (ppc_store_vrregset): Add and set vscr_offset variable as in
1303 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1304 vscr_offset.
1305
d078308a
PFC
13062018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1307
1308 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1309 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1310 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1311
7273b5fc
PFC
13122018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1313
1314 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1315 (ppc_store_vsxregset): Likewise.
1316 (ppc_fill_vrregset): Likewise.
1317 (ppc_store_vrregset): Likewise.
1318 (ppc_fill_evrregset): Likewise.
1319 (ppc_store_evrregset): Likewise.
1320 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1321 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1322 needed.
1323
2e077f5e
PFC
13242018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1325
1326 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1327 wordsize of the inferior. Call ppc_linux_target_wordsize.
1328
bd64614e
PFC
13292018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1330
1331 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1332 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1333 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1334 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1335 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1336 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1337 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1338 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1339 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1340 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1341 (tdesc_powerpc_e500l): Remove.
1342 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1343 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1344 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1345 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1346 linux-ppc-tdesc.h.
1347 (ppc_arch_setup): Remove target description matching code. Fill a
1348 ppc_linux_features struct and call ppc_linux_match_description
1349 with it.
1350
75d74cca
MR
13512018-05-22 Maciej W. Rozycki <macro@mips.com>
1352
1353 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1354 width of the requested register exceeds the width of the
1355 `ptrace' data type.
1356 (mips_cannot_store_register): Likewise.
1357
e4439e43
MR
13582018-05-21 Maciej W. Rozycki <macro@mips.com>
1359
1360 * linux-mips-low.c (mips_fetch_register): New function. Update
1361 preceding comment.
1362 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1363 (the_low_target): Wire `mips_fetch_register'.
1364
55271bf9
JB
13652018-05-10 Joel Brobecker <brobecker@adacore.com>
1366
1367 * lynx-i386-low.c (LYNXOS_178): New macro.
1368 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1369 the layout on LynxOS-178.
1370 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1371 handle floating point registers that are not supported by
1372 LynxOS-178.
1373
1a34f210
TT
13742018-05-10 Tom Tromey <tom@tromey.com>
1375
1376 * configure: Rebuild.
1377
190852c8
JB
13782018-05-10 Joel Brobecker <brobecker@adacore.com>
1379
1380 PR server/23158:
1381 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1382 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1383 Use it to set the expedite_regs field in the given tdesc.
1384 * x86-tdesc.h: New file.
1385 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1386 Adjust following the addition of the new expedite_regs parameter
1387 to init_target_desc.
1388 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1389 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1390 (i386_linux_read_description, amd64_linux_read_description):
1391 Adjust following the addition of the new expedite_regs parameter
1392 to init_target_desc.
1393 * lynx-i386-low.c: #include "x86-tdesc.h".
1394 (lynx_i386_arch_setup): Adjust following the addition of the new
1395 expedite_regs parameter to init_target_desc.
1396 * nto-x86-low.c: #include "x86-tdesc.h".
1397 (nto_x86_arch_setup): Adjust following the addition of the new
1398 expedite_regs parameter to init_target_desc.
1399 * win32-i386-low.c: #include "x86-tdesc.h".
1400 (i386_arch_setup): Adjust following the addition of the new
1401 expedite_regs parameter to init_target_desc.
1402
7dbac825
JB
14032018-05-10 Joel Brobecker <brobecker@adacore.com>
1404
1405 PR server/23158:
1406 * win32-low.c (win32_create_inferior): Add call to my_wait
1407 setting last_status global.
1408
906994d9
JB
14092018-05-10 Joel Brobecker <brobecker@adacore.com>
1410
1411 PR server/23158:
1412 * win32-low.c (create_process): Only call gdb_tilde_expand if
1413 inferior_cwd is not NULL.
1414
8ee22052
AB
14152018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1416
1417 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1418 registers to the cache if their values have changed.
1419 (i387_xsave_to_cache): Provide default values for x87 control
1420 registers when these features are available, but disabled.
1421 * regcache.c (supply_register_by_name_zeroed): New function.
1422 * regcache.h (supply_register_by_name_zeroed): Declare new
1423 function.
1424
aff689d3
TT
14252018-05-07 Tom Tromey <tom@tromey.com>
1426
1427 * configure: Rebuild.
1428
85e26832
TT
14292018-05-04 Tom Tromey <tom@tromey.com>
1430
1431 * configure: Rebuild.
1432
a3b60e45
JK
14332018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1434 Pedro Alves <palves@redhat.com>
1435
1436 * linux-aarch64-low.c (aarch64_stopped_data_address):
1437 Likewise.
1438
632e107b
TT
14392018-04-27 Tom Tromey <tom@tromey.com>
1440
1441 * configure: Rebuild.
1442
458412c3
TT
14432018-04-23 Tom Tromey <tom@tromey.com>
1444
1445 * configure: Rebuild.
1446
f31c089e
SM
14472018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * Makefile.in (depcomp): Add "..".
1450 (all_deps_files): New and use it.
1451
b319b098
AH
14522018-04-18 Alan Hayward <alan.hayward@arm.com>
1453
1454 * configure.srv (aarch64*-*-linux*): Don't include xml.
1455 (i[34567]86-*-cygwin*): Likewise.
1456 (i[34567]86-*-linux*): Likewise.
1457 (i[34567]86-*-lynxos*): Likewise.
1458 (i[34567]86-*-mingw32ce*): Likewise.
1459 (i[34567]86-*-mingw*): Likewise.
1460 (i[34567]86-*-nto*): Likewise.
1461 (tic6x-*-uclinux): Likewise.
1462 (x86_64-*-linux*): Likewise.
1463 (x86_64-*-mingw*): Likewise.
1464 (x86_64-*-cygwin*): Likewise.
1465
3b74854b
AH
14662018-04-18 Alan Hayward <alan.hayward@arm.com>
1467
1468 * tdesc.c: Remove xml parameter.
1469
e98577a9
AH
14702018-04-18 Alan Hayward <alan.hayward@arm.com>
1471
1472 * server.c (get_features_xml): Remove cast.
1473 * tdesc.c (void target_desc::accept): Fill in function.
1474 (tdesc_get_features_xml): Remove old xml creation.
1475 (print_xml_feature::visit_pre): Add xml vistor.
1476 * tdesc.h (struct target_desc): Make xmltarget mutable.
1477 (tdesc_get_features_xml): Remove declaration.
1478
d278f585
AH
14792018-04-18 Alan Hayward <alan.hayward@arm.com>
1480
1481 * tdesc.c (tdesc_architecture_name): Add new function.
1482 (tdesc_osabi_name): Likewise.
1483 (tdesc_get_features_xml): Use new functions.
1484
eee8a18d
AH
14852018-04-18 Alan Hayward <alan.hayward@arm.com>
1486
1487 * tdesc.c (tdesc_create_flags): Remove.
1488 (tdesc_add_flag): Likewise.
1489 (tdesc_named_type): Likewise.
1490 (tdesc_create_union): Likewise.
1491 (tdesc_create_struct): Likewise.
1492 (tdesc_create_vector): Likewise.
1493 (tdesc_add_bitfield): Likewise.
1494 (tdesc_add_field): Likewise.
1495 (tdesc_set_struct_size): Likewise.
1496
82ec9bc7
AH
14972018-04-18 Alan Hayward <alan.hayward@arm.com>
1498
1499 * tdesc.c (~target_desc): Remove implictly deleted items.
1500 (init_target_desc): Iterate all features.
1501 (tdesc_get_features_xml): Use vector.
1502 (tdesc_create_feature): Create feature.
1503 * tdesc.h (tdesc_feature) Remove
1504 (target_desc): Add features.
1505
ea3e7d71
AH
15062018-04-18 Alan Hayward <alan.hayward@arm.com>
1507
1508 * Makefile.in: Add common/tdesc.c
1509 * tdesc.c (init_target_desc): init all reg_defs from register
1510 vector.
1511 (tdesc_create_reg): Create tdesc_reg.
1512 * tdesc.h (tdesc_feature): Add register vector.
1513
17d08cd4
SM
15142018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1515
1516 * tdesc.h (struct target_desc) <features>: Change type to
1517 std::vector<std::string>.
1518 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1519 changes.
1520 (tdesc_get_features_xml): Likewise.
1521 (tdesc_create_feature): Likewise.
1522
5cd3e386
AH
15232018-03-26 Alan Hayward <alan.hayward@arm.com>
1524
1525 * regcache.c (find_register_by_number): Return a ref.
1526 (find_regno): Use references.
1527 (register_size): Likewise.
1528 (register_data): Likewise.
1529 * tdesc.c (target_desc::~target_desc): Remove free calls.
1530 (target_desc::operator==): Use std::vector compare.
1531 (init_target_desc): Use reference.
1532 (tdesc_create_reg): Use reg constructors.
1533 * tdesc.h (struct target_desc): Replace pointer with object.
1534
dff7492c
AH
15352018-03-23 Alan Hayward <alan.hayward@arm.com>
1536
1537 * regcache.c (find_register_by_number): Make static.
1538 (find_regno): Use find_register_by_number
1539 * regcache.h (struct reg): Remove declaration.
1540
d80e5242
AH
15412018-03-23 Alan Hayward <alan.hayward@arm.com>
1542
1543 * tdesc.c (target_desc::~target_desc): Move to here.
1544 (target_desc::operator==): Likewise.
1545 * tdesc.h (target_desc::~target_desc): Move from here.
1546 (target_desc::operator==): Likewise.
1547
f69c5afb
AA
15482018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1549
1550 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1551
ce29f843
AA
15522018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1553
1554 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1555 S390_TDESC_GS.
1556 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1557 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1558 and init_registers_s390_gs_linux64.
1559
c49bd90b
AA
15602018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1561
1562 * linux-s390-low.c (s390_fill_gs): Remove function.
1563 (s390_fill_gsbc): Remove function.
1564 (s390_regsets): Set fill functions for the guarded storage regsets
1565 to NULL.
1566
7edb9bd3
AA
15672018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1568
1569 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1570 the word size. Add comment.
1571 (s390_get_wordsize): New function.
1572 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1573 pswm with it. Instead, use s390_get_wordsize to determine the
1574 word size first and derive the correct tdesc from that directly.
1575
39be3c7e
SM
15762018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1577
1578 * Makefile.in: Include silent-rules.mk.
1579 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1580 (COMPILE): Add ECHO_CXX.
1581 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1582 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1583 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1584 (version-generated.c): Add ECHO_GEN.
1585 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1586 (IPAGENT_COMPILE): Add ECHO_CXX.
1587 (%-generated.c): Add ECHO_REGDAT.
1588
3ae9ce5d
TT
15892018-03-14 Tom Tromey <tom@tromey.com>
1590
1591 PR cli/14977:
1592 * ax.c (ax_printf): Special case for NULL.
1593
e6a58aa8
SM
15942018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * linux-low.c (linux_qxfer_libraries_svr4): Use
1597 xml_escape_text_append.
1598
f6e8a41e
SM
15992018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1600
1601 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1602
b9671caf
SM
16032018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1604
1605 * server.c (handle_general_set): Remove unnecessary xstrdup.
1606
e80aaf61
SM
16072018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1608
1609 * server.c (parse_debug_format_options): Adjust to
1610 delim_string_to_char_ptr_vec changes.
1611 * thread-db.c (thread_db_load_search): Adjust to
1612 dirnames_to_char_ptr_vec changes.
1613
b1223e78
MM
16142018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1615
1616 * target.h (target_enable_btrace, target_disable_btrace)
1617 (target_read_btrace, target_read_btrace_conf): Turn macro into
1618 inline function. Throw error if target method is not defined.
1619 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1620 check for btrace target method. Be prepared to handle exceptions
1621 from btrace target methods.
1622
81561546
SDJ
16232018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1624
1625 * server.c (captured_main): Change order of error message printed
1626 when the current working directory cannot be found.
1627
25e3c82c
SDJ
16282018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1629
1630 * server.c: Include "filenames.h" and "pathstuff.h".
1631 (program_name): Delete variable.
1632 (program_path): New anonymous class.
1633 (get_exec_wrapper): Use "program_path" instead of
1634 "program_name".
1635 (handle_v_run): Likewise.
1636 (captured_main): Likewise.
1637 (process_serial_event): Likewise.
1638
b4987c95
SDJ
16392018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1640
1641 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1642 (OBJS): Add "pathstuff.o".
1643 * server.c (current_directory): New global variable.
1644 (captured_main): Initialize "current_directory".
1645
f46cd62a
AH
16462018-02-26 Alan Hayward <alan.hayward@arm.com>
1647
1648 * tdesc.c: Use common/tdesc.h.
1649 * tdesc.h: Likewise.
1650
a543c5ca
AH
16512018-02-20 Alan Hayward <alan.hayward@arm.com>
1652 Simon Marchi <simon.marchi@ericsson.com>
1653
1654 * Makefile.in: Switch order of make rules.
1655
b5884fa7
AH
16562018-02-19 Alan Hayward <alan.hayward@arm.com>
1657
1658 * Makefile.in: Add common directory in build.
1659 * configure.ac: Add common reference.
1660 * configure: Regenerate.
1661
de6242d3
MM
16622018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1663
1664 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1665 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1666 * spu-low.c (spu_target_ops): Likewise.
1667 * win32-low.c (win32_target_ops): Likewise.
1668 * server.c (supported_btrace_packets): Report packets unconditionally.
1669 * target.h (target_ops) <supports_btrace>: Remove.
1670 (target_supports_btrace): Remove.
1671
9ee23a85
MM
16722018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1673
1674 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1675 (handle_btrace_disable): Change return type to void. Use exceptions
1676 to report errors.
1677 (handle_btrace_general_set): Catch exception and copy message to
1678 return message.
1679
8ce47547
TT
16802018-02-08 Tom Tromey <tom@tromey.com>
1681
1682 * linux-low.c (install_software_single_step_breakpoints): Use
1683 make_scoped_restore.
1684 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1685 (do_restore_current_thread_cleanup): Remove.
1686 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1687 declare.
1688
45dd3607
TT
16892018-02-08 Tom Tromey <tom@tromey.com>
1690
1691 * mem-break.c (set_raw_breakpoint_at): Use
1692 gdb::unique_xmalloc_ptr.
1693
e671cd59
PA
16942018-01-30 Pedro Alves <palves@redhat.com>
1695
1696 PR gdb/13211
1697 * target.c (target_terminal::terminal_state): Rename to ...
1698 (target_terminal::m_terminal_state): ... this.
1699
a0aad537
JC
17002018-01-19 James Clarke <jrtc27@jrtc27.com>
1701
1702 * linux-low.c (handle_extended_wait): Surround call to
1703 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1704
4d9b86e1
SM
17052018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1706
1707 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1708 linux_ptrace_attach_fail_reason_string now returning an
1709 std::string.
1710 (linux_attach): Likewise.
1711 * thread-db.c (attach_thread): Likewise.
1712
f517c180
EA
17132018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1714
1715 PR gdb/21559
1716 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1717 checking for fs_base/gs_base fields in struct user_regs_struct.
1718 * configure: Regenerate.
1719
9a70f35c
YQ
17202018-01-16 Yao Qi <yao.qi@linaro.org>
1721
1722 PR gdb/18749
1723 * linux-low.c (fetch_register): Call supply_register instead of
1724 error.
1725
605fd3c6
YQ
17262018-01-08 Yao Qi <yao.qi@linaro.org>
1727 Simon Marchi <simon.marchi@ericsson.com>
1728
1729 * Makefile.in (OBS): Remove selftest.o.
1730 * configure.ac: Set srv_selftest_objs if $development is true.
1731 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1732 * configure: Re-generated.
1733 * server.c (captured_main): Wrap variable selftest_filter with
1734 GDB_SELF_TEST.
1735
2cc05030
SM
17362018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1737
1738 * server.c (parse_debug_format_options): Return std::string.
1739 (handle_monitor_command, captured_main): Adjust.
1740
e379cee6
PA
17412018-01-05 Pedro Alves <palves@redhat.com>
1742
1743 PR gdb/18653
1744 * server.c (captured_main): Pass quiet=false to
1745 save_original_signals_state.
1746
82e1e79a
JB
17472018-01-01 Joel Brobecker <brobecker@adacore.com>
1748
1749 * gdbreplay.c (gdbreplay_version): Update copyright year in
1750 version message.
1751 * server.c (gdbserver_version): Likewise.
1752
8e481c3b
TT
17532017-12-08 Tom Tromey <tom@tromey.com>
1754
1755 * ax.c (ax_printf): Update.
1756
a8806230
YQ
17572017-12-07 Yao Qi <yao.qi@linaro.org>
1758
1759 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1760 aarch64_linux_read_description.
1761 * linux-amd64-ipa.c (idx2mask): New array.
1762 (get_ipa_tdesc): Move idx2mask out.
1763 (initialize_low_tracepoint): Initialize target descriptions.
1764 * linux-i386-ipa.c (idx2mask): New array.
1765 (get_ipa_tdesc): Move idx2mask out.
1766 (initialize_low_tracepoint): Initialize target descriptions.
1767
d4a0e8b5
SM
17682017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1769
1770 * tdesc.c (struct tdesc_type): Change return type.
1771 (tdesc_add_flag): Change parameter type.
1772 (tdesc_add_bitfield): Likewise.
1773 (tdesc_add_field): Likewise.
1774 (tdesc_set_struct_size): Likewise.
1775
798a7429
SM
17762017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1777
1778 * regcache.c (registers_to_string): Remove unused variable.
1779
c0e15c9b
SM
17802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1781
1782 * inferiors.c (for_each_inferior_with_data): Remove.
1783 * inferiors.h (for_each_inferior_with_data): Remove.
1784 * server.c (handle_qxfer_threads_worker): Change parameter type.
1785 (handle_qxfer_threads_proper): Use for_each_thread.
1786
f0045347
SM
17872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * inferiors.c (for_each_inferior): Remove.
1790 (clear_inferiors): Use for_each_thread.
1791 * inferiors.h (for_each_inferior): Remove.
1792 * linux-low.c (linux_wait_for_event_filtered): Use
1793 for_each_thread.
1794 (linux_stabilize_threads): Likewise.
1795 * regcache.c (regcache_release): Likewise.
1796 * server.c (gdb_wants_all_threads_stopped): Likewise.
1797 (clear_pending_status_callback): Remove.
1798 (handle_status): Use for_each_thread.
1799 (captured_main): Likewise.
1800 * win32-low.c (child_init_thread_list): Likewise.
1801 (win32_clear_inferiors): Likewise.
1802 (fake_breakpoint_event): Likewise.
1803
9521758b
SM
18042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1805
1806 * inferiors.h (find_inferior): Remove.
1807 * inferiors.c (find_inferior): Remove.
1808
8f86d7aa
SM
18092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1810
1811 * linux-low.c (resume_status_pending_p): Update comment.
1812 (need_step_over_p): Update comment.
1813
e2b44075
SM
18142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * linux-low.c (proceed_one_lwp): Return void, change parameter
1817 type.
1818 (unsuspend_and_proceed_one_lwp): Likewise.
1819 (proceed_all_lwps): Use for_each_thread.
1820 (unstop_all_lwps): Likewise.
1821
c80825ff
SM
18222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1823
1824 * linux-low.c (linux_resume_one_thread): Return void, take
1825 parameter directly.
1826 (linux_resume): Use for_each_thread.
1827
df3e4dbe
SM
18282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1829
1830 * linux-low.c (send_sigstop_callback): Return void, change
1831 parameter type. Rename to...
1832 (send_sigstop): ... this.
1833 (suspend_and_send_sigstop_callback): Return void, change parameter
1834 type. Rename to...
1835 (suspend_and_send_sigstop): ... this.
1836 (stop_all_lwps): Use for_each_thread.
1837
5a6b0a41
SM
18382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1839
1840 * linux-low.c (lwp_running): Return bool, remove unused
1841 argument.
1842 (linux_stabilize_threads): Use find_thread.
1843
39a64da5
SM
18442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1845
1846 * linux-low.c (select_singlestep_lwp_callback): Remove.
1847 (count_events_callback): Remove.
1848 (select_event_lwp_callback): Remove.
1849 (select_event_lwp): Use find_thread/for_each_thread.
1850
a1385b7b
SM
18512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1852
1853 * linux-low.c (not_stopped_callback): Return bool, take filter
1854 argument directly.
1855 (linux_wait_for_event_filtered): Use find_thread.
1856 (linux_wait_1): Likewise.
1857
454296a2
SM
18582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1859
1860 * linux-low.c (same_lwp): Remove.
1861 (find_lwp_pid): Use find_thread.
1862
6b2a85da
SM
18632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1864
1865 * linux-low.c (delete_lwp_callback): Remove.
1866 (linux_mourn): Use for_each_thread.
1867
798a38e8
SM
18682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1869
1870 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1871 args parameter, don't check for pid.
1872 (linux_detach): Use for_each_thread.
1873
e4eb0dec
SM
18742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1875
1876 * linux-low.c (struct counter): Remove.
1877 (second_thread_of_pid_p): Remove.
1878 (last_thread_of_process_p): Use find_thread.
1879
83e1b6c1
SM
18802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1881
1882 * inferiors.c (find_inferior_in_random): Remove.
1883 * inferiors.h (find_inferior_in_random): Remove.
1884 * linux-low.c (status_pending_p_callback): Return bool, accept
1885 parameter ptid directly.
1886 (linux_wait_for_event_filtered): Use find_thread_in_random.
1887 (linux_wait_1): Likewise.
1888
8dc7b443
SM
18892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1890
1891 * inferiors.c (find_inferior_id): Remove.
1892 (find_thread_ptid): Move implemention from find_inferior_id to
1893 here.
1894 * inferiors.h (find_inferior_id): Remove.
1895 * server.c (handle_status): Use find_thread_ptid.
1896 (process_serial_event): Likewise.
1897 * thread-db.c (find_one_thread): Likewise.
1898 (thread_db_thread_handle): Likewise.
1899 * win32-low.c (thread_rec): Likewise.
1900 (child_delete_thread): Likewise.
1901 (win32_thread_alive): Likewise.
1902 (get_child_debug_event): Likewise.
1903
da25033c
SM
19042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1905
1906 * linux-mips-low.c (update_watch_registers_callback): Return
1907 void, remove pid_p parameter, don't check for pid.
1908 (mips_insert_point, mips_remove_point): Use for_each_thread.
1909
c91bb56b
SM
19102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1911
1912 * lynx.low (lynx_delete_thread_callback): Remove.
1913 (lynx_mourn): Use for_each_thread.
1914
634a3254
SM
19152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1916
1917 * regcache.c (regcache_invalidate_one): Remove.
1918 (regcache_invalidate_pid): use for_each_thread.
1919
41272101
TT
19202017-11-26 Tom Tromey <tom@tromey.com>
1921
1922 * linux-low.c (linux_create_inferior): Update.
1923
f5291a6f
UW
19242017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1925
1926 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1927
6654d750
AH
19282017-11-24 Alan Hayward <alan.hayward@arm.com>
1929
1930 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1931 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1932 * linux-aarch64-tdesc-selftest.c: New file.
1933 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1934
19352017-11-24 Alan Hayward <alan.hayward@arm.com>
1936
1937 * configure.srv: Add new file.
1938 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1939 * linux-aarch64-tdesc-selftest.c: New file.
1940 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1941
49bdb7ee
AH
19422017-11-24 Alan Hayward <alan.hayward@arm.com>
1943
1944 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1945 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1946 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1947
d6d7ce56
AH
19482017-11-24 Alan Hayward <alan.hayward@arm.com>
1949
1950 * configure.srv: Add new files.
1951 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1952 aarch64_linux_read_description.
1953 * linux-aarch64-low.c (aarch64_linux_read_description):
1954 Merge with aarch64_arch_setup.
1955 (aarch64_arch_setup): Call aarch64_linux_read_description.
1956 * linux-aarch64-tdesc.c: New file.
1957 * linux-aarch64-tdesc.h: New file.
1958
506fe5f4
YQ
19592017-11-24 Yao Qi <yao.qi@linaro.org>
1960
1961 * configure.srv: Set $srv_regobj for tic6x-linux.
1962 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1963 (tic6x_read_description): Move some code to tic6x_arch_setup.
1964 (tic6x_tdesc_test): New function.
1965 (initialize_low_arch): Call selftests::register_test.
1966
29f9a567
YQ
19672017-11-22 Yao Qi <yao.qi@linaro.org>
1968
1969 * remote-utils.c (prepare_resume_reply): Use memcpy.
1970
578290ec
SM
19712017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1972
1973 * linux-low.c (kill_one_lwp_callback): Return void, take
1974 argument directly, don't filter on pid.
1975 (linux_kill): Use for_each_thread.
1976
eca55aec
SM
19772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1978
1979 * linux-low.c (need_step_over_p): Return bool, remove dummy
1980 argument.
1981 (linux_resume, proceed_all_lwps): Use find_thread.
1982
25c28b4d
SM
19832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1984
1985 * linux-low.c (resume_status_pending_p): Return bool, remove
1986 flag_p argument.
1987 (linux_resume): Use find_thread.
1988
5fdda392
SM
19892017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1990
1991 * linux-low.c (struct thread_resume_array): Remove.
1992 (linux_set_resume_request): Return void, take arguments
1993 directly.
1994 (linux_resume): Use for_each_thread.
1995
fcb056a5
SM
19962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1997
1998 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1999 return bool, remove data argument.
2000 (linux_stabilize_threads): Use find_thread.
2001
139720c5
SM
20022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2003
2004 * linux-low.c (unsuspend_one_lwp): Remove.
2005 (unsuspend_all_lwps): Use for_each_thread, inline code from
2006 unsuspend_one_lwp.
2007
6d1e5673
SM
20082017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2009
2010 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2011 * linux-low.c (struct iterate_over_lwps_args): Remove.
2012 (iterate_over_lwps_filter): Remove.
2013 (iterate_over_lwps): Use find_thread.
2014
bbf550d5
SM
20152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2016
2017 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2018 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2019 code from reset_lwp_ptrace_options_callback.
2020
00192f77
SM
20212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2022
2023 * linux-arm-low.c (struct update_registers_data): Remove.
2024 (update_registers_callback): Return void, take arguments
2025 directly, don't check thread's pid.
2026 (arm_insert_point, arm_remove_point): Use for_each_thread.
2027
2bee2b6c
SM
20282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * win32-low.c (continue_one_thread): Return void, take argument
2031 directly.
2032 (child_continue): Use for_each_thread.
2033
0b360f19
SM
20342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2035
2036 * win32-i386-low.c (update_debug_registers_callback): Rename
2037 to ...
2038 (update_debug_registers): ... this, return void, remove pid_p arg.
2039 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2040
f27866ba
SM
20412017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2042
2043 * inferiors.h (struct process_info): Add constructor, initialize
2044 fields..
2045 <syscalls_to_catch>: Change type to std::vector<int>.
2046 * inferiors.c (add_process): Allocate process_info with new.
2047 (remove_process): Free process_info with delete.
2048 * linux-low.c (handle_extended_wait): Adjust.
2049 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2050 * server.c (handle_general_set): Adjust.
2051
e849ea89
PA
20522017-11-16 Pedro Alves <palves@redhat.com>
2053
2054 * remote-utils.c (remote_close): Block SIGIO signals instead of
2055 uninstalling the SIGIO handler.
2056
1d0aa65c
AH
20572017-11-16 Alan Hayward <alan.hayward@arm.com>
2058
2059 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2060
3491a34c
YQ
20612017-11-16 Yao Qi <yao.qi@linaro.org>
2062
2063 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2064 (tic6x_store_gregset): Likewise.
2065 (tic6x_usrregs_info): Move it up.
2066
a602f924
AH
20672017-11-15 Alan Hayward <alan.hayward@arm.com>
2068
2069 * Makefile.in: Update arch rules.
2070 * configure.srv: Explicitly mark arch/ files.
2071
5616b6c3
AS
20722017-11-13 Andreas Schwab <schwab@suse.de>
2073
2074 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2075 function.
2076 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2077
d1928160
PA
20782017-11-06 Pedro Alves <palves@redhat.com>
2079
2080 * config.in, configure: Regenerate.
2081
bac608e7
SM
20822017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2083
2084 * target.c (struct thread_search): Remove.
2085 (thread_search_callback): Remove.
2086 (prepare_to_access_memory): Use for_each_thread instead of
2087 find_inferior. Inline code from thread_search_callback.
2088
eaddb425
SM
20892017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2090
2091 * server.c (struct visit_actioned_threads_data): Remove.
2092 (visit_actioned_threads): Change prototype to take arguments
2093 directly.
2094 (resume): Use find_thread instead of find_inferior.
2095
99078d34
SM
20962017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2097
2098 * server.c (queue_stop_reply_callback): Change prototype, return
2099 void.
2100 (find_status_pending_thread_callback): Remove.
2101 (handle_status): Replace find_inferior with find_thread and
2102 for_each_thread.
2103
cc628f3d
AH
21042017-10-25 Alan Hayward <alan.hayward@arm.com>
2105
2106 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2107 with REGNO.
2108 (aarch64_store_gregset): Likewise.
2109 (aarch64_fill_fpregset): Likewise.
2110 (aarch64_store_fpregset): Likewise.
2111
4d3bb80e
SM
21122017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2113
2114 * gdbthread.h (find_thread, for_each_thread): New functions.
2115 * inferiors.c (thread_of_pid): Remove.
2116 (find_any_thread_of_pid): Use find_thread.
2117 * linux-low.c (num_lwps): Use for_each_thread.
2118
7a7cdfa0
YQ
21192017-10-17 Yao Qi <yao.qi@linaro.org>
2120
2121 * Makefile.in: Remove one rule.
2122 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2123
e675d170
YQ
21242017-10-17 Yao Qi <yao.qi@linaro.org>
2125
2126 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2127 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2128
7eb4e0f9
YQ
21292017-10-17 Yao Qi <yao.qi@linaro.org>
2130
2131 * configure.srv: Rename arm.o with arch/arm.o.
2132
60d6cfc9
YQ
21332017-10-17 Yao Qi <yao.qi@linaro.org>
2134
2135 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2136 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2137 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2138 (arch-i386.o, arch-amd64.o): Remove rules.
2139 (arch/%.o): New rule.
2140 Update POSTCOMPILE and COMPILE.pre.
2141 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2142 * configure: Re-generated.
2143 * configure.srv: Replace arch-i386.o with arch/i386.o.
2144 Replace arch-amd64.o with arch/amd64.o.
2145
5bfda255
YQ
21462017-10-16 Yao Qi <yao.qi@linaro.org>
2147
2148 * configure: Regenerated.
2149
9c80ecd6
SM
21502017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2151
2152 * inferiors.h: (struct inferior_list): Remove.
2153 (struct inferior_list_entry); Remove.
2154 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2155 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2156 get_first_inferior): Remove.
2157 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2158 find_inferior_id, find_inferior_in_random): Change signature.
2159 * inferiors.c (all_threads): Change type to
2160 std::list<thread_info *>.
2161 (get_thread): Remove macro.
2162 (find_inferior, find_inferior_id): Change signature, implement
2163 using find_thread.
2164 (find_inferior_in_random): Change signature, implement using
2165 find_thread_in_random.
2166 (for_each_inferior, for_each_inferior_with_data): Change
2167 signature, implement using for_each_thread.
2168 (add_inferior_to_list, remove_inferior): Remove.
2169 (add_thread, get_first_thread, thread_of_pid,
2170 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2171 (get_first_inferior, one_inferior_p, clear_inferior_list):
2172 Remove.
2173 (clear_inferiors, get_thread_process): Update.
2174 * gdbthread.h: Include <list>.
2175 (struct thread_info) <entry>: Remove field.
2176 <id>: New field.
2177 (all_threads): Change type to std::list<thread_info *>.
2178 (get_first_inferior): Add doc.
2179 (find_thread, for_each_thread, find_thread_in_random): New
2180 functions.
2181 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2182 * linux-arm-low.c (update_registers_callback): Update.
2183 * linux-low.c (second_thread_of_pid_p): Update.
2184 (kill_one_lwp_callback, linux_detach_lwp_callback,
2185 delete_lwp_callback, status_pending_p_callback, same_lwp,
2186 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2187 iterate_over_lwps, not_stopped_callback,
2188 resume_stopped_resumed_lwps, count_events_callback,
2189 select_singlestep_lwp_callback, select_event_lwp_callback,
2190 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2191 suspend_and_send_sigstop_callback, wait_for_sigstop,
2192 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2193 lwp_running, linux_set_resume_request, resume_status_pending_p,
2194 need_step_over_p, start_step_over, linux_resume_one_thread,
2195 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2196 reset_lwp_ptrace_options_callback): Update.
2197 * linux-mips-low.c (update_watch_registers_callback): Update.
2198 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2199 Update.
2200 (free_register_cache_thread_one): Remove.
2201 (regcache_release): Update.
2202 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2203 handle_qxfer_threads_worker): Update.
2204 (handle_query): Update, use list iterator.
2205 (visit_actioned_threads, handle_pending_status,
2206 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2207 clear_pending_status_callback, set_pending_status_callback,
2208 find_status_pending_thread_callback, handle_status,
2209 process_serial_event): Update.
2210 * target.c (thread_search_callback): Update.
2211 * thread-db.c (thread_db_get_tls_address): Update.
2212 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2213 Update.
2214 * win32-i386-low.c (update_debug_registers_callback): Update.
2215 * win32-low.c (delete_thread_info, child_delete_thread,
2216 continue_one_thread, suspend_one_thread,
2217 get_child_debug_event): Adjust.
2218
9179355e
SM
22192017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2220
2221 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2222 * inferiors.h: Include <list>.
2223 (struct process_info) <entry>: Remove field.
2224 <pid>: New field.
2225 (pid_of): Change macro to function.
2226 (ptid_of, lwpid_of): Remove macro.
2227 (all_processes): Change type to std::list<process_info *>.
2228 (ALL_PROCESSES): Remove macro.
2229 (for_each_process, find_process): New function.
2230 * inferiors.c (all_processes): Change type to
2231 std::list<process_info *>.
2232 (find_thread_process): Adjust.
2233 (add_process): Likewise.
2234 (remove_process): Likewise.
2235 (find_process_pid): Likewise.
2236 (get_first_process): Likewise.
2237 (started_inferior_callback): Remove.
2238 (have_started_inferiors_p): Adjust.
2239 (attached_inferior_callback): Remove.
2240 (have_attached_inferiors_p): Adjust.
2241 * linux-low.c (check_zombie_leaders): Likewise.
2242 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2243 (x86_linux_update_xmltarget): Adjust.
2244 * server.c (handle_query): Likewise.
2245 (gdb_reattached_process): Remove.
2246 (handle_status): Adjust.
2247 (kill_inferior_callback): Likewise.
2248 (detach_or_kill_inferior): Remove.
2249 (print_started_pid): Likewise.
2250 (print_attached_pid): Likewise.
2251 (detach_or_kill_for_exit): Update.
2252 (process_serial_event): Likewise.
2253 * linux-arm-low.c (arm_new_fork): Likewise.
2254
c9cb8905
SM
22552017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2256
2257 * dll.h: Include <list>.
2258 (struct dll_info): Add constructor.
2259 <entry>: Remove field.
2260 (all_dlls): Change type to std::list<dll_info>.
2261 * dll.c: Include <algorithm>.
2262 (get_dll): Remove macro.
2263 (all_dlls): Change type to std::list<dll_info *>.
2264 (free_one_dll): Remove.
2265 (match_dll): Likewise.
2266 (loaded_dll): Adjust.
2267 (unloaded_dll): Adjust to all_dlls type change, use
2268 std::find_if. Inline code from match_dll.
2269 (clear_dlls): Adjust to all_dlls type change.
2270 * server.c (emit_dll_description): Remove.
2271 (handle_qxfer_libraries): Adjust to all_dlls type change,
2272 integrate emit_dll_description's functionality.
2273
04ec7890
SM
22742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2275
2276 * linux-low.h (struct linux_target_ops) <delete_process>: New
2277 field.
2278 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2279 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2280 (struct linux_target_ops): Add delete_process callback.
2281 * linux-arm-low.c (arm_delete_process): New.
2282 (struct linux_target_ops): Add delete_process callback.
2283 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2284 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2285 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2286 * linux-mips-low.c (mips_linux_delete_process): New.
2287 (struct linux_target_ops): Add delete_process callback.
2288 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2289 * linux-s390-low.c (struct linux_target_ops): Likewise.
2290 * linux-sh-low.c (struct linux_target_ops): Likewise.
2291 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2292 * linux-tile-low.c (struct linux_target_ops): Likewise.
2293 * linux-x86-low.c (x86_linux_delete_process): New.
2294 (struct linux_target_ops): Add delete_process callback.
2295 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2296
466eecee
SM
22972017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2298
2299 * linux-aarch64-low.c (the_low_target): Add thread delete
2300 callback.
2301 * linux-arm-low.c (arm_delete_thread): New function.
2302 (the_low_target): Add thread delete callback.
2303 * linux-bfin-low.c (the_low_target): Likewise.
2304 * linux-crisv32-low.c (the_low_target): Likewise.
2305 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2306 set.
2307 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2308 field.
2309 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2310 * linux-mips-low.c (mips_linux_delete_thread): New function.
2311 (the_low_target): Add thread delete callback.
2312 * linux-ppc-low.c (the_low_target): Likewise.
2313 * linux-s390-low.c (the_low_target): Likewise.
2314 * linux-sh-low.c (the_low_target): Likewise.
2315 * linux-tic6x-low.c (the_low_target): Likewise.
2316 * linux-tile-low.c (the_low_target): Likewise.
2317 * linux-x86-low.c (the_low_target): Likewise.
2318 * linux-xtensa-low.c (the_low_target): Likewise.
2319
b79f7801
YZ
23202017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2321
2322 * win32-low.c: Include "common-inferior.h".
2323
bc3b087d
SDJ
23242017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2325
2326 * inferiors.c (set_inferior_cwd): New function.
2327 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2328 (handle_query): Inform that QSetWorkingDir is supported.
2329 * win32-low.c (create_process): Pass the inferior's cwd to
2330 CreateProcess.
2331
d092c5a2
SDJ
23322017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2333
2334 * inferiors.c (current_inferior_cwd): New global variable.
2335 (get_inferior_cwd): New function.
2336 * inferiors.h (struct process_info) <cwd>: New field.
2337
7da0a886
SDJ
23382017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2339
2340 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2341 (OBS): Add gdb_tilde_expand.o.
2342
289a6840
SM
23432017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2346 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2347
256642e8
PA
23482017-09-29 Pedro Alves <palves@redhat.com>
2349
2350 * ax.c (gdb_parse_agent_expr): Constify.
2351 * ax.h (gdb_parse_agent_expr): Constify.
2352 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2353 Constify.
2354 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2355 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2356 * remote-utils.h (read_ptid): Constify.
2357 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2358 (process_point_options, process_serial_event): Constify.
2359 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2360 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2361 (cmd_qtbuffer): Constify.
2362
5b9ca4d4
PA
23632017-09-29 Pedro Alves <palves@redhat.com>
2364
2365 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2366 fails.
2367
94c207e0
PA
23682017-09-29 Pedro Alves <palves@redhat.com>
2369
2370 * linux-low.c (handle_extended_wait): Pass parent thread instead
2371 of process to thread_db_notice_clone.
2372 * linux-low.h (thread_db_notice_clone): Replace parent process
2373 parameter with parent thread parameter.
2374 * thread-db.c (find_one_thread): Add comment.
2375 (thread_db_notice_clone): Replace parent process parameter with
2376 parent thread parameter. Temporarily switch to the parent thread.
2377
75352e28
SDJ
23782017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2379
2380 * gdbthread.h: Include "common-gdbthread.h".
2381 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2382 "if" when validating the ptid.
2383 * remote-utils.c: Include "gdbthread.h".
2384 (prepare_resume_reply): Use "switch_to_thread".
2385 * target.c (done_accessing_memory): Likewise.
2386
ad339634
AA
23872017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2388
2389 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2390 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2391 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2392 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2393 s390x-gs-linux64-ipa.o to ipa_obj.
2394 * linux-s390-low.c (HWCAP_S390_GS): New define.
2395 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2396 New functions.
2397 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2398 (s390_arch_setup): Check for guarded-storage support and choose
2399 appropriate tdesc.
2400 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2401 init_registers_s390x_gs_linux64.
2402 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2403 enum value.
2404 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2405 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2406
cc4d742f
SM
24072017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2410
f6327dcb
KB
24112017-09-21 Kevin Buettner <kevinb@redhat.com>
2412
2413 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2414 (thread_db_thread_handle): Declare.
2415 * linux-low.c (linux_target_ops): Initialize thread_handle.
2416 * server.c (handle_qxfer_threads_worker): Add support for
2417 "handle" attribute.
2418 * target.h (struct target_ops): Add new function pointer,
2419 thread_handle.
2420 (target_thread_handle): Define.
2421 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2422 field in lwp.
2423 (thread_db_thread_handle): New function.
2424
86299109
KB
24252017-09-21 Kevin Buettner <kevinb@redhat.com>
2426
2427 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2428 * linux-low.h (thread_db_notice_clone): Declare.
2429 * thread-db.c (thread_db_notice_clone): New function.
2430
f557a88a
PA
24312017-09-21 Pedro Alves <palves@redhat.com>
2432
2433 * server.c (gdb_read_memory, handle_status, process_serial_event)
2434 (handle_serial_event, handle_target_event): Adjust to
2435 set_desired_thread prototype change.
2436 * target.c (set_desired_thread): Remove 'use_general' parameter
2437 and adjust.
2438 * target.h (set_desired_thread): Remove 'use_general' parameter.
2439
223ffa71
TT
24402017-09-20 Tom Tromey <tom@tromey.com>
2441
2442 * target.c (target_terminal::terminal_state): Define.
2443 (target_terminal::init): Rename from target_terminal_init.
2444 (target_terminal::inferior): Rename from
2445 target_terminal_inferior.
2446 (target_terminal::ours): Rename from target_terminal_ours.
2447 (target_terminal::ours_for_output, target_terminal::info): New.
2448
04fd3ba9
SM
24492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2450
2451 * server.c (accumulate_file_name_length): Remove.
2452 (emit_dll_description): Adjust to std::string change.
2453 (handle_qxfer_libraries): Use std::string to hold document.
2454
5e187554
SM
24552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2456
2457 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2458 return type of xml_escape_text.
2459 * server.c (emit_dll_description): Likewise.
2460
1526853e
SM
24612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2462
2463 * server.c (captured_main): Accept argument for --selftest.
2464 Update run_tests call.
2465 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2466 when registering selftests.
2467
c4dfafab
SDJ
24682017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2469
2470 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2471 instead of "VEC" for "target_desc.reg_defs".
2472 (regcache_cpy): Likewise.
2473 (registers_to_string): Likewise.
2474 (registers_from_string): Likewise.
2475 (find_regno): Likewise.
2476 (supply_regblock): Likewise.
2477 (regcache_raw_read_unsigned): Likewise.
2478 * tdesc.c (init_target_desc): Likewise.
2479 (tdesc_create_reg): Likewise.
2480 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2481 (struct target_desc) <reg_defs>: Convert to "std::vector".
2482 (target_desc): Do not initialize "reg_defs".
2483 (~target_desc): Update code to use "std::vector" instead of "VEC"
2484 for "target_desc.reg_defs".
2485 (operator==): Likewise.
2486
124aceb4
SM
24872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2488
2489 * inferiors.h (thread_to_gdb_id): Remove.
2490 * inferiors.c (thread_to_gdb_id): Remove.
2491 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2492 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2493 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2494 Likewise.
2495 * nto-low.c (nto_fetch_registers, nto_store_registers,
2496 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2497
96cde54f
SM
24982017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2499
2500 * inferiors.h (gdb_id_to_thread_id): Remove.
2501 * inferiors.c (gdb_id_to_thread_id): Remove.
2502 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2503 removal. Move pid declaration closer to where it's used.
2504
e8ca139e
SM
25052017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2506
2507 * server.c (handle_detach): New function.
2508 (process_serial_event): Move code out, call handle_detach.
2509
f8a4e119
SM
25102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2511
2512 * server.c (require_running): Rename to ...
2513 (require_running_or_return): ... this ...
2514 (require_running_or_break): ... and this.
2515 (handle_query, process_serial_event): Adjust.
2516
0eb0a407
SM
25172017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2518
2519 * linux-low.c (linux_set_resume_request): Remove unused
2520 variables.
2521
785922a5
SM
25222017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2523
2524 * server.c (first_thread_of): Remove.
2525 (process_serial_event): Replace usage of first_thread_of with
2526 find_any_thread_of_pid.
2527 * tracepoint.c (same_process_p): Remove.
2528 (gdb_agent_about_to_close): Replace usage of same_process_p with
2529 find_any_thread_of_pid.
2530 * linux-x86-low.c (same_process_callback): Remove.
2531 (x86_arch_setup_process_callback): Replace usage of
2532 same_process_callback with find_any_thread_of_pid.
2533 * thread-db.c (any_thread_of): Remove.
2534 (switch_to_process): Replace usage of any_thread_of with
2535 find_any_thread_of_pid.
2536 * inferiors.c (thread_pid_matches_callback): Remove.
2537 (find_thread_process): Adjust to use find_any_thread_of_pid.
2538
a059f00c
SDJ
25392017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2540
2541 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2542 with "!VEC_empty".
a059f00c 2543
cc397f3a
SDJ
25442017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2545
2546 * linux-low.c (handle_extended_wait): Use
2547 "allocate_target_description" instead of "XNEW".
2548 * linux-x86-low.c (initialize_low_arch): Likewise.
2549
22916b07
YQ
25502017-09-05 Yao Qi <yao.qi@linaro.org>
2551
2552 * configure.srv (srv_i386_regobj): Remove.
2553 (srv_amd64_regobj): Remove.
2554 (srv_regobj): Set it to "" for x86 non-linux targets.
2555 * linux-x86-tdesc.c (i386_linux_read_description):
2556 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2557 (init_registers_i386): Remove the declaration.
2558 (tdesc_i386): Remove the declaration.
2559 (lynx_i386_arch_setup): Call i386_create_target_description.
2560 * nto-x86-low.c: Likewise.
2561 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2562 [!__x86_64__]: include arch/i386.h.
2563 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2564
38602d55
YQ
25652017-09-05 Yao Qi <yao.qi@linaro.org>
2566
2567 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2568 i386/amd64-XXX-linux from it.
2569
44b886ff
YQ
25702017-09-05 Yao Qi <yao.qi@linaro.org>
2571
2572 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2573 false.
2574 (ipa_amd64_linux_regobj): Remove.
2575 (ipa_x32_linux_regobj): Remove.
2576
b4570e4b
YQ
25772017-09-05 Yao Qi <yao.qi@linaro.org>
2578
2579 * Makefile.in (arch-amd64.o): New rule.
2580 * configure.srv: Append arch-amd64.o.
2581 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2582 (get_ipa_tdesc): Call amd64_linux_read_description.
2583 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2584 and init_registers_amd64_XXX.
2585 * linux-x86-low.c (x86_linux_read_description): Call
2586 amd64_linux_read_description.
2587 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2588 (initialize_low_arch): Don't call init_registers_x32_XXX and
2589 init_registers_amd64_XXX.
2590 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2591 and tdesc_amd64_XXX.
2592 [__x86_64__] (amd64_tdesc_test): New function.
2593 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2594 and init_registers_amd64_XXX.
2595 * linux-x86-tdesc.c: Include arch/amd64.h.
2596 (xcr0_to_tdesc_idx): New function.
2597 (i386_linux_read_description): New function.
2598 (amd64_get_ipa_tdesc_idx): New function.
2599 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2600 (amd64_get_ipa_tdesc): Declare.
2601
d1f28ea2
YQ
26022017-09-05 Yao Qi <yao.qi@linaro.org>
2603
2604 * configure.srv (srv_i386_linux_xmlfiles): Remove
2605 i386/i386-XXX-linux.xml from it.
2606
25a93583
YQ
26072017-09-05 Yao Qi <yao.qi@linaro.org>
2608
2609 * configure.srv: Set srv_i386_linux_regobj empty if $development
2610 is false.
2611 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2612 initialize_low_tdesc.
2613 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2614 with #if initialize_low_tdesc.
2615 * linux-x86-tdesc-selftest.c: New file.
2616 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2617
5f035c07
YQ
26182017-09-05 Yao Qi <yao.qi@linaro.org>
2619
2620 * Makefile.in (arch-i386.o): New rule.
2621 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2622 (x86_64-*-linux*): Likewise.
2623 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2624 include arch/i386.h.
2625 (i386_linux_read_description): Remove code and call
2626 i386_create_target_description.
2627 * tdesc.c (allocate_target_description): New function.
2628 * tdesc.h (set_tdesc_architecture): Remove declaration.
2629 (set_tdesc_osabi): Likewise.
2630
0abe8a89
YQ
26312017-09-05 Yao Qi <yao.qi@linaro.org>
2632
2633 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2634 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2635 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2636 .xmltarget.
2637 * server.c (get_features_xml): Call tdesc_get_features_xml.
2638 * tdesc.c (set_tdesc_architecture): New function.
2639 (set_tdesc_osabi): New function.
2640 (tdesc_get_features_xml): New function.
2641 (tdesc_create_feature): Add an argument.
2642 * tdesc.h (struct target_desc) <features>: New field.
2643 <arch, osabi>: New field.
2644 (~target_desc): xfree features, arch, and osabi.
2645 (target_desc::oerator==): Don't compare .xmltarget.
2646 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2647 (set_tdesc_osabi): Likewise.
2648 (tdesc_get_features_xml): Likewise.
2649
0a188386
YQ
26502017-09-05 Yao Qi <yao.qi@linaro.org>
2651
2652 * linux-x86-tdesc.c: Include selftest.h.
2653 (i386_tdesc_test): New function.
2654 (initialize_low_tdesc): Call selftests::register_test.
2655 * tdesc.h: Include regdef.h.
2656 (target_desc): Override operator == and !=.
2657
f49ff000
YQ
26582017-09-05 Yao Qi <yao.qi@linaro.org>
2659
2660 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2661 (ipa_obj): Likewise.
2662 * linux-i386-ipa.c: Include common/x86-xstate.h
2663 (get_ipa_tdesc): Call i386_linux_read_description.
2664 (initialize_low_tracepoint): Don't call init_registers_XXX
2665 functions, call initialize_low_tdesc instead.
2666 * linux-x86-low.c (x86_linux_read_description): Call
2667 i386_linux_read_description.
2668 (initialize_low_arch): Don't call init_registers_i386_XXX
2669 functions, call initialize_low_tdesc.
2670 * linux-x86-tdesc.c: New file.
2671 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2672 (i386_get_ipa_tdesc_idx): Declare.
2673 (i386_get_ipa_tdesc): Declare.
2674 (initialize_low_tdesc): Declare.
2675
2b68ef2f
YQ
26762017-09-05 Yao Qi <yao.qi@linaro.org>
2677
2678 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2679 instead of 0.
2680
f7000548
YQ
26812017-09-05 Yao Qi <yao.qi@linaro.org>
2682
2683 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2684 * regcache.c (get_thread_regcache): Use VEC_length.
2685 (init_register_cache): Likewise.
2686 (regcache_cpy): Likewise.
2687 (registers_to_string): Iterate reg_defs via VEC_iterate.
2688 (find_regno): Likewise.
2689 (find_register_by_number): Use VEC_index.
2690 (register_size): Call find_register_by_number.
2691 (register_data): Call find_register_by_number.
2692 (supply_regblock): Use VEC_length.
2693 (regcache_raw_read_unsigned): Likewise.
2694 * tdesc.c (init_target_desc): Iterate reg_defs via
2695 VEC_iterate.
2696 (default_description): Update initializer.
2697 (copy_target_description): Don't update field num_registers.
2698 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2699 <num_registers>: Remove.
2700
50a421ac
SM
27012017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2702
2703 * Makefile.in (.SECONDARY): Define target.
2704
23fdd69e
SM
27052017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2706
2707 * linux-low.c (linux_wait_1): Adjust.
2708 * server.c (queue_stop_reply_callback): Adjust.
2709
0a2dde4a
SDJ
27102017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2711
2712 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2713 QEnvironmentUnset and QEnvironmentReset packets.
2714 (handle_query): Inform remote that QEnvironmentHexEncoded,
2715 QEnvironmentUnset and QEnvironmentReset are supported.
2716
6afd337d
SM
27172017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2718
2719 * inferiors.h (inferior_target_data): Rename to ...
2720 (thread_target_data): ... this.
2721 (inferior_regcache_data): Rename to ...
2722 (thread_regcache_data): ... this.
2723 (set_inferior_regcache_data): Rename to ...
2724 (set_thread_regcache_data): ... this.
2725 * inferiors.c (inferior_target_data): Rename to ...
2726 (thread_target_data): ... this.
2727 (inferior_regcache_data): Rename to ...
2728 (thread_regcache_data): ... this.
2729 (set_inferior_regcache_data): Rename to ...
2730 (set_thread_regcache_data): ... this.
2731 (free_one_thread): Update.
2732 * linux-low.h (get_thread_lwp): Update.
2733 * regcache.c (get_thread_regcache): Update.
2734 (regcache_invalidate_thread): Update.
2735 (free_register_cache_thread): Update.
2736 * win32-i386-low.c (update_debug_registers_callback): Update.
2737 (win32_get_current_dr): Update.
2738 * win32-low.c (thread_rec): Update.
2739 (delete_thread_info): Update.
2740 (continue_one_thread): Update.
2741 (suspend_one_thread): Update.
2742
a160cc46
SM
27432017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2744
2745 * inferiors.c (set_inferior_target_data): Remove.
2746 * inferiors.h (set_inferior_target_data): Remove.
2747
6d580b63
YQ
27482017-08-18 Yao Qi <yao.qi@linaro.org>
2749
2750 * Makefile.in (OBS): Add selftest.o.
2751 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2752 * configure, config.in: Re-generated.
2753 * server.c: Include common/sefltest.h.
2754 (captured_main): Handle option --selftest.
2755
f5a29eb0
YQ
27562017-08-09 Yao Qi <yao.qi@linaro.org>
2757
2758 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2759 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2760 i386-avx-mpx.o and i386-mmx.o.
2761 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2762 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2763 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2764 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2765 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2766 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2767 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2768 i386/amd64-avx-mpx.xml.
2769
57757c2f
YQ
27702017-08-09 Yao Qi <yao.qi@linaro.org>
2771
2772 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2773 and x32-avx-avx512.o.
2774 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2775 i386/x32-avx-avx512.xml.
2776
229d26fc
SM
27772017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2778
2779 * tracepoint.h (enum class fast_tpoint_collect_result): New
2780 enumeration.
2781 (fast_tracepoint_collecting): Change return type to
2782 fast_tpoint_collect_result.
2783 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2784 * linux-low.h: Include tracepoint.h.
2785 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2786 fast_tpoint_collect_result.
2787 * linux-low.c (handle_tracepoints): Adjust.
2788 (linux_fast_tracepoint_collecting): Change return type to
2789 fast_tpoint_collect_result.
2790 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2791 linux_wait_1, stuck_in_jump_pad_callback,
2792 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2793 proceed_one_lwp): Adjust to type change.
2794
2e1e43e1
YQ
27952017-07-10 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2798
adc764e7
YQ
27992017-06-29 Yao Qi <yao.qi@linaro.org>
2800
2801 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2802 Remove.
2803 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2804
a206891a
SM
28052017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2806
2807 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2808
9a6c7d9c
SDJ
28092017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2810
2811 * linux-low.c (linux_create_inferior): Adjust code to access the
2812 environment information via 'gdb_environ' class.
2813 * lynx-low.c (lynx_create_inferior): Likewise.
2814 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2815 (get_environ): Return a pointer to 'our_environ'.
2816 (captured_main): Initialize 'our_environ'.
2817 * server.h (get_environ): Adjust prototype.
2818 * spu-low.c (spu_create_inferior): Adjust code to access the
2819 environment information via 'gdb_environ' class.
2820
ae3e2ccf
SM
28212017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2822
2823 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2824 usage of "register" keyword.
2825
3e019bdc
SM
28262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2827
2828 * configure: Re-generate.
2829
8465943a
SM
28302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2831
2832 * configure: Re-generate.
2833
cf0dd6f0
SM
28342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2835
2836 * Makefile.in (COMPILE.pre): Add "-x c++".
2837
9845682b
SDJ
28382017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2839
2840 * fork-child.c: Conditionally include <signal.h>.
2841
aefd8b33
SDJ
28422017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2843
2844 * server.c (handle_general_set): Handle new packet
2845 "QStartupWithShell".
2846 (handle_query): Add "QStartupWithShell" to the list of supported
2847 packets.
2848 (gdbserver_usage): Add help text explaining the
2849 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2850 options.
2851 (captured_main): Recognize and act upon the presence of the new
2852 CLI options.
2853
2090129c
SDJ
28542017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2855 Pedro Alves <palves@redhat.com>
2856
2857 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2858 * configure: Regenerate.
2859 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2860 "fork-inferior.o".
2861 (i[34567]86-*-lynxos*): Likewise.
2862 (spu*-*-*): Likewise.
2863 * fork-child.c: New file.
2864 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2865 and "environ.h".
2866 (linux_ptrace_fun): New function.
2867 (linux_create_inferior): Adjust function prototype to reflect
2868 change on "target.h". Adjust function code to use
2869 "fork_inferior".
2870 (linux_request_interrupt): Delete "signal_pid".
2871 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2872 (lynx_ptrace_fun): New function.
2873 (lynx_create_inferior): Adjust function prototype to reflect
2874 change on "target.h". Adjust function code to use
2875 "fork_inferior".
2876 * nto-low.c (nto_create_inferior): Adjust function prototype and
2877 code to reflect change on "target.h". Update comments.
2878 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2879 "common-terminal.h" and "environ.h".
2880 (terminal_fd): Moved to fork-child.c.
2881 (old_foreground_pgrp): Likewise.
2882 (restore_old_foreground_pgrp): Likewise.
2883 (last_status): Make it global.
2884 (last_ptid): Likewise.
2885 (our_environ): New variable.
2886 (startup_with_shell): Likewise.
2887 (program_name): Likewise.
2888 (program_argv): Rename to...
2889 (program_args): ...this.
2890 (wrapper_argv): New variable.
2891 (start_inferior): Delete function.
2892 (get_exec_wrapper): New function.
2893 (get_exec_file): Likewise.
2894 (get_environ): Likewise.
2895 (prefork_hook): Likewise.
2896 (post_fork_inferior): Likewise.
2897 (postfork_hook): Likewise.
2898 (postfork_child_hook): Likewise.
2899 (handle_v_run): Update code to deal with arguments coming from the
2900 remote host. Update calls from "start_inferior" to
2901 "create_inferior".
2902 (captured_main): Likewise. Initialize environment variable. Call
2903 "have_job_control".
2904 * server.h (post_fork_inferior): New prototype.
2905 (get_environ): Likewise.
2906 (last_status): Declare.
2907 (last_ptid): Likewise.
2908 (signal_pid): Likewise.
2909 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2910 (spu_ptrace_fun): New function.
2911 (spu_create_inferior): Adjust function prototype to reflect change
2912 on "target.h". Adjust function code to use "fork_inferior".
2913 * target.c (target_terminal_init): New function.
2914 (target_terminal_inferior): Likewise.
2915 (target_terminal_ours): Likewise.
2916 * target.h: Include <vector>.
2917 (struct target_ops) <create_inferior>: Update prototype.
2918 (create_inferior): Update macro.
2919 * utils.c (gdb_flush_out_err): New function.
2920 * win32-low.c (win32_create_inferior): Adjust function prototype
2921 and code to reflect change on "target.h".
2922
043a4934
SDJ
29232017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2924
2925 * inferiors.c (switch_to_thread): New function.
2926
15652511
SDJ
29272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2928
2929 * Makefile.in (SFILE): Add "common/job-control.c".
2930 (OBS): Add "job-control.o".
2931
21ea5acd
SDJ
29322017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2933
2934 * Makefile: Remove "@host_makefile_frag@".
2935
e13cb306
PA
29362017-05-05 Pedro Alves <palves@redhat.com>
2937
2938 * configure: Regenerate.
2939
c94fee56
SDJ
29402017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2941
2942 * configure: Regenerate.
2943
a0ff9e1a
SM
29442017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2945
2946 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2947 software_single_step change of return type to
2948 std::vector<CORE_ADDR>.
2949 * linux-low.c (install_software_single_step_breakpoints):
2950 Likewise.
2951 * linux-low.h (install_software_single_step_breakpoints):
2952 Likewise.
2953
be628ab8
SDJ
29542017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2955
2956 * remote-utils.c: Include "gdb_termios.h" instead of
2957 "terminal.h".
2958 * terminal.h: Delete file.
2959
7c5ded6a
SDJ
29602017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2961
2962 * server.c: Include <vector>.
2963 <program_argv, wrapper_argv>: Convert to std::vector.
2964 (start_inferior): Rewrite function to use C++.
2965 (handle_v_run): Likewise. Update code that calculates the argv
2966 based on the vRun packet; use C++.
2967 (captured_main): Likewise.
2968
436252de
SM
29692017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2970
2971 * server.c (handle_v_cont): Initialize thread_resume::thread
2972 with null_ptid.
2973
9bf2a700
PA
29742017-04-05 Pedro Alves <palves@redhat.com>
2975
2976 * configure: Regenerate.
2977
a121b7c1
PA
29782017-04-05 Pedro Alves <palves@redhat.com>
2979
2980 * gdbreplay.c (sync_error): Constify.
2981 * linux-x86-low.c (push_opcode): Constify.
2982
21c8a587
PA
29832017-04-05 Pedro Alves <palves@redhat.com>
2984
2985 * win32-low.c (get_child_debug_event)
2986 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2987 Report TARGET_WAITKIND_SPURIOUS instead.
2988
fb32b4f7
PA
29892017-04-05 Pedro Alves <palves@redhat.com>
2990
e79be6e5
SM
2991 * remote-utils.c (remote_prepare, remote_open): Constify.
2992 * remote-utils.h (remote_prepare, remote_open): Constify.
2993 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2994
65dd1e59
SM
29952017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2996
2997 * Makefile.in (clean): Clear .deps.
2998
8fa5b777
SM
29992017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3000
3001 * .gitignore: Remove generated files, replace with wildcard.
3002 * (clean): Replace removal of generated files with wildcard.
3003 (version.c): Replace with...
3004 (version-generated.c): ...this.
3005 (xml-builtin.c): Replace with...
3006 (xml-builtin-generated.c): ...this.
3007 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3008 (%.c: *regformats*): Replace with...
3009 (%-generated.c: *regformats*): ...this.
3010
a12e714b
MF
30112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3012
3013 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3014 (xtensa_fill_gregset): Call collect_register_by_name for
3015 threadptr register.
3016 (xtensa_store_gregset): Call supply_register_by_name for
3017 threadptr register.
3018
1a09b50a
MF
30192017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3020
3021 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3022 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3023 (xtensa_store_gregset): Call supply_register for all registers in
3024 a0_regnum..a0_regnum + C0_NREGS range.
3025
1a01e7c6
SM
30262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3027
3028 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3029 (ax-ipa.o: ax.c): Remove.
3030 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3031 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3032 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3033 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3034 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3035
36bc18a8
SM
30362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3037
3038 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3039 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3040 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3041 (errors-ipa.o: ../common/errors.c): Remove.
3042 (format-ipa.o: ../common/format.c): Remove.
3043 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3044
a8ebe3d5
SM
30452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3046
3047 * Makefile.in (%-ipa.o: %.c): New rule.
3048 (tracepoint-ipa.o: tracepoint.c): Remove.
3049 (utils-ipa.o: utils.c): Remove.
3050 (remote-utils-ipa.o: remote-utils.c): Remove.
3051 (regcache-ipa.o: regcache.c): Remove.
3052 (i386-linux-ipa.o: i386-linux.c): Remove.
3053 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3054 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3055 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3056 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3057 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3058 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3059 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3060 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3061 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3062 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3063 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3064 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3065 (aarch64-ipa.o: aarch64.c): Remove.
3066 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3067 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3068 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3069 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3070 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3071 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3072 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3073 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3074 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3075 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3076 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3077 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3078 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3079 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3080 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3081 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3082 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3083 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3084 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3085 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3086 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3087 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3088 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3089 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3090 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3091 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3092 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3093 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3094 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3095 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3096 (tdesc-ipa.o: tdesc.c): Remove.
3097 (x32-linux-ipa.o: x32-linux.c): Remove.
3098 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3099 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3100
50cfacb7
SM
31012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3102
3103 * Makefile.in (%.o: ../arch/%.c): New rule.
3104 (arm.o: ../arch/arm.c): Remove.
3105 (arm-linux.o: ../arch/arm-linux.c): Remove.
3106 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3107 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3108
c5a22423
SM
31092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3110
3111 * Makefile.in (%.o: ../nat/%.c): New rule.
3112 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3113 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3114 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3115 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3116 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3117 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3118 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3119 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3120 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3121 (linux-personality.o: ../nat/linux-personality.c): Remove.
3122 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3123 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3124 (x86-linux.o: ../nat/x86-linux.c): Remove.
3125 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3126 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3127
6bda016b
SM
31282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3129
3130 * Makefile.in (%.o: ../common/%.c): New rule.
3131 (signals.o: ../common/signals.c): Remove.
3132 (print-utils.o: ../common/print-utils.c): Remove.
3133 (rsp-low.o: ../common/rsp-low.c): Remove.
3134 (common-utils.o: ../common/common-utils.c): Remove.
3135 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3136 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3137 (vec.o: ../common/vec.c): Remove.
3138 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3139 (xml-utils.o: ../common/xml-utils.c): Remove.
3140 (ptid.o: ../common/ptid.c): Remove.
3141 (buffer.o: ../common/buffer.c): Remove.
3142 (format.o: ../common/format.c): Remove.
3143 (filestuff.o: ../common/filestuff.c): Remove.
3144 (agent.o: ../common/agent.c): Remove.
3145 (errors.o: ../common/errors.c): Remove.
3146 (environ.o: ../common/environ.c): Remove.
3147 (common-debug.o: ../common/common-debug.c): Remove.
3148 (cleanups.o: ../common/cleanups.c): Remove.
3149 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3150 (fileio.o: ../common/fileio.c): Remove.
3151 (common-regcache.o: ../common/common-regcache.c): Remove.
3152 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3153 (new-op.o: ../common/new-op.c): Remove.
3154 (btrace-common.o: ../common/btrace-common.c): Remove.
3155
21122961
SM
31562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3157
3158 * Makefile.in (%.o: ../target/%.c): New rule.
3159 (waitstatus.o: ../target/waitstatus.c): Remove.
3160
c362e621
SM
31612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3162
3163 * Makefile.in
3164 (%.c: ../regformats/%.dat,
3165 (%.c: ../regformats/arm/%.dat,
3166 (%.c: ../regformats/i386/%.dat,
3167 (%.c: ../regformats/rs6000/%.dat): New rules.
3168 (aarch64.c): Remove.
3169 (reg-arm.c): Remove.
3170 (arm-with-iwmmxt.c): Remove.
3171 (arm-with-vfpv2.c): Remove.
3172 (arm-with-vfpv3.c): Remove.
3173 (arm-with-neon.c): Remove.
3174 (reg-bfin.c): Remove.
3175 (reg-cris.c): Remove.
3176 (reg-crisv32.c): Remove.
3177 (i386.c): Remove.
3178 (i386-linux.c): Remove.
3179 (i386-avx.c): Remove.
3180 (i386-avx-linux.c): Remove.
3181 (i386-avx-avx512.c): Remove.
3182 (i386-avx-avx512-linux.c): Remove.
3183 (i386-mpx.c): Remove.
3184 (i386-mpx-linux.c): Remove.
3185 (i386-avx-mpx-avx512-pku.c): Remove.
3186 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3187 (i386-avx-mpx.c): Remove.
3188 (i386-avx-mpx-linux.c): Remove.
3189 (i386-mmx.c): Remove.
3190 (i386-mmx-linux.c): Remove.
3191 (reg-ia64.c): Remove.
3192 (reg-m32r.c): Remove.
3193 (reg-m68k.c): Remove.
3194 (reg-cf.c): Remove.
3195 (mips-linux.c): Remove.
3196 (mips-dsp-linux.c): Remove.
3197 (mips64-linux.c): Remove.
3198 (mips64-dsp-linux.c): Remove.
3199 (nios2-linux.c): Remove.
3200 (powerpc-32.c): Remove.
3201 (powerpc-32l.c): Remove.
3202 (powerpc-altivec32l.c): Remove.
3203 (powerpc-cell32l.c): Remove.
3204 (powerpc-vsx32l.c): Remove.
3205 (powerpc-isa205-32l.c): Remove.
3206 (powerpc-isa205-altivec32l.c): Remove.
3207 (powerpc-isa205-vsx32l.c): Remove.
3208 (powerpc-e500l.c): Remove.
3209 (powerpc-64l.c): Remove.
3210 (powerpc-altivec64l.c): Remove.
3211 (powerpc-cell64l.c): Remove.
3212 (powerpc-vsx64l.c): Remove.
3213 (powerpc-isa205-64l.c): Remove.
3214 (powerpc-isa205-altivec64l.c): Remove.
3215 (powerpc-isa205-vsx64l.c): Remove.
3216 (s390-linux32.c): Remove.
3217 (s390-linux32v1.c): Remove.
3218 (s390-linux32v2.c): Remove.
3219 (s390-linux64.c): Remove.
3220 (s390-linux64v1.c): Remove.
3221 (s390-linux64v2.c): Remove.
3222 (s390-te-linux64.c): Remove.
3223 (s390-vx-linux64.c): Remove.
3224 (s390-tevx-linux64.c): Remove.
3225 (s390x-linux64.c): Remove.
3226 (s390x-linux64v1.c): Remove.
3227 (s390x-linux64v2.c): Remove.
3228 (s390x-te-linux64.c): Remove.
3229 (s390x-vx-linux64.c): Remove.
3230 (s390x-tevx-linux64.c): Remove.
3231 (tic6x-c64xp-linux.c): Remove.
3232 (tic6x-c64x-linux.c): Remove.
3233 (tic6x-c62x-linux.c): Remove.
3234 (reg-sh.c): Remove.
3235 (reg-sparc64.c): Remove.
3236 (reg-spu.c): Remove.
3237 (amd64.c): Remove.
3238 (amd64-linux.c): Remove.
3239 (amd64-avx.c): Remove.
3240 (amd64-avx-linux.c): Remove.
3241 (amd64-avx-avx512.c): Remove.
3242 (amd64-avx-avx512-linux.c): Remove.
3243 (amd64-mpx.c): Remove.
3244 (amd64-mpx-linux.c): Remove.
3245 (amd64-avx-mpx-avx512-pku.c): Remove.
3246 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3247 (amd64-avx-mpx.c): Remove.
3248 (amd64-avx-mpx-linux.c): Remove.
3249 (x32.c): Remove.
3250 (x32-linux.c): Remove.
3251 (x32-avx.c): Remove.
3252 (x32-avx-linux.c): Remove.
3253 (x32-avx-avx512.c): Remove.
3254 (x32-avx-avx512-linux.c): Remove.
3255 (reg-xtensa.c): Remove.
3256 (reg-tilegx.c): Remove.
3257 (reg-tilegx32.c): Remove.
3258
1672e0d9
SDJ
32592017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3260
3261 * Makefile.in (SFILES): Add "common/environ.c".
3262 (OBJS): Add "common/environ.h".
3263
239b6d10
WT
32642017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3265
3266 * configure.ac: Check if the fs_base and gs_base members of
3267 `struct user_regs_struct' exist.
3268 * config.in: Regenerated.
3269 * configure: Likewise.
3270
694b382c
AT
32712017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3272
3273 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3274 target_read_memory.
3275 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3276 (get_next_pcs_syscall_next_pc): Likewise.
3277
7dc53023
LM
32782016-12-23 Luis Machado <lgustavo@codesourcery.com>
3279
3280 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3281 * nto-x86-low.c: Likewise.
3282
ad02e4fe
SM
32832016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3284
3285 * Makefile.in: Include disable-implicit-rules.mk.
3286
dcb07cfa
PA
32872016-11-23 Pedro Alves <palves@redhat.com>
3288
3289 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3290 (debug_vprintf): Use std::chrono::steady_clock instead of
3291 gettimeofday. Use '.' instead of ':'.
3292 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3293 (get_timestamp): Use std::chrono::steady_clock instead of
3294 gettimeofday.
3295
8629c02c
SM
32962016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3297
3298 * Makefile.in: Fix whitespace formatting.
3299
b593ecca
SM
33002016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3301
3302 * Makefile.in (SFILES, OBS): Flatten list and order
3303 alphabetically.
3304
9986ba08
PA
33052016-11-23 Pedro Alves <palves@redhat.com>
3306
3307 * event-loop.c (handle_file_event): Use warning.
3308 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3309 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3310 Use warning.
3311
4eefa7bc
PA
33122016-11-23 Pedro Alves <palves@redhat.com>
3313
3314 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3315 output.
3316 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3317 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3318 debug_printf and debug_flush for debug output.
3319 * server.c (handle_general_set): Likewise.
3320 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3321 output.
3322
5443506e
SM
33232016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3324
3325 * Makefile.in (.c.o): Replace rule with ...
3326 (%.o: %.c): ... this one.
3327
3b165252
SM
33282016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3329
3330 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3331 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3332 make.
3333 * configure.ac: Remove checks for the make program.
3334 * configure: Re-generate.
3335
0bcda685
PA
33362016-10-28 Pedro Alves <palves@redhat.com>
3337
3338 * Makefile.in (CXX_DIALECT): Get from configure.
3339 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3340 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3341 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3342 * config.in: Regenerate.
3343 * configure: Regenerate.
3344
c3805894
YQ
33452016-10-27 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-low.c (linux_supports_range_stepping): Return true if
3348 can_software_single_step return true.
3349
89342618
YQ
33502016-10-27 Yao Qi <yao.qi@linaro.org>
3351
3352 * inferiors.c (find_inferior_in_random): New function.
3353 * inferiors.h (find_inferior_in_random): Declare.
3354 * linux-low.c (linux_wait_for_event_filtered): Call
3355 find_inferior_in_random instead of find_inferior.
3356
e3652c84
YQ
33572016-10-27 Yao Qi <yao.qi@linaro.org>
3358
3359 * linux-low.c (linux_wait_1): If single-step breakpoints are
3360 inserted, remove them.
3361
5a04c4cf
PA
33622016-10-26 Pedro Alves <palves@redhat.com>
3363
3364 * linux-low.c (handle_extended_wait): Link parent/child fork
3365 threads.
3366 (linux_wait_1): Unlink them.
3367 (linux_set_resume_request): Ignore resume requests for
3368 already-resumed and unhandled fork child threads.
3369 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3370 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3371 New functions.
3372 (handle_v_requests) <vCont>: Don't call require_running.
3373 * server.h (in_queued_stop_replies): New declaration.
3374
cb93dc7f
YQ
33752016-10-24 Yao Qi <yao.qi@linaro.org>
3376
3377 PR server/20733
3378 * linux-aarch64-low.c (append_insns): Cast the return value to
3379 'uint32_t *'.
3380
a1078bea
YQ
33812016-10-10 Yao Qi <yao.qi@linaro.org>
3382
3383 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3384
1fb77080
SDJ
33852016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3386
3387 * target.c (target_supports_multi_process): New function, moved
3388 from...
3389 * target.h (target_supports_multi_process): ... here. Remove
3390 macro.
3391
39b5a3b9
TT
33922016-10-05 Tom Tromey <tom@tromey.com>
3393
3394 PR remote/20655:
3395 * tracepoint.c (handle_tracepoint_bkpts): Check
3396 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3397
c1d0b70a
YQ
33982016-10-05 Yao Qi <yao.qi@linaro.org>
3399
3400 * configure.srv: Update the path of arm-*.xml files.
3401
0a69eedb
YQ
34022016-10-05 Terry Guo <terry.guo@arm.com>
3403 Yao Qi <yao.qi@linaro.org>
3404
3405 * Makefile.in: Adjust the path of rules.
3406 * configure.srv: Update the path of xml files.
3407 * regformats/arm-with-iwmmxt.dat: Regenerated.
3408 * regformats/arm-with-neon.dat: Likewise.
3409 * regformats/arm-with-vfpv2.dat: Likewise.
3410 * regformats/arm-with-vfpv3.dat Likewise.
3411
17e16485
YQ
34122016-09-30 Yao Qi <yao.qi@linaro.org>
3413
3414 PR gdbserver/20627
3415 * target.c (target_stop_and_wait): Don't call
3416 target_continue_no_signal, use resume_stop instead.
3417
edeeb602
YQ
34182016-09-26 Yao Qi <yao.qi@linaro.org>
3419
3420 * linux-low.c (linux_wait_1): Call debug_exit.
3421
503b1c39
PA
34222016-09-23 Pedro Alves <palves@redhat.com>
3423
3424 * Makefile.in (SFILES): Add common/new-op.c.
3425 (OBS): Add common/new-op.o.
3426 (new-op.o): New rule.
3427
74172ecf
SM
34282016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3429
3430 * .gitinore: Ignore more files.
3431
fc6cda2e
YQ
34322016-09-21 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3435 23.
3436
bc1e6c81
SDJ
34372016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3438
3439 * server.c (start_inferior): Call target_mourn_inferior instead of
3440 mourn_inferior; pass ptid_t argument to it.
3441 (resume): Likewise.
3442 (handle_target_event): Likewise.
3443 * target.c (target_mourn_inferior): New function.
3444 * target.h (mourn_inferior): Delete macro.
3445
0e00e962
AA
34462016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3447
3448 * linux-low.c (lwp_is_stepping): New function.
3449
1d8cb77d
CL
34502016-09-06 Carl Love <cel@us.ibm.com>
3451
3452 * server.c (start_inferior): Fixed comment, requested comment change
3453 didn't get updated correctly. Removed reference to ptrace () call as
3454 it is only true on Linux systems.
3455
7313bced
CL
34562016-09-06 Carl Love <cel@us.ibm.com>
3457
3458 * server.c (start_inferior): Do not call
3459 function target_post_create_inferior () if the
3460 inferior process has already exited.
3461
cf6de44d
PA
34622016-09-05 Pedro Alves <palves@redhat.com>
3463
3464 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3465 (COMPILE.pre, CC_LD): Use CXX directly.
3466 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3467 * acinclude.m4: Don't include build-with-cxx.m4.
3468 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3469 * configure: Regenerate.
3470
c1da6748
AT
34712016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3472
3473 PR gdb/19495
3474 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3475 call writing data to own_buf.
3476
f2b9e3df
SDJ
34772016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3478
3479 * target.c (mywait): Call target_wait instead of
3480 the_target->wait.
3481 (target_wait): New function.
3482
049a8570
SDJ
34832016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3484
3485 * server.c (start_inferior): New variable 'ptid'. Replace calls
3486 to the_target->resume by target_continue{,_no_signal}, depending
3487 on the case.
3488 * target.c (target_stop_and_wait): Call target_continue_no_signal
3489 instead of the_target->resume.
3490 (target_continue): New function.
3491
3aa5cfa0
AT
34922016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3493
3494 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3495
754653a7
AZ
34962016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3497
3498 PR server/20491
3499 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3500 ps_prochandle.
3501 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3502 * linux-arm-low.c (ps_get_thread_area): Likewise.
3503 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3504 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3505 * linux-mips-low.c (ps_get_thread_area): Likewise.
3506 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3507 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3508 * linux-x86-low.c (ps_get_thread_area): Likewise.
3509 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3510
ed036b40
PA
35112016-08-19 Pedro Alves <palves@redhat.com>
3512
3513 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3514
c8ef42ee
PA
35152016-08-19 Pedro Alves <palves@redhat.com>
3516
3517 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3518 comment. Use memcpy instead of casting through unsigned long.
3519
9c235a72
PA
35202016-08-19 Pedro Alves <palves@redhat.com>
3521
3522 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3523 allocating around 0x80000000.
3524
201506da
PA
35252016-08-19 Pedro Alves <palves@redhat.com>
3526
3527 PR gdb/20415
3528 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3529 (x32-avx512-linux-ipa.o): New rules.
3530 * configure.ac (x86_64-*-linux*): New x32 check.
3531 * configure.srv (ipa_x32_linux_regobj): New.
3532 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3533 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3534 descriptions.
3535 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3536 descriptions.
3537 * configure: Regenerate.
3538
f348d89a
PA
35392016-08-09 Pedro Alves <palves@redhat.com>
3540
3541 PR gdb/18653
3542 * Makefile.in (OBS): Add signals-state-save-restore.o.
3543 (signals-state-save-restore.o): New rule.
3544 * config.in: Regenerate.
3545 * configure: Regenerate.
3546 * linux-low.c: Include "signals-state-save-restore.h".
3547 (linux_create_inferior): Call
3548 restore_original_signals_state.
3549 * server.c: Include "dispositions-save-restore.h".
3550 (captured_main): Call save_original_signals_state.
3551
1baf5149
PA
35522016-08-05 Pedro Alves <palves@redhat.com>
3553
3554 * configure: Regenerate.
3555
fcd4a73d
YQ
35562016-08-04 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-low.c (regsets_fetch_inferior_registers): Check
3559 errno is ESRCH or not.
3560
979659d0
YQ
35612016-08-02 Yao Qi <yao.qi@linaro.org>
3562
3563 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3564 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3565 (thread_db_load_search): Update.
3566 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3567 td_ta_set_event and td_ta_event_getmsg.
3568
6598661d
PA
35692016-07-26 Pedro Alves <palves@redhat.com>
3570
3571 PR server/20414
3572 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3573 of unsigned long for 64-bit registers and use uint32_t instead of
3574 unsigned int for 32-bit registers.
3575
9cf12d57
PA
35762016-07-26 Pedro Alves <palves@redhat.com>
3577
3578 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3579 to 'ptrace'.
3580
305450ed
TT
35812016-07-21 Tom Tromey <tom@tromey.com>
3582
3583 * configure: Rebuild.
3584
2583da7c
YQ
35852016-07-21 Yao Qi <yao.qi@linaro.org>
3586
3587 * mem-break.c (find_gdb_breakpoint): Cast bp to
3588 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3589
21536b36
YQ
35902016-07-21 Yao Qi <yao.qi@linaro.org>
3591
3592 * server.c (handle_v_requests): Support s and S actions
3593 if target_supports_software_single_step return true.
3594
8901d193
YQ
35952016-07-21 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3598 is resume_step, call maybe_hw_step.
3599 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3600 and unstop them.
3601 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3602 breakpoints or not.
3603 (proceed_one_lwp): If resume request is resume_step, install
3604 reinsert breakpoints and call maybe_hw_step.
3605
0e9a339e
YQ
36062016-07-21 Yao Qi <yao.qi@linaro.org>
3607
3608 * linux-low.c (proceed_one_lwp): Declare.
3609 (linux_resume_one_thread): Remove local variable 'step'.
3610 Lift code enqueue signal. Call proceed_one_lwp instead of
3611 linux_resume_one_lwp.
3612
4281b351
YQ
36132016-07-21 Yao Qi <yao.qi@linaro.org>
3614
3615 * linux-low.c (linux_resume_one_thread): Call
3616 enqueue_pending_signal.
3617
984a2c04
YQ
36182016-07-21 Yao Qi <yao.qi@linaro.org>
3619
3620 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3621 * inferiors.c (do_restore_current_thread_cleanup): New function.
3622 (make_cleanup_restore_current_thread): Likewise.
3623 * linux-low.c (install_software_single_step_breakpoints): Call
3624 make_cleanup_restore_current_thread. Switch current_thread to
3625 thread.
3626
bec903c9
YQ
36272016-07-21 Yao Qi <yao.qi@linaro.org>
3628
3629 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3630 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3631 (clone_one_breakpoint): Likewise.
3632 (delete_reinsert_breakpoints): Change parameter to thread.
3633 Callers updated.
3634 (has_reinsert_breakpoints): Likewise.
3635 (uninsert_reinsert_breakpoints): Likewise.
3636 (reinsert_reinsert_breakpoints): Likewise.
3637 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3638 (delete_reinsert_breakpoints): Likewise.
3639 (reinsert_reinsert_breakpoints): Likewise.
3640 (uninsert_reinsert_breakpoints): Likewise.
3641 (has_reinsert_breakpoints): Likewise.
3642
63c40ec7
YQ
36432016-07-21 Yao Qi <yao.qi@linaro.org>
3644
3645 * inferiors.c (get_thread_process): Make parameter const.
3646 * inferiors.h (get_thread_process): Update declaration.
3647 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3648 Add new parameters child_thread and parent_thread. Callers
3649 updated.
3650 * mem-break.h (clone_all_breakpoints): Update declaration.
3651
9aa76cd0
YQ
36522016-07-21 Yao Qi <yao.qi@linaro.org>
3653
3654 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3655 <command_list, handler>: Remove.
3656 (struct gdb_breakpoint): New.
3657 (struct other_breakpoint): New.
3658 (struct reinsert_breakpoint): New.
3659 (is_gdb_breakpoint): New function.
3660 (any_persistent_commands): Update command_list if
3661 is_gdb_breakpoint returns true.
3662 (set_breakpoint): Create breakpoints according to their types.
3663 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3664 (set_gdb_breakpoint_1): Likewise.
3665 (set_gdb_breakpoint): Likewise.
3666 (clear_breakpoint_conditions): Change parameter type to
3667 'struct gdb_breakpoint *'.
3668 (clear_breakpoint_commands): Likewise.
3669 (clear_breakpoint_conditions_and_commands): Likewise.
3670 (add_condition_to_breakpoint): Likewise.
3671 (add_breakpoint_condition): Likewise.
3672 (add_commands_to_breakpoint): Likewise.
3673 (check_breakpoints): Check other_breakpoint.
3674 (clone_one_breakpoint): Clone breakpopint according to its type.
3675 * mem-break.h (struct gdb_breakpoint): Declare.
3676 (set_gdb_breakpoint): Update declaration.
3677 (clear_breakpoint_conditions_and_commands): Likewise.
3678 (add_breakpoint_condition): Likewise.
3679 (add_breakpoint_commands): Likewise.
3680 * server.c (process_point_options): Change parameter type to
3681 'struct gdb_breakpoint *'.
3682
811f8301
YQ
36832016-07-21 Yao Qi <yao.qi@linaro.org>
3684
3685 * mem-break.c (set_breakpoint_at): Rename it to ...
3686 (set_breakpoint_type_at): ... it.
3687 (set_breakpoint_at): Call set_breakpoint_type_at.
3688 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3689 * mem-break.h (set_breakpoint_at): Update comments.
3690
b1c51e36
CLT
36912016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3692
3693 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3694 to buf parameter.
3695 (nios2_store_gregset): Likewise.
3696
ced2dffb
PA
36972016-07-01 Pedro Alves <palves@redhat.com>
3698 Antoine Tremblay <antoine.tremblay@ericsson.com>
3699
3700 * linux-low.c: Change interface to take the target lwp_info
3701 pointer directly and return void. Handle detaching from a zombie
3702 thread.
3703 (linux_detach_lwp_callback): New function.
3704 (linux_detach): Detach from the leader thread after detaching from
3705 the clone threads.
3706
2ac09a5b
YQ
37072016-06-28 Yao Qi <yao.qi@linaro.org>
3708
3709 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3710 for variable new_offset.
3711 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3712 (aarch64_ftrace_insn_reloc_cb): Likewise.
3713 (aarch64_ftrace_insn_reloc_tb): Likewise.
3714 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3715 PRIx64 instead of PRIx32.
3716
79e7fd4f
YQ
37172016-06-28 Yao Qi <yao.qi@linaro.org>
3718
3719 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3720 (the_low_target): Install arm_get_syscall_trapinfo.
3721
061fc021
YQ
37222016-06-28 Yao Qi <yao.qi@linaro.org>
3723
3724 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3725 function.
3726 (the_low_target): Install aarch64_get_syscall_trapinfo.
3727
4cc32bec
YQ
37282016-06-28 Yao Qi <yao.qi@linaro.org>
3729
3730 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3731 Callers updated.
3732 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3733 Remove parameter sysno.
3734 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3735 sysret.
3736
782c1122
AA
37372016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3738
3739 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3740 (s390_emit_ne_goto): Likewise.
3741 (s390_emit_lt_goto): Likewise.
3742 (s390_emit_le_goto): Likewise.
3743 (s390_emit_gt_goto): Likewise.
3744 (s390_emit_ge_goto): Likewise.
3745 (s390x_emit_eq_goto): Likewise.
3746 (s390x_emit_ne_goto): Likewise.
3747 (s390x_emit_lt_goto): Likewise.
3748 (s390x_emit_le_goto): Likewise.
3749 (s390x_emit_gt_goto): Likewise.
3750 (s390x_emit_ge_goto): Likewise.
3751 (s390_emit_ops_impl): Mark variable static.
3752 (s390x_emit_ops): Likewise.
3753
2e7b624b
YQ
37542016-06-17 Yao Qi <yao.qi@linaro.org>
3755
3756 * linux-low.c (handle_extended_wait): Call
3757 uninsert_reinsert_breakpoints for the parent process. Remove
3758 reinsert breakpoints from the child process. Reinsert them to
3759 the parent process when vfork is done.
3760 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3761 (reinsert_reinsert_breakpoints): New function.
3762 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3763 (reinsert_reinsert_breakpoints): Declare.
3764
8a81c5d7
YQ
37652016-06-17 Yao Qi <yao.qi@linaro.org>
3766
3767 * linux-low.c (handle_extended_wait): If the parent is doing
3768 step-over, remove the reinsert breakpoints from the forked child.
3769
f50bf8e5
YQ
37702016-06-17 Yao Qi <yao.qi@linaro.org>
3771
3772 * linux-low.c (unsuspend_all_lwps): Declare.
3773 (linux_low_filter_event): If thread exited, call finish_step_over.
3774 If step-over is finished, unsuspend other threads.
3775
8376a3cb
YQ
37762016-06-17 Yao Qi <yao.qi@linaro.org>
3777
3778 * linux-low.c (linux_resume_one_lwp_throw): Assert
3779 has_reinsert_breakpoints returns false.
3780 * mem-break.c (delete_disabled_breakpoints): Assert
3781 bp type isn't reinsert_breakpoint.
3782
f79b145d
YQ
37832016-06-17 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-low.c (maybe_hw_step): New function.
3786 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3787 (finish_step_over): Switch current_thread to lwp temporarily,
3788 and assert has_reinsert_breakpoints returns true.
3789 (proceed_one_lwp): Call maybe_hw_step.
3790 * mem-break.c (has_reinsert_breakpoints): New function.
3791 * mem-break.h (has_reinsert_breakpoints): Declare.
3792
0ae534d2
JT
37932016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3794
3795 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3796
fcdad592
YQ
37972016-05-17 Yao Qi <yao.qi@linaro.org>
3798
3799 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3800 instead of find_inferior.
3801
9e784964
YQ
38022016-05-05 Yao Qi <yao.qi@linaro.org>
3803
3804 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3805 Initialize res to zero.
3806
cf2ebb6e
YQ
38072016-05-05 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3810 to uint32_t.
3811
c1aebf87
UW
38122016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3813
3814 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3815 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3816 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3817
35fd2deb 38182016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3819 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3820
3821 * tracepoint.c (write_inferior_int8): New function.
3822 (cmd_qtenable_disable): Write enable flag using
3823 write_inferior_int8.
3824
484b3c32
YQ
38252016-04-25 Yao Qi <yao.qi@linaro.org>
3826
3827 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3828 (need_step_over_p): Return zero if the LWP has pending signals
3829 can be delivered on software single step target.
3830
85ba7d86
YQ
38312016-04-25 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3834 return instead of error.
3835
3539aa13
YQ
38362016-04-22 Yao Qi <yao.qi@linaro.org>
3837
3838 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3839 to 23.
3840
5b061e98
YQ
38412016-04-22 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3844 signal when stepping over breakpoint with software single
3845 step.
3846
3451269c
PA
38472016-04-21 Pedro Alves <palves@redhat.com>
3848
3849 * linux-s390-low.c (s390_collect_ptrace_register)
3850 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3851 add casts.
3852 (s390_check_regset): Use void * instead of gdb_byte *.
3853
a2358508
PA
38542016-04-20 Pedro Alves <palves@redhat.com>
3855
3856 * configure: Renegerate.
3857
6885166d
YQ
38582016-04-20 Yao Qi <yao.qi@linaro.org>
3859
3860 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3861 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3862 number 16.
3863 (arm_store_gregset): Likewise.
3864
2b863f51
WT
38652016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3866
3867 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3868 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3869 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3870 (amd64-avx-mpx-linux.c): New rules.
3871 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3872 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3873 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3874 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3875 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3876 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3877 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3878 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3879 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3880 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3881 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3882 * linux-x86-low.c (x86_linux_read_description): Add case for
3883 X86_XSTATE_AVX_MPX_MASK.
3884 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3885 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3886 init_registers_i386_avx_mpx_linux.
3887 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3888 (initialize_low_tracepoint): Call
3889 init_registers_i386_avx_mpx_linux.
3890 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3891 (initialize_low_tracepoint): Call
3892 init_registers_amd64_avx_mpx_linux.
3893 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3894 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3895 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3896 declarations.
3897
9b30624b
PA
38982016-04-18 Pedro Alves <palves@redhat.com>
3899
3900 * configure: Regenerate.
3901
45e3745e
AT
39022016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3903
3904 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3905 (aarch64_emit_sub): Likewise.
3906
2afc13ff
PA
39072016-04-12 Pedro Alves <palves@redhat.com>
3908
3909 * utils.c (prepare_to_throw_exception): Delete.
3910
6e774b13
SM
39112016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3912
3913 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3914
4dca19f8
MK
39152016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3916
3917 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3918
d0a9981f
MK
39192016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3920
3921 * linux-aarch64-ipa.c: Add <elf.h> include.
3922 * linux-ppc-ipa.c: Add <elf.h> include.
3923 * linux-s390-ipa.c: Add <elf.h> include.
3924
252db07e
MK
39252016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3926
3927 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3928 (get_raw_reg_ptr): Likewise.
3929 (get_trace_state_variable_value_ptr): Likewise.
3930 (set_trace_state_variable_value_ptr): Likewise.
3931 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3932 char *.
3933
14e2b6d9
MK
39342016-03-31 Wei-cheng Wang <cole945@gmail.com>
3935 Marcin Kościelnicki <koriakin@0x04.net>
3936
3937 PR/17221
3938 * linux-ppc-low.c (emit_insns): New function.
3939 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3940 (ppc_emit_prologue): New function.
3941 (ppc_emit_epilogue): New function.
3942 (ppc_emit_add): New function.
3943 (ppc_emit_sub): New function.
3944 (ppc_emit_mul): New function.
3945 (ppc_emit_lsh): New function.
3946 (ppc_emit_rsh_signed): New function.
3947 (ppc_emit_rsh_unsigned): New function.
3948 (ppc_emit_ext): New function.
3949 (ppc_emit_zero_ext): New function.
3950 (ppc_emit_log_not): New function.
3951 (ppc_emit_bit_and): New function.
3952 (ppc_emit_bit_or): New function.
3953 (ppc_emit_bit_xor): New function.
3954 (ppc_emit_bit_not): New function.
3955 (ppc_emit_equal): New function.
3956 (ppc_emit_less_signed): New function.
3957 (ppc_emit_less_unsigned): New function.
3958 (ppc_emit_ref): New function.
3959 (ppc_emit_const): New function.
3960 (ppc_emit_reg): New function.
3961 (ppc_emit_pop): New function.
3962 (ppc_emit_stack_flush): New function.
3963 (ppc_emit_swap): New function.
3964 (ppc_emit_stack_adjust): New function.
3965 (ppc_emit_call): New function.
3966 (ppc_emit_int_call_1): New function.
3967 (ppc_emit_void_call_2): New function.
3968 (ppc_emit_if_goto): New function.
3969 (ppc_emit_goto): New function.
3970 (ppc_emit_eq_goto): New function.
3971 (ppc_emit_ne_goto): New function.
3972 (ppc_emit_lt_goto): New function.
3973 (ppc_emit_le_goto): New function.
3974 (ppc_emit_gt_goto): New function.
3975 (ppc_emit_ge_goto): New function.
3976 (ppc_write_goto_address): New function.
3977 (ppc_emit_ops_impl): New static variable.
3978 (ppc64v1_emit_prologue): New function.
3979 (ppc64v2_emit_prologue): New function.
3980 (ppc64_emit_epilogue): New function.
3981 (ppc64_emit_add): New function.
3982 (ppc64_emit_sub): New function.
3983 (ppc64_emit_mul): New function.
3984 (ppc64_emit_lsh): New function.
3985 (ppc64_emit_rsh_signed): New function.
3986 (ppc64_emit_rsh_unsigned): New function.
3987 (ppc64_emit_ext): New function.
3988 (ppc64_emit_zero_ext): New function.
3989 (ppc64_emit_log_not): New function.
3990 (ppc64_emit_bit_and): New function.
3991 (ppc64_emit_bit_or): New function.
3992 (ppc64_emit_bit_xor): New function.
3993 (ppc64_emit_bit_not): New function.
3994 (ppc64_emit_equal): New function.
3995 (ppc64_emit_less_signed): New function.
3996 (ppc64_emit_less_unsigned): New function.
3997 (ppc64_emit_ref): New function.
3998 (ppc64_emit_const): New function.
3999 (ppc64v1_emit_reg): New function.
4000 (ppc64v2_emit_reg): New function.
4001 (ppc64_emit_pop): New function.
4002 (ppc64_emit_stack_flush): New function.
4003 (ppc64_emit_swap): New function.
4004 (ppc64v1_emit_call): New function.
4005 (ppc64v2_emit_call): New function.
4006 (ppc64v1_emit_int_call_1): New function.
4007 (ppc64v2_emit_int_call_1): New function.
4008 (ppc64v1_emit_void_call_2): New function.
4009 (ppc64v2_emit_void_call_2): New function.
4010 (ppc64_emit_if_goto): New function.
4011 (ppc64_emit_eq_goto): New function.
4012 (ppc64_emit_ne_goto): New function.
4013 (ppc64_emit_lt_goto): New function.
4014 (ppc64_emit_le_goto): New function.
4015 (ppc64_emit_gt_goto): New function.
4016 (ppc64_emit_ge_goto): New function.
4017 (ppc64v1_emit_ops_impl): New static variable.
4018 (ppc64v2_emit_ops_impl): New static variable.
4019 (ppc_emit_ops): New function.
4020 (linux_low_target): Wire in ppc_emit_ops.
4021
a2174ba4
MK
40222016-03-31 Wei-cheng Wang <cole945@gmail.com>
4023 Marcin Kościelnicki <koriakin@0x04.net>
4024
4025 PR/17221
4026 * Makefile.in: Add powerpc-*-ipa.o
4027 * configure.srv: Add ipa_obj for powerpc*-linux.
4028 * linux-ppc-ipa.c: New file.
4029 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4030 includes.
4031 (PPC_FIELD): New macro.
4032 (PPC_SEXT): New macro.
4033 (PPC_OP6): New macro.
4034 (PPC_BO): New macro.
4035 (PPC_LI): New macro.
4036 (PPC_BD): New macro.
4037 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4038 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4039 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4040 (ppc_get_thread_area): New function.
4041 (is_elfv2_inferior): New function.
4042 (gen_ds_form): New function.
4043 (GEN_STD): New macro.
4044 (GEN_STDU): New macro.
4045 (GEN_LD): New macro.
4046 (GEN_LDU): New macro.
4047 (gen_d_form): New function.
4048 (GEN_ADDI): New macro.
4049 (GEN_ADDIS): New macro.
4050 (GEN_LI): New macro.
4051 (GEN_LIS): New macro.
4052 (GEN_ORI): New macro.
4053 (GEN_ORIS): New macro.
4054 (GEN_LWZ): New macro.
4055 (GEN_STW): New macro.
4056 (GEN_STWU): New macro.
4057 (gen_xfx_form): New function.
4058 (GEN_MFSPR): New macro.
4059 (GEN_MTSPR): New macro.
4060 (GEN_MFCR): New macro.
4061 (GEN_MTCR): New macro.
4062 (GEN_SYNC): New macro.
4063 (GEN_LWSYNC): New macro.
4064 (gen_x_form): New function.
4065 (GEN_OR): New macro.
4066 (GEN_MR): New macro.
4067 (GEN_LWARX): New macro.
4068 (GEN_STWCX): New macro.
4069 (GEN_CMPW): New macro.
4070 (gen_md_form): New function.
4071 (GEN_RLDICL): New macro.
4072 (GEN_RLDICR): New macro.
4073 (gen_i_form): New function.
4074 (GEN_B): New macro.
4075 (GEN_BL): New macro.
4076 (gen_b_form): New function.
4077 (GEN_BNE): New macro.
4078 (GEN_LOAD): New macro.
4079 (GEN_STORE): New macro.
4080 (gen_limm): New function.
4081 (gen_atomic_xchg): New function.
4082 (gen_call): New function.
4083 (ppc_relocate_instruction): New function.
4084 (ppc_install_fast_tracepoint_jump_pad): New function.
4085 (ppc_get_min_fast_tracepoint_insn_len): New function.
4086 (ppc_get_ipa_tdesc_idx): New function.
4087 (the_low_target): Wire in the new functions.
4088 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4089 tdescs.
4090 * linux-ppc-tdesc.h: New file.
4091
a13c4696
MK
40922016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4093
4094 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4095 (alloc_jump_pad_buffer): New function.
4096 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4097 (alloc_jump_pad_buffer): New function.
4098 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4099 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4100 (alloc_jump_pad_buffer): New function.
4101 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4102 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4103 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4104 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4105
1cda1512
MK
41062016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4107
4108 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4109 * linux-amd64-ipa.c: Likewise.
4110 * linux-i386-ipa.c: Likewise.
4111 * linux-s390-ipa.c: Likewise.
4112 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4113 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4114 set_trace_state_variable_value_ptr.
4115 (struct ipa_sym_addresses): Likewise.
4116 (symbol_list): Likewise.
4117 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4118 accessing gdb_collect directly.
4119 (gdb_collect_ptr_type): New typedef.
4120 (get_raw_reg_ptr_type): New typedef.
4121 (get_trace_state_variable_value_ptr_type): New typedef.
4122 (set_trace_state_variable_value_ptr_type): New typedef.
4123 (gdb_collect_ptr): New global.
4124 (get_raw_reg_ptr): New global.
4125 (get_trace_state_variable_value_ptr): New global.
4126 (set_trace_state_variable_value_ptr): New global.
4127 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4128 accessing get_raw_reg directly.
4129 (get_get_tsv_func_addr): Likewise for
4130 get_trace_state_variable_value_ptr.
4131 (get_set_tsv_func_addr): Likewise for
4132 set_trace_state_variable_value_ptr.
4133 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4134
72fb5488
SM
41352016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4136
4137 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4138
28170b88
MK
41392016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4140
4141 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4142 packets.
4143 (relocate_instruction): Remove own_buf.
4144 * server.c (own_buf): Make global.
4145 (handle_v_requests): Make global.
4146 * server.h (own_buf): New declaration.
4147 (handle_v_requests): New prototype.
4148
f39e8743
MK
41492016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4150
4151 PR 18377
4152 * linux-s390-low.c (add_insns): New function.
4153 (s390_emit_prologue): New function.
4154 (s390_emit_epilogue): New function.
4155 (s390_emit_add): New function.
4156 (s390_emit_sub): New function.
4157 (s390_emit_mul): New function.
4158 (s390_emit_lsh): New function.
4159 (s390_emit_rsh_signed): New function.
4160 (s390_emit_rsh_unsigned): New function.
4161 (s390_emit_ext): New function.
4162 (s390_emit_log_not): New function.
4163 (s390_emit_bit_and): New function.
4164 (s390_emit_bit_or): New function.
4165 (s390_emit_bit_xor): New function.
4166 (s390_emit_bit_not): New function.
4167 (s390_emit_equal): New function.
4168 (s390_emit_less_signed): New function.
4169 (s390_emit_less_unsigned): New function.
4170 (s390_emit_ref): New function.
4171 (s390_emit_if_goto): New function.
4172 (s390_emit_goto): New function.
4173 (s390_write_goto_address): New function.
4174 (s390_emit_litpool): New function.
4175 (s390_emit_const): New function.
4176 (s390_emit_call): New function.
4177 (s390_emit_reg): New function.
4178 (s390_emit_pop): New function.
4179 (s390_emit_stack_flush): New function.
4180 (s390_emit_zero_ext): New function.
4181 (s390_emit_swap): New function.
4182 (s390_emit_stack_adjust): New function.
4183 (s390_emit_set_r2): New function.
4184 (s390_emit_int_call_1): New function.
4185 (s390_emit_void_call_2): New function.
4186 (s390_emit_eq_goto): New function.
4187 (s390_emit_ne_goto): New function.
4188 (s390_emit_lt_goto): New function.
4189 (s390_emit_le_goto): New function.
4190 (s390_emit_gt_goto): New function.
4191 (s390_emit_ge_goto): New function.
4192 (s390x_emit_prologue): New function.
4193 (s390x_emit_epilogue): New function.
4194 (s390x_emit_add): New function.
4195 (s390x_emit_sub): New function.
4196 (s390x_emit_mul): New function.
4197 (s390x_emit_lsh): New function.
4198 (s390x_emit_rsh_signed): New function.
4199 (s390x_emit_rsh_unsigned): New function.
4200 (s390x_emit_ext): New function.
4201 (s390x_emit_log_not): New function.
4202 (s390x_emit_bit_and): New function.
4203 (s390x_emit_bit_or): New function.
4204 (s390x_emit_bit_xor): New function.
4205 (s390x_emit_bit_not): New function.
4206 (s390x_emit_equal): New function.
4207 (s390x_emit_less_signed): New function.
4208 (s390x_emit_less_unsigned): New function.
4209 (s390x_emit_ref): New function.
4210 (s390x_emit_if_goto): New function.
4211 (s390x_emit_const): New function.
4212 (s390x_emit_call): New function.
4213 (s390x_emit_reg): New function.
4214 (s390x_emit_pop): New function.
4215 (s390x_emit_stack_flush): New function.
4216 (s390x_emit_zero_ext): New function.
4217 (s390x_emit_swap): New function.
4218 (s390x_emit_stack_adjust): New function.
4219 (s390x_emit_int_call_1): New function.
4220 (s390x_emit_void_call_2): New function.
4221 (s390x_emit_eq_goto): New function.
4222 (s390x_emit_ne_goto): New function.
4223 (s390x_emit_lt_goto): New function.
4224 (s390x_emit_le_goto): New function.
4225 (s390x_emit_gt_goto): New function.
4226 (s390x_emit_ge_goto): New function.
4227 (s390_emit_ops): New function.
4228 (struct linux_target_ops): Fill in emit_ops hook.
4229
abd9baf9
MK
42302016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4231
4232 PR 18377
4233 * Makefile.in: Add s390 IPA files.
4234 * configure.srv: Build IPA for s390.
4235 * linux-s390-ipa.c: New file.
4236 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4237 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4238 (tdesc_s390_linux32): Likewise.
4239 (init_registers_s390_linux32v1): Likewise.
4240 (tdesc_s390_linux32v1): Likewise.
4241 (init_registers_s390_linux32v2): Likewise.
4242 (tdesc_s390_linux32v2): Likewise.
4243 (init_registers_s390_linux64): Likewise.
4244 (tdesc_s390_linux64): Likewise.
4245 (init_registers_s390_linux64v1): Likewise.
4246 (tdesc_s390_linux64v1): Likewise.
4247 (init_registers_s390_linux64v2): Likewise.
4248 (tdesc_s390_linux64v2): Likewise.
4249 (init_registers_s390_te_linux64): Likewise.
4250 (tdesc_s390_te_linux64): Likewise.
4251 (init_registers_s390_vx_linux64): Likewise.
4252 (tdesc_s390_vx_linux64): Likewise.
4253 (init_registers_s390_tevx_linux64): Likewise.
4254 (tdesc_s390_tevx_linux64): Likewise.
4255 (init_registers_s390x_linux64): Likewise.
4256 (tdesc_s390x_linux64): Likewise.
4257 (init_registers_s390x_linux64v1): Likewise.
4258 (tdesc_s390x_linux64v1): Likewise.
4259 (init_registers_s390x_linux64v2): Likewise.
4260 (tdesc_s390x_linux64v2): Likewise.
4261 (init_registers_s390x_te_linux64): Likewise.
4262 (tdesc_s390x_te_linux64): Likewise.
4263 (init_registers_s390x_vx_linux64): Likewise.
4264 (tdesc_s390x_vx_linux64): Likewise.
4265 (init_registers_s390x_tevx_linux64): Likewise.
4266 (tdesc_s390x_tevx_linux64): Likewise.
4267 (have_hwcap_s390_vx): New static variable.
4268 (s390_arch_setup): Fill have_hwcap_s390_vx.
4269 (s390_get_thread_area): New function.
4270 (s390_ft_entry_gpr_esa): New const.
4271 (s390_ft_entry_gpr_zarch): New const.
4272 (s390_ft_entry_misc): New const.
4273 (s390_ft_entry_fr): New const.
4274 (s390_ft_entry_vr): New const.
4275 (s390_ft_main_31): New const.
4276 (s390_ft_main_64): New const.
4277 (s390_ft_exit_fr): New const.
4278 (s390_ft_exit_vr): New const.
4279 (s390_ft_exit_misc): New const.
4280 (s390_ft_exit_gpr_esa): New const.
4281 (s390_ft_exit_gpr_zarch): New const.
4282 (append_insns): New function.
4283 (s390_relocate_instruction): New function.
4284 (s390_install_fast_tracepoint_jump_pad): New function.
4285 (s390_get_min_fast_tracepoint_insn_len): New function.
4286 (s390_get_ipa_tdesc_idx): New function.
4287 (struct linux_target_ops): Wire in the above functions.
4288 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4289 * linux-s390-tdesc.h: New file.
4290
a4105d04
MK
42912016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4292
4293 * linux-s390-low.c (s390_supports_tracepoints): New function.
4294 (struct linux_target_ops): Fill supports_tracepoints hook.
4295
35ac8b3e
YQ
42962016-03-18 Yao Qi <yao.qi@linaro.org>
4297
4298 * linux-low.c (lwp_signal_can_be_delivered): New function.
4299 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4300
94610ec4
YQ
43012016-03-18 Yao Qi <yao.qi@linaro.org>
4302
4303 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4304 0 if signal is enqueued. Remove 'signal' from one debugging
4305 message. Move one debugging message to some lines below.
4306 Remove code setting 'signal' to 0.
4307
80aea927
YQ
43082016-03-18 Yao Qi <yao.qi@linaro.org>
4309
4310 * linux-low.c (linux_low_filter_event): Remove redundant
4311 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4312
b04fd3be
MK
43132016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4314
4315 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4316 (struct linux_target_ops): Wire in the above.
4317
c40c8d4b
YQ
43182016-03-03 Yao Qi <yao.qi@linaro.org>
4319
4320 * linux-low.c: Update comments to start_step_over.
4321
0f8288ae
YQ
43222016-03-03 Yao Qi <yao.qi@linaro.org>
4323
4324 PR server/19736
4325 * linux-low.c (handle_extended_wait): Set child suspended
4326 if event_lwp->bp_reinsert isn't zero.
4327
fdbd04a8
YQ
43282016-03-02 Yao Qi <yao.qi@linaro.org>
4329
4330 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4331 enqueue_pending_signal.
4332
6896a8fa
MK
43332016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4334
4335 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4336 is actually loaded.
4337
ab503087
MK
43382016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4339
4340 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4341 (s390_regmap_3264) [!__s390x__]: New global.
4342 (s390_collect_ptrace_register): Skip map entries containing -1.
4343 (s390_supply_ptrace_register): Ditto.
4344 (s390_fill_gprs_high): New function.
4345 (s390_store_gprs_high): New function.
4346 (s390_regsets): Add NT_S390_HIGH_GPRS.
4347 (s390_get_hwcap): Enable on 31-bit.
4348 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4349 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4350 Detect NT_S390_HIGH_GPRS.
4351 (s390_usrregs_info_3264): Enable on 31-bit.
4352 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4353 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4354
ae91f625
MK
43552016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4356
4357 PR gdb/13808
4358 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4359 * configure.srv: Ditto.
4360 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4361 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4362 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4363 (init_registers_amd64_linux): Remove prototype.
4364 (tdesc_amd64_linux): Remove declaration.
4365 (get_ipa_tdesc): New function.
4366 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4367 initialize remaining tdescs.
4368 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4369 (init_registers_i386_linux): Remove prototype.
4370 (tdesc_i386_linux): Remove declaration.
4371 (get_ipa_tdesc): New function.
4372 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4373 initialize remaining tdescs.
4374 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4375 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4376 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4377 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4378 (x86_get_ipa_tdesc_idx): New function.
4379 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4380 * linux-x86-tdesc.h: New file.
4381 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4382 (target_get_ipa_tdesc_idx): New macro.
4383 * tracepoint.c (ipa_tdesc_idx): New macro.
4384 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4385 (symbol_list): Add ipa_tdesc_idx.
4386 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4387 (ipa_tdesc): Remove.
4388 (ipa_tdesc_idx): New variable.
4389 (get_context_regcache): Use get_ipa_tdesc.
4390 (gdb_collect): Ditto.
4391 (gdb_probe): Ditto.
4392 * tracepoint.h (get_ipa_tdesc): New prototype.
4393 (ipa_tdesc): Remove.
4394
e7ad2f14
PA
43952016-02-24 Pedro Alves <palves@redhat.com>
4396
4397 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4398 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4399 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4400 Factor out common code between the USE_SIGTRAP_SIGINFO and
4401 !USE_SIGTRAP_SIGINFO blocks.
4402 (linux_low_filter_event): Call save_stop_reason instead of
4403 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4404 Update comments.
4405 (linux_wait_1): Update comments.
4406
657f9cde
WW
44072016-02-24 Wei-cheng Wang <cole945@gmail.com>
4408
4409 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4410 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4411 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4412 ppc_insert_point, ppc_remove_point.
4413
b00b61e1
MK
44142016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4415
4416 * linux-s390-low.c (s390_supports_z_point_type): New function.
4417 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4418
553cb527
YQ
44192016-02-16 Yao Qi <yao.qi@linaro.org>
4420
4421 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4422 PC. Get pc from regcache_read_pc.
4423
a5652c21
YQ
44242016-02-12 Yao Qi <yao.qi@linaro.org>
4425
4426 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4427 or linux_get_pc_32bit.
4428 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4429
ed443b61
YQ
44302016-02-12 Yao Qi <yao.qi@linaro.org>
4431
4432 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4433 arm_linux_get_next_pcs_fixup.
4434
020ecd38
MK
44352016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4436
4437 * tracepoint.c (x_tracepoint_action_download): Change
4438 write_inferior_data_ptr to write_inferior_data_pointer.
4439 (cmd_qtstart): Likewise.
4440 (write_inferior_data_ptr): Remove.
4441 (download_agent_expr): Change write_inferior_data_ptr to
4442 write_inferior_data_pointer.
4443 (download_tracepoint_1): Likewise.
4444 (download_tracepoint): Likewise.
4445 (download_trace_state_variables): Likewise.
4446
7cae9051
WW
44472016-02-11 Wei-cheng Wang <cole945@gmail.com>
4448 Marcin Kościelnicki <koriakin@0x04.net>
4449
4450 * tracepoint.c (struct tracepoint_action_ops): Remove.
4451 (struct tracepoint_action): Remove ops.
4452 (m_tracepoint_action_download, r_tracepoint_action_download)
4453 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4454 size and offset accordingly.
4455 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4456 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4457 (tracepoint_action_send, tracepoint_action_download): New functions.
4458 Helpers for trace action handlers.
4459 (add_tracepoint_action): Remove setup actions ops.
4460 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4461
9f6a71b4
YQ
44622016-02-10 Yao Qi <yao.qi@linaro.org>
4463
4464 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4465
1e94266c
SM
44662016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4467
4468 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4469 to AC_OUTPUT.
4470 * configure: Regenerate.
4471
8adce034
SM
44722016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4473
4474 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4475 void * to gdb_byte *.
4476 * linux-low.c (siginfo_fixup): Likewise.
4477 (linux_xfer_siginfo): Likewise.
4478 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4479 Likewise.
4480 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4481
93813b37
WT
44822016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4483
4484 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4485 to srv_tgtobj.
4486 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4487 to srv_tgtobj.
4488 * linux-x86-low.c [__x86_64__]: Include
4489 "nat/amd64-linux-siginfo.h".
4490 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4491 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4492 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4493 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4494 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4495 (cpt_si_fd, si_timerid, si_overrun): Move from
4496 nat/amd64-linux-siginfo.c.
4497 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4498
8424cc97
SM
44992016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4500
4501 * server.c (skip_to_semicolon): Remove.
4502 (process_point_options): Use strchrnul instead of
4503 skip_to_semicolon.
4504
4d18591b
YQ
45052016-01-26 Yao Qi <yao.qi@linaro.org>
4506
4507 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4508 * linux-low.c (install_software_single_step_breakpoints): Don't
4509 call regcache_read_pc.
4510 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4511 argument pc.
4512
d8020970
YQ
45132016-01-26 Yao Qi <yao.qi@linaro.org>
4514
4515 * linux-low.c (install_software_single_step_breakpoints): Call
4516 regcache_read_pc instead of get_pc.
4517
8b207339
YQ
45182016-01-26 Yao Qi <yao.qi@linaro.org>
4519
4520 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4521 (unblock_async_io): Rename to ...
4522 (block_unblock_async_io): ... it. New function.
4523 (enable_async_io): Don't install SIGIO handler. Unblock it
4524 instead.
4525 (disable_async_io): Don't ignore SIGIO. Block it instead.
4526 (initialize_async_io): Install SIGIO handler. Don't call
4527 unblock_async_io.
4528
18879fef
YQ
45292016-01-26 Yao Qi <yao.qi@linaro.org>
4530
4531 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4532 first character is '\003', call *the_target->request_interrupt.
4533
a0f8e08a
YQ
45342016-01-25 Yao Qi <yao.qi@linaro.org>
4535
4536 * remote-utils.c (new_thread_notify): Remove.
4537 (dead_thread_notify): Likewise.
4538 * remote-utils.h (new_thread_notify): Remove declaration.
4539 (dead_thread_notify): Likewise.
4540
cc5fd9ab
MK
45412016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4542
4543 * gdb.trace/pending.exp: Fix expected message on continue.
4544
99e8eb11
MK
45452016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4546
4547 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4548 it works properly on big-endian machines where sizeof (CORE_ADDR)
4549 != sizeof (void *).
4550
a994041d
PA
45512016-01-21 Pedro Alves <palves@redhat.com>
4552
4553 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4554 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4555 * configure: Regenerate.
4556
f7a6a40d
YQ
45572016-01-21 Yao Qi <yao.qi@linaro.org>
4558
4559 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4560 is_thumb and set it according to CPSR saved on the stack.
4561 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4562 arm_sigreturn_next_pc.
4563
6f69e520
YQ
45642016-01-18 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-low.c (linux_set_pc_64bit): New function.
4567 (linux_get_pc_64bit): New function.
4568 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4569 Declare.
4570 * linux-sparc-low.c (debug_threads): Remove declaration.
4571 (sparc_get_pc): Remove.
4572 (the_low_target): Use linux_get_pc_64bit instead of
4573 sparc_get_pc.
4574 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4575 (the_low_target): Use linux_get_pc_64bit and
4576 linux_set_pc_64bit.
4577
276d4552
YQ
45782016-01-18 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-arm-low.c (debug_threads): Remove declaration.
4581 (arm_get_pc, arm_set_pc): Remove.
4582 (the_low_target): Use linux_get_pc_32bit and
4583 linux_set_pc_32bit.
4584 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4585 (the_low_target): Use linux_get_pc_32bit and
4586 linux_set_pc_32bit.
4587 * linux-cris-low.c (debug_threads): Remove declaration.
4588 (cris_get_pc, cris_set_pc,): Remove.
4589 (the_low_target): Use linux_get_pc_32bit and
4590 linux_set_pc_32bit.
4591 * linux-crisv32-low.c (debug_threads): Remove declaration.
4592 (cris_get_pc, cris_set_pc): Remove.
4593 (the_low_target): Use linux_get_pc_32bit and
4594 linux_set_pc_32bit.
4595 * linux-low.c: Include inttypes.h.
4596 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4597 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4598 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4599 (the_low_target): Use linux_get_pc_32bit and
4600 linux_set_pc_32bit.
4601 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4602 (the_low_target): Use linux_get_pc_32bit and
4603 linux_set_pc_32bit.
4604 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4605 (the_low_target): Use linux_get_pc_32bit and
4606 linux_set_pc_32bit.
4607 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4608 (the_low_target): Use linux_get_pc_32bit and
4609 linux_set_pc_32bit.
4610 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4611 (the_low_target): Use linux_get_pc_32bit and
4612 linux_set_pc_32bit.
4613
eb0edac8
GB
46142016-01-18 Gary Benson <gbenson@redhat.com>
4615
4616 * configure.ac (AC_FUNC_FORK): New check.
4617 * config.in: Regenerate.
4618 * configure: Likewise.
4619
1b451dda
YQ
46202016-01-14 Yao Qi <yao.qi@linaro.org>
4621
4622 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4623 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4624 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4625 arm_get_next_pcs_ctor.
4626
82075af2
JS
46272016-01-12 Josh Stone <jistone@redhat.com>
4628 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4629
4630 * inferiors.h: Include "gdb_vecs.h".
4631 (struct process_info): Add syscalls_to_catch.
4632 * inferiors.c (remove_process): Free syscalls_to_catch.
4633 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4634 syscall_return stops.
4635 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4636 * server.c (handle_general_set): Handle QCatchSyscalls.
4637 (handle_query): Report support for QCatchSyscalls.
4638 * target.h (struct target_ops): Add supports_catch_syscall.
4639 (target_supports_catch_syscall): New macro.
4640 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4641 (struct lwp_info): Add syscall_state.
4642 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4643 Maintain syscall_state and syscalls_to_catch across exec.
4644 (get_syscall_trapinfo): New function, proxy to the_low_target.
4645 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4646 (linux_low_filter_event): Toggle syscall_state entry/return for
4647 syscall traps, and set it ignored for all others.
4648 (gdb_catching_syscalls_p): New function.
4649 (gdb_catch_this_syscall_p): New function.
4650 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4651 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4652 (linux_supports_catch_syscall): New function.
4653 (linux_target_ops): Install it.
4654 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4655 (the_low_target): Install it.
4656
8f13a3ce
MF
46572016-01-12 Mike Frysinger <vapier@gentoo.org>
4658
4659 * acinclude.m4: Include new ../warning.m4 file.
4660 * configure: Regenerated.
4661 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4662
5b3da067
MF
46632016-01-12 Mike Frysinger <vapier@gentoo.org>
4664
4665 * ax.c (is_goto_target): Mark static.
4666 * linux-low.c (register_addr): Likewise.
4667 (linux_fetch_registers, linux_store_registers): Likewise.
4668 * mem-break.c (any_persistent_commands): Fix old prototype.
4669 (add_commands_to_breakpoint): Mark static.
4670 * regcache.c (find_register_by_name): Delete unused func.
4671 * remote-utils.c (hex_or_minus_one): Mark static.
4672 * server.c (monitor_show_help): Mark static.
4673 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4674 handle_v_requests): Likewise.
4675
bc504a31
PA
46762016-01-12 Pedro Alves <palves@redhat.com>
4677
4678 Remove use of the registered trademark symbol throughout.
4679
5a0dd67a
YQ
46802016-01-08 Yao Qi <yao.qi@linaro.org>
4681
4682 * remote-utils.c (getpkt): If c is '\003', call target hook
4683 request_interrupt.
4684
b2ca446f
YQ
46852016-01-06 Yao Qi <yao.qi@linaro.org>
4686
4687 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4688 linux-aarch32-low.c.
4689 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4690 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4691 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4692 (thumb2_breakpoint): Declare.
4693 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4694 linux-aarch32-low.h.
4695 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4696 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4697 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4698
edd88788
JB
46992016-01-01 Joel Brobecker <brobecker@adacore.com>
4700
4701 * gdbreplay.c (gdbreplay_version): Change copyright year in
4702 version message.
4703 * server.c (gdbserver_version): Likewise.
4704
65da7f14
PP
47052015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4706
4707 * server.c (crc32_table): Delete.
4708 (crc32): Use libiberty's xcrc32 function.
4709
4abd5ed2
JB
47102015-12-22 Joel Brobecker <brobecker@adacore.com>
4711
4712 * lynx-low.c (lynx_delete_thread_callback): New function.
4713 (lynx_mourn): Properly delete our process and all of its
4714 threads. Remove call to clear_inferiors.
4715
0e50fe5c
JB
47162015-12-22 Joel Brobecker <brobecker@adacore.com>
4717
4718 * target.c (thread_search_callback): Add check that
4719 the thread_stopped target callback is not NULL before
4720 calling it.
4721
35adc03f
YQ
47222015-12-21 Yao Qi <yao.qi@linaro.org>
4723
4724 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4725 arm breakpoint.
4726
bd2b2909
AT
47272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4728
4729 * server.c (handle_query): Call target_supports_software_single_step.
4730
7fe5e27e
AT
47312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4732
4733 * linux-low.c (single_step): New function.
4734 (linux_resume_one_lwp_throw): Call single_step.
4735 (start_step_over): Likewise.
4736
d9311bfa
AT
47372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4738
4739 * Makefile.in (SFILES): Append arch/arm-linux.c,
4740 arch/arm-get-next-pcs.c.
4741 (arm-linux.o): New rule.
4742 (arm-get-next-pcs.o): New rule.
4743 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4744 arm-linux.o.
4745 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4746 to linux-aarch32-low.c.
4747 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4748 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4749 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4750 (thumb2_breakpoint_len): Likewise.
4751 (arm_is_thumb_mode): Make non-static.
4752 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4753 from linux-aarch32-low.c.
4754 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4755 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4756 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4757 (thumb2_breakpoint_len): Likewise.
4758 (arm_is_thumb_mode): New declaration.
4759 * linux-arm-low.c: Include arch/arm-linux.h
4760 aarch/arm-get-next-pcs.h, sys/syscall.h.
4761 (get_next_pcs_ops): New struct.
4762 (get_next_pcs_addr_bits_remove): New function.
4763 (get_next_pcs_is_thumb): New function.
4764 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4765 (arm_sigreturn_next_pc): Likewise.
4766 (get_next_pcs_syscall_next_pc): Likewise.
4767 (arm_gdbserver_get_next_pcs): Likewise.
4768 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4769 Initialize.
4770 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4771 * server.h: Include gdb_vecs.h.
4772
68ce2059
AT
47732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4774
4775 * Makefile.in (SFILES): Append common/common-regcache.c.
4776 (OBS): Append common-regcache.o.
4777 (common-regcache.o): New rule.
4778 * regcache.c (init_register_cache): Initialize cache to
4779 REG_UNAVAILABLE.
4780 (regcache_raw_read_unsigned): New function.
4781 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4782 register_status enum.
4783
fa5308bd
AT
47842015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4785
4786 * linux-aarch64-low.c (the_low_targets): Rename
4787 breakpoint_reinsert_addr to get_next_pcs.
4788 * linux-arm-low.c (the_low_targets): Likewise.
4789 * linux-bfin-low.c (the_low_targets): Likewise.
4790 * linux-cris-low.c (the_low_targets): Likewise.
4791 * linux-crisv32-low.c (the_low_targets): Likewise.
4792 * linux-low.c (can_software_single_step): Likewise.
4793 (install_software_single_step_breakpoints): New function.
4794 (start_step_over): Use install_software_single_step_breakpoints.
4795 * linux-low.h: New CORE_ADDR vector.
4796 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4797 get_next_pcs.
4798 * linux-mips-low.c (the_low_targets): Likewise.
4799 * linux-nios2-low.c (the_low_targets): Likewise.
4800 * linux-sparc-low.c (the_low_targets): Likewise.
4801
4a6ed09b
PA
48022015-12-17 Pedro Alves <palves@redhat.com>
4803
4804 * linux-low.c (linux_kill_one_lwp): Remove references to
4805 LinuxThreads.
4806 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4807 to 'kill'.
4808 (linux_init_signals): Delete.
4809 (initialize_low): Adjust.
4810 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4811
7544db95
PA
48122015-12-16 Pedro Alves <palves@redhat.com>
4813
4814 * configure.ac (compiler warning flags): When testing a
4815 -Wno-foo option, check whether -Wfoo works instead.
4816 * configure: Regenerate.
4817
8020350c
DB
48182015-12-11 Don Breazeal <donb@codesourcery.com>
4819
4820 * server.c (process_serial_event): Don't exit from gdbserver
4821 in remote mode if there are still active inferiors.
4822
db91f502
YQ
48232015-12-11 Yao Qi <yao.qi@linaro.org>
4824
4825 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4826 arm_breakpoint_at if the process is 32-bit.
4827
b37a6290
YQ
48282015-12-11 Yao Qi <yao.qi@linaro.org>
4829
4830 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4831 arm breakpoint.
4832
17b1509a
YQ
48332015-12-07 Yao Qi <yao.qi@linaro.org>
4834
4835 * configure.srv: Append arm.o to srv_tgtobj for
4836 aarch64*-*-linux* target.
4837 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4838 from linux-arm-low.c.
4839 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4840 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4841 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4842 (thumb2_breakpoint_len): Likewise.
4843 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4844 (arm_breakpoint_kinds): Likewise.
4845 (arm_breakpoint_kind_from_pc): Likewise.
4846 (arm_sw_breakpoint_from_kind): Likewise.
4847 (arm_breakpoint_kind_from_current_state): Likewise.
4848 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4849 (arm_sw_breakpoint_from_kind): Declare.
4850 (arm_breakpoint_kind_from_current_state): Declare.
4851 (arm_breakpoint_at): Declare.
4852 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4853 arm_sw_breakpoint_from_kind if process is 32-bit.
4854 (aarch64_breakpoint_kind_from_pc): New function.
4855 (aarch64_breakpoint_kind_from_current_state): New function.
4856 (the_low_target): Initialize fields breakpoint_kind_from_pc
4857 and breakpoint_kind_from_current_state.
4858 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4859 linux-aarch32-low.c.
4860 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4861 (arm_breakpoint, arm_breakpoint_len): Likewise.
4862 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4863 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4864 (arm_is_thumb_mode): Likewise.
4865 (arm_breakpoint_at): Likewise.
4866 (arm_breakpoint_kind_from_pc): Likewise.
4867 (arm_sw_breakpoint_from_kind): Likewise.
4868 (arm_breakpoint_kind_from_current_state): Likewise.
4869
4870 Revert:
4871 2015-08-04 Yao Qi <yao.qi@linaro.org>
4872
4873 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4874 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4875 * server.c (extended_protocol): Remove "static".
4876 * server.h (extended_protocol): Declare it.
4877
ece66d65
JS
48782015-12-04 Josh Stone <jistone@redhat.com>
4879
4880 * target.h (struct target_ops) <arch_setup>: Rename to ...
4881 (struct target_ops) <post_create_inferior>: ... this.
4882 (target_arch_setup): Rename to ...
4883 (target_post_create_inferior): ... this, calling post_create_inferior.
4884 * server.c (start_inferior): Update target_arch_setup calls to
4885 target_post_create_inferior.
4886 * linux-low.c (linux_low_ptrace_options): Forward declare.
4887 (linux_arch_setup): Update its comment for general use.
4888 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4889 (struct linux_target_ops): Use linux_post_create_inferior.
4890 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4891 to post_create_inferior.
4892 * nto-low.c (struct nto_target_ops): Likewise.
4893 * spu-low.c (struct spu_target_ops): Likewise.
4894 * win32-low.c (struct win32_target_ops): Likewise.
4895
e58c48b4
AT
48962015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4897
4898 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4899
fbec8956
AT
49002015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4901
4902 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4903 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4904 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4905 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4906 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4907 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4908 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4909 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4910 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4911 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4912 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4913 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4914
9b4c5f87
AT
49152015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4916
4917 * linux-low.c (linux_look_up_symbols): Don't call
4918 linux_supports_traceclone.
4919 * linux-low.h (thread_db_init): Remove use_events argument.
4920 * thread-db.c (thread_db_use_event): Remove global variable.
4921 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4922 (struct thread_db) <td_create_bp>: Remove field.
4923 (thread_db_create_event): Remove function.
4924 (thread_db_enable_reporting): Likewise.
4925 (find_one_thread): Don't check for thread_db_use_events.
4926 (attach_thread): Likewise.
4927 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4928 (try_thread_db_load_1): Don't check for thread_db_use_events.
4929 (thread_db_init): Remove use_events argument and thread events
4930 handling.
4931 (remove_thread_event_breakpoints): Remove function.
4932 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4933
7d00775e
AT
49342015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4935
4936 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4937 New function.
4938 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4939 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4940 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4941 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4942 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4943 Initialize.
4944 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4945 New function.
4946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4947 * linux-low.c (can_hardware_single_step): Use
4948 supports_hardware_single_step.
4949 (can_software_single_step): New function.
4950 (start_step_over): Call can_software_single_step.
4951 (linux_supports_hardware_single_step): New function.
4952 (struct target_ops) <supports_software_single_step>: Initialize.
4953 * linux-low.h (struct linux_target_ops)
4954 <supports_hardware_single_step>: Initialize.
4955 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4956 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4957 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4958 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4959 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4960 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4961 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4962 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4963 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4964 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4965 Initialize.
4966 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4967 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4968 Initialize.
4969 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4970 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4971 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4972 New function.
4973 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4974 * target.h (struct target_ops): <supports_software_single_step>:
4975 New field.
4976 (target_supports_software_single_step): New macro.
4977
2d97cd35
AT
49782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4979
4980 * linux-low.c (linux_wait_1): Fix pc advance condition.
4981 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4982 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4983
769ef81f
AT
49842015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4985
4986 * linux-arm-low.c (arm_is_thumb_mode): New function.
4987 (arm_breakpoint_at): Use arm_is_thumb_mode.
4988 (arm_breakpoint_kind_from_current_state): New function.
4989 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4990 Initialize.
4991 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4992 (linux_breakpoint_kind_from_current_state): New function.
4993 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4994 * linux-low.h (struct linux_target_ops)
4995 <breakpoint_kind_from_current_state>: New field.
4996 * target.h (struct target_ops): Likewise.
4997 (target_breakpoint_kind_from_current_state): New macro.
4998
1bebeeca
PA
49992015-11-30 Pedro Alves <palves@redhat.com>
5000
5001 * linux-low.c (linux_resume): Wake up the event loop before
5002 returning.
5003
a67a9fae
PA
50042015-11-30 Pedro Alves <palves@redhat.com>
5005
5006 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5007 check.
5008 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5009 to -1.
5010 * target.c (struct thread_search): New structure.
5011 (thread_search_callback): New function.
5012 (prev_general_thread): New global.
5013 (prepare_to_access_memory, done_accessing_memory): New functions.
5014 * target.h (prepare_to_access_memory, done_accessing_memory):
5015 Replace macros with function declarations.
5016
f2faf941
PA
50172015-11-30 Pedro Alves <palves@redhat.com>
5018
5019 PR 14618
5020 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5021 report TARGET_WAITKIND_NO_RESUMED.
5022 * remote-utils.c (prepare_resume_reply): Handle
5023 TARGET_WAITKIND_NO_RESUMED.
5024 * server.c (report_no_resumed): New global.
5025 (handle_query) <qSupported>: Handle "no-resumed+". Report
5026 "no-resumed+" support.
5027 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5028 return error if the client doesn't support no-resumed events.
5029 (push_stop_notification): New function.
5030 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5031 events if the client supports them.
5032
a681f9c9
PA
50332015-11-30 Pedro Alves <palves@redhat.com>
5034
5035 * linux-low.c (thread_still_has_status_pending_p): Don't check
5036 vCont;t here.
5037 (lwp_resumed): New function.
5038 (status_pending_p_callback): Return early if the LWP is not
5039 supposed to be resumed.
5040
65706a29
PA
50412015-11-30 Pedro Alves <palves@redhat.com>
5042
5043 * linux-low.c (handle_extended_wait): Assert that the LWP's
5044 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5045 thread create events, leave the new child's status pending.
5046 (linux_low_filter_event): If GDB wants to hear about thread exit
5047 events, leave the LWP marked dead and don't delete it.
5048 (linux_wait_for_event_filtered): Don't check for thread exit.
5049 (filter_exit_event): New function.
5050 (linux_wait_1): Use it, when returning an exit event.
5051 (linux_resume_one_lwp_throw): Assert that the LWP's
5052 waitstatus is TARGET_WAITKIND_IGNORE.
5053 * remote-utils.c (prepare_resume_reply): Handle
5054 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5055 * server.c (report_thread_events): New global.
5056 (handle_general_set): Handle QThreadEvents.
5057 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5058 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5059 TARGET_WAITKIND_THREAD_EXITED.
5060 * server.h (report_thread_events): Declare.
5061
56cf4bed
PA
50622015-11-30 Pedro Alves <palves@redhat.com>
5063
5064 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5065 the thread's last_resume_kind was resume_stop.
5066
500c1d85
PA
50672015-11-30 Pedro Alves <palves@redhat.com>
5068
5069 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5070 before returning.
5071
de979965
PA
50722015-11-30 Pedro Alves <palves@redhat.com>
5073
5074 * server.c (handle_v_requests): Handle vCtrlC.
5075
34c65914
PA
50762015-11-30 Pedro Alves <palves@redhat.com>
5077
5078 * gdbthread.h (find_any_thread_of_pid): Declare.
5079 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5080 functions.
5081 * server.c (handle_query): If current_thread is NULL, look for
5082 another thread of the selected process.
5083
79efa585 50842015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5085 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5086
5087 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5088 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5089 name in reply.
5090 * target.h (struct target_ops) <thread_name>: New field.
5091 (target_thread_name): New macro.
5092
80d82c19
JB
50932015-11-23 Joel Brobecker <brobecker@adacore.com>
5094
5095 * regcache.h (regcache_invalidate_pid): Add declaration.
5096 * regcache.c (regcache_invalidate_pid): New function, extracted
5097 from regcache_invalidate.
5098 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5099 Add trivial documentation comment.
5100 * lynx-low.c: Use regcache_invalidate_pid instead of
5101 regcache_invalidate.
5102
64da5dd5
JB
51032015-11-23 Joel Brobecker <brobecker@adacore.com>
5104
5105 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5106 and Elf64_auxv_t if the target is Android.
5107
37ce4055
DE
51082015-11-22 Doug Evans <xdje42@gmail.com>
5109
5110 * target.h: #include <sys/types.h>.
5111
06e03fff
PA
51122015-11-19 Pedro Alves <palves@redhat.com>
5113
5114 * linux-low.c (linux_process_qsupported): Change prototype.
5115 Adjust.
5116 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5117 Change prototype.
5118 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5119 and adjust to loop over all features.
5120 * server.c (handle_query) <qSupported>: Adjust to call
5121 target_process_qsupported once, passing it a vector of unprocessed
5122 features.
5123 * target.h (struct target_ops) <process_qsupported>: Change
5124 prototype.
5125 (target_process_qsupported): Adjust.
5126
9a084706
PA
51272015-11-19 Pedro Alves <palves@redhat.com>
5128
5129 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5130 mode.
5131 * configure: Regenerate.
5132
dad44a1f
PA
51332015-11-19 Pedro Alves <palves@redhat.com>
5134
5135 * configure: Regenerate.
5136
231c0592
YQ
51372015-11-19 Yao Qi <yao.qi@linaro.org>
5138
5139 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5140 type to uint32_t.
5141
6c1c9a8b
YQ
51422015-11-19 Yao Qi <yao.qi@linaro.org>
5143
5144 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5145 (struct aarch64_operand): Move enum out.
5146
9caa3311
YQ
51472015-11-19 Yao Qi <yao.qi@linaro.org>
5148
5149 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5150 struct user_fpsimd_state *.
5151 (aarch64_store_fpregset): Likewise.
5152
6a69a054
YQ
51532015-11-19 Yao Qi <yao.qi@linaro.org>
5154
5155 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5156 struct user_pt_regs *.
5157 (aarch64_store_gregset): Likewise.
5158
1798301e
PA
51592015-11-18 Pedro Alves <palves@redhat.com>
5160
5161 * Makefile.in (all_object_files): Add $IPA_OBJS.
5162
ce7715e2
PA
51632015-11-17 Pedro Alves <palves@redhat.com>
5164
5165 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5166 GDB_SIGNAL_0 and gdb_signal_to_string.
5167
c0879059
PA
51682015-11-17 Pedro Alves <palves@redhat.com>
5169
5170 * win32-low.c (handle_output_debug_string): Remove parameter.
5171 (win32_kill): Remove our_status local and adjust call to
5172 handle_output_debug_string.
5173 (get_child_debug_event): Adjust call to
5174 handle_output_debug_string.
5175
1996e237
SM
51762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5177
5178 * linux-mips-low.c (mips_fill_gregset): Add cast.
5179 (mips_store_gregset): Likewise.
5180 (mips_fill_fpregset): Likewise.
5181 (mips_store_fpregset): Likewise.
5182
cbec665b
SM
51832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5184
5185 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5186 priv.
5187
eb3e3c67
SM
51882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5189
5190 * linux-mips-low.c (mips_linux_new_thread): Change type of
5191 watch_type to enum target_hw_bp_type.
5192
171de4b8
SM
51932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5194
5195 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5196 Change return type to arm_hwbp_type.
5197
04248ead
SM
51982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5199
5200 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5201 (arm_store_gregset): Likewise.
5202 * linux-arm-low.c (arm_get_hwcap): Likewise.
5203 (arm_read_description): Likewise.
5204
04b3479c
SM
52052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5206
5207 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5208
2bc84e8a
SM
52092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5210
5211 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5212 (ppc_fill_vsxregset): Likewise.
5213 (ppc_store_vsxregset): Likewise.
5214 (ppc_fill_vrregset): Likewise.
5215 (ppc_store_vrregset): Likewise.
5216 (ppc_fill_evrregset): Likewise.
5217 (ppc_store_evrregset): Likewise.
5218
e6c5bb05
SM
52192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5220
5221 * linux-ppc-low.c (ppc_usrregs_info): Remove
5222 forward-declaration.
5223 (ppc_arch_setup): Move lower in file.
5224
7ea45d72
SM
52252015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5226
5227 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5228 (ps_pdwrite): Likewise.
5229
69291610
HW
52302015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5231
5232 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5233 to after assert checks.
5234
b42945fd
SM
52352015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5236
5237 * proc-service.c (ps_pdread): Add/adjust casts.
5238 (ps_pdwrite): Add/adjust casts.
5239
d6f85c84
SM
52402015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5241
5242 * server.c (handle_search_memory_1): Cast return value of
5243 memmem.
5244
f98cd059
SM
52452015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5246
5247 * server.c (write_qxfer_response): Change type of data to
5248 gdb_byte *.
5249
d2412fa5
PA
52502015-10-29 Pedro Alves <palves@redhat.com>
5251
5252 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5253
c17414a2
PA
52542015-10-29 Pedro Alves <palves@redhat.com>
5255
5256 * tracepoint.c (clear_installed_tracepoints): Add casts.
5257
e053fbc4
PA
52582015-10-29 Pedro Alves <palves@redhat.com>
5259
5260 * server.c (handle_v_cont, process_serial_event): Add enum
5261 gdb_signal casts to signal parsing code.
5262
add67df8
PA
52632015-10-29 Pedro Alves <palves@redhat.com>
5264
5265 * linux-low.h (NULL_REGSET): Define.
5266 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5267 * linux-arm-low.c (arm_regsets): Likewise.
5268 * linux-crisv32-low.c (cris_regsets): Likewise.
5269 * linux-m68k-low.c (m68k_regsets): Likewise.
5270 * linux-mips-low.c (mips_regsets): Likewise.
5271 * linux-nios2-low.c (nios2_regsets): Likewise.
5272 * linux-ppc-low.c (ppc_regsets): Likewise.
5273 * linux-s390-low.c (s390_regsets): Likewise.
5274 * linux-sh-low.c (sh_regsets): Likewise.
5275 * linux-sparc-low.c (sparc_regsets): Likewise.
5276 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5277 * linux-tile-low.c (tile_regsets): Likewise.
5278 * linux-x86-low.c (x86_regsets): Likewise.
5279 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5280
50bc912a
PA
52812015-10-29 Pedro Alves <palves@redhat.com>
5282
5283 * linux-low.h (NULL_REGSET): Define.
5284 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5285 * linux-arm-low.c (arm_regsets): Likewise.
5286 * linux-crisv32-low.c (cris_regsets): Likewise.
5287 * linux-m68k-low.c (m68k_regsets): Likewise.
5288 * linux-mips-low.c (mips_regsets): Likewise.
5289 * linux-nios2-low.c (nios2_regsets): Likewise.
5290 * linux-ppc-low.c (ppc_regsets): Likewise.
5291 * linux-s390-low.c (s390_regsets): Likewise.
5292 * linux-sh-low.c (sh_regsets): Likewise.
5293 * linux-sparc-low.c (sparc_regsets): Likewise.
5294 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5295 * linux-tile-low.c (tile_regsets): Likewise.
5296 * linux-x86-low.c (x86_regsets): Likewise.
5297 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5298
682b2546
DE
52992015-10-26 Doug Evans <dje@google.com>
5300
5301 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5302
963843d4
DE
53032015-10-26 Doug Evans <dje@google.com>
5304
5305 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5306
d41401ac
DE
53072015-10-26 Doug Evans <dje@google.com>
5308
5309 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5310 for debug_printf.
5311 (attach_thread, find_new_threads_callback): Ditto.
5312
3db28855
AT
53132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5314
5315 * mem-break.h (set_breakpoint_data): Remove.
5316
fb78e89c
AT
53172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5318
5319 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5320 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5321 (initialize_low): Remove set_breakpoint_data call.
5322 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5323 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5324 (initialize_low): Remove set_breakpoint_data call.
5325 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5326 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5327 (initialize_low): Remove set_breakpoint_data call.
5328
2e6ee069
AT
53292015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5330
5331 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5332 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5333 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5334 * target.h (target_breakpoint_kind_from_pc): New macro.
5335
1652a986
AT
53362015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5337
5338 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5339 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5340 the default breakpoint kind.
5341
abeead09
AT
53422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5343
5344 * linux-arm-low.c (arm_supports_z_point_type): Add software
5345 breakpoint support.
5346
b0b4b501
AT
53472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5348
5349 * linux-arm-low.c: Refactor breakpoint definitions.
5350 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5351 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5352
8689682c
AT
53532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5354
5355 * Makefile.in: Add arm.c/o.
5356 * configure.srv: Likewise.
5357 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5358 (arm_breakpoint_kind_from_pc): New function.
5359 (arm_sw_breakpoint_from_kind): Return proper kind.
5360 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5361
27165294
AT
53622015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5363
5364 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5365 removal.
5366 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5367 (struct raw_breakpoint) <size>: Remove.
5368 (struct raw_breakpoint) <kind>: Add.
5369 (bp_size): New function.
5370 (bp_opcode): Likewise.
5371 (find_raw_breakpoint_at): Adjust for kind.
5372 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5373 (remove_memory_breakpoint): Adjust for kind call bp_size.
5374 (set_raw_breakpoint_at): Adjust for kind.
5375 (set_breakpoint): Likewise.
5376 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5377 (delete_raw_breakpoint): Adjust for kind.
5378 (delete_breakpoint): Likewise.
5379 (find_gdb_breakpoint): Likewise.
5380 (set_gdb_breakpoint_1): Likewise.
5381 (set_gdb_breakpoint): Likewise.
5382 (delete_gdb_breakpoint_1): Likewise.
5383 (delete_gdb_breakpoint): Likewise.
5384 (uninsert_raw_breakpoint): Likewise.
5385 (reinsert_raw_breakpoint): Likewise.
5386 (set_breakpoint_data): Remove.
5387 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5388 (check_mem_read): Adjust for kind call bp_size.
5389 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5390 (clone_one_breakpoint): Adjust for kind.
5391 * mem-break.h (set_gdb_breakpoint): Likewise.
5392 (delete_gdb_breakpoint): Likewise.
5393 * server.c (process_serial_event): Likewise.
5394
dd373349
AT
53952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5396
5397 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5398 (struct linux_target_ops) <breakpoint>: Remove.
5399 (struct linux_target_ops) <breakpoint_len>: Remove.
5400 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5402 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5403 (arm_sw_breakpoint_from_kind): New function.
5404 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5405 (struct linux_target_ops) <breakpoint>: Remove.
5406 (struct linux_target_ops) <breakpoint_len>: Remove.
5407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5409 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5410 (struct linux_target_ops) <breakpoint>: Remove.
5411 (struct linux_target_ops) <breakpoint_len>: Remove.
5412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5414 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5415 (struct linux_target_ops) <breakpoint>: Remove.
5416 (struct linux_target_ops) <breakpoint_len>: Remove.
5417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5419 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5420 and sw_breakpoint_from_kind to increment the pc.
5421 (linux_breakpoint_kind_from_pc): New function.
5422 (linux_sw_breakpoint_from_kind): New function.
5423 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5424 (initialize_low): Call breakpoint_kind_from_pc and
5425 sw_breakpoint_from_kind to replace breakpoint_data/len.
5426 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5427 New field.
5428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5429 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5430 (struct linux_target_ops) <breakpoint>: Remove.
5431 (struct linux_target_ops) <breakpoint_len>: Remove.
5432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5434 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5435 (struct linux_target_ops) <breakpoint>: Remove.
5436 (struct linux_target_ops) <breakpoint_len>: Remove.
5437 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5438 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5439 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5440 (struct linux_target_ops) <breakpoint>: Remove.
5441 (struct linux_target_ops) <breakpoint_len>: Remove.
5442 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5443 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5444 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5445 (struct linux_target_ops) <breakpoint>: Remove.
5446 (struct linux_target_ops) <breakpoint_len>: Remove.
5447 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5448 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5449 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5450 (struct linux_target_ops) <breakpoint>: Remove.
5451 (struct linux_target_ops) <breakpoint_len>: Remove.
5452 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5453 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5454 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5455 (struct linux_target_ops) <breakpoint>: Remove.
5456 (struct linux_target_ops) <breakpoint_len>: Remove.
5457 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5458 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5459 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5460 (struct linux_target_ops) <breakpoint>: Remove.
5461 (struct linux_target_ops) <breakpoint_len>: Remove.
5462 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5463 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5464 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5465 (struct linux_target_ops) <breakpoint>: Remove.
5466 (struct linux_target_ops) <breakpoint_len>: Remove.
5467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5469 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5470 (struct linux_target_ops) <breakpoint>: Remove.
5471 (struct linux_target_ops) <breakpoint_len>: Remove.
5472 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5473 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5474 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5475 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5476 (struct linux_target_ops) <breakpoint>: Remove.
5477 (struct linux_target_ops) <breakpoint_len>: Remove.
5478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5480 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5481 (struct linux_target_ops) <breakpoint>: Remove.
5482 (struct linux_target_ops) <breakpoint_len>: Remove.
5483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5485
4cd98a19
AT
54862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5487
5488 * linux-cris-low.c (cris_get_pc): Remove void arg.
5489
774ee6d2
AR
54902015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5491
5492 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5493 variable name.
5494
833dcd29
AR
54952015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5496
5497 * inferiors.c (thread_pid_matches_callback): New function.
5498 (find_thread_process): New function.
5499 (remove_thread): Reset current_thread.
5500 (remove_process): Assert threads have been removed first.
5501
8d689ee5
YQ
55022015-10-15 Yao Qi <yao.qi@linaro.org>
5503
5504 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5505 if it is 3.
5506 (aarch64_remove_point): Likewise.
5507 * regcache.c (regcache_register_size): New function.
5508
1c2e1515
YQ
55092015-10-12 Yao Qi <yao.qi@linaro.org>
5510
5511 * linux-aarch64-low.c: Update all callers as emit_load_store
5512 is renamed to aarch64_emit_load_store.
5513
e1c587c3
YQ
55142015-10-12 Yao Qi <yao.qi@linaro.org>
5515
5516 * linux-aarch64-low.c: Update all callers of function renaming
5517 from emit_insn to aarch64_emit_insn.
5518
b6542f81
YQ
55192015-10-12 Yao Qi <yao.qi@linaro.org>
5520
5521 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5522 arch/aarch64-insn.h.
5523 (struct aarch64_memory_operand): Likewise.
5524 (ENCODE): Likewise.
5525 (emit_insn): Move to arch/aarch64-insn.c.
5526 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5527 (emit_load_store): Move to arch/aarch64-insn.c.
5528 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5529 (can_encode_int32): Remove.
5530
246994ce
YQ
55312015-10-12 Yao Qi <yao.qi@linaro.org>
5532
5533 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5534 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5535 (aarch64_relocate_instruction): Likewise.
5536 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5537 (struct aarch64_insn_visitor): Likewise.
5538
0badd99f
YQ
55392015-10-12 Yao Qi <yao.qi@linaro.org>
5540
5541 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5542 (struct aarch64_insn_visitor): New.
5543 (struct aarch64_insn_relocation_data): New.
5544 (aarch64_ftrace_insn_reloc_b): New function.
5545 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5546 (aarch64_ftrace_insn_reloc_cb): Likewise.
5547 (aarch64_ftrace_insn_reloc_tb): Likewise.
5548 (aarch64_ftrace_insn_reloc_adr): Likewise.
5549 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5550 (aarch64_ftrace_insn_reloc_others): Likewise.
5551 (visitor): New.
5552 (aarch64_relocate_instruction): Use visitor.
5553
dfaffe9d
YQ
55542015-10-12 Yao Qi <yao.qi@linaro.org>
5555
5556 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5557 int. Add argument buf.
5558 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5559 aarch64_relocate_instruction.
5560
70b439f0
YQ
55612015-10-12 Yao Qi <yao.qi@linaro.org>
5562
5563 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5564 argument insn. Remove local variable insn. Don't call
5565 target_read_uint32.
5566 (aarch64_install_fast_tracepoint_jump_pad): Call
5567 target_read_uint32.
5568
7781c06f
YQ
55692015-09-30 Yao Qi <yao.qi@linaro.org>
5570
5571 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5572 (emit_load_store_pair): Likewise.
5573
9a3c8263
SM
55742015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5575
5576 * dll.c (match_dll): Add cast(s).
5577 (unloaded_dll): Likewise.
5578 * linux-low.c (second_thread_of_pid_p): Likewise.
5579 (delete_lwp_callback): Likewise.
5580 (count_events_callback): Likewise.
5581 (select_event_lwp_callback): Likewise.
5582 (linux_set_resume_request): Likewise.
5583 * server.c (accumulate_file_name_length): Likewise.
5584 (emit_dll_description): Likewise.
5585 (handle_qxfer_threads_worker): Likewise.
5586 (visit_actioned_threads): Likewise.
5587 * thread-db.c (any_thread_of): Likewise.
5588 * tracepoint.c (same_process_p): Likewise.
5589 (match_blocktype): Likewise.
5590 (build_traceframe_info_xml): Likewise.
5591
224c3ddb
SM
55922015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5593
5594 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5595 assignment.
5596 (gdb_unparse_agent_expr): Likewise.
5597 * hostio.c (require_data): Likewise.
5598 (handle_pread): Likewise.
5599 * linux-low.c (disable_regset): Likewise.
5600 (fetch_register): Likewise.
5601 (store_register): Likewise.
5602 (get_dynamic): Likewise.
5603 (linux_qxfer_libraries_svr4): Likewise.
5604 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5605 (set_fast_tracepoint_jump): Likewise.
5606 (uninsert_fast_tracepoint_jumps_at): Likewise.
5607 (reinsert_fast_tracepoint_jumps_at): Likewise.
5608 (validate_inserted_breakpoint): Likewise.
5609 (clone_agent_expr): Likewise.
5610 * regcache.c (init_register_cache): Likewise.
5611 * remote-utils.c (putpkt_binary_1): Likewise.
5612 (decode_M_packet): Likewise.
5613 (decode_X_packet): Likewise.
5614 (look_up_one_symbol): Likewise.
5615 (relocate_instruction): Likewise.
5616 (monitor_output): Likewise.
5617 * server.c (handle_search_memory): Likewise.
5618 (handle_qxfer_exec_file): Likewise.
5619 (handle_qxfer_libraries): Likewise.
5620 (handle_qxfer): Likewise.
5621 (handle_query): Likewise.
5622 (handle_v_cont): Likewise.
5623 (handle_v_run): Likewise.
5624 (captured_main): Likewise.
5625 * target.c (write_inferior_memory): Likewise.
5626 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5627 * tracepoint.c (init_trace_buffer): Likewise.
5628 (add_tracepoint_action): Likewise.
5629 (add_traceframe): Likewise.
5630 (add_traceframe_block): Likewise.
5631 (cmd_qtdpsrc): Likewise.
5632 (cmd_qtdv): Likewise.
5633 (cmd_qtstatus): Likewise.
5634 (response_source): Likewise.
5635 (response_tsv): Likewise.
5636 (cmd_qtnotes): Likewise.
5637 (gdb_collect): Likewise.
5638 (initialize_tracepoint): Likewise.
5639
afbe19f8
PL
56402015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5641
5642 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5643 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5644 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5645 <NOP>: New.
5646 (enum aarch64_condition_codes): New enum.
5647 (w0): New static global.
5648 (fp): Likewise.
5649 (lr): Likewise.
5650 (struct aarch64_memory_operand) <type>: New
5651 MEMORY_OPERAND_POSTINDEX type.
5652 (postindex_memory_operand): New helper function.
5653 (emit_ret): New function.
5654 (emit_load_store_pair): New function, factored out of emit_stp
5655 with support for MEMORY_OPERAND_POSTINDEX.
5656 (emit_stp): Rewrite using emit_load_store_pair.
5657 (emit_ldp): New function.
5658 (emit_load_store): Likewise.
5659 (emit_ldr): Mention post-index instruction in comment.
5660 (emit_ldrh): New function.
5661 (emit_ldrb): New function.
5662 (emit_ldrsw): Mention post-index instruction in comment.
5663 (emit_str): Likewise.
5664 (emit_subs): New function.
5665 (emit_cmp): Likewise.
5666 (emit_and): Likewise.
5667 (emit_orr): Likewise.
5668 (emit_orn): Likewise.
5669 (emit_eor): Likewise.
5670 (emit_mvn): Likewise.
5671 (emit_lslv): Likewise.
5672 (emit_lsrv): Likewise.
5673 (emit_asrv): Likewise.
5674 (emit_mul): Likewise.
5675 (emit_sbfm): Likewise.
5676 (emit_sbfx): Likewise.
5677 (emit_ubfm): Likewise.
5678 (emit_ubfx): Likewise.
5679 (emit_csinc): Likewise.
5680 (emit_cset): Likewise.
5681 (emit_nop): Likewise.
5682 (emit_ops_insns): New helper function.
5683 (emit_pop): Likewise.
5684 (emit_push): Likewise.
5685 (aarch64_emit_prologue): New function.
5686 (aarch64_emit_epilogue): Likewise.
5687 (aarch64_emit_add): Likewise.
5688 (aarch64_emit_sub): Likewise.
5689 (aarch64_emit_mul): Likewise.
5690 (aarch64_emit_lsh): Likewise.
5691 (aarch64_emit_rsh_signed): Likewise.
5692 (aarch64_emit_rsh_unsigned): Likewise.
5693 (aarch64_emit_ext): Likewise.
5694 (aarch64_emit_log_not): Likewise.
5695 (aarch64_emit_bit_and): Likewise.
5696 (aarch64_emit_bit_or): Likewise.
5697 (aarch64_emit_bit_xor): Likewise.
5698 (aarch64_emit_bit_not): Likewise.
5699 (aarch64_emit_equal): Likewise.
5700 (aarch64_emit_less_signed): Likewise.
5701 (aarch64_emit_less_unsigned): Likewise.
5702 (aarch64_emit_ref): Likewise.
5703 (aarch64_emit_if_goto): Likewise.
5704 (aarch64_emit_goto): Likewise.
5705 (aarch64_write_goto_address): Likewise.
5706 (aarch64_emit_const): Likewise.
5707 (aarch64_emit_call): Likewise.
5708 (aarch64_emit_reg): Likewise.
5709 (aarch64_emit_pop): Likewise.
5710 (aarch64_emit_stack_flush): Likewise.
5711 (aarch64_emit_zero_ext): Likewise.
5712 (aarch64_emit_swap): Likewise.
5713 (aarch64_emit_stack_adjust): Likewise.
5714 (aarch64_emit_int_call_1): Likewise.
5715 (aarch64_emit_void_call_2): Likewise.
5716 (aarch64_emit_eq_goto): Likewise.
5717 (aarch64_emit_ne_goto): Likewise.
5718 (aarch64_emit_lt_goto): Likewise.
5719 (aarch64_emit_le_goto): Likewise.
5720 (aarch64_emit_gt_goto): Likewise.
5721 (aarch64_emit_ge_got): Likewise.
5722 (aarch64_emit_ops_impl): New static global variable.
5723 (aarch64_emit_ops): New target function, return
5724 &aarch64_emit_ops_impl.
5725 (struct linux_target_ops): Install it.
5726
bb903df0
PL
57272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5728
5729 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5730 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5731 aarch64-ipa.o.
5732 * linux-aarch64-ipa.c: New file.
5733 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5734 and endian.h.
5735 (aarch64_get_thread_area): New target method.
5736 (extract_signed_bitfield): New helper function.
5737 (aarch64_decode_ldr_literal): New function.
5738 (enum aarch64_opcodes): New enum.
5739 (struct aarch64_register): New struct.
5740 (struct aarch64_operand): New struct.
5741 (x0): New static global.
5742 (x1): Likewise.
5743 (x2): Likewise.
5744 (x3): Likewise.
5745 (x4): Likewise.
5746 (w2): Likewise.
5747 (ip0): Likewise.
5748 (sp): Likewise.
5749 (xzr): Likewise.
5750 (aarch64_register): New helper function.
5751 (register_operand): Likewise.
5752 (immediate_operand): Likewise.
5753 (struct aarch64_memory_operand): New struct.
5754 (offset_memory_operand): New helper function.
5755 (preindex_memory_operand): Likewise.
5756 (enum aarch64_system_control_registers): New enum.
5757 (ENCODE): New macro.
5758 (emit_insn): New helper function.
5759 (emit_b): New function.
5760 (emit_bcond): Likewise.
5761 (emit_cb): Likewise.
5762 (emit_tb): Likewise.
5763 (emit_blr): Likewise.
5764 (emit_stp): Likewise.
5765 (emit_ldp_q_offset): Likewise.
5766 (emit_stp_q_offset): Likewise.
5767 (emit_load_store): Likewise.
5768 (emit_ldr): Likewise.
5769 (emit_ldrsw): Likewise.
5770 (emit_str): Likewise.
5771 (emit_ldaxr): Likewise.
5772 (emit_stxr): Likewise.
5773 (emit_stlr): Likewise.
5774 (emit_data_processing_reg): Likewise.
5775 (emit_data_processing): Likewise.
5776 (emit_add): Likewise.
5777 (emit_sub): Likewise.
5778 (emit_mov): Likewise.
5779 (emit_movk): Likewise.
5780 (emit_mov_addr): Likewise.
5781 (emit_mrs): Likewise.
5782 (emit_msr): Likewise.
5783 (emit_sevl): Likewise.
5784 (emit_wfe): Likewise.
5785 (append_insns): Likewise.
5786 (can_encode_int32_in): New helper function.
5787 (aarch64_relocate_instruction): New function.
5788 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5789 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5790 (struct linux_target_ops): Install aarch64_get_thread_area,
5791 aarch64_install_fast_tracepoint_jump_pad and
5792 aarch64_get_min_fast_tracepoint_insn_len.
5793
787749ea
PL
57942015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5795
5796 * Makefile.in (aarch64-insn.o): New rule.
5797 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5798
9812b2e6
YQ
57992015-09-21 Yao Qi <yao.qi@linaro.org>
5800
5801 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5802
18fe412b
YQ
58032015-09-21 Yao Qi <yao.qi@linaro.org>
5804
5805 * tracepoint.c (max_jump_pad_size): Remove.
5806
a0cc84cd
YQ
58072015-09-18 Yao Qi <yao.qi@linaro.org>
5808
5809 * linux-aarch64-low.c: Don't include sys/uio.h.
5810 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5811
d78908cf
WW
58122015-09-16 Wei-cheng Wang <cole945@gmail.com>
5813
5814 * tracepoint.c (eval_result_type): Change prototype.
5815 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5816
d57e0d50
PA
58172015-09-15 Pedro Alves <palves@redhat.com>
5818
5819 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5820 Check whether to report exec events instead of checking whether
5821 multiprocess is enabled.
5822
5a676acc
PA
58232015-09-15 Pedro Alves <palves@redhat.com>
5824
5825 PR remote/18965
5826 * remote-utils.c (prepare_resume_reply): Merge
5827 TARGET_WAITKIND_VFORK_DONE switch case with the
5828 TARGET_WAITKIND_FORKED case.
5829
7c5d0fad
YQ
58302015-09-15 Yao Qi <yao.qi@linaro.org>
5831
5832 * server.c (handle_query): Check string comparison using
5833 "else if" instead of "if".
5834
750ce8d1
YQ
58352015-09-15 Yao Qi <yao.qi@linaro.org>
5836
5837 * server.c (vCont_supported): New global variable.
5838 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5839 matches. Append ";vContSupported+" to own_buf.
5840 (handle_v_requests): Append ";s;S" to own_buf if target supports
5841 hardware single step or vCont_supported is false.
5842 (capture_main): Set vCont_supported to zero.
5843
70b90b91
YQ
58442015-09-15 Yao Qi <yao.qi@linaro.org>
5845
5846 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5847 it to ...
5848 (linux_supports_hardware_single_step): ... New function.
5849 (linux_target_ops): Update.
5850 * lynx-low.c (lynx_target_ops): Set field
5851 supports_hardware_single_step to target_can_do_hardware_single_step.
5852 * nto-low.c (nto_target_ops): Likewise.
5853 * spu-low.c (spu_target_ops): Likewise.
5854 * win32-low.c (win32_target_ops): Likewise.
5855 * target.c (target_can_do_hardware_single_step): New function.
5856 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5857 Remove. <supports_hardware_single_step>: New field.
5858 (target_supports_conditional_breakpoints): Remove.
5859 (target_supports_hardware_single_step): New macro.
5860 (target_can_do_hardware_single_step): Declare.
5861 * server.c (handle_query): Use target_supports_hardware_single_step
5862 instead of target_supports_conditional_breakpoints.
5863
ade90bde
YQ
58642015-09-15 Yao Qi <yao.qi@linaro.org>
5865
5866 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5867 function.
5868 (struct linux_target_ops the_low_target): Install
5869 aarch64_linux_siginfo_fixup.
5870
94585166
DB
58712015-09-11 Don Breazeal <donb@codesourcery.com>
5872 Luis Machado <lgustavo@codesourcery.com>
5873
5874 * linux-low.c (linux_mourn): Static declaration.
5875 (linux_arch_setup): Move in front of
5876 handle_extended_wait.
5877 (linux_arch_setup_thread): New function.
5878 (handle_extended_wait): Handle exec events. Call
5879 linux_arch_setup_thread. Make event_lwp argument a
5880 pointer-to-a-pointer.
5881 (check_zombie_leaders): Do not check stopped threads.
5882 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5883 (linux_low_filter_event): Add lwp and thread for exec'ing
5884 non-leader thread if leader thread has been deleted.
5885 Refactor code into linux_arch_setup_thread and call it.
5886 Pass child lwp pointer by reference to handle_extended_wait.
5887 (linux_wait_for_event_filtered): Update comment.
5888 (linux_wait_1): Prevent clobbering exec event status.
5889 (linux_supports_exec_events): New function.
5890 (linux_target_ops) <supports_exec_events>: Initialize new member.
5891 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5892 new member.
5893 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5894 * server.c (report_exec_events): New global variable.
5895 (handle_query): Handle qSupported query for exec-events feature.
5896 (captured_main): Initialize report_exec_events.
5897 * server.h (report_exec_events): Declare new global variable.
5898 * target.h (struct target_ops) <supports_exec_events>: New
5899 member.
5900 (target_supports_exec_events): New macro.
5901 * win32-low.c (win32_target_ops) <supports_exec_events>:
5902 Initialize new member.
5903
0568462b
MM
59042015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5905
5906 * linux-low.c (linux_low_enable_btrace): Remove.
5907 (linux_target_ops): Replace linux_low_enable_btrace with
5908 linux_enable_btrace.
5909
39edd165
YQ
59102015-09-03 Yao Qi <yao.qi@linaro.org>
5911
5912 * linux-aarch64-low.c (aarch64_insert_point): Call
5913 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5914 returns true.
5915
1db33b5a
UW
59162015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5917
5918 * linux-low.c (check_stopped_by_breakpoint): Use
5919 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5920
ab290430
PA
59212015-08-27 Pedro Alves <palves@redhat.com>
5922
5923 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5924
8d749320
SM
59252015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5926
6711b7f8
SM
5927 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5928 the XNEW-family equivalent.
8d749320
SM
5929 (compile_bytecodes): Likewise.
5930 * dll.c (loaded_dll): Likewise.
5931 * event-loop.c (append_callback_event): Likewise.
5932 (create_file_handler): Likewise.
5933 (create_file_event): Likewise.
5934 * hostio.c (handle_open): Likewise.
5935 * inferiors.c (add_thread): Likewise.
5936 (add_process): Likewise.
5937 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5938 * linux-arm-low.c (arm_new_process): Likewise.
5939 (arm_new_thread): Likewise.
5940 * linux-low.c (add_to_pid_list): Likewise.
5941 (linux_add_process): Likewise.
5942 (handle_extended_wait): Likewise.
5943 (add_lwp): Likewise.
5944 (enqueue_one_deferred_signal): Likewise.
5945 (enqueue_pending_signal): Likewise.
5946 (linux_resume_one_lwp_throw): Likewise.
5947 (linux_resume_one_thread): Likewise.
5948 (linux_read_memory): Likewise.
5949 (linux_write_memory): Likewise.
5950 * linux-mips-low.c (mips_linux_new_process): Likewise.
5951 (mips_linux_new_thread): Likewise.
5952 (mips_add_watchpoint): Likewise.
5953 * linux-x86-low.c (initialize_low_arch): Likewise.
5954 * lynx-low.c (lynx_add_process): Likewise.
5955 * mem-break.c (set_raw_breakpoint_at): Likewise.
5956 (set_breakpoint): Likewise.
5957 (add_condition_to_breakpoint): Likewise.
5958 (add_commands_to_breakpoint): Likewise.
5959 (clone_agent_expr): Likewise.
5960 (clone_one_breakpoint): Likewise.
5961 * regcache.c (new_register_cache): Likewise.
5962 * remote-utils.c (look_up_one_symbol): Likewise.
5963 * server.c (queue_stop_reply): Likewise.
5964 (start_inferior): Likewise.
5965 (queue_stop_reply_callback): Likewise.
5966 (handle_target_event): Likewise.
5967 * spu-low.c (fetch_ppc_memory): Likewise.
5968 (store_ppc_memory): Likewise.
5969 * target.c (set_target_ops): Likewise.
5970 * thread-db.c (thread_db_load_search): Likewise.
5971 (try_thread_db_load_1): Likewise.
5972 * tracepoint.c (add_tracepoint): Likewise.
5973 (add_tracepoint_action): Likewise.
5974 (create_trace_state_variable): Likewise.
5975 (cmd_qtdpsrc): Likewise.
5976 (cmd_qtro): Likewise.
5977 (add_while_stepping_state): Likewise.
5978 * win32-low.c (child_add_thread): Likewise.
5979 (get_image_name): Likewise.
5980
ed8b7b42
YQ
59812015-08-25 Yao Qi <yao.qi@linaro.org>
5982
5983 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5984
db3cb7cb
YQ
59852015-08-25 Yao Qi <yao.qi@linaro.org>
5986
5987 * Makefile.in (aarch64-linux.o): New rule.
5988 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5989 srv_tgtobj.
5990 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5991 (aarch64_init_debug_reg_state): Make it extern.
5992 (aarch64_linux_prepare_to_resume): Remove.
5993
f6011a1c
YQ
59942015-08-25 Yao Qi <yao.qi@linaro.org>
5995
5996 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5997 lwp_arch_private_info and ptid_of_lwp.
5998
88e2cf7e
YQ
59992015-08-25 Yao Qi <yao.qi@linaro.org>
6000
6001 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6002 Find proc_info by find_process_pid. All callers updated.
6003
5e35436e
YQ
60042015-08-25 Yao Qi <yao.qi@linaro.org>
6005
6006 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6007 Remove.
6008 (debug_reg_change_callback): Remove.
6009 (aarch64_notify_debug_reg_change): Remove.
6010
4a8a7965
YQ
60112015-08-25 Yao Qi <yao.qi@linaro.org>
6012
6013 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6014 Call current_lwp_ptid.
6015
32a271ee
YQ
60162015-08-25 Yao Qi <yao.qi@linaro.org>
6017
6018 * linux-aarch64-low.c (debug_reg_change_callback): Use
6019 debug_printf.
6020
0d51c8d7
YQ
60212015-08-25 Yao Qi <yao.qi@linaro.org>
6022
6023 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6024
31a43dd5
YQ
60252015-08-25 Yao Qi <yao.qi@linaro.org>
6026
6027 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6028
8ee52567
YQ
60292015-08-25 Yao Qi <yao.qi@linaro.org>
6030
6031 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6032 the code.
6033
ff3f0f45
YQ
60342015-08-25 Yao Qi <yao.qi@linaro.org>
6035
6036 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6037 Remove.
6038 (debug_reg_change_callback): Remove argument entry and add argument
6039 lwp. Remove local variable thread. Don't print thread id in the
6040 debugging output. Don't check whether pid of thread equals to pid.
6041 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6042 iterate_over_lwps instead find_inferior.
6043
3d40fbb5
PA
60442015-08-24 Pedro Alves <palves@redhat.com>
6045
6046 * inferiors.c (get_first_process): New function.
6047 * inferiors.h (get_first_process): New declaration.
6048 * remote-utils.c (read_ptid): Default to the first process in the
6049 list, instead of to the current thread's process.
6050
438e1e42
PA
60512015-08-24 Pedro Alves <palves@redhat.com>
6052
6053 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6054 * event-loop.c: Likewise.
6055 * remote-utils.c: Likewise.
6056 * tracepoint.c: Likewise.
6057
a8c6d4fc
PA
60582015-08-24 Pedro Alves <palves@redhat.com>
6059
6060 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6061 ptid_get_lwp.
6062
99b0bb12
PA
60632015-08-21 Pedro Alves <palves@redhat.com>
6064
6065 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6066 instead of literal 1.
6067
f8904751
PA
60682015-08-21 Pedro Alves <palves@redhat.com>
6069
6070 * tdesc.c (default_description): Explicitly zero-initialize.
6071
465a859e
PA
60722015-08-21 Pedro Alves <palves@redhat.com>
6073
6074 PR gdb/18749
6075 * inferiors.c (remove_thread): Discard any pending stop reply for
6076 this thread.
6077 * server.c (remove_all_on_match_pid): Rename to ...
6078 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6079 instead of a pid.
6080 (discard_queued_stop_replies): Change parameter to a ptid. Now
6081 extern.
6082 (handle_v_kill, kill_inferior_callback, captured_main)
6083 (process_serial_event): Adjust.
6084 * server.h (discard_queued_stop_replies): Declare.
6085
f0db101d
PA
60862015-08-21 Pedro Alves <palves@redhat.com>
6087
6088 * linux-low.c (wait_for_sigstop): Always switch to no thread
6089 selected if the previously current thread dies.
6090 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6091 process instead of the current thread's.
6092 * remote-utils.c (input_interrupt): Don't check if there's no
6093 current thread.
6094 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6095 current thread to the general thread fails, error out.
6096 (handle_qxfer_auxv, handle_qxfer_libraries)
6097 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6098 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6099 (handle_query): Check if there's a thread selected instead of
6100 checking whether there's any thread in the thread list.
6101 (handle_qxfer_threads, handle_qxfer_btrace)
6102 (handle_qxfer_btrace_conf): Don't error out early if there's no
6103 thread in the thread list.
6104 (handle_v_cont, myresume): Don't set the current thread to the
6105 continue thread.
6106 (process_serial_event) <Hg handling>: Also set thread_id if the
6107 previous general thread is still alive.
6108 (process_serial_event) <g/G handling>: If setting the current
6109 thread to the general thread fails, error out.
6110 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6111 thread's lwp instead of the current thread's.
6112 * target.c (set_desired_thread): If the desired thread was not
6113 found, leave the current thread pointing to NULL. Return an int
6114 (boolean) indicating success.
6115 * target.h (set_desired_thread): Change return type to int.
6116
40045d91
MF
61172015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6118
6119 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6120 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6121 #includes.
6122 (ps_get_thread_area): New function.
6123
45face3b
GB
61242015-08-19 Gary Benson <gbenson@redhat.com>
6125
6126 * hostio.c (handle_pread): Do not attempt to read more data
6127 than hostio_reply_with_data can fit in a packet.
6128
16d5f642
JB
61292015-08-18 Joel Brobecker <brobecker@adacore.com>
6130
6131 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6132
a738da3a
MF
61332015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6134
6135 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6136
33ebda9d
PA
61372015-08-06 Pedro Alves <palves@redhat.com>
6138
6139 * tracepoint.c (expr_eval_result): Now an int.
6140
a44892be
PA
61412015-08-06 Pedro Alves <palves@redhat.com>
6142
6143 * gdbthread.h (struct regcache): Forward declare.
6144 (struct thread_info) <regcache_data>: Now a struct regcache
6145 pointer.
6146 * inferiors.c (inferior_regcache_data)
6147 (set_inferior_regcache_data): Now work with struct regcache
6148 pointers.
6149 * inferiors.h (struct regcache): Forward declare.
6150 (inferior_regcache_data, set_inferior_regcache_data): Now work
6151 with struct regcache pointers.
6152 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6153 (free_register_cache_thread): Remove struct regcache pointer
6154 casts.
6155
608a1e46
PA
61562015-08-06 Pedro Alves <palves@redhat.com>
6157
6158 * server.c (captured_main): On error, print the exception message
6159 to stderr, and if run_once is set, throw a quit.
6160
f0ce0d3a
PA
61612015-08-06 Pedro Alves <palves@redhat.com>
6162
6163 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6164 the current thread.
6165
bf47e248
PA
61662015-08-06 Pedro Alves <palves@redhat.com>
6167
6168 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6169 reading beyond the passed in buffer length.
6170
b6b9ffcc
PL
61712015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6172
6173 * tracepoint.c (symbol_list) <required>: Remove.
6174
863d01bd
PA
61752015-08-06 Pedro Alves <palves@redhat.com>
6176
6177 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6178 count if stopping and suspending threads.
6179 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6180 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6181 (linux_detach): Complete an ongoing step-over.
6182 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6183 throughout.
6184 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6185 (linux_wait_1): If passing a signal to the inferior after
6186 finishing a step-over, unsuspend and re-resume all lwps. If we
6187 see a single-step event but the thread should be continuing, don't
6188 pass the trap to gdb.
6189 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6190 internal_error instead of gdb_assert.
6191 (enqueue_pending_signal): New function.
6192 (check_ptrace_stopped_lwp_gone): Add debug output.
6193 (start_step_over): Use internal_error instead of gdb_assert.
6194 (complete_ongoing_step_over): New function.
6195 (linux_resume_one_thread): Don't resume a suspended thread.
6196 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6197 it stepping.
6198
00db26fa
PA
61992015-08-06 Pedro Alves <palves@redhat.com>
6200
6201 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6202 (linux_thread_alive): Use lwp_is_marked_dead.
6203 (extended_event_reported): Delete.
6204 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6205 instead of extended_event_reported.
6206 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6207 as well.
6208 (lwp_is_marked_dead): New function.
6209 (lwp_running): Use lwp_is_marked_dead.
6210 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6211 comment.
6212
ad071a30
PA
62132015-08-06 Pedro Alves <palves@redhat.com>
6214
6215 * linux-low.c (linux_wait_1): Move fork event output out of the
6216 !report_to_gdb check. Pass event_child->waitstatus to
6217 target_waitstatus_to_string instead of ourstatus.
6218
524b57e6
YQ
62192015-08-04 Yao Qi <yao.qi@linaro.org>
6220
6221 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6222 if current_thread is 32 bit.
6223
6085d6f6
YQ
62242015-08-04 Yao Qi <yao.qi@linaro.org>
6225
6226 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6227 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6228 * server.c (extended_protocol): Remove "static".
6229 * server.h (extended_protocol): Declare it.
6230
8a7e4587
YQ
62312015-08-04 Yao Qi <yao.qi@linaro.org>
6232
6233 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6234 both aarch64 and aarch32.
6235 (aarch64_set_pc): Likewise.
6236
3b53ae99
YQ
62372015-08-04 Yao Qi <yao.qi@linaro.org>
6238
6239 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6240 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6241 arm-with-neon.xml to srv_xmlfiles.
6242 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6243 (is_64bit_tdesc): New function.
6244 (aarch64_linux_read_description): New function.
6245 (aarch64_arch_setup): Call aarch64_linux_read_description.
6246 (regs_info): Rename to regs_info_aarch64.
6247 (aarch64_regs_info): Return right regs_info.
6248 (initialize_low_arch): Call initialize_low_arch_aarch32.
6249
bd9e6534
YQ
62502015-08-04 Yao Qi <yao.qi@linaro.org>
6251
6252 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6253 * linux-aarch32-low.c: New file.
6254 * linux-aarch32-low.h: New file.
6255 * linux-arm-low.c (arm_fill_gregset): Move it to
6256 linux-aarch32-low.c.
6257 (arm_store_gregset): Likewise.
6258 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6259 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6260 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6261 (regs_info): Rename to regs_info_arm.
6262 (arm_regs_info): Return regs_info_aarch32 if
6263 have_ptrace_getregset is 1 and target description is
6264 arm_with_neon or arm_with_vfpv3.
6265 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6266 Call initialize_low_arch_aarch32 instead.
6267
ded48a5e
YQ
62682015-08-04 Yao Qi <yao.qi@linaro.org>
6269
6270 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6271 * linux-low.c: ... here.
6272 * linux-low.h (have_ptrace_getregset): Declare it.
6273
96e9210f
PA
62742015-08-04 Pedro Alves <palves@redhat.com>
6275
6276 * thread-db.c (struct thread_db): Use new typedefs.
6277 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6278 CHK calls.
6279 (disable_thread_event_reporting): Cast result of dlsym to
6280 destination function pointer type.
6281 (thread_db_mourn): Use td_ta_delete_ftype.
6282
af60a1ef
SL
62832015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6284
6285 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6286 arch variant.
6287 (CDX_BREAKPOINT): Define for R2.
6288 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6289 (the_low_target): Add comments.
6290
e8b41681
YQ
62912015-07-30 Yao Qi <yao.qi@linaro.org>
6292
6293 * linux-arm-low.c (arm_hwcap): Remove it.
6294 (arm_read_description): New local variable arm_hwcap. Don't
6295 set arm_hwcap to zero.
6296
89abb039
YQ
62972015-07-30 Yao Qi <yao.qi@linaro.org>
6298
6299 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6300 Use regcache->tdesc instead.
6301 (arm_store_wmmxregset): Likewise.
6302 (arm_fill_vfpregset): Likewise.
6303 (arm_store_vfpregset): Likewise.
6304
deca266c
YQ
63052015-07-30 Yao Qi <yao.qi@linaro.org>
6306
6307 * linux-arm-low.c: Include arch/arm.h.
6308 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6309 (arm_store_gregset): Likewise.
6310
aa58a496
SM
63112015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6312
6313 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6314 ptrace's 4th parameter.
6315
50904b25
YQ
63162015-07-27 Yao Qi <yao.qi@linaro.org>
6317
6318 * configure.srv (case aarch64*-*-linux*): Don't set
6319 srv_linux_usrregs.
6320
5826e159
PA
63212015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6322
6323 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6324 sys/ptrace.h.
6325 * linux-arm-low.c: Likewise.
6326 * linux-cris-low.c: Likewise.
6327 * linux-crisv32-low.c: Likewise.
6328 * linux-low.c: Likewise.
6329 * linux-m68k-low.c: Likewise.
6330 * linux-mips-low.c: Likewise.
6331 * linux-nios2-low.c: Likewise.
6332 * linux-s390-low.c: Likewise.
6333 * linux-sparc-low.c: Likewise.
6334 * linux-tic6x-low.c: Likewise.
6335 * linux-tile-low.c: Likewise.
6336 * linux-x86-low.c: Likewise.
6337
54019719
PA
63382015-07-24 Pedro Alves <palves@redhat.com>
6339
6340 * config.in: Regenerate.
6341 * configure: Regenerate.
6342
eb7aa561
PA
63432015-07-24 Pedro Alves <palves@redhat.com>
6344
6345 * acinclude.m4: Include ../ptrace.m4.
6346 * configure.ac: Call GDB_AC_PTRACE.
6347 * config.in, configure: Regenerate.
6348
55d7b841
YQ
63492015-07-24 Yao Qi <yao.qi@linaro.org>
6350
6351 * linux-low.c (linux_create_inferior): Remove setting to
6352 proc->priv->new_inferior.
6353 (linux_attach): Likewise.
6354 (linux_low_filter_event): Likewise.
6355 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6356
c06cbd92
YQ
63572015-07-24 Yao Qi <yao.qi@linaro.org>
6358
6359 * linux-low.c (linux_arch_setup): New function.
6360 (linux_low_filter_event): If proc->tdesc is NULL and
6361 proc->attached is true, call the_low_target.arch_setup.
6362 Otherwise, keep status pending, and return.
6363 (linux_resume_one_lwp_throw): Don't call get_pc if
6364 thread->while_stepping isn't NULL. Don't call
6365 get_thread_regcache if proc->tdesc is NULL.
6366 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6367 (linux_target_ops): Install arch_setup.
6368 * server.c (start_inferior): Call the_target->arch_setup.
6369 * target.h (struct target_ops) <arch_setup>: New field.
6370 (target_arch_setup): New marco.
6371 * lynx-low.c (lynx_target_ops): Update.
6372 * nto-low.c (nto_target_ops): Update.
6373 * spu-low.c (spu_target_ops): Update.
6374 * win32-low.c (win32_target_ops): Update.
6375
5ae3ebba
YQ
63762015-07-24 Yao Qi <yao.qi@linaro.org>
6377
6378 * linux-low.c (linux_add_process): Don't set
6379 proc->priv->new_inferior.
6380 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6381 (linux_attach): Likewise.
6382
eb97750b
YQ
63832015-07-24 Yao Qi <yao.qi@linaro.org>
6384
6385 * server.c (start_inferior): Code refactor.
6386
51aee833
YQ
63872015-07-24 Yao Qi <yao.qi@linaro.org>
6388
6389 * server.c (process_serial_event): Set general_thread.
6390
af1b22f3
YQ
63912015-07-21 Yao Qi <yao.qi@linaro.org>
6392
6393 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6394 aarch64_linux_get_debug_reg_capacity.
6395
554717a3
YQ
63962015-07-17 Yao Qi <yao.qi@linaro.org>
6397
6398 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6399 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6400 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6401 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6402 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6403 (AARCH64_HWP_ALIGNMENT): Likewise.
6404 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6405 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6406 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6407 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6408 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6409 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6410 (struct aarch64_debug_reg_state): Likewise.
6411 (struct arch_lwp_info): Likewise.
6412 (aarch64_align_watchpoint): Likewise.
6413 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6414 (aarch64_watchpoint_length): Likewise.
6415 (aarch64_point_encode_ctrl_reg): Likewise
6416 (aarch64_point_is_aligned): Likewise.
6417 (aarch64_align_watchpoint): Likewise.
6418 (aarch64_linux_set_debug_regs):
6419 (aarch64_dr_state_insert_one_point): Likewise.
6420 (aarch64_dr_state_remove_one_point): Likewise.
6421 (aarch64_handle_breakpoint): Likewise.
6422 (aarch64_handle_aligned_watchpoint): Likewise.
6423 (aarch64_handle_unaligned_watchpoint): Likewise.
6424 (aarch64_handle_watchpoint): Likewise.
6425
c67ca4de
YQ
64262015-07-17 Yao Qi <yao.qi@linaro.org>
6427
6428 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6429 and don't aarch64_get_debug_reg_state. All callers update.
6430 (aarch64_handle_aligned_watchpoint): Likewise.
6431 (aarch64_handle_unaligned_watchpoint): Likewise.
6432 (aarch64_handle_watchpoint): Likewise.
6433 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6434 (aarch64_remove_point): Likewise.
6435
25abf979
YQ
64362015-07-17 Yao Qi <yao.qi@linaro.org>
6437
6438 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6439 debug_printf.
6440 (aarch64_handle_unaligned_watchpoint): Likewise.
6441
db1ff28b
JK
64422015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6443
6444 Revert the previous 3 commits:
6445 Move gdb_regex* to common/
6446 Move linux_find_memory_regions_full & co.
6447 gdbserver build-id attribute generator
6448
700ca40f
JK
64492015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6450 Jan Kratochvil <jan.kratochvil@redhat.com>
6451
6452 gdbserver build-id attribute generator.
6453 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6454 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6455 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6456 (find_phdr): New.
6457 (get_dynamic): Use find_pdhr to traverse program headers.
6458 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6459 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6460 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6461 (get_hex_build_id): New.
6462 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6463 to reply XML document.
6464
9904185c
JK
64652015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6466 Jan Kratochvil <jan.kratochvil@redhat.com>
6467
6468 * target.c: Include target/target-utils.h and fcntl.h.
6469 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6470 (target_fileio_read_stralloc): New functions.
6471
6e5b4429
JK
64722015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6473
6474 * Makefile.in (OBS): Add gdb_regex.o.
6475 (gdb_regex.o): New.
6476 * config.in: Rebuilt.
6477 * configure: Rebuilt.
6478
ddc98fbf
JK
64792015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6480 Jan Kratochvil <jan.kratochvil@redhat.com>
6481
6482 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6483 * Makefile.in (OBS): Add target-utils.o.
6484 (linux-maps.o, target-utils.o): New.
6485 * configure.srv (srv_linux_obj): Add linux-maps.o.
6486
e57bb7a0
PL
64872015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6488
6489 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6490 function, return 1.
6491 (the_low_target): Install it.
6492
586b02a9
PA
64932015-07-14 Pedro Alves <palves@redhat.com>
6494
6495 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6496 Instead, ignore ECHILD, and throw an error for other errnos.
6497
58c1b36c
PA
64982015-07-10 Pedro Alves <palves@redhat.com>
6499
6500 * event-loop.c (struct callback_event) <data>: Change type to
6501 gdb_client_data instance instead of gdb_client_data pointer.
6502 (append_callback_event): Adjust.
6503
421530db
PL
65042015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6505
6506 * linux-aarch64-low.c: Add comments for each linux_target_ops
6507 method. Remove comments already covered in target_ops and
6508 linux_target_ops definitions.
6509 (the_low_target): Add comments for each unimplemented method.
6510
c2d65f38
YQ
65112015-07-09 Yao Qi <yao.qi@linaro.org>
6512
6513 * linux-aarch64-low.c (aarch64_regmap): Remove.
6514 (aarch64_usrregs_info): Remove.
6515 (regs_info): Set field usrregs to NULL.
6516
b20a6524
MM
65172015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6518
6519 * linux-low.c: Include "rsp-low.h"
6520 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6521 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6522 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6523 (handle_btrace_enable_pt): New.
6524 (handle_btrace_general_set): Support "pt".
6525 (handle_btrace_conf_general_set): Support "pt:size".
6526
96c97461
PL
65272015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6528
6529 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6530 Z_PACKET_SW_BP.
6531
37d66942
PL
65322015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6533
6534 * linux-aarch64-low.c: Remove comment about endianness.
6535 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6536 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6537 memcmp.
6538
dc06243f
GB
65392015-06-24 Gary Benson <gbenson@redhat.com>
6540
6541 * linux-i386-ipa.c (stdint.h): Do not include.
6542 * lynx-i386-low.c (stdint.h): Likewise.
6543 * lynx-ppc-low.c (stdint.h): Likewise.
6544 * mem-break.c (stdint.h): Likewise.
6545 * thread-db.c (stdint.h): Likewise.
6546 * tracepoint.c (stdint.h): Likewise.
6547 * win32-low.c (stdint.h): Likewise.
6548
124e13d9
SM
65492015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6550
6551 * server.c (write_qxfer_response): Update call to
6552 remote_escape_output.
6553
909c2cda
JK
65542015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6555 Jan Kratochvil <jan.kratochvil@redhat.com>
6556
6557 Merge multiple hex conversions.
6558 * gdbreplay.c (tohex): Rename to 'fromhex'.
6559 (logchar): Use fromhex.
6560
24c05f46
JK
65612015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6562
6563 * server.c (handle_qxfer_libraries): Set `version' attribute for
6564 <library-list>.
6565
14d2069a
GB
65662015-06-10 Gary Benson <gbenson@redhat.com>
6567
6568 * target.h (struct target_ops) <multifs_open>: New field.
6569 <multifs_unlink>: Likewise.
6570 <multifs_readlink>: Likewise.
6571 * linux-low.c (nat/linux-namespaces.h): New include.
6572 (linux_target_ops): Initialize the_target->multifs_open,
6573 the_target->multifs_unlink and the_target->multifs_readlink.
6574 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6575 * hostio.c (hostio_fs_pid): New static variable.
6576 (hostio_handle_new_gdb_connection): New function.
6577 (handle_setfs): Likewise.
6578 (handle_open): Use the_target->multifs_open as appropriate.
6579 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6580 (handle_readlink): Use the_target->multifs_readlink as
6581 appropriate.
6582 (handle_vFile): Handle vFile:setfs packets.
6583 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6584 after target_handle_new_gdb_connection.
6585
4b8b5e72
GB
65862015-06-10 Gary Benson <gbenson@redhat.com>
6587
6588 * configure.ac (AC_CHECK_FUNCS): Add setns.
6589 * config.in: Regenerate.
6590 * configure: Likewise.
6591 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6592 (linux-namespaces.o): New rule.
6593 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6594
3ac2e371
GB
65952015-06-09 Gary Benson <gbenson@redhat.com>
6596
6597 * hostio.c (handle_open): Process mode argument with
6598 fileio_to_host_mode.
6599
ca9b78ce
YQ
66002015-06-01 Yao Qi <yao.qi@linaro.org>
6601
6602 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6603 * linux-x86-low.c: Likewise.
6604
bfacd19d
DB
66052015-05-28 Don Breazeal <donb@codesourcery.com>
6606
6607 * linux-low.c (handle_extended_wait): Initialize
6608 thread_info.last_resume_kind for new fork children.
6609
452003ef
PA
66102015-05-15 Pedro Alves <palves@redhat.com>
6611
6612 * target.h (target_handle_new_gdb_connection): Rewrite using if
6613 wrapped in do/while.
6614
1041a03c
JB
66152015-05-14 Joel Brobecker <brobecker@adacore.com>
6616
6617 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6618 * configure, config.in: Regenerate.
6619 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6620 Declare typedef.
6621
c269dbdb
DB
66222015-05-12 Don Breazeal <donb@codesourcery.com>
6623
6624 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6625 PTRACE_EVENT_VFORK_DONE.
6626 (linux_low_ptrace_options, extended_event_reported): Add vfork
6627 events.
6628 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6629 and "vforkdone" for RSP 'T' Stop Reply Packet.
6630 * server.h (report_vfork_events): Declare
6631 global variable.
6632
3a8a0396
DB
66332015-05-12 Don Breazeal <donb@codesourcery.com>
6634
6635 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6636 (the_low_target) <new_fork>: Initialize new member.
6637 * linux-arm-low.c (arm_new_fork): New function.
6638 (the_low_target) <new_fork>: Initialize new member.
6639 * linux-low.c (handle_extended_wait): Call new target function
6640 new_fork.
6641 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6642 * linux-mips-low.c (mips_add_watchpoint): New function
6643 extracted from mips_insert_point.
6644 (the_low_target) <new_fork>: Initialize new member.
6645 (mips_linux_new_fork): New function.
6646 (mips_insert_point): Call mips_add_watchpoint.
6647 * linux-x86-low.c (x86_linux_new_fork): New function.
6648 (the_low_target) <new_fork>: Initialize new member.
6649
de0d863e
DB
66502015-05-12 Don Breazeal <donb@codesourcery.com>
6651
6652 * linux-low.c (handle_extended_wait): Implement return value,
6653 rename argument 'event_child' to 'event_lwp', handle
6654 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6655 (linux_low_ptrace_options): New function.
6656 (linux_low_filter_event): Call linux_low_ptrace_options,
6657 use different argument fo linux_enable_event_reporting,
6658 use return value from handle_extended_wait.
6659 (extended_event_reported): New function.
6660 (linux_wait_1): Call extended_event_reported and set
6661 status to report fork events.
6662 (linux_write_memory): Add pid to debug message.
6663 (reset_lwp_ptrace_options_callback): New function.
6664 (linux_handle_new_gdb_connection): New function.
6665 (linux_target_ops): Initialize new structure member.
6666 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6667 * lynx-low.c: Initialize new structure member.
6668 * remote-utils.c (prepare_resume_reply): Implement stop reason
6669 "fork" for "T" stop message.
6670 * server.c (handle_query): Call handle_new_gdb_connection.
6671 * server.h (report_fork_events): Declare global flag.
6672 * target.h (struct target_ops) <handle_new_gdb_connection>:
6673 New member.
6674 (target_handle_new_gdb_connection): New macro.
6675 * win32-low.c: Initialize new structure member.
6676
ddcbc397
DB
66772015-05-12 Don Breazeal <donb@codesourcery.com>
6678
6679 * mem-break.c (APPEND_TO_LIST): Define macro.
6680 (clone_agent_expr): New function.
6681 (clone_one_breakpoint): New function.
6682 (clone_all_breakpoints): New function.
6683 * mem-break.h: Declare new functions.
6684
89245bc0
DB
66852015-05-12 Don Breazeal <donb@codesourcery.com>
6686
6687 * linux-low.c (linux_supports_fork_events): New function.
6688 (linux_supports_vfork_events): New function.
6689 (linux_target_ops): Initialize new structure members.
6690 (initialize_low): Call linux_check_ptrace_features.
6691 * lynx-low.c (lynx_target_ops): Initialize new structure
6692 members.
6693 * server.c (report_fork_events, report_vfork_events):
6694 New global flags.
6695 (handle_query): Add new features to qSupported packet and
6696 response.
6697 (captured_main): Initialize new global variables.
6698 * target.h (struct target_ops) <supports_fork_events>:
6699 New member.
6700 <supports_vfork_events>: New member.
6701 (target_supports_fork_events): New macro.
6702 (target_supports_vfork_events): New macro.
6703 * win32-low.c (win32_target_ops): Initialize new structure
6704 members.
6705
835205d0
GB
67062015-05-12 Gary Benson <gbenson@redhat.com>
6707
6708 * server.c (handle_qxfer_exec_file): Use current process
6709 if annex is empty.
6710
21e94bd9
SL
67112015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6712
6713 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6714 Remove HAVE_PTRACE_GETREGS conditionals.
6715 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6716 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6717
45614f15
YQ
67182015-05-08 Yao Qi <yao.qi@linaro.org>
6719
6720 * linux-low.c (linux_supports_conditional_breakpoints): New
6721 function.
6722 (linux_target_ops): Install new target method.
6723 * lynx-low.c (lynx_target_ops): Install NULL hook for
6724 supports_conditional_breakpoints.
6725 * nto-low.c (nto_target_ops): Likewise.
6726 * spu-low.c (spu_target_ops): Likewise.
6727 * win32-low.c (win32_target_ops): Likewise.
6728 * server.c (handle_query): Check
6729 target_supports_conditional_breakpoints.
6730 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6731 New field.
6732 (target_supports_conditional_breakpoints): New macro.
6733
80ad801e
PA
67342015-05-06 Pedro Alves <palves@redhat.com>
6735
6736 PR server/18081
6737 * server.c (start_inferior): If the process exits, mourn it.
6738
819843c7
GB
67392015-04-21 Gary Benson <gbenson@redhat.com>
6740
6741 * hostio.c (fileio_open_flags_to_host): Factored out to
6742 fileio_to_host_openflags in common/fileio.c. Single use
6743 updated.
6744
a2d5a9d7
MF
67452015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6746
6747 * linux-xtensa-low.c (xtensa_fill_gregset)
6748 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6749 XCHAL_HAVE_LOOP.
6750
deb44829
MF
67512015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6752
6753 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6754 (regs_info): Replace usrregs pointer with NULL.
6755
e57f1de3
GB
67562015-04-17 Gary Benson <gbenson@redhat.com>
6757
6758 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6759 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6760 * server.c (handle_qxfer_exec_file): New function.
6761 (qxfer_packets): Add exec-file entry.
6762 (handle_query): Report qXfer:exec-file:read as supported packet.
6763
62828379
RN
67642015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6765
6766 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6767
b88bb450
GB
67682015-04-09 Gary Benson <gbenson@redhat.com>
6769
6770 * hostio-errno.c (errno_to_fileio_error): Remove function.
6771 Update caller to use remote_fileio_to_fio_error.
6772
c8f4bfdd
YQ
67732015-04-09 Yao Qi <yao.qi@linaro.org>
6774
6775 * linux-low.c (linux_insert_point): Call
6776 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6777 (linux_remove_point): Call remove_memory_breakpoint if type is
6778 raw_bkpt_type_sw.
6779 * linux-x86-low.c (x86_insert_point): Don't call
6780 insert_memory_breakpoint.
6781 (x86_remove_point): Don't call remove_memory_breakpoint.
6782
41f98f02
PA
67832015-04-01 Pedro Alves <palves@redhat.com>
6784 Cleber Rosa <crosa@redhat.com>
6785
6786 * server.c (gdbserver_usage): Reorganize and extend the usage
6787 message.
6788
2bf6fb9d
PA
67892015-03-24 Pedro Alves <palves@redhat.com>
6790
6791 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6792 output. Also dump TRAP_TRACE.
6793 (linux_low_filter_event): In debug output, distinguish a
6794 resume_stop SIGSTOP from a delayed SIGSTOP.
6795
369f6daa
GB
67962015-03-24 Gary Benson <gbenson@redhat.com>
6797
6798 * linux-x86-low.c (x86_linux_new_thread): Moved to
6799 nat/x86-linux.c.
6800 (x86_linux_prepare_to_resume): Likewise.
6801
8e5d4070
GB
68022015-03-24 Gary Benson <gbenson@redhat.com>
6803
6804 * Makefile.in (x86-linux-dregs.o): New rule.
6805 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6806 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6807 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6808 (x86_linux_dr_get): Likewise.
6809 (x86_linux_dr_set): Likewise.
6810 (update_debug_registers_callback): Likewise.
6811 (x86_linux_dr_set_addr): Likewise.
6812 (x86_linux_dr_get_addr): Likewise.
6813 (x86_linux_dr_set_control): Likewise.
6814 (x86_linux_dr_get_control): Likewise.
6815 (x86_linux_dr_get_status): Likewise.
6816 (x86_linux_update_debug_registers): Likewise.
6817
2b95d440
GB
68182015-03-24 Gary Benson <gbenson@redhat.com>
6819
6820 * linux-x86-low.c (x86_linux_update_debug_registers):
6821 New function, factored out from...
6822 (x86_linux_prepare_to_resume): ...this.
6823
14b0bc68
GB
68242015-03-24 Gary Benson <gbenson@redhat.com>
6825
6826 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6827 (x86_linux_dr_set): Likewise.
6828 (update_debug_registers_callback): Likewise.
6829 (x86_linux_dr_set_addr): Likewise.
6830 (x86_linux_dr_get_addr): Likewise.
6831 (x86_linux_dr_set_control): Likewise.
6832 (x86_linux_dr_get_control): Likewise.
6833 (x86_linux_dr_get_status): Likewise.
6834 (x86_linux_prepare_to_resume): Likewise.
6835
5dfe6ca8
GB
68362015-03-24 Gary Benson <gbenson@redhat.com>
6837
6838 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6839 Use perror_with_name. Pass string through gettext.
6840 (x86_linux_dr_set): Likewise.
6841
d33472ad
GB
68422015-03-24 Gary Benson <gbenson@redhat.com>
6843
6844 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6845 (x86_linux_dr_set_addr): ...this.
6846 (x86_dr_low_get_addr): Rename to...
6847 (x86_linux_dr_get_addr): ...this.
6848 (x86_dr_low_set_control): Rename to...
6849 (x86_linux_dr_set_control): ...this.
6850 (x86_dr_low_get_control): Rename to...
6851 (x86_linux_dr_get_control): ...this.
6852 (x86_dr_low_get_status): Rename to...
6853 (x86_linux_dr_get_status): ...this.
6854 (x86_dr_low): Update with new function names.
6855
4b134ca1
GB
68562015-03-24 Gary Benson <gbenson@redhat.com>
6857
6858 * Makefile.in (x86-linux.o): New rule.
6859 * configure.srv: Add x86-linux.o to relevant targets.
6860 * linux-low.c (lwp_set_arch_private_info): New function.
6861 (lwp_arch_private_info): Likewise.
6862 * linux-x86-low.c: Include nat/x86-linux.h.
6863 (arch_lwp_info): Removed structure.
6864 (update_debug_registers_callback):
6865 Use lwp_set_debug_registers_changed.
6866 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6867 and lwp_set_debug_registers_changed.
6868 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6869
34c703da
GB
68702015-03-24 Gary Benson <gbenson@redhat.com>
6871
6872 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6873 * linux-arm-low.c (arm_new_thread): Likewise.
6874 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6875 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6876 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6877 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6878
cff068da
GB
68792015-03-24 Gary Benson <gbenson@redhat.com>
6880
6881 * linux-low.c (ptid_of_lwp): New function.
6882 (lwp_is_stopped): Likewise.
6883 (lwp_stop_reason): Likewise.
6884 * linux-x86-low.c (update_debug_registers_callback):
6885 Use lwp_is_stopped.
6886 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6887 lwp_stop_reason.
6888
b2f7c7e8
GB
68892015-03-24 Gary Benson <gbenson@redhat.com>
6890
6891 * linux-low.h (linux_stop_lwp): Remove declaration.
6892
6d4ee8c6
GB
68932015-03-24 Gary Benson <gbenson@redhat.com>
6894
6895 * linux-low.h: Include nat/linux-nat.h.
6896 * linux-low.c (iterate_over_lwps_args): New structure.
6897 (iterate_over_lwps_filter): New function.
6898 (iterate_over_lwps): Likewise.
6899 * linux-x86-low.c (update_debug_registers_callback):
6900 Update signature to what iterate_over_lwps expects.
6901 Remove PID check that iterate_over_lwps now performs.
6902 (x86_dr_low_set_addr): Use iterate_over_lwps.
6903 (x86_dr_low_set_control): Likewise.
6904
70a0bb6b
GB
69052015-03-24 Gary Benson <gbenson@redhat.com>
6906
6907 * linux-x86-low.c (x86_debug_reg_state): New function.
6908 (x86_linux_prepare_to_resume): Use the above.
6909
7b669087
GB
69102015-03-24 Gary Benson <gbenson@redhat.com>
6911
6912 * linux-low.c (current_lwp_ptid): New function.
6913 * linux-x86-low.c: Include nat/linux-nat.h.
6914 (x86_dr_low_get_addr): Use current_lwp_ptid.
6915 (x86_dr_low_get_control): Likewise.
6916 (x86_dr_low_get_status): Likewise.
6917
eef49a3d
PA
69182015-03-20 Pedro Alves <palves@redhat.com>
6919
6920 * tracepoint.c (cmd_qtstatus): Make "str" const.
6921
b2333d22
PA
69222015-03-20 Pedro Alves <palves@redhat.com>
6923
6924 * server.c (handle_general_set): Make "req_str" const.
6925
23f238d3
PA
69262015-03-19 Pedro Alves <palves@redhat.com>
6927
6928 * linux-low.c (linux_resume_one_lwp): Rename to ...
6929 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6930 instead call perror_with_name.
6931 (check_ptrace_stopped_lwp_gone): New function.
6932 (linux_resume_one_lwp): Reimplement as wrapper around
6933 linux_resume_one_lwp_throw that swallows errors if the LWP is
6934 gone.
6935
91baf43f
PA
69362015-03-19 Pedro Alves <palves@redhat.com>
6937
6938 * linux-low.c (count_events_callback, select_event_lwp_callback):
6939 No longer check whether the thread has resume_stop as last resume
6940 kind.
6941
8bf3b159
PA
69422015-03-19 Pedro Alves <palves@redhat.com>
6943
6944 * linux-low.c (count_events_callback, select_event_lwp_callback):
6945 Use the lwp's status_pending_p field, not the thread's.
6946
b90fc188
PA
69472015-03-19 Pedro Alves <palves@redhat.com>
6948
6949 * linux-low.c (select_event_lwp_callback): Update comments to
6950 no longer mention SIGTRAP.
6951
464b0089
GB
69522015-03-18 Gary Benson <gbenson@redhat.com>
6953
6954 * server.c (handle_query): Do not report vFile:fstat as supported.
6955
aa9e327f
GB
69562015-03-11 Gary Benson <gbenson@redhat.com>
6957
6958 * hostio.c (sys/types.h): New include.
6959 (sys/stat.h): Likewise.
6960 (common-remote-fileio.h): Likewise.
6961 (handle_fstat): New function.
6962 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6963
791c0056
GB
69642015-03-11 Gary Benson <gbenson@redhat.com>
6965
6966 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6967 struct stat.st_blocks and struct stat.st_blksize.
6968 * configure: Regenerate.
6969 * config.in: Likewise.
6970 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6971 (OBS): Add common-remote-fileio.o.
6972 (common-remote-fileio.o): New rule.
6973
9a9df970
PA
69742015-03-09 Pedro Alves <palves@redhat.com>
6975
6976 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6977 'struct sockaddr' pointer in 'accept' call.
6978
9eb1356e
PA
69792015-03-09 Pedro Alves <palves@redhat.com>
6980
6981 Revert:
6982 2015-03-07 Pedro Alves <palves@redhat.com>
6983 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6984 or <winsock2.h> here. Instead include "gdb_socket.h".
6985 (remote_open): Use union gdb_sockaddr_u.
6986 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6987 or <winsock2.h> here. Instead include "gdb_socket.h".
6988 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6989 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6990 or <sys/un.h>.
6991 (init_named_socket, gdb_agent_helper_thread): Use union
6992 gdb_sockaddr_u.
6993
aac331e4
PA
69942015-03-07 Pedro Alves <palves@redhat.com>
6995
6996 * configure.ac (build_warnings): Move
6997 -Wdeclaration-after-statement to the C-specific set.
6998 * configure: Regenerate.
6999
366c75fc
PA
70002015-03-07 Pedro Alves <palves@redhat.com>
7001
7002 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7003 or <winsock2.h> here. Instead include "gdb_socket.h".
7004 (remote_open): Use union gdb_sockaddr_u.
7005 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7006 or <winsock2.h> here. Instead include "gdb_socket.h".
7007 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7008 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7009 or <sys/un.h>.
7010 (init_named_socket, gdb_agent_helper_thread): Use union
7011 gdb_sockaddr_u.
7012
492d29ea
PA
70132015-03-07 Pedro Alves <palves@redhat.com>
7014
7015 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7016 instead.
7017
60a191ed
YQ
70182015-03-06 Yao Qi <yao.qi@linaro.org>
7019
7020 * linux-aarch64-low.c (aarch64_insert_point): Use
7021 show_debug_regs as a boolean.
7022 (aarch64_remove_point): Likewise.
7023
f5771b1d
PA
70242015-03-05 Pedro Alves <palves@redhat.com>
7025
7026 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7027 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7028 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7029 * nto-low.c (nto_target_ops): Likewise.
7030 * spu-low.c (spu_target_ops): Likewise.
7031 * win32-low.c (win32_target_ops): Likewise.
7032
3e572f71
PA
70332015-03-04 Pedro Alves <palves@redhat.com>
7034
72f4393d 7035 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7036 Decide whether a breakpoint triggered based on the SIGTRAP's
7037 siginfo.si_code.
72f4393d
L
7038 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7039 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7040 (linux_low_filter_event): Check for breakpoints before checking
7041 watchpoints.
7042 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7043 siginfo.si_code.
72f4393d
L
7044 (linux_stopped_by_sw_breakpoint)
7045 (linux_supports_stopped_by_sw_breakpoint)
7046 (linux_stopped_by_hw_breakpoint)
7047 (linux_supports_stopped_by_hw_breakpoint): New functions.
7048 (linux_target_ops): Install new target methods.
3e572f71 7049
1ec68e26
PA
70502015-03-04 Pedro Alves <palves@redhat.com>
7051
7052 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7053 * server.c (swbreak_feature, hwbreak_feature): New globals.
7054 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7055 (captured_main): Clear swbreak_feature and hwbreak_feature.
7056 * server.h (swbreak_feature, hwbreak_feature): Declare.
7057 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7058 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7059 supports_stopped_by_hw_breakpoint>: New fields.
7060 (target_supports_stopped_by_sw_breakpoint)
7061 (target_stopped_by_sw_breakpoint)
7062 (target_supports_stopped_by_hw_breakpoint)
7063 (target_stopped_by_hw_breakpoint): Declare.
7064
15c66dd6
PA
70652015-03-04 Pedro Alves <palves@redhat.com>
7066
7067 enum lwp_stop_reason -> enum target_stop_reason
7068 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7069 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7070 (linux_wait_1, stuck_in_jump_pad_callback)
7071 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7072 (linux_stopped_by_watchpoint):
7073 * linux-low.h (enum lwp_stop_reason): Delete.
7074 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7075 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7076
98fc70d6
YQ
70772015-03-04 Yao Qi <yao.qi@linaro.org>
7078
7079 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7080
dd2ac174
GB
70812015-03-03 Gary Benson <gbenson@redhat.com>
7082
7083 * hostio.c (handle_vFile): Fix prefix lengths.
7084
d68e53f4
MM
70852015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7086
7087 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7088 ptr_bits.
7089
bf2d68ab
AA
70902015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7091
7092 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7093 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7094 (clean): Add "rm -f" for above C files.
7095 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7096 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7097 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7098 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7099 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7100 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7101 (init_registers_s390x_vx_linux64)
7102 (init_registers_s390x_tevx_linux64)
7103 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7104 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7105 declarations.
7106 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7107 (s390_store_vxrs_high): New functions.
7108 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7109 NT_S390_VXRS_HIGH.
7110 (s390_arch_setup): Add logic for selecting one of the new target
7111 descriptions. Activate the new vector regsets if applicable.
7112 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7113 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7114 and init_registers_s390x_tevx_linux64.
7115
c966a859
PA
71162015-03-01 Pedro Alves <palves@redhat.com>
7117
7118 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7119 parameter.
7120
4180215b
PA
71212015-02-27 Pedro Alves <palves@redhat.com>
7122
7123 * linux-x86-low.c (u_debugreg_offset): New function.
7124 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7125
749bab01
PA
71262015-02-27 Pedro Alves <palves@redhat.com>
7127
7128 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7129 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7130 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7131 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7132 (ps_lsetfpregs, ps_getpid)
7133 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7134 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7135 (ps_lsetxregs, ps_plog): Declare.
7136
3c14e5a3
PA
71372015-02-27 Pedro Alves <palves@redhat.com>
7138
7139 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7140 IP_AGENT_EXPORT_FUNC.
7141 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7142 IP_AGENT_EXPORT_FUNC.
7143 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7144 (IP_AGENT_EXPORT): Delete.
7145 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7146 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7147 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7148 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7149 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7150 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7151 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7152 (traceframe_read_count, traceframe_write_count)
7153 (traceframes_created, trace_state_variables, get_raw_reg)
7154 (get_trace_state_variable_value, set_trace_state_variable_value)
7155 (ust_loaded, helper_thread_id, cmd_buf): Use
7156 IPA_SYM_EXPORTED_NAME.
7157 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7158 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7159 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7160 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7161 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7162 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7163 EXTERN_C_PUSH/EXTERN_C_POP.
7164 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7165 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7166 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7167 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7168 (traceframe_write_count, traceframe_read_count)
7169 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7170 (about_to_request_buffer_space, get_trace_state_variable_value)
7171 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7172 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7173 EXTERN_C_PUSH/EXTERN_C_POP.
7174 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7175 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7176 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7177 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7178 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7179 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7180 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7181 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7182 Define.
7183 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7184 (IP_AGENT_EXPORT_VAR_DECL): Define.
7185 (tracing): Declare.
7186 (gdb_agent_get_raw_reg): Declare.
7187
fe978cb0
PA
71882015-02-27 Tom Tromey <tromey@redhat.com>
7189 Pedro Alves <palves@redhat.com>
7190
7191 Rename symbols whose names are reserved C++ keywords throughout.
7192
3bc3d82a
PA
71932015-02-27 Pedro Alves <palves@redhat.com>
7194
7195 * Makefile.in (COMPILER): New, get it from autoconf.
7196 (CXX): Get from autoconf instead.
7197 (COMPILE.pre): Use COMPILER.
7198 (CC-LD): Rename to ...
7199 (CC_LD): ... this. Use COMPILER.
7200 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7201 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7202 * acinclude.m4: Include build-with-cxx.m4.
7203 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7204 Disable -Werror by default if building in C++ mode.
7205 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7206 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7207 the C++ compiler. Save/restore CXXFLAGS too.
7208 * configure: Regenerate.
7209
07697489
PA
72102015-02-27 Pedro Alves <palves@redhat.com>
7211
7212 * acinclude.m4: Include libiberty.m4.
7213 * configure.ac: Call libiberty_INIT.
7214 * config.in, configure: Regenerate.
7215
9beb7c4e
PA
72162015-02-26 Pedro Alves <palves@redhat.com>
7217
7218 * linux-low.c (linux_wait_1): When incrementing the PC past a
7219 program breakpoint always use the_low_target.breakpoint_len as
7220 increment, rather than the maximum between that and
7221 the_low_target.decr_pc_after_break.
7222
8090aef2
PA
72232015-02-23 Pedro Alves <palves@redhat.com>
7224
7225 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7226 thread was doing a step-over; always adjust the PC if
7227 we stepped over a permanent breakpoint.
7228 (linux_wait_1): If we stepped over breakpoint that was on top of a
7229 permanent breakpoint, manually advance the PC past it.
7230
bc9540e8
PA
72312015-02-23 Pedro Alves <palves@redhat.com>
7232
7233 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7234 modes.
7235 (x86_fill_gregset, x86_store_gregset): Use it when handling
7236 $orig_eax.
7237
2db9a427
PA
72382015-02-20 Pedro Alves <palves@redhat.com>
7239
7240 * thread-db.c: Include "nat/linux-procfs.h".
7241 (thread_db_init): Skip listing new threads if the kernel supports
7242 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7243
afa8d396
PA
72442015-02-20 Pedro Alves <palves@redhat.com>
7245
7246 * linux-low.c (status_pending_p_callback): Use ptid_match.
7247
c9587f88
AT
72482015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7249
7250 PR breakpoints/16812
7251 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7252 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7253 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7254
b05ec7a5
AT
72552015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7256
7257 PR breakpoints/15956
7258 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7259
d33501a5
MM
72602015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7261
7262 * linux-low.c (linux_low_btrace_conf): Print size.
7263 * server.c (handle_btrace_conf_general_set): New.
7264 (hanle_general_set): Call handle_btrace_conf_general_set.
7265 (handle_query): Report Qbtrace-conf:bts:size as supported.
7266
f4abbc16
MM
72672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7268
7269 * linux-low.c (linux_low_enable_btrace): Update parameters.
7270 (linux_low_btrace_conf): New.
7271 (linux_target_ops)<to_btrace_conf>: Initialize.
7272 * server.c (current_btrace_conf): New.
7273 (handle_btrace_enable): Rename to ...
7274 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7275 to target_enable_btrace. Update comment. Update users.
7276 (handle_qxfer_btrace_conf): New.
7277 (qxfer_packets): Add btrace-conf entry.
7278 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7279 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7280 (target_ops)<read_btrace_conf>: New.
7281 (target_enable_btrace): Update parameters.
7282 (target_read_btrace_conf): New.
7283
043c3577
MM
72842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7285
7286 * server.c (handle_btrace_general_set): Remove call to
7287 target_supports_btrace.
7288 (supported_btrace_packets): New.
7289 (handle_query): Call supported_btrace_packets.
7290 * target.h: include btrace-common.h.
7291 (btrace_target_info): Removed.
7292 (supports_btrace, target_supports_btrace): Update parameters.
7293
734b0e4b
MM
72942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7295
7296 * Makefile.in (SFILES): Add common/btrace-common.c.
7297 (OBS): Add common/btrace-common.o.
7298 (btrace-common.o): Add build rules.
7299 * linux-low: Include btrace-common.h.
7300 (linux_low_read_btrace): Use struct btrace_data. Call
7301 btrace_data_init and btrace_data_fini.
7302
d6c146e9
PA
73032015-02-06 Pedro Alves <palves@redhat.com>
7304
7305 * thread-db.c (find_new_threads_callback): Add debug output.
7306
20ba1ce6
PA
73072015-02-04 Pedro Alves <palves@redhat.com>
7308
7309 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7310 (resume_stopped_resumed_lwps): New function.
7311 (linux_wait_for_event_filtered): Use it.
7312
8cc73a39
SDJ
73132015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7314
7315 * Makefile.in (SFILES): Add linux-personality.c.
7316 (linux-personality.o): New rule.
7317 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7318 list of objects to be built.
7319 * linux-low.c: Include nat/linux-personality.h.
7320 (linux_create_inferior): Remove code to disable address space
7321 randomization (moved to ../nat/linux-personality.c). Create
7322 cleanup to disable address space randomization.
7323
fb23d554
SDJ
73242015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7325
7326 * Makefile.in (posix-strerror.o): New rule.
7327 (mingw-strerror.o): Likewise.
7328 * configure: Regenerated.
7329 * configure.ac: Source file ../common/common.host. Initialize new
7330 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7331
cdf43629
YQ
73322015-01-14 Yao Qi <yao@codesourcery.com>
7333
7334 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7335 (ppc-linux.o): New rule.
7336 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7337 * configure.ac: AC_CHECK_FUNCS(getauxval).
7338 * config.in: Re-generated.
7339 * configure: Re-generated.
7340 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7341 ppc64_64bit_inferior_p
7342
514c5338
YQ
73432015-01-14 Yao Qi <yao@codesourcery.com>
7344
7345 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7346 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7347 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7348 (PT_ORIG_R3, PT_TRAP): Likewise.
7349 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7350 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7351 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7352
3368c1e5
JB
73532015-01-10 Joel Brobecker <brobecker@adacore.com>
7354
7355 * i387-fp.c (i387_cache_to_xsave): In look over
7356 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7357 zmmh_low_space field by use of zmmh_high_space.
7358
582511be
PA
73592015-01-09 Pedro Alves <palves@redhat.com>
7360
7361 * linux-low.c (step_over_bkpt): Move higher up in the file.
7362 (handle_extended_wait): Don't store the stop_pc here.
7363 (get_stop_pc): Adjust comments and rename to ...
7364 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7365 stopped for a software breakpoint or hardware breakpoint.
7366 (thread_still_has_status_pending_p): New function.
7367 (status_pending_p_callback): Use
7368 thread_still_has_status_pending_p. If the event is no longer
7369 interesting, resume the LWP.
7370 (handle_tracepoints): Add assert.
7371 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7372 (wstatus_maybe_breakpoint): New function.
7373 (cancel_breakpoint): Delete function.
7374 (check_stopped_by_watchpoint): New function, factored out from
7375 linux_low_filter_event.
7376 (lp_status_maybe_breakpoint): Delete function.
7377 (linux_low_filter_event): Remove filter_ptid argument.
7378 Leave thread group exits pending here. Store the LWP's stop PC.
7379 Always leave events pending.
7380 (linux_wait_for_event_filtered): Pull all events out of the
7381 kernel, and leave them all pending.
7382 (count_events_callback, select_event_lwp_callback): Consider all
7383 events.
7384 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7385 (select_event_lwp): Only give preference to the stepping LWP in
7386 all-stop mode. Adjust comments.
7387 (ignore_event): New function.
7388 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7389 references to cancel_breakpoints. Adjust to renames. Also give
7390 equal priority to all LWPs that have had events in non-stop mode.
7391 If reporting a software breakpoint event, unadjust the LWP's PC.
7392 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7393 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7394 Adjust.
7395 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7396 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7397 (linux_stopped_by_watchpoint): Adjust.
7398 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7399 * linux-low.h (enum lwp_stop_reason): New.
7400 (struct lwp_info) <stop_pc>: Adjust comment.
7401 <stopped_by_watchpoint>: Delete field.
7402 <stop_reason>: New field.
7403 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7404 * mem-break.c (software_breakpoint_inserted_here)
7405 (hardware_breakpoint_inserted_here): New function.
7406 * mem-break.h (software_breakpoint_inserted_here)
7407 (hardware_breakpoint_inserted_here): Declare.
7408 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7409 (cancel_breakpoints): Delete.
7410 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7411 (upload_fast_traceframes): Remove references to
7412 cancel_breakpoints.
7413
a33e3959
PA
74142015-01-09 Pedro Alves <palves@redhat.com>
7415
7416 * thread-db.c (find_new_threads_callback): Ignore thread if the
7417 kernel thread ID is -1.
7418
8784d563
PA
74192015-01-09 Pedro Alves <palves@redhat.com>
7420
7421 * linux-low.c (linux_attach_fail_reason_string): Move to
7422 nat/linux-ptrace.c, and rename.
7423 (linux_attach_lwp): Update comment.
7424 (attach_proc_task_lwp_callback): New function.
7425 (linux_attach): Adjust to rename and use
7426 linux_proc_attach_tgid_threads.
7427 (linux_attach_fail_reason_string): Delete declaration.
7428
76f2b779
JB
74292015-01-01 Joel Brobecker <brobecker@adacore.com>
7430
7431 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7432 * server.c (gdbserver_version): Likewise.
7433
fafcc06a
SDJ
74342014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7435
7436 * remote-utils.c: Include ctype.h.
7437 (input_interrupt): Explicitly handle the case when the char
7438 received is the NUL byte. Improve the printing of non-ASCII
7439 characters.
7440
beed38b8
JB
74412014-12-16 Joel Brobecker <brobecker@adacore.com>
7442
7443 * linux-low.c (linux_low_filter_event): Update call to
7444 linux_enable_event_reporting following the addition of
7445 a new parameter to that function.
7446
bf330350
CU
74472014-12-16 Catalin Udma <catalin.udma@freescale.com>
7448
7449 PR server/17457
7450 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7451 (AARCH64_FPCR_REGNO): Likewise.
7452 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7453 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7454 (aarch64_store_fpregset): Likewise.
7455
5227d625
JB
74562014-12-15 Joel Brobecker <brobecker@adacore.com>
7457
7458 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7459 Remove FIXME comment about assumption about N.
7460
f93b65a0
JB
74612014-12-13 Joel Brobecker <brobecker@adacore.com>
7462
7463 * configure.ac: If large-file support is disabled in GDBserver,
7464 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7465 * configure: Regenerate.
7466
e5a9158d
AA
74672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7468
7469 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7470 warning upon ENODATA from ptrace.
7471 * linux-s390-low.c (s390_store_tdb): New.
7472 (s390_regsets): Add regset for NT_S390_TDB.
7473
feea5f36
AA
74742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7475
7476 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7477 without a fill_function.
7478 * linux-s390-low.c (s390_fill_last_break): Remove.
7479 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7480 (s390_arch_setup): Use regset's size instead of fill_function for
7481 loop end condition.
7482
098dbe61
AA
74832014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7484
7485 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7486 the regset's store function when ptrace returned an error.
7487 * regcache.c (get_thread_regcache): Invalidate register cache
7488 before fetching inferior's registers.
7489
28eef672
AA
74902014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7491
7492 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7493 while-loop as for-loop.
7494 (regsets_store_inferior_registers): Likewise.
7495
bdca27a2
YQ
74962014-11-28 Yao Qi <yao@codesourcery.com>
7497
7498 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7499 * config.in, configure: Re-generate.
7500 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7501 is defined.
7502
9c232dda
YQ
75032014-11-21 Yao Qi <yao@codesourcery.com>
7504
7505 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7506 (AC_CHECK_HEADERS): Remove malloc.h.
7507 * configure: Re-generated.
7508 * config.in: Re-generated.
7509 * server.h: Don't include alloca.h and malloc.h.
7510 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7511 Don't include malloc.h.
7512
43968415
JB
75132014-11-17 Joel Brobecker <brobecker@adacore.com>
7514
7515 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7516 corresponding ERRNO check in same block.
7517
40e91bc7
PA
75182014-11-12 Pedro Alves <palves@redhat.com>
7519
7520 * server.c (cont_thread): Update comment.
7521 (start_inferior, attach_inferior): No longer clear cont_thread.
7522 (handle_v_cont): No longer set cont_thread.
7523 (captured_main): Clear cont_thread each time a GDB connects.
7524
c2c118cf
PA
75252014-11-12 Pedro Alves <palves@redhat.com>
7526
7527 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7528 thread, and don't resume all threads if the Hc thread has exited.
7529
78708b7c
PA
75302014-11-12 Pedro Alves <palves@redhat.com>
7531
7532 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7533 the process group instead of to a specific LWP.
7534
a2abc7de
PA
75352014-10-15 Pedro Alves <palves@redhat.com>
7536
7537 PR server/17487
7538 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7539 parameter.
7540 (arm_set_thread_context): Delete.
7541 (the_low_target): Adjust.
7542 * win32-i386-low.c (debug_registers_changed)
7543 (debug_registers_used): Delete.
7544 (update_debug_registers_callback): New function.
7545 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7546 needing to update their debug registers.
7547 (win32_get_current_dr): New function.
7548 (x86_dr_low_get_addr, x86_dr_low_get_control)
7549 (x86_dr_low_get_status): Fetch the debug register from the thread
7550 record's context.
7551 (i386_initial_stuff): Adjust.
7552 (i386_get_thread_context): Remove current_event parameter. Don't
7553 clear debug_registers_changed nor copy DR values to
7554 debug_reg_state.
7555 (i386_set_thread_context): Delete.
7556 (i386_prepare_to_resume): New function.
7557 (i386_thread_added): Mark the thread as needing to update irs
7558 debug registers.
7559 (the_low_target): Remove i386_set_thread_context and install
7560 i386_prepare_to_resume.
7561 * win32-low.c (win32_get_thread_context): Adjust.
7562 (win32_set_thread_context): Use SetThreadContext
7563 directly.
7564 (win32_prepare_to_resume): New function.
7565 (win32_require_context): New function, factored out from ...
7566 (thread_rec): ... this.
7567 (continue_one_thread): Call win32_prepare_to_resume on each thread
7568 we're about to continue.
7569 (win32_resume): Call win32_prepare_to_resume on the event thread.
7570 * win32-low.h (struct win32_thread_info)
7571 <debug_registers_changed>: New field.
7572 (struct win32_target_ops): Change prototype of set_thread_context,
7573 delete set_thread_context and add prepare_to_resume.
7574 (win32_require_context): New declaration.
7575
a442d071
GB
75762014-10-08 Gary Benson <gbenson@redhat.com>
7577
7578 * server.h: Do not include common-exceptions.h.
7579
6f1947e8
GB
75802014-10-08 Gary Benson <gbenson@redhat.com>
7581
7582 * server.h: Do not include cleanups.h.
7583
63b434a4
JH
75842014-09-30 James Hogan <james.hogan@imgtec.com>
7585
7586 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7587 mips64-dsp-linux.c.
7588
c4d9ceb6
YQ
75892014-09-23 Yao Qi <yao@codesourcery.com>
7590
7591 * linux-low.c (lp_status_maybe_breakpoint): New function.
7592 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7593 (count_events_callback): Likewise.
7594 (select_event_lwp_callback): Likewise.
7595 (cancel_breakpoints_callback): Likewise.
7596
89a5711c
DB
75972014-09-19 Don Breazeal <donb@codesourcery.com>
7598
7599 * linux-low.c (handle_extended_wait): Call
7600 linux_ptrace_get_extended_event.
7601 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7602 linux_is_extended_waitstatus.
7603
bffc0964
JB
76042014-09-16 Joel Brobecker <brobecker@adacore.com>
7605
7606 * Makefile.in (CPPFLAGS): Define.
7607 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7608 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7609
0bfdf32f
GB
76102014-09-16 Gary Benson <gbenson@redhat.com>
7611
7612 * inferiors.h (current_inferior): Renamed as...
7613 (current_thread): New variable. All uses updated.
7614 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7615 (maybe_move_out_of_jump_pad): Likewise.
7616 (cancel_breakpoint): Likewise.
7617 (linux_low_filter_event): Likewise.
7618 (wait_for_sigstop): Likewise.
7619 (linux_resume_one_lwp): Likewise.
7620 (need_step_over_p): Likewise.
7621 (start_step_over): Likewise.
7622 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7623 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7624 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7625 and save_inferior as saved_thread.
7626 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7627 saved_thread.
7628 (regcache_invalidate_thread): Likewise.
7629 * remote-utils.c (prepare_resume_reply): Likewise.
7630 * thread-db.c (thread_db_get_tls_address): Likewise.
7631 (disable_thread_event_reporting): Likewise.
7632 (remove_thread_event_breakpoints): Likewise.
7633 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7634 as saved_thread.
7635 * target.h (set_desired_inferior): Renamed as...
7636 (set_desired_thread): New declaration. All uses updated.
7637 * server.c (myresume): Updated comment to reference thread instead
7638 of inferior.
7639 (handle_serial_event): Likewise.
7640 (handle_target_event): Likewise.
7641
361c8ade
GB
76422014-09-12 Tom Tromey <tromey@redhat.com>
7643 Gary Benson <gbenson@redhat.com>
7644
7645 * regcache.h: Include common-regcache.h.
7646 (regcache_read_pc): Don't declare.
7647 * regcache.c (get_thread_regcache_for_ptid): New function.
7648
bd9269f7
GB
76492014-09-11 Tom Tromey <tromey@redhat.com>
7650 Gary Benson <gbenson@redhat.com>
7651
7652 * symbol.c: New file.
7653 * Makefile.in (SFILES): Add symbol.c.
7654 (OBS): Add symbol.o.
7655
f8c1d06b
GB
76562014-09-11 Gary Benson <gbenson@redhat.com>
7657
7658 * target.c (target_stop_ptid, target_continue_ptid): New
7659 functions.
7660
721ec300
GB
76612014-09-11 Tom Tromey <tromey@redhat.com>
7662 Gary Benson <gbenson@redhat.com>
7663
7664 * target.h: Include target/target.h.
7665 * target.c (target_read_memory, target_read_uint32)
7666 (target_write_memory): New functions.
7667
c5e92cca
GB
76682014-09-11 Gary Benson <gbenson@redhat.com>
7669
7670 * server.h (debug_hw_points): Don't declare.
7671 * server.c (debug_hw_points): Don't define. Replace all uses
7672 with show_debug_regs.
7673 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7674 all uses with show_debug_regs.
7675
2e4bb98a
EBM
76762014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7677
7678 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7679 endianness into account.
7680 (ppc_supply_ptrace_register): Likewise.
7681
ac740bc7
JH
76822014-09-03 James Hogan <james.hogan@imgtec.com>
7683
7684 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7685 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7686
97ea6506
GB
76872014-09-03 Gary Benson <gbenson@redhat.com>
7688
7689 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7690 ALL_DEBUG_ADDRESS_REGISTERS.
7691
df7e5265
GB
76922014-09-02 Gary Benson <gbenson@redhat.com>
7693
7694 * i386-low.h: Renamed as...
7695 * x86-low.h: New file. All type, function and variable name
7696 prefixes changed from "i386_" to "x86_". All references updated.
7697 * i386-low.c: Renamed as...
7698 * x86-low.c: New file. All type, function and variable name
7699 prefixes changed from "i386_" to "x86_". All references updated.
7700
ed859da7
GB
77012014-09-02 Gary Benson <gbenson@redhat.com>
7702
7703 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7704 (x86_linux_new_thread): Likewise.
7705
860789c7
GB
77062014-08-29 Gary Benson <gbenson@redhat.com>
7707
7708 * server.h (setjmp.h): Do not include.
7709 (toplevel): Do not declare.
7710 (common-exceptions.h): Include.
7711 (cleanups.h): Likewise.
7712 * server.c (toplevel): Do not define.
7713 (exit_code): New static global.
7714 (detach_or_kill_for_exit_cleanup): New function.
7715 (main): New function. Original main renamed to...
7716 (captured_main): New function.
7717 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7718
ff55e1b5
GB
77192014-08-29 Gary Benson <gbenson@redhat.com>
7720
7721 * Makefile.in (SFILES): Add common/common-exceptions.c.
7722 (OBS): Add common-exceptions.o.
7723 (common-exceptions.o): New rule.
7724 * utils.c (prepare_to_throw_exception): New function.
7725
e9bcb658
GB
77262014-08-29 Gary Benson <gbenson@redhat.com>
7727
7728 * config.in: Regenerate.
7729 * configure: Likewise.
7730
e3180625
GB
77312014-08-29 Gary Benson <gbenson@redhat.com>
7732
7733 * Makefile.in (SFILES): Add common/cleanups.c.
7734 (OBS): cleanups.o.
7735 (cleanups.o): New rule.
7736
e3d6ba5d
GB
77372014-08-29 Gary Benson <gbenson@redhat.com>
7738
7739 * utils.c (internal_vwarning): New function.
7740
7096e886
GB
77412014-08-28 Gary Benson <gbenson@redhat.com>
7742
7743 * utils.h (fatal): Remove declaration.
7744 * utils.c (fatal): Remove function.
7745
14ce3192
GB
77462014-08-28 Gary Benson <gbenson@redhat.com>
7747
7748 * tracepoint.c (gdb_agent_init): Replace fatal with
7749 perror_with_name.
7750 (initialize_tracepoint): Likewise.
7751
50278d59
GB
77522014-08-28 Gary Benson <gbenson@redhat.com>
7753
7754 * remote-utils.c (remote_prepare): Replace fatal with error.
7755
aa96c426
GB
77562014-08-28 Gary Benson <gbenson@redhat.com>
7757
7758 * linux-low.c (linux_async): Replace fatal with warning.
7759 Tidy up and return.
7760 (linux_start_non_stop): Return -1 if linux_async failed.
7761
f7160e97
GB
77622014-08-28 Gary Benson <gbenson@redhat.com>
7763
7764 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7765 gdb_assert.
7766 (i386_dr_low_get_addr): Remove vague comment.
7767 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7768 gdb_assert.
7769
38e08fca
GB
77702014-08-28 Gary Benson <gbenson@redhat.com>
7771
7772 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7773 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7774 internal_error.
7775 (linux_resume_one_lwp): Likewise.
7776 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7777 gdb_assert.
7778 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7779 with internal_error.
7780 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7781 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7782 (find_register_by_name): Replace fatal with internal_error.
7783 (find_regno): Likewise.
7784 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7785 * thread-db.c (thread_db_create_event): Likewise.
7786 (thread_db_load_search): Likewise.
7787 (try_thread_db_load_1): Likewise.
7788 * tracepoint.c (get_jump_space_head): Replace fatal with
7789 internal_error.
7790 (claim_trampoline_space): Likewise.
7791 (have_fast_tracepoint_trampoline_buffer): Likewise.
7792 (cmd_qtstart): Likewise.
7793 (stop_tracing): Likewise.
7794 (fast_tracepoint_collecting): Likewise.
7795 (target_malloc): Likewise.
7796 (download_tracepoint): Likewise.
7797 (download_trace_state_variables): Replace check with gdb_assert.
7798 (upload_fast_traceframes): Replace fatal with internal_error.
7799
34abf635
GB
78002014-08-19 Tom Tromey <tromey@redhat.com>
7801 Gary Benson <gbenson@redhat.com>
7802
7803 * Makefile.in (SFILES): Add common/common-debug.c.
7804 (OBS): Add common-debug.o.
7805 (common-debug.o): New rule.
7806 * debug.h (debug_printf): Don't declare.
7807 * debug.c (debug_printf): Renamed and rewritten as...
7808 (debug_vprintf): New function.
7809
f6e94d78
GB
78102014-08-19 Gary Benson <gbenson@redhat.com>
7811
7812 * utils.h: Do not include print-utils.h.
7813
9239eeab
GB
78142014-08-19 Tom Tromey <tromey@redhat.com>
7815 Gary Benson <gbenson@redhat.com>
7816
7817 * server.h: Add static assertion.
7818 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7819
ef87c8bb
GB
78202014-08-19 Tom Tromey <tromey@redhat.com>
7821 Gary Benson <gbenson@redhat.com>
7822
7823 * Makefile.in (SFILES): Add common/errors.c.
7824 (OBS): Add errors.o.
7825 (IPA_OBS): Add errors-ipa.o.
7826 (errors.o): New rule.
7827 (errors-ipa.o): Likewise.
7828 * utils.h (perror_with_name, error, warning): Don't declare.
7829 * utils.c (warning): Renamed and rewritten as...
7830 (vwarning): New function.
7831 (error): Renamed and rewritten as...
7832 (verror): New function.
7833 (internal_error): Renamed and rewritten as...
7834 (internal_verror): New function.
7835
bb974a24
GB
78362014-08-07 Gary Benson <gbenson@redhat.com>
7837
7838 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7839 * configure: Regenerate.
7840 * config.in: Likewise.
7841 * server.h: Do not include errno.h.
7842 * event-loop.c: Likewise.
7843 * hostio-errno.c: Likewise.
7844 * linux-low.c: Likewise.
7845 * remote-utils.c: Likewise.
7846 * spu-low.c: Likewise.
7847 * utils.c: Likewise.
7848 * gdbreplay.c: Unconditionally include errno.h.
7849
6d3d12eb
GB
78502014-08-07 Gary Benson <gbenson@redhat.com>
7851
7852 * server.h: Do not include string.h.
7853 * event-loop.c: Likewise.
7854 * linux-low.c: Likewise.
7855 * regcache.c: Likewise.
7856 * remote-utils.c: Likewise.
7857 * spu-low.c: Likewise.
7858 * utils.c: Likewise.
7859
dccbb609
GB
78602014-08-07 Gary Benson <gbenson@redhat.com>
7861
7862 * server.h: Do not include gdb_assert.h.
7863
e76df0d0
GB
78642014-08-07 Gary Benson <gbenson@redhat.com>
7865
7866 * server.h: Do not include common-utils.h.
7867
4cb9c816
GB
78682014-08-07 Gary Benson <gbenson@redhat.com>
7869
7870 * server.h: Do not include ptid.h.
7871 * notif.h: Likewise.
7872
3995eeee
GB
78732014-08-07 Gary Benson <gbenson@redhat.com>
7874
7875 * server.h: Do not include gdb_locale.h.
7876
cb9f1a9b
GB
78772014-08-07 Gary Benson <gbenson@redhat.com>
7878
7879 * server.h: Do not include gdb/signals.h.
7880 * win32-low.c: Likewise.
7881
a5fceff8
GB
78822014-08-07 Gary Benson <gbenson@redhat.com>
7883
7884 * server.h: Do not include pathmax.h.
7885
b9391142
GB
78862014-08-07 Gary Benson <gbenson@redhat.com>
7887
7888 * server.h: Do not include libiberty.h.
7889 * linux-bfin-low.c: Likewise.
7890
0e443c87
GB
78912014-08-07 Gary Benson <gbenson@redhat.com>
7892
7893 * server.h: Do not include ansidecl.h.
7894
8ebb3f56
GB
78952014-08-07 Gary Benson <gbenson@redhat.com>
7896
7897 * linux-x86-low.c: Do not include stddef.h.
7898 * lynx-ppc-low.c: Likewise.
7899 * tracepoint.c: Likewise.
7900
8980bdf6
GB
79012014-08-07 Gary Benson <gbenson@redhat.com>
7902
7903 * server.h: Do not include stdarg.h.
7904 * nto-low.c: Likewise.
7905
d7096f71
GB
79062014-08-07 Gary Benson <gbenson@redhat.com>
7907
7908 * server.h: Do not include stdlib.h.
7909 * inferiors.c: Likewise.
7910 * linux-low.c: Likewise.
7911 * regcache.c: Likewise.
7912 * spu-low.c: Likewise.
7913 * tracepoint.c: Likewise.
7914 * utils.c: Likewise.
7915
d02f550d
GB
79162014-08-07 Gary Benson <gbenson@redhat.com>
7917
7918 * server.h: Do not include stdio.h.
7919 * linux-low.c: Likewise.
7920 * remote-utils.c: Likewise.
7921 * spu-low.c: Likewise.
7922 * utils.c: Likewise.
7923 * wincecompat.c: Likewise.
7924
87f6c4e3
GB
79252014-08-06 Gary Benson <gbenson@redhat.com>
7926
7927 * regcache.c (init_register_cache): Move conditionals inside if.
7928
7089dca4
GB
79292014-08-06 Gary Benson <gbenson@redhat.com>
7930
7931 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7932
462f517e
GB
79332014-07-31 Gary Benson <gbenson@redhat.com>
7934
7935 * ax.h: Do not include server.h.
7936 * gdbthread.h: Likewise.
7937 * lynx-low.h: Likewise.
7938 * notif.h: Likewise.
7939
976411d6
GB
79402014-07-30 Gary Benson <gbenson@redhat.com>
7941
7942 * server.h: Include common-defs.h.
7943 Do not include config.h or build-gnulib-gdbserver/config.h.
7944
d41f6d8e
GB
79452014-07-30 Gary Benson <gbenson@redhat.com>
7946
7947 * hostio-errno.c: Move server.h to top of includes list.
7948 * inferiors.c: Likewise.
7949 * linux-x86-low.c: Likewise.
7950 * notif.c: Include server.h.
7951
314c6a35
TT
79522014-07-24 Tom Tromey <tromey@redhat.com>
7953 Gary Benson <gbenson@redhat.com>
7954
7955 * server.h (CORE_ADDR): Now unsigned.
7956
69ff6be5
PA
79572014-07-16 Pedro Alves <palves@redhat.com>
7958
7959 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7960
ce9e3fe7
PA
79612014-07-15 Pedro Alves <palves@redhat.com>
7962
7963 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7964 copy.
7965
e76126e8
PA
79662014-07-11 Pedro Alves <palves@redhat.com>
7967
7968 * linux-low.c (kill_wait_lwp): New function, based on
7969 kill_one_lwp_callback, but use my_waitpid directly.
7970 (kill_one_lwp_callback, linux_kill): Use it.
7971
8e9db26e
PA
79722014-06-23 Pedro Alves <palves@redhat.com>
7973
7974 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7975 before setting DR0..DR3.
7976
698b3e08
GB
79772014-06-20 Gary Benson <gbenson@redhat.com>
7978
7979 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7980 * configure: Regenerated.
7981 * config.in: Likewise.
7982
125f8a3d
GB
79832014-06-20 Gary Benson <gbenson@redhat.com>
7984
7985 * Makefile.in (SFILES): Update locations for files moved
7986 from common to nat.
7987 (object file files): Reordered.
7988
42995dbd
GB
79892014-06-20 Gary Benson <gbenson@redhat.com>
7990
7991 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7992 (i386_dr_low_set_addr): Likewise.
7993 (i386_dr_low_get_addr): Likewise.
7994 (i386_dr_low_can_set_control): Likewise.
7995 (i386_dr_low_set_control): Likewise.
7996 (i386_dr_low_get_control): Likewise.
7997 (i386_dr_low_get_status): Likewise.
7998 (i386_get_debug_register_length): Likewise.
7999 * linux-x86-low.c (i386_dr_low_set_addr):
8000 Changed signature. Made static.
8001 (i386_dr_low_get_addr): Likewise.
8002 (i386_dr_low_set_control): Likewise.
8003 (i386_dr_low_get_control): Likewise.
8004 (i386_dr_low_get_status): Likewise.
8005 (i386_dr_low): New global variable.
8006 * win32-i386-low.c (i386_dr_low_set_addr):
8007 Changed signature. Made static.
8008 (i386_dr_low_get_addr): Likewise.
8009 (i386_dr_low_set_control): Likewise.
8010 (i386_dr_low_get_control): Likewise.
8011 (i386_dr_low_get_status): Likewise.
8012 (i386_dr_low): New global variable.
8013
e1d2394b
MS
80142014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8015
8016 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8017 * Makefile.in (AR, AR_FLAGS): Define.
8018 * configure: Regenerate.
8019
3a8ee006
GB
80202014-06-19 Gary Benson <gbenson@redhat.com>
8021
8022 * Makefile.in (i386-dregs.o): New rule.
8023 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8024 * i386-low.c (target.h): Remove include.
8025 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8026 (DR_CONTROL_SHIFT): Likewise.
8027 (DR_CONTROL_SIZE): Likewise.
8028 (DR_RW_EXECUTE): Likewise.
8029 (DR_RW_WRITE): Likewise.
8030 (DR_RW_READ): Likewise.
8031 (DR_RW_IORW): Likewise.
8032 (DR_LEN_1): Likewise.
8033 (DR_LEN_2): Likewise.
8034 (DR_LEN_4): Likewise.
8035 (DR_LEN_8): Likewise.
8036 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8037 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8038 (DR_ENABLE_SIZE): Likewise.
8039 (DR_LOCAL_SLOWDOWN): Likewise.
8040 (DR_GLOBAL_SLOWDOWN): Likewise.
8041 (DR_CONTROL_RESERVED): Likewise.
8042 (I386_DR_CONTROL_MASK): Likewise.
8043 (I386_DR_VACANT): Likewise.
8044 (I386_DR_LOCAL_ENABLE): Likewise.
8045 (I386_DR_GLOBAL_ENABLE): Likewise.
8046 (I386_DR_DISABLE): Likewise.
8047 (I386_DR_SET_RW_LEN): Likewise.
8048 (I386_DR_GET_RW_LEN): Likewise.
8049 (I386_DR_WATCH_HIT): Likewise.
8050 (i386_wp_op_t): Likewise.
8051 (i386_show_dr): Likewise.
8052 (i386_length_and_rw_bits): Likewise.
8053 (i386_insert_aligned_watchpoint): Likewise.
8054 (i386_remove_aligned_watchpoint): Likewise.
8055 (i386_handle_nonaligned_watchpoint): Likewise.
8056 i386_update_inferior_debug_regs(): Likewise.
8057 (i386_dr_insert_watchpoint): Likewise.
8058 (i386_dr_remove_watchpoint): Likewise.
8059 (i386_dr_region_ok_for_watchpoint): Likewise.
8060 (i386_dr_stopped_data_address): Likewise.
8061 (i386_dr_stopped_by_watchpoint): Likewise.
8062
8f26655c
GB
80632014-06-19 Gary Benson <gbenson@redhat.com>
8064
8065 * i386-low.c (i386_dr_show): Renamed to
8066 i386_show_dr and made static. All uses updated.
8067 (i386_dr_length_and_rw_bits): Renamed to
8068 i386_length_and_rw_bits and made static.
8069 All uses updated.
8070 (i386_dr_insert_aligned_watchpoint): Renamed to
8071 i386_insert_aligned_watchpoint and made static.
8072 All uses updated.
8073 (i386_dr_remove_aligned_watchpoint): Renamed to
8074 i386_remove_aligned_watchpoint and made static.
8075 All uses updated.
8076 (i386_dr_update_inferior_debug_regs): Renamed to
8077 i386_update_inferior_debug_regs and made static.
8078 All uses updated.
8079
b9228891
GB
80802014-06-18 Gary Benson <gbenson@redhat.com>
8081
5171def3
GB
8082 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8083 (i386_dr_low_can_set_control): Likewise.
8084 (i386_get_debug_register_length): Likewise.
8085 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8086 (i386_dr_low_can_set_control): Likewise.
8087 (i386_get_debug_register_length): Likewise.
8088
80892014-06-17 Gary Benson <gbenson@redhat.com>
8090
b9228891
GB
8091 * i386-low.h (i386-dregs.h): New include.
8092 (DR_FIRSTADDR): Now in i386-dregs.h.
8093 (DR_LASTADDR): Likewise.
8094 (DR_NADDR): Likewise.
8095 (DR_STATUS): Likewise.
8096 (DR_CONTROL): Likewise.
8097 (i386_debug_reg_state): Likewise.
8098 (i386_dr_insert_watchpoint): Likewise.
8099 (i386_dr_remove_watchpoint): Likewise.
8100 (i386_dr_region_ok_for_watchpoint): Likewise.
8101 (i386_dr_stopped_data_address): Likewise.
8102 (i386_dr_stopped_by_watchpoint): Likewise.
8103 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8104
4be83cc2
GB
81052014-06-18 Gary Benson <gbenson@redhat.com>
8106
8107 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8108 i386_dr_insert_watchpoint.
8109 (i386_low_remove_watchpoint): Renamed to
8110 i386_dr_remove_watchpoint.
8111 (i386_low_region_ok_for_watchpoint): Renamed to
8112 i386_dr_region_ok_for_watchpoint.
8113 (i386_low_stopped_data_address): Renamed to
8114 i386_dr_stopped_data_address.
8115 (i386_low_stopped_by_watchpoint): Renamed to
8116 i386_dr_stopped_by_watchpoint.
8117 * i386-low.c (i386_show_dr): Renamed to
8118 i386_dr_show and made nonstatic. All uses updated.
8119 (i386_length_and_rw_bits): Renamed to
8120 i386_dr_length_and_rw_bits and made nonstatic.
8121 All uses updated.
8122 (i386_insert_aligned_watchpoint): Renamed to
8123 i386_dr_insert_aligned_watchpoint and made nonstatic.
8124 All uses updated.
8125 (i386_remove_aligned_watchpoint): Renamed to
8126 i386_dr_remove_aligned_watchpoint and made nonstatic.
8127 All uses updated.
8128 (i386_update_inferior_debug_regs): Renamed to
8129 i386_dr_update_inferior_debug_regs and made nonstatic.
8130 All uses updated.
8131 (i386_low_insert_watchpoint): Renamed to
8132 i386_dr_insert_watchpoint. All uses updated.
8133 (i386_low_remove_watchpoint): Renamed to
8134 i386_dr_remove_watchpoint. All uses updated.
8135 (i386_low_region_ok_for_watchpoint): Renamed to
8136 i386_dr_region_ok_for_watchpoint. All uses updated.
8137 (i386_low_stopped_data_address): Renamed to
8138 i386_dr_stopped_data_address. All uses updated.
8139 (i386_low_stopped_by_watchpoint): Renamed to
8140 i386_dr_stopped_by_watchpoint. All uses updated.
8141
131aa0d4
GB
81422014-06-18 Gary Benson <gbenson@redhat.com>
8143
8144 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8145 (i386_dr_low_can_set_control): Likewise.
8146 (i386_insert_aligned_watchpoint): New check.
8147
d9305f7f
GB
81482014-06-18 Gary Benson <gbenson@redhat.com>
8149
8150 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8151 Renamed to state.
8152
e927c9fc
GB
81532014-06-18 Gary Benson <gbenson@redhat.com>
8154
8155 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8156 instead of fatal and error.
8157 (i386_handle_nonaligned_watchpoint): Likewise.
8158
1b6d4134
GB
81592014-06-18 Gary Benson <gbenson@redhat.com>
8160
8161 * i386-low.c (i386_get_debug_register_length): New macro.
8162 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8163 (i386_show_dr): Use debug_printf instead of fprintf. Use
8164 phex to format values.
8165
6e62758f
GB
81662014-06-18 Gary Benson <gbenson@redhat.com>
8167
8168 * i386-low.h: Comment changes.
8169 * i386-low.c: Likewise.
8170
fc6e2f03
GB
81712014-06-18 Gary Benson <gbenson@redhat.com>
8172
8173 * i386-low.c: Whitespace changes.
8174
f9d1eeed
TT
81752014-06-12 Tom Tromey <tromey@redhat.com>
8176
8177 * utils.c (freeargv): Remove.
8178
0b04e523
TT
81792014-06-12 Tom Tromey <tromey@redhat.com>
8180
8181 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8182 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8183 (parse_debug_format_options): Likewise.
8184 (gdbserver_usage): Likewise.
8185 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8186 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8187 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8188 against libiberty.
8189 ($(LIBGNU)): Depend on libiberty.
8190 (all-lib): Recurse into all subdirs.
8191 (install-only): Invoke "install" target in subdirs.
8192 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8193 targets.
8194 * configure: Rebuild.
8195 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8196 for vasprintf, vsnprintf, or gettimeofday.
8197 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8198 srv_tgtobj.
8199
270c9937
JB
82002014-06-05 Joel Brobecker <brobecker@adacore.com>
8201
8202 * development.sh: Delete.
8203 * Makefile.in (config.status): Adjust dependency on development.sh.
8204 * configure.ac: Adjust development.sh source call.
8205 * configure: Regenerate.
8206
0a261ed8
PA
82072014-06-02 Pedro Alves <palves@redhat.com>
8208
8209 * ax.c (gdb_free_agent_expr): New function.
8210 * ax.h (gdb_free_agent_expr): New declaration.
8211 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8212 list.
8213 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8214 static.
8215 (clear_breakpoint_conditions_and_commands): New function.
8216 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8217 (clear_breakpoint_conditions_and_commands): New declaration.
8218
e9dae05e
RR
82192014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8220
8221 * linux-aarch64-low.c (asm/ptrace.h): Include.
8222
5876f503
JK
82232014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8224
8225 Fix TLS access for -static -pthread.
8226 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8227 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8228 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8229
802e8e6d
PA
82302014-05-20 Pedro Alves <palves@redhat.com>
8231
8232 * linux-aarch64-low.c (aarch64_insert_point)
8233 (aarch64_remove_point): No longer check whether the type is
8234 supported here. Adjust to new interface.
8235 (the_low_target): Install aarch64_supports_z_point_type as
8236 supports_z_point_type method.
8237 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8238 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8239 instead of a Z packet char. Adjust.
8240 (arm_supports_z_point_type): New function.
8241 (arm_insert_point, arm_remove_point): Adjust to new interface.
8242 (the_low_target): Install arm_supports_z_point_type.
8243 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8244 (cris_insert_point, cris_remove_point): Adjust to new interface.
8245 Don't check whether the type is supported here.
8246 (the_low_target): Install cris_supports_z_point_type.
8247 * linux-low.c (linux_supports_z_point_type): New function.
8248 (linux_insert_point, linux_remove_point): Adjust to new interface.
8249 * linux-low.h (struct linux_target_ops) <insert_point,
8250 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8251 raw_breakpoint pointer parameter.
8252 <supports_z_point_type>: New method.
8253 * linux-mips-low.c (mips_supports_z_point_type): New function.
8254 (mips_insert_point, mips_remove_point): Adjust to new interface.
8255 Use mips_supports_z_point_type.
8256 (the_low_target): Install mips_supports_z_point_type.
8257 * linux-ppc-low.c (the_low_target): Install NULL as
8258 supports_z_point_type method.
8259 * linux-s390-low.c (the_low_target): Install NULL as
8260 supports_z_point_type method.
8261 * linux-sparc-low.c (the_low_target): Install NULL as
8262 supports_z_point_type method.
8263 * linux-x86-low.c (x86_supports_z_point_type): New function.
8264 (x86_insert_point): Adjust to new insert_point interface. Use
8265 insert_memory_breakpoint. Adjust to new
8266 i386_low_insert_watchpoint interface.
8267 (x86_remove_point): Adjust to remove_point interface. Use
8268 remove_memory_breakpoint. Adjust to new
8269 i386_low_remove_watchpoint interface.
8270 (the_low_target): Install x86_supports_z_point_type.
8271 * lynx-low.c (lynx_target_ops): Install NULL as
8272 supports_z_point_type callback.
8273 * nto-low.c (nto_supports_z_point_type): New.
8274 (nto_insert_point, nto_remove_point): Adjust to new interface.
8275 (nto_target_ops): Install nto_supports_z_point_type.
8276 * mem-break.c: Adjust intro comment.
8277 (struct raw_breakpoint) <raw_type, size>: New fields.
8278 <inserted>: Update comment.
8279 <shlib_disabled>: Delete field.
8280 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8281 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8282 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8283 (raw_bkpt_type_to_target_hw_bp_type): New function.
8284 (find_enabled_raw_code_breakpoint_at): New function.
8285 (find_raw_breakpoint_at): New type and size parameters. Use them.
8286 (insert_memory_breakpoint): New function, based off
8287 set_raw_breakpoint_at.
8288 (remove_memory_breakpoint): New function.
8289 (set_raw_breakpoint_at): Reimplement.
8290 (set_breakpoint): New, based on set_breakpoint_at.
8291 (set_breakpoint_at): Reimplement.
8292 (delete_raw_breakpoint): Go through the_target->remove_point
8293 instead of assuming memory breakpoints.
8294 (find_gdb_breakpoint_at): Delete.
8295 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8296 (find_gdb_breakpoint): New function.
8297 (set_gdb_breakpoint_at): Delete.
8298 (z_type_supported): New function.
8299 (set_gdb_breakpoint_1): New function, loosely based off
8300 set_gdb_breakpoint_at.
8301 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8302 (delete_gdb_breakpoint_at): Delete.
8303 (delete_gdb_breakpoint_1): New function, loosely based off
8304 delete_gdb_breakpoint_at.
8305 (delete_gdb_breakpoint): New function.
8306 (clear_gdb_breakpoint_conditions): Rename to ...
8307 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8308 breakpoint.
8309 (add_condition_to_breakpoint): Make static.
8310 (add_breakpoint_condition): Take a struct breakpoint pointer
8311 instead of an address. Adjust.
8312 (gdb_condition_true_at_breakpoint): Rename to ...
8313 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8314 z_type parameter.
8315 (gdb_condition_true_at_breakpoint): Reimplement.
8316 (add_breakpoint_commands): Take a struct breakpoint pointer
8317 instead of an address. Adjust.
8318 (gdb_no_commands_at_breakpoint): Rename to ...
8319 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8320 parameter. Return true if no breakpoint was found. Change debug
8321 output.
8322 (gdb_no_commands_at_breakpoint): Reimplement.
8323 (run_breakpoint_commands): Rename to ...
8324 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8325 and change return type to boolean.
8326 (run_breakpoint_commands): New function.
8327 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8328 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8329 breakpoint. Go through the_target->remove_point instead of
8330 assuming memory breakpoint.
8331 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8332 software and hardware breakpoints.
8333 (reinsert_raw_breakpoint): Go through the_target->insert_point
8334 instead of assuming memory breakpoint.
8335 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8336 software and hardware breakpoints.
8337 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8338 Check both software and hardware breakpoints.
8339 (validate_inserted_breakpoint): Assert the breakpoint is a
8340 software breakpoint. Set the inserted flag to -1 instead of
8341 setting shlib_disabled.
8342 (delete_disabled_breakpoints): Adjust.
8343 (validate_breakpoints): Only validate software breakpoints.
8344 Adjust to inserted flag change.
8345 (check_mem_read, check_mem_write): Skip breakpoint types other
8346 than software breakpoints. Adjust to inserted flag change.
8347 * mem-break.h (enum raw_bkpt_type): New enum.
8348 (raw_breakpoint, struct process_info): Forward declare.
8349 (Z_packet_to_target_hw_bp_type): Delete declaration.
8350 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8351 (set_gdb_breakpoint, delete_gdb_breakpoint)
8352 (clear_breakpoint_conditions): New declarations.
8353 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8354 (breakpoint_inserted_here): Update comment.
8355 (add_breakpoint_condition, add_breakpoint_commands): Replace
8356 address parameter with a breakpoint pointer parameter.
8357 (gdb_breakpoint_here): Update comment.
8358 (delete_gdb_breakpoint_at): Delete.
8359 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8360 * server.c (process_point_options): Take a struct breakpoint
8361 pointer instead of an address. Adjust.
8362 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8363 delete_gdb_breakpoint.
8364 * spu-low.c (spu_target_ops): Install NULL as
8365 supports_z_point_type method.
8366 * target.h: Include mem-break.h.
8367 (struct target_ops) <prepare_to_access_memory>: Update comment.
8368 <supports_z_point_type>: New field.
8369 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8370 instead of a char. Also take a raw breakpoint pointer.
8371 * win32-arm-low.c (the_low_target): Install NULL as
8372 supports_z_point_type.
8373 * win32-i386-low.c (i386_supports_z_point_type): New function.
8374 (i386_insert_point, i386_remove_point): Adjust to new interface.
8375 (the_low_target): Install i386_supports_z_point_type.
8376 * win32-low.c (win32_supports_z_point_type): New function.
8377 (win32_insert_point, win32_remove_point): Adjust to new interface.
8378 (win32_target_ops): Install win32_supports_z_point_type.
8379 * win32-low.h (struct win32_target_ops):
8380 <supports_z_point_type>: New method.
8381 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8382 instead of a char. Also take a raw breakpoint pointer.
8383
932539e3
PA
83842014-05-20 Pedro Alves <palves@redhat.com>
8385
8386 * mem-break.h: Include break-common.h.
8387 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8388 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8389 (Z_packet_to_target_hw_bp_type): New declaration.
8390 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8391 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8392 (Z_PACKET_ACCESS_WP): Delete macros.
8393 (Z_packet_to_hw_type): Delete function.
8394 * i386-low.h: Don't include break-common.h here.
8395 (Z_packet_to_hw_type): Delete declaration.
8396 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8397 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8398 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8399 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8400 * linux-aarch64-low.c: Don't include break-common.h here.
8401 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8402 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8403 (Z_packet_to_target_hw_bp_type): Delete function.
8404 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8405 function.
8406 (mips_insert_point, mips_remove_point): Use
8407 Z_packet_to_target_hw_bp_type.
8408
4ff0d3d8
PA
84092014-05-20 Pedro Alves <palves@redhat.com>
8410
8411 * linux-aarch64-low.c: Include break-common.h.
8412 (enum target_point_type): Delete.
8413 (Z_packet_to_point_type): Rename to ...
8414 (Z_packet_to_target_hw_bp_type): ... this, and return a
8415 target_hw_bp_type instead.
8416 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8417 instead of an enum target_point_type.
8418 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8419 breakpoint type.
8420 (aarch64_dr_state_insert_one_point)
8421 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8422 (aarch64_handle_aligned_watchpoint)
8423 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8424 Take an enum target_hw_bp_type instead of an enum
8425 target_point_type.
8426 (aarch64_supports_z_point_type): New function.
8427 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8428 use Z_packet_to_target_hw_bp_type.
8429
786dc519
JB
84302014-05-20 Joel Brobecker <brobecker@adacore.com>
8431
8432 * configure.ac: Only use -Werror by default when DEVELOPMENT
8433 is true.
8434 * configure: Regenerate.
8435
9e0aa64f
JK
84362014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8437
8438 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8439 * linux-x86-low.c (X86_64_USER_REGS): New.
8440 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8441
2b577b92
YQ
84422014-04-28 Yao Qi <yao@codesourcery.com>
8443
8444 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8445 name.
8446
94611da2
PA
84472014-04-25 Pedro Alves <palves@redhat.com>
8448
8449 PR server/16255
8450 * linux-low.c (linux_attach_fail_reason_string): New function.
8451 (linux_attach_lwp): Delete.
8452 (linux_attach_lwp_1): Rename to ...
8453 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8454 argument. Remove "initial" parameter. Return int instead of
8455 void. Don't error or warn here.
8456 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8457 failure to attach to the tgid. Call warning when failing to
8458 attach to an lwp.
8459 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8460 argument. Remove "initial" parameter. Return int instead of
8461 void. Don't error or warn here.
8462 (linux_attach_fail_reason_string): New declaration.
8463 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8464 interface change. Use linux_attach_fail_reason_string.
8465
01f9f808
MS
84662014-04-24 Michael Sturm <michael.sturm@mintel.com>
8467 Walfred Tedeschi <walfred.tedeschi@intel.com>
8468
8469 * Makefile.in: Added rules to handle new files
8470 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8471 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8472 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8473 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8474 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8475 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8476 x32-avx512-linux.o.
8477 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8478 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8479 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8480 i386/x32-avx512.xml.
8481 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8482 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8483 i386/x32-avx512-linux.xml.
8484 * i387-fp.c (num_avx512_k_registers): New constant for number
8485 of K registers.
8486 (num_avx512_zmmh_low_registers): New constant for number of
8487 lower ZMM registers (0-15).
8488 (num_avx512_zmmh_high_registers): New constant for number of
8489 higher ZMM registers (16-31).
8490 (num_avx512_ymmh_registers): New contant for number of higher
8491 YMM registers (ymm16-31 added by avx521 on x86_64).
8492 (num_avx512_xmm_registers): New constant for number of higher
8493 XMM registers (xmm16-31 added by AVX512 on x86_64).
8494 (struct i387_xsave): Add space for AVX512 registers.
8495 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8496 Add code to handle AVX512 registers.
8497 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8498 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8499 prototypei from generated file.
8500 (tdesc_amd64_avx512_linux): Likewise.
8501 (init_registers_x32_avx512_linux): Likewise.
8502 (tdesc_x32_avx512_linux): Likewise.
8503 (init_registers_i386_avx512_linux): Likewise.
8504 (tdesc_i386_avx512_linux): Likewise.
8505 (x86_64_regmap): Add AVX512 registers.
8506 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8507 mask.
8508 (initialize_low_arch): Add code to initialize AVX512 registers.
8509
51aa91f9
PA
85102014-04-23 Pedro Alves <palves@redhat.com>
8511
8512 * mem-break.c (find_gdb_breakpoint_at): Make static.
8513 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8514
a4165e94
PA
85152014-04-23 Pedro Alves <palves@redhat.com>
8516
8517 * i386-low.c: Don't include break-common.h here.
8518 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8519 prototype to take target_hw_bp_type as argument instead of a Z
8520 packet char.
8521 * i386-low.h: Include break-common.h here.
8522 (Z_packet_to_hw_type): Declare.
8523 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8524 prototypes.
8525 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8526 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8527 (x86_remove_point): Convert the packet number to a
8528 target_hw_bp_type before calling i386_low_remove_watchpoint.
8529 * win32-i386-low.c (i386_insert_point): Convert the packet number
8530 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8531 (i386_remove_point): Convert the packet number to a
8532 target_hw_bp_type before calling i386_low_remove_watchpoint.
8533
b8acf843
PA
85342014-04-23 Pedro Alves <palves@redhat.com>
8535
8536 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8537
d708bcd1
PA
85382014-04-10 Pedro Alves <palves@redhat.com>
8539
8540 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8541 Check if the condition or command is NULL before checking if the
8542 breakpoint is known. On success, return true.
8543 * mem-break.h (add_breakpoint_condition): Document return.
8544 (add_breakpoint_commands): Add describing comment.
8545 * server.c (skip_to_semicolon): New function.
8546 (process_point_options): Use it.
8547
2eec7d5b
PA
85482014-04-09 Pedro Alves <palves@redhat.com>
8549
8550 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8551 to lwpid_of.
8552
fa96cb38
PA
85532014-02-27 Pedro Alves <palves@redhat.com>
8554
8555 PR 12702
8556 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8557 macros.
8558 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8559 output.
8560 (last_thread_of_process_p): Take a PID argument instead of a
8561 thread pointer.
8562 (linux_wait_for_lwp): Delete.
8563 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8564 functions.
8565 (linux_low_filter_event): New function, party factored out from
8566 linux_wait_for_event.
8567 (linux_wait_for_event): Rename to ...
8568 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8569 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8570 sigsuspend. Check for zombie leaders.
8571 (linux_wait_for_event): Reimplement as wrapper around
8572 linux_wait_for_event_filtered.
8573 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8574 a normal or signal exit is seen, it's the whole process exiting.
8575 (wait_for_sigstop): No longer a for_each_inferior callback.
8576 Rewrite on top of linux_wait_for_event_filtered.
8577 (stop_all_lwps): Call wait_for_sigstop directly.
8578 * server.c (resume, handle_target_event): Handle
8579 TARGET_WAITKIND_NO_RESUMED.
8580
d763de10
JB
85812014-02-26 Joel Brobecker <brobecker@adacore.com>
8582
8583 * win32-low.c (psapi_get_dll_name,
8584 * win32_CreateToolhelp32Snapshot): Delete.
8585 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8586 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8587 Delete.
8588 (handle_load_dll): Add function description.
8589 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8590
850a0f76
JB
85912014-02-26 Joel Brobecker <brobecker@adacore.com>
8592
8593 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8594 Add comment.
8595 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8596 base address when calling win32_add_one_solib.
8597 (handle_load_dll): Delete local variable load_addr.
8598 Remove 0x1000 offset applied to DLL base address when calling
8599 win32_add_one_solib.
8600 (handle_unload_dll): Add comment.
8601
f25b3fc3
JB
86022014-02-26 Joel Brobecker <brobecker@adacore.com>
8603
8604 * win32-low.c (win32_add_all_dlls): Renames
8605 win32_ensure_ntdll_loaded. Rewrite function documentation.
8606 Adjust implementation to always load all DLLs.
8607 Add 0x1000 offset to DLL base address when calling
8608 win32_add_one_solib.
8609 (child_initialization_done): New static global.
8610 (do_initial_child_stuff): Set child_initialization_done to
8611 zero during child initialization, and 1 after. Replace call
8612 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8613 Add comment.
8614 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8615 (handle_unload_dll): Add function documentation.
8616 (get_child_debug_event): Ignore load and unload DLL events
8617 during child initialization.
8618
d86d4aaf
DE
86192014-02-20 Doug Evans <dje@google.com>
8620
3bc32da3 8621 Remove global all_lwps.
d86d4aaf
DE
8622 * inferiors.h (ptid_of): Move here from linux-low.h.
8623 (pid_of, lwpid_of): Ditto.
8624 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8625 parameter is a struct thread_info * now.
8626 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8627 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8628 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8629 directly.
8630 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8631 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8632 * linux-arm-low.c (update_registers_callback): Update, "entry"
8633 parameter is a struct thread_info * now.
8634 Fetch lwpid from current_inferior directly.
8635 (arm_insert_point): Pass &all_threads to find_inferior instead of
8636 &all_lwps.
8637 (arm_remove_point): Ditto.
8638 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8639 (arm_prepare_to_resume): Fetch pid from thread.
8640 (arm_read_description): Fetch lwpid from current_inferior directly.
8641 * linux-low.c (all_lwps): Delete.
8642 (delete_lwp): Delete call to remove_inferior.
8643 (handle_extended_wait): Fetch lwpid from thread.
8644 (add_lwp): Don't set lwp->entry.id. Remove call to
8645 add_inferior_to_list.
8646 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8647 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8648 (kill_one_lwp_callback): Ditto.
8649 (linux_kill): Don't dereference NULL pointer.
8650 Fetch ptid,lwpid from thread.
8651 (get_detach_signal): Fetch ptid from thread.
8652 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8653 Simplify call to regcache_invalidate_thread.
8654 (delete_lwp_callback): Update, "entry" parameter is a
8655 struct thread_info * now. Fetch pid from thread.
8656 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8657 (status_pending_p_callback): Update, "entry" parameter is a
8658 struct thread_info * now. Fetch ptid from thread.
8659 (find_lwp_pid): Update, "entry" parameter is a
8660 struct thread_info * now.
8661 (linux_wait_for_lwp): Fetch pid from thread.
8662 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8663 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8664 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8665 (dequeue_one_deferred_signal): Ditto.
8666 (cancel_breakpoint): Fetch ptid from current_inferior.
8667 (linux_wait_for_event): Pass &all_threads to find_inferior,
8668 not &all_lwps. Fetch ptid, lwpid from thread.
8669 (count_events_callback): Update, "entry" parameter is a
8670 struct thread_info * now.
8671 (select_singlestep_lwp_callback): Ditto.
8672 (select_event_lwp_callback): Ditto.
8673 (cancel_breakpoints_callback): Ditto.
8674 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8675 not &all_lwps.
8676 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8677 (unsuspend_one_lwp): Update, "entry" parameter is a
8678 struct thread_info * now.
8679 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8680 not &all_lwps.
8681 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8682 Fetch lwpid from thread, not lwp.
8683 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8684 Pass &all_threads to find_inferior, not &all_lwps.
8685 (send_sigstop): Fetch lwpid from thread, not lwp.
8686 (send_sigstop_callback): Update, "entry" parameter is a
8687 struct thread_info * now.
8688 (suspend_and_send_sigstop_callback): Ditto.
8689 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8690 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8691 struct thread_info * now.
8692 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8693 from thread, lwp.
8694 (lwp_running): Update, "entry" parameter is a
8695 struct thread_info * now.
8696 (stop_all_lwps): Fetch ptid from thread.
8697 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8698 (linux_resume_one_lwp): Fetch lwpid from thread.
8699 (linux_set_resume_request): Update, "entry" parameter is a
8700 struct thread_info * now. Fetch pid, lwpid from thread.
8701 (resume_status_pending_p): Update, "entry" parameter is a
8702 struct thread_info * now.
8703 (need_step_over_p): Ditto. Fetch lwpid from thread.
8704 (start_step_over): Fetch lwpid from thread.
8705 (linux_resume_one_thread): Update, "entry" parameter is a
8706 struct thread_info * now. Fetch lwpid from thread.
8707 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8708 (proceed_one_lwp): Update, "entry" parameter is a
8709 struct thread_info * now. Fetch lwpid from thread.
8710 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8711 struct thread_info * now.
8712 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8713 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8714 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8715 directly.
8716 (regsets_store_inferior_registers): Ditto.
8717 (fetch_register, store_register): Ditto.
8718 (linux_read_memory, linux_write_memory): Ditto.
8719 (linux_request_interrupt): Ditto.
8720 (linux_read_auxv): Ditto.
8721 (linux_xfer_siginfo): Ditto.
8722 (linux_qxfer_spu): Ditto.
8723 (linux_qxfer_libraries_svr4): Ditto.
8724 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8725 moved to inferiors.h.
8726 (get_lwp): Delete.
8727 (get_thread_lwp): Update.
8728 (struct lwp_info): Delete member "entry". Simplify comment for
8729 member "thread".
8730 (all_lwps): Delete.
8731 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8732 current_inferior directly.
8733 (update_watch_registers_callback): Update, "entry" parameter is a
8734 struct thread_info * now. Fetch pid from thread.
8735 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8736 (mips_insert_point): Fetch lwpid from current_inferior.
8737 Pass &all_threads to find_inferior, not &all_lwps.
8738 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8739 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8740 directly.
8741 (mips_stopped_data_address): Ditto.
8742 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8743 directly.
8744 * linux-tile-low.c (tile_arch_setup): Ditto.
8745 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8746 (update_debug_registers_callback): Update, "entry" parameter is a
8747 struct thread_info * now. Fetch pid from thread.
8748 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8749 Pass &all_threads to find_inferior, not &all_lwps.
8750 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8751 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8752 Pass &all_threads to find_inferior, not &all_lwps.
8753 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8754 (i386_dr_low_get_status): Ditto.
8755 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8756 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8757 (x86_linux_read_description): Ditto.
8758 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8759
3b8361aa
DE
87602014-02-20 Doug Evans <dje@google.com>
8761
8762 * inferiors.c (get_first_inferior): Fix buglet.
8763
f7667f0d
DE
87642014-02-19 Doug Evans <dje@google.com>
8765
8766 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8767 * inferiors.c (add_thread): Change result type to struct thread_info *.
8768 All callers updated.
8769 (add_lwp): Call add_thread here instead of in callers.
8770 All callers updated.
8771 * linux-low.h (get_lwp_thread): Rewrite.
8772 (struct lwp_info): New member "thread".
8773
b3312d80
DE
87742014-02-19 Doug Evans <dje@google.com>
8775
8776 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8777 All callers updated.
8778
ecc6f45c
DE
87792014-02-19 Doug Evans <dje@google.com>
8780
8781 * inferiors.c (add_thread): Fix whitespace.
8782
649ebbca
DE
87832014-02-19 Doug Evans <dje@google.com>
8784
8785 * dll.c (clear_dlls): Replace accessing list implemention details
8786 with API function.
8787 * gdbthread.h (get_first_thread): Declare.
8788 * inferiors.c (for_each_inferior_with_data): New function.
8789 (get_first_thread): New function.
8790 (find_thread_ptid): Simplify.
8791 (get_first_inferior): New function.
8792 (clear_list): Delete.
8793 (one_inferior_p): New function.
8794 (clear_inferior_list): New function.
8795 (clear_inferiors): Update.
8796 * inferiors.h (for_each_inferior_with_data): Declare.
8797 (clear_inferior_list): Declare.
8798 (one_inferior_p): Declare.
8799 (get_first_inferior): Declare.
8800 * linux-low.c (linux_wait_for_event): Replace accessing list
8801 implemention details with API function.
8802 * server.c (target_running): Ditto.
8803 (accumulate_file_name_length): New function.
8804 (emit_dll_description): New function.
8805 (handle_qxfer_libraries): Replace accessing list implemention
8806 details with API function.
8807 (handle_qxfer_threads_worker): New function.
8808 (handle_qxfer_threads_proper): Replace accessing list implemention
8809 details with API function.
8810 (handle_query): Ditto.
8811 (visit_actioned_threads_callback_ftype): New typedef.
8812 (visit_actioned_threads_data): New struct.
8813 (visit_actioned_threads): Rewrite to be find_inferior callback.
8814 (resume): Call find_inferior.
8815 (handle_status): Replace accessing list implemention
8816 details with API function.
8817 (process_serial_event): Replace accessing list implemention details
8818 with API function.
8819 * target.c (set_desired_inferior): Replace accessing list implemention
8820 details with API function.
8821 * tracepoint.c (same_process_p): New function.
8822 (gdb_agent_about_to_close): Replace accessing list implemention
8823 details with API function.
8824 * win32-low.c (child_delete_thread): Replace accessing list
8825 implemention details with API function.
8826 (match_dll_by_basename): New function.
8827 (dll_is_loaded_by_basename): New function.
8828 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8829 details call to dll_is_loaded_by_basename.
8830
80894984
DE
88312014-02-19 Doug Evans <dje@google.com>
8832
8833 * dll.h (struct dll_info): Add comment.
8834 * gdbthread.h (struct thread_info): Add comment.
8835 (current_ptid): Simplify.
8836 * inferiors.c (add_process): Update.
8837 (remove_process): Update.
8838 * inferiors.h (struct process_info): Rename member "head" to "entry".
8839 * linux-low.c (delete_lwp): Update.
8840 (add_lwp): Update.
8841 (last_thread_of_process_p): Update.
8842 (kill_one_lwp_callback, linux_kill): Update.
8843 (status_pending_p_callback): Update.
8844 (wait_for_sigstop): Update. Simplify read of ptid.
8845 (start_step_over): Update.
8846 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8847 (get_lwp_thread): Update.
8848 (struct lwp_info): Rename member "head" to "entry".
8849 * regcache.h (inferior_list_entry): Delete.
8850 * server.c (kill_inferior_callback): Update.
8851 (detach_or_kill_inferior_callback): Update.
8852 (print_started_pid): Update.
8853 (print_attached_pid): Update.
8854 (process_serial_event): Simplify read of ptid.
8855 * thread-db.c (thread_db_create_event): Update.
8856 (thread_db_get_tls_address): Update.
8857 * win32-low.c (current_inferior_ptid): Simplify.
8858
46917d26
TT
88592014-02-19 Tom Tromey <tromey@redhat.com>
8860
8861 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8862 argument.
8863 (target_supports_btrace): Update.
8864
0759a81e
YQ
88652014-02-14 Yao Qi <yao@codesourcery.com>
8866
8867 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8868 (rsp-low-ipa.o): New target.
8869
a7191e8b
TT
88702014-02-12 Tom Tromey <tromey@redhat.com>
8871
8872 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8873 convert_ascii_to_int.
8874 * regcache.c (registers_to_string): Likewise.
8875 * remote-utils.c (decode_M_packet): Likewise.
8876 * server.c (process_serial_event): Likewise.
8877
ff0e980e
TT
88782014-02-12 Tom Tromey <tromey@redhat.com>
8879
8880 * server.c (handle_query, handle_v_run): Use hex2bin, not
8881 unhexify.
8882 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8883
e9371aff
TT
88842014-02-12 Tom Tromey <tromey@redhat.com>
8885
8886 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8887 convert_int_to_ascii.
8888 * regcache.c (registers_to_string, collect_register_as_string):
8889 Likewise.
8890 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8891 Likewise.
8892 * server.c (process_serial_event): Likewise.
8893 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8894 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8895
971dc0b8
TT
88962014-02-12 Tom Tromey <tromey@redhat.com>
8897
8898 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8899 bin2hex, not hexify.
8900 * tracepoint.c (cmd_qtstatus): Likewise.
8901
0a822afb
TT
89022014-02-12 Tom Tromey <tromey@redhat.com>
8903
8904 * remote-utils.c (monitor_output): Pass explicit length to
8905 hexify.
8906
9c3d6531
TT
89072014-02-12 Tom Tromey <tromey@redhat.com>
8908
8909 * tracepoint.c: Include rsp-low.h.
8910 * server.c: Include rsp-low.h.
8911 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8912 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8913 declare.
8914 * remote-utils.c: Include rsp-low.h.
8915 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8916 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8917 (convert_int_to_ascii, convert_ascii_to_int): Move to
8918 common/rsp-low.c.
8919 * regcache.c: Include rsp-low.h.
8920 * ax.c: Include rsp-low.h.
8921 * Makefile.in (SFILES): Add common/rsp-low.c.
8922 (OBS): Add rsp-low.o.
8923 (rsp-low.o): New target.
8924
01fd3ea5
TT
89252014-02-12 Tom Tromey <tromey@redhat.com>
8926
8927 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8928 Include print-utils.h.
8929 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8930 (plongest, thirty_two, phex_nz): Remove.
8931 * Makefile.in (SFILES): Add common/print-utils.c.
8932 (OBS): Add print-utils.o.
8933 (print-utils-ipa.o): New target.
8934 (print-utils.o): New target.
8935 (IPA_OBJS): Add print-utils-ipa.o.
8936
e99dc820
TT
89372014-02-06 Tom Tromey <tromey@redhat.com>
8938
8939 * Makefile.in (SFILES): Fix indentation.
8940
ee1e2d4f
DE
89412014-02-05 Doug Evans <dje@google.com>
8942
8943 * linux-low.c (linux_wait_for_event): Improve comment.
8944 (linux_wait_1): Keep current_inferior in sync with event_child.
8945
f5a02773
DE
89462014-01-22 Doug Evans <dje@google.com>
8947
8948 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8949
87ce2a04
DE
89502014-01-22 Doug Evans <dje@google.com>
8951
8952 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8953 * configure: Regenerate.
8954 * config.in: Regenerate.
8955 * Makefile.in (SFILES): Add debug.c.
8956 (OBS): Add debug.o.
8957 * debug.c: New file.
8958 * debug.h: New file.
8959 * linux-aarch64-low.c (*): Update all debugging printfs to use
8960 debug_printf instead of fprintf.
8961 * linux-arm-low.c (*): Ditto.
8962 * linux-cris-low.c (*): Ditto.
8963 * linux-crisv32-low.c (*): Ditto.
8964 * linux-m32r-low.c (*): Ditto.
8965 * linux-sparc-low.c (*): Ditto.
8966 * linux-x86.c (*): Ditto.
8967 * linux-low.c (*): Ditto.
8968 (linux_wait_1): Add calls to debug_enter, debug_exit.
8969 (linux_wait): Remove redundant debugging printf.
8970 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8971 (linux_resume, unstop_all_lwps): Ditto.
8972 * mem-break.c (*): Update all debugging printfs to use
8973 debug_printf instead of fprintf.
8974 * remote-utils.c (*): Ditto.
8975 * thread-db.c (*): Ditto.
8976 * server.c #include <ctype.h>, "gdb_vecs.h".
8977 (debug_threads): Moved to debug.c.
8978 (*): Update all debugging printfs to use debug_printf instead of
8979 fprintf.
8980 (start_inferior): Replace call to fflush with call to debug_flush.
8981 (monitor_show_help): Mention set debug-format.
8982 (parse_debug_format_options): New function.
8983 (handle_monitor_command): Handle "monitor set debug-format".
8984 (gdbserver_usage): Mention --debug-format.
8985 (main): Parse --debug-format.
8986 * server.h (debug_threads): Declaration moved to debug.h.
8987 #include "debug.h".
8988 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8989 trace_debug_1 that uses debug_printf.
8990 (tracepoint_look_up_symbols): Update all debugging printfs to use
8991 debug_printf instead of fprintf.
8992
e671835b
BS
89932014-01-20 Baruch Siach <baruch@tkos.co.il>
8994
8995 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8996 sys/ptrace.h.
8997
b5737fa9
PA
89982014-01-17 Pedro Alves <palves@redhat.com>
8999
ea38d2a9 9000 PR build/16445
c7faa97a
PA
9001 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9002 defined after including gdb_proc_service.h.
b5737fa9 9003
40ed484e
DE
90042014-01-16 Doug Evans <dje@google.com>
9005
9006 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9007 (match_dll): Use it.
9008
969c39fb
MM
90092014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9010
9011 * target.h (target_ops) <read_btrace>: Change parameters and
9012 return type to allow error reporting.
9013 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9014 trace reading errors on.
9015 * linux-low.c (linux_low_read_btrace): Pass trace reading
9016 errors on.
9017 (linux_low_disable_btrace): New.
9018
ab7f45ba
DE
90192014-01-15 Doug Evans <dje@google.com>
9020
9021 * inferiors.c (thread_id_to_gdb_id): Delete.
9022 * inferiors.h (thread_id_to_gdb_id): Delete.
9023
66af0f44
EZ
90242014-01-13 Eli Zaretskii <eliz@gnu.org>
9025
9026 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9027 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9028 versions.
9029
9939e131
PA
90302014-01-08 Pedro Alves <palves@redhat.com>
9031
9032 * server.c (handle_status): Don't discard previous queued stop
9033 replies or thread's pending status here.
9034 (main) <disconnection>: Do it here instead.
9035
b7ea362b
PA
90362014-01-08 Pedro Alves <palves@redhat.com>
9037
9038 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9039 * server.c (visit_actioned_threads, handle_pending_status): New
9040 function.
9041 (handle_v_cont): Factor out parts to ...
9042 (resume): ... this new function. If in all-stop, and a thread
9043 being resumed has a pending status, report it without actually
9044 resuming.
9045 (myresume): Adjust to use the new 'resume' function.
9046 (clear_pending_status_callback, set_pending_status_callback)
9047 (find_status_pending_thread_callback): New functions.
9048 (handle_status): Handle the case of multiple threads having
9049 interesting statuses to report. Report threads' real last signal
9050 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9051 with an interesting thread to report the status for, instead of
9052 always reporting the status of the first thread.
9053
28498c42
JB
90542014-01-01 Joel Brobecker <brobecker@adacore.com>
9055
9056 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9057 * gdbreplay.c (gdbreplay_version): Likewise.
9058
f45c82da
YZ
90592013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9060
9061 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9062 iov.iov_len with the real length in use.
9063
379a5e2d
JB
90642013-12-13 Joel Brobecker <brobecker@adacore.com>
9065
9066 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9067 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9068 for all targets that use win32-low.c.
9069 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9070 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9071
4210d83e
PA
90722013-12-13 Pedro Alves <palves@redhat.com>
9073
9074 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9075 if equal to TARGET_WAITKIND_LOADED.
9076 * win32-low.c (cached_status): New static global.
9077 (win32_wait): Add declaration.
9078 (do_initial_child_stuff): Flush all initial pending debug events
9079 up to the initial breakpoint.
9080 (win32_wait): If CACHED_STATUS was set, return that instead
9081 of doing a real wait. Remove the code resuming the execution
9082 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9083 during the initial phase. Also remove the code changing
9084 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9085 TARGET_WAITKIND_STOPPED.
9086
e7f0d979
YQ
90872013-12-11 Yao Qi <yao@codesourcery.com>
9088
9089 * notif.c (handle_notif_ack): Return 0 if no notification
9090 matches.
9091
ebcf782c
DE
90922013-11-20 Doug Evans <dje@google.com>
9093
9094 * linux-low.c (linux_set_resume_request): Fix comment.
9095
20ad9378
DE
90962013-11-20 Doug Evans <dje@google.com>
9097
9098 * linux-low.c (resume_status_pending_p): Tweak comment.
9099
a196ebeb
WT
91002013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9101
9102 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9103 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9104 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9105 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9106 (srv_amd64_regobj): Add amd64-mpx.o.
9107 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9108 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9109 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9110 * i387-fp.c (num_pl_bnd_register) Added constant.
9111 (num_pl_bnd_cfg_registers) Added constant.
9112 (struct i387_xsave) Added reserved area and MPX fields.
9113 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9114 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9115 function.
9116 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9117 (init_registers_amd64_mpx_linux): Declare new function.
9118 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9119 (x86_64_regmap): Add MPX registers.
9120 (x86_linux_read_description): Add MPX case.
9121 (initialize_low_arch): Initialize MPX targets.
9122
0080a2f6
TT
91232013-11-18 Tom Tromey <tromey@redhat.com>
9124
9125 * configure: Rebuild.
9126 * configure.ac: Don't check for stdlib.h.
9127 * gdbreplay.c: Unconditionally include stdlib.h.
9128
2978b111
TT
91292013-11-18 Tom Tromey <tromey@redhat.com>
9130
9131 * config.in: Rebuild.
9132 * configure: Rebuild.
9133 * configure.ac: Don't use AC_HEADER_DIRENT.
9134
a3d08894
TT
91352013-11-18 Tom Tromey <tromey@redhat.com>
9136
9137 * server.h: Don't check HAVE_STRING_H.
9138 * gdbreplay.c: Don't check HAVE_STRING_H.
9139 * configure: Rebuild.
9140
0a5dd17d
TT
91412013-11-18 Tom Tromey <tromey@redhat.com>
9142
9143 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9144 LIBGNU.
9145
1bd2f0ba
TT
91462013-11-08 Tom Tromey <tromey@redhat.com>
9147
9148 * configure, config.in: Rebuild.
9149 * configure.ac: Remove unused configury.
9150
3266f10b
TT
91512013-11-08 Tom Tromey <tromey@redhat.com>
9152
9153 * acinclude.m4: Include common.m4, codeset.m4.
9154 * configure, config.in: Rebuild.
9155 * configure.ac: Use GDB_AC_COMMON.
9156
6682d959
AA
91572013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9158
9159 * linux-s390-low.c (HWCAP_S390_TE): New define.
9160 (s390_arch_setup): Consider the TE field in the HWCAP for
9161 determining 'have_regset_tdb'.
9162
fd0a4d76
SDJ
91632013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9164
9165 PR gdb/16014
9166 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9167 call to sizeof.
9168
1a3d890b
PA
91692013-10-02 Pedro Alves <palves@redhat.com>
9170
9171 * server.c (process_serial_event): Don't output "GDBserver
9172 exiting" if GDB is connected through stdio.
9173 * target.c (mywait): Likewise, be silent if GDB is connected
9174 through stdio.
9175
97ad4581
JB
91762013-10-01 Joel Brobecker <brobecker@adacore.com>
9177
9178 * lynx-low.c (lynx_add_threads_after_attach): New function.
9179 (lynx_attach): Remove call to add_thread. Add call to
9180 lynx_add_threads_after_attach instead.
9181
5b4e221c
MF
91822013-09-28 Mike Frysinger <vapier@gentoo.org>
9183
9184 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9185 * config.in, configure: Regenerated.
9186
ee47b2f8
YQ
91872013-09-18 Yao Qi <yao@codesourcery.com>
9188
9189 PR server/15959
9190 * server.c (start_inferior): Clear 'resume_info'.
9191
d6707650 91922013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9193
d6707650
JW
9194 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9195 for each register.
9196
9243dd0e 91972013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9198
9243dd0e
JW
9199 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9200 linux-tile-low.o to srv_tgtobj.
9201
c623a6ef
WN
92022013-09-16 Will Newton <will.newton@linaro.org>
9203
9204 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9205 out regs.
9206
fb71d39e
PA
92072013-09-06 Pedro Alves <palves@redhat.com>
9208
9209 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9210 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9211 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9212 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9213 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9214 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9215
8e7e9910
PA
92162013-09-06 Pedro Alves <palves@redhat.com>
9217
9218 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9219 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9220
7c3a12ca
PA
92212013-09-06 Pedro Alves <palves@redhat.com>
9222
9223 * linux-amd64-ipa.c: Include tracepoint.h.
9224 * linux-i386-ipa.c: Include tracepoint.h.
9225
8eb3d7b6
RW
92262013-09-06 Ricard Wanderlof <ricardw@axis.com>
9227
9228 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9229 (ps_get_thread_area): New function.
9230
eddddb9d
RW
92312013-09-06 Ricard Wanderlof <ricardw@axis.com>
9232
9233 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9234 (initialize_low_arch): Call init_registers_crisv32 rather than
9235 init_register_crisv32.
9236
533b0600
PA
92372013-09-05 Pedro Alves <palves@redhat.com>
9238
9239 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9240 to ...
9241 * hostio.h: ... this new file.
9242 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9243 win32-low.c: Include hostio.h.
9244
0ce3d3b5
PA
92452013-09-05 Pedro Alves <palves@redhat.com>
9246
9247 * server.h (gdb_client_data, handler_func, callback_handler_func)
9248 (delete_file_handler, add_file_handler, append_callback_event)
9249 (delete_callback_event, start_event_loop, initialize_event_loop):
9250 Move to event-loop.h and include it.
9251 * event-loop.h: New file.
9252
799cdc37
PA
92532013-09-05 Pedro Alves <palves@redhat.com>
9254
9255 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9256 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9257 (loaded_dll, unloaded_dll): Move to ...
9258 * dll.h: ... this new file.
9259 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9260
6a6bbd9d
PA
92612013-09-05 Pedro Alves <palves@redhat.com>
9262
9263 * server.h (current_process, get_thread_process, all_processes)
9264 (add_inferior_to_list, for_each_inferior, current_inferior)
9265 (remove_inferior, add_process, remove_process, find_process_pid)
9266 (have_started_inferiors_p, have_attached_inferiors_p)
9267 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9268 (clear_inferiors, find_inferior, find_inferior_id)
9269 (inferior_target_data, set_inferior_target_data)
9270 (inferior_regcache_data, set_inferior_regcache_data): Move to
9271 inferiors.h, and include it.
9272 * inferiors.h: New file.
9273
f699aaba
PA
92742013-09-05 Pedro Alves <palves@redhat.com>
9275
9276 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9277 Move ...
72f4393d 9278 * ax.h: ... here.
f699aaba 9279
c144c7a0
PA
92802013-09-05 Pedro Alves <palves@redhat.com>
9281
9282 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9283 tracepoint.h.
9284 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9285 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9286 (handle_tracepoint_general_set, handle_tracepoint_query)
9287 (tracepoint_finished_step, tracepoint_was_hit)
9288 (release_while_stepping_state_list, current_traceframe)
9289 (in_readonly_region, traceframe_read_mem)
9290 (fetch_traceframe_registers, traceframe_read_sdata)
9291 (traceframe_read_info, struct fast_tpoint_collect_status)
9292 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9293 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9294 (supply_fast_tracepoint_registers)
9295 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9296 (ipa_tdesc, claim_trampoline_space)
9297 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9298 (agent_mem_read, agent_get_trace_state_variable_value)
9299 (agent_set_trace_state_variable_value, agent_tsv_read)
9300 (agent_mem_read_string, get_raw_reg_func_addr)
9301 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9302 * tracepoint.h: ... this new file.
9303
ff42e6ab
PA
93042013-09-05 Pedro Alves <palves@redhat.com>
9305
9306 * server.h (perror_with_name, error, fatal, warning, paddress)
9307 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9308 include it.
9309 * utils.h: New file.
9310
541af0f4
PA
93112013-09-05 Pedro Alves <palves@redhat.com>
9312
9313 * server.h (remote_debug, noack_mode, transport_is_reliable)
9314 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9315 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9316 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9317 (write_enn, initialize_async_io, enable_async_io)
9318 (disable_async_io, check_remote_input_interrupt_request)
9319 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9320 (dead_thread_notify, prepare_resume_reply)
9321 (decode_address_to_semicolon, decode_address, decode_m_packet)
9322 (decode_M_packet, decode_X_packet, decode_xfer_write)
9323 (decode_search_memory_packet, unhexify, hexify)
9324 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9325 (look_up_one_symbol, relocate_instruction)
9326 (monitor_output): Move to remote-utils.h, and include it.
9327 * remote-utils.h: New file.
9328
eebdf26b
PA
93292013-09-05 Pedro Alves <palves@redhat.com>
9330
9331 * server.h (_): Delete.
9332
3aafd2ff
PA
93332013-09-02 Pedro Alves <palves@redhat.com>
9334
9335 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9336 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9337 allocated.
9338 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9339
cee83bcb
PM
93402013-09-02 Pierre Muller <muller@sourceware.org>
9341
9342 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9343 or WriteProcessMemory complete successfully and handle
9344 ERROR_PARTIAL_COPY error.
9345
9a13b2fa
PA
93462013-09-02 Pedro Alves <palves@redhat.com>
9347
9348 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9349 error instead of EIO.
9350
602e3198
JK
93512013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9352
9353 PR server/15604
9354 * linux-low.c: Include filestuff.h.
9355 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9356 * lynx-low.c: Include filestuff.h.
9357 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9358 * server.c: Include filestuff.h.
9359 (main): Call notice_open_fds.
9360 * spu-low.c: Include filestuff.h.
9361 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9362
96d7229d
LM
93632013-08-22 Luis Machado <lgustavo@codesourcery.com>
9364
9365 * Makefile.in: Explain why ../target and ../nat are not
9366 listed as include file search paths.
9367 (linux-waitpid.o): New object file rule.
9368 * configure.srv (srv_native_linux_obj): New variable.
9369 Replace all occurrences of linux native object files with
9370 $srv_native_linux_obj.
9371 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9372 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9373 (linux_enable_event_reporting): Remove declaration.
9374 (my_waitpid): Moved to common/linux-waitpid.c.
9375 (linux_wait_for_event): Pass ptid when calling
9376 linux_enable_event_reporting.
9377 (linux_supports_tracefork_flag): Remove.
9378 (linux_enable_event_reporting): Likewise.
9379 (linux_tracefork_grandchild): Remove.
9380 (STACK_SIZE): Moved to common/linux-ptrace.c.
9381 (linux_tracefork_child): Remove.
9382 (linux_test_for_tracefork): Remove.
9383 (linux_look_up_symbols): Call linux_supports_traceclone.
9384 (initialize_low): Remove call to linux_test_for_tracefork.
9385 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9386 common/linux-ptrace.h.
9387 (PTRACE_TYPE_ARG4): Likewise.
9388 Include linux-ptrace.h.
9389
32940073
PA
93902013-08-21 Pedro Alves <palves@redhat.com>
9391
9392 * config.in: Renegerate.
9393
33b60d58 93942013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9395
33b60d58
LM
9396 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9397 (SFILES): Remove $(srcdir)/common/target-common.c and
9398 add $(srcdir)/target/waitstatus.c.
9399 (OBS): Remove target-common.o and add waitstatus.o.
9400 (server_h): Remove $(srcdir)/../common/target-common.h and
9401 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9402 and $(srcdir)/../target/waitstatus.h.
9403 (target-common.o): Remove.
9404 (waitstatus.o): New target object file.
9405 * target.h: Do not include target-common.h and
9406 include target/resume.h, target/wait.h and
9407 target/waitstatus.h.
9408
b8e1b30e
LM
94092013-08-13 Luis Machado <lgustavo@codesourcery.com>
9410
9411 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9412 to PTRACE_TYPE_ARG3.
9413 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9414 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9415 PTRACE_TYPE_ARG4.
9416 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9417 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9418
7a60ad40
YQ
94192013-07-27 Jie Zhang <jie@codesourcery.com>
9420 Daniel Jacobowitz <dan@codesourcery.com>
9421 Yao Qi <yao@codesourcery.com>
9422
9423 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9424 (mips-linux-watch.o): New rule.
9425 (mips_linux_watch_h): New variable.
9426 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9427 srv_tgtobj.
9428 * linux-mips-low.c: Include mips-linux-watch.h.
9429 (struct arch_process_info, struct arch_lwp_info): New.
9430 (update_watch_registers_callback): New function.
9431 (mips_linux_new_process, mips_linux_new_thread) New functions.
9432 (mips_linux_prepare_to_resume, mips_insert_point): New
9433 functions.
9434 (mips_remove_point, mips_stopped_by_watchpoint): New
9435 functions.
9436 (rsp_bp_type_to_target_hw_bp_type): New function.
9437 (mips_stopped_data_address): New function.
9438 (the_low_target): Add watchpoint support functions.
9439
de6f69ad
YQ
94402013-07-27 Yao Qi <yao@codesourcery.com>
9441
9442 * i386-low.c: Include break-common.h.
9443 (enum target_hw_bp_type): Remove.
9444
3360c0bf
LM
94452013-07-24 Luis Machado <lgustavo@codesourcery.com>
9446
9447 * Makefile.in (SFILES): /common/target-common.c.
9448 (OBS): Add target-common.o.
9449 (server_h): Add $(srcdir)/../common/target-common.h.
9450 (target-common.o): New target.
9451 * server.c (queue_stop_reply_callback): Free
9452 status string after use.
9453 * target.c (target_waitstatus_to_string): Remove.
9454 * target.h: Include target-common.h.
9455 (resume_kind): Likewise.
9456 (target_waitkind): Likewise.
9457 (target_waitstatus): Likewise.
9458 (TARGET_WNOHANG): Likewise.
9459
bd885420
YQ
94602013-07-04 Yao Qi <yao@codesourcery.com>
9461
9462 * Makefile.in (host_alias): Use @host_noncanonical@.
9463 (target_alias): Use @target_noncanonical@.
9464 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9465 ACX_NONCANONICAL_HOST.
9466 * configure: Regenerated.
9467
9468 Revert:
9469 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9470
9471 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9472 * configure: Rebuild.
9473 * Makefile.in (version_host, version_target): Get from configure.
9474 (version.c): Use $(version_host) and $(version_target).
9475
17ef446e
PA
94762013-07-03 Pedro Alves <palves@redhat.com>
9477
9478 * Makefile.in (config.status): Depend on development.sh.
9479 * acinclude.m4: Include libmcheck.m4.
9480 * configure: Regenerate.
9481
7a9a7487
MG
94822013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9483
9484 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9485 attribute inside the parentheses.
9486 (winapi_DebugSetProcessKillOnExit): Ditto.
9487 (winapi_DebugBreakProcess): Ditto.
9488 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9489
49b64de6
MG
94902013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9491
9492 * notif.h (notif_event): Add a dummy member to avoid compiler
9493 errors.
9494
d5749ee7
PA
94952013-07-01 Pedro Alves <palves@redhat.com>
9496
9497 * hostio.c (HOSTIO_PATH_MAX): Define.
9498 (require_filename, handle_open, handle_unlink, handle_readlink):
9499 Use it.
9500
d8d2a3ee
PA
95012013-07-01 Pedro Alves <palves@redhat.com>
9502
9503 * server.h: Include "pathmax.h".
9504 * linux-low.c: Don't include sys/param.h.
9505 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9506 MAXPATHLEN.
9507 * win32-low.c: Don't include sys/param.h.
9508 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9509
bc7dea8d
PA
95102013-07-01 Pedro Alves <palves@redhat.com>
9511
9512 * event-loop.c: Don't check HAVE_UNISTD_H before including
9513 <unistd.h>.
9514 * gdbreplay.c: Likewise.
9515 * remote-utils.c: Likewise.
9516 * server.c: Likewise.
9517 * configure.ac: Don't check for unistd.h.
9518 * configure: Regenerate.
9519
d6c2da54
TT
95202013-06-28 Tom Tromey <tromey@redhat.com>
9521
9522 * Makefile.in (version.c): Use version.in, not
9523 common/version.in.
9524
257b6bec
MG
95252013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9526
9527 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9528 * configure: Rebuild.
9529 * Makefile.in (version_host, version_target): Get from configure.
9530 (version.c): Use $(version_host) and $(version_target).
9531
86ebe149
DK
95322013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9533
9534 Fix trace-status to output user name without trailing colon.
9535 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9536
f30aa5af
DK
95372013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9538
9539 Fix trace-status to output proper start-time and stop-time.
9540 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9541 output start time and stop time in hex as gdb expects.
9542
28a93511
YQ
95432013-06-26 Pedro Alves <pedro@codesourcery.com>
9544
9545 * tracepoint.c (build_traceframe_info_xml): Output trace state
9546 variables present in the trace buffer.
9547
01208463
TT
95482013-06-24 Tom Tromey <tromey@redhat.com>
9549
9550 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9551 create-version.sh.
9552 (version.o): Remove.
9553 * gdbreplay.c: Include version.h.
9554 (version, host_name): Don't declare.
9555 * server.h: Include version.h.
9556 (version, host_name): Don't declare.
9557
760256f9
PA
95582013-06-12 Pedro Alves <palves@redhat.com>
9559
9560 * linux-x86-low.c (linux_is_elf64): Delete global.
9561 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9562 with local linux_pid_exe_is_elf_64_file use.
9563
030031ee
PA
95642013-06-11 Pedro Alves <palves@redhat.com>
9565
9566 * linux-low.c (regset_disabled, disable_regset): New functions.
9567 (regsets_fetch_inferior_registers)
9568 (regsets_store_inferior_registers): Use them.
9569 (initialize_regsets_info); Don't allocate the disabled_regsets
9570 array here.
9571 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9572 comment.
9573
5da6eb0a
PA
95742013-06-11 Pedro Alves <palves@redhat.com>
9575
9576 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9577 xmalloc.
9578
7e5aaa09
PA
95792013-06-11 Pedro Alves <palves@redhat.com>
9580
9581 * linux-x86-low.c (initialize_low_arch): Call
9582 init_registers_x32_avx_linux.
9583
d878444c
JK
95842013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9585
9586 Fix compatibility with Android Bionic.
9587 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9588 it is not empty.
9589
3aee8918
PA
95902013-06-07 Pedro Alves <palves@redhat.com>
9591
5f2b57b5 9592 PR server/14823
3aee8918
PA
9593 * Makefile.in (OBS): Add tdesc.o.
9594 (IPA_OBJS): Add tdesc-ipa.o.
9595 (tdesc-ipa.o): New rule.
9596 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9597 interface.
9598 * linux-low.c (new_inferior): Delete.
9599 (disabled_regsets, num_regsets): Delete.
9600 (linux_add_process): Adjust to set the new per-process
9601 new_inferior flag.
9602 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9603 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9604 was a stop. When calling arch_setup, switch the current inferior
9605 to the thread that got an event.
9606 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9607 (regsets_fetch_inferior_registers)
9608 (regsets_store_inferior_registers): New regsets_info parameter.
9609 Adjust to use it.
9610 (linux_register_in_regsets): New regs_info parameter. Adjust to
9611 use it.
9612 (register_addr, fetch_register, store_register): New usrregs_info
9613 parameter. Adjust to use it.
9614 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9615 parameter regs_info. Adjust to use it.
9616 (linux_fetch_registers): Get the current inferior's regs_info, and
9617 adjust to use it.
9618 (linux_store_registers): Ditto.
9619 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9620 (initialize_low): Don't initialize the target_regsets here. Call
9621 initialize_low_arch.
9622 * linux-low.h (target_regsets): Delete declaration.
9623 (struct regsets_info): New.
9624 (struct usrregs_info): New.
9625 (struct regs_info): New.
9626 (struct process_info_private) <new_inferior>: New field.
9627 (struct linux_target_ops): Delete the num_regs, regmap, and
9628 regset_bitmap fields. New field regs_info.
9629 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9630 * i387-fp.c (num_xmm_registers): Delete.
9631 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9632 calls to new interface.
9633 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9634 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9635 Infer the number of xmm registers from the regcache's target
9636 description.
9637 * i387-fp.h (num_xmm_registers): Delete.
9638 * inferiors.c (add_thread): Don't install the thread's regcache
9639 here.
9640 * proc-service.c (gregset_info): Fetch the current inferior's
9641 regs_info. Adjust to use it.
9642 * regcache.c: Include tdesc.h.
9643 (register_bytes, reg_defs, num_registers)
9644 (gdbserver_expedite_regs): Delete.
9645 (get_thread_regcache): If the thread doesn't have a regcache yet,
9646 create one, instead of aborting gdbserver.
9647 (regcache_invalidate_one): Rename to ...
9648 (regcache_invalidate_thread): ... this.
9649 (regcache_invalidate_one): New.
9650 (regcache_invalidate): Only invalidate registers of the current
9651 process.
9652 (init_register_cache): Add target_desc parameter, and use it.
9653 (new_register_cache): Ditto. Assert the target description has a
9654 non zero registers_size.
9655 (regcache_cpy): Add assertions. Adjust.
9656 (realloc_register_cache, set_register_cache): Delete.
9657 (registers_to_string, registers_from_string): Adjust.
9658 (find_register_by_name, find_regno, find_register_by_number)
9659 (register_cache_size): Add target_desc parameter, and use it.
9660 (free_register_cache_thread, free_register_cache_thread_one)
9661 (regcache_release, register_cache_size): New.
9662 (register_size): Add target_desc parameter, and use it.
9663 (register_data, supply_register, supply_register_zeroed)
9664 (supply_regblock, supply_register_by_name, collect_register)
9665 (collect_register_as_string, collect_register_by_name): Adjust.
9666 * regcache.h (struct target_desc): Forward declare.
9667 (struct regcache) <tdesc>: New field.
9668 (init_register_cache, new_register_cache): Add target_desc
9669 parameter.
9670 (regcache_invalidate_thread): Declare.
9671 (regcache_invalidate_one): Delete declaration.
9672 (regcache_release): Declare.
9673 (find_register_by_number, register_cache_size, register_size)
9674 (find_regno): Add target_desc parameter.
9675 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9676 declarations.
9677 * remote-utils.c: Include tdesc.h.
9678 (outreg, prepare_resume_reply): Adjust.
9679 * server.c: Include tdesc.h.
9680 (gdbserver_xmltarget): Delete declaration.
9681 (get_features_xml, process_serial_event): Adjust.
9682 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9683 declare.
9684 (struct process_info) <tdesc>: New field.
9685 (ipa_tdesc): Declare.
9686 * tdesc.c: New file.
9687 * tdesc.h: New file.
9688 * tracepoint.c: Include tdesc.h.
9689 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9690 (get_context_regcache): Adjust to pass ipa_tdesc down.
9691 (do_action_at_tracepoint): Adjust to get the register cache size
9692 from the context regcache's description.
9693 (traceframe_walk_blocks): Adjust to get the register cache size
9694 from the current trace frame's description.
9695 (traceframe_get_pc): Adjust to get current trace frame's
9696 description and pass it down.
9697 (gdb_collect): Adjust to get the register cache size from the
9698 IPA's description.
9699 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9700 (gdbserver_xmltarget): Delete.
9701 (initialize_low_tracepoint): Set the ipa's target description.
9702 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9703 (initialize_low_tracepoint): Set the ipa's target description.
9704 * linux-x86-low.c: Include tdesc.h.
9705 [__x86_64__] (is_64bit_tdesc): New.
9706 (ps_get_thread_area, x86_get_thread_area): Use it.
9707 (i386_cannot_store_register): Rename to ...
9708 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9709 (i386_cannot_fetch_register): Rename to ...
9710 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9711 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9712 to new interface.
9713 (target_regsets): Rename to ...
9714 (x86_regsets): ... this.
9715 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9716 interface.
9717 (x86_siginfo_fixup): Use is_64bit_tdesc.
9718 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9719 (tdesc_x32_avx_linux, tdesc_x32_linux)
9720 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9721 Declare.
9722 (x86_linux_update_xmltarget): Delete.
9723 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9724 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9725 (AMD64_LINUX_USER64_CS): New.
9726 (x86_linux_read_description): New, based on
9727 x86_linux_update_xmltarget.
9728 (same_process_callback): New.
9729 (x86_arch_setup_process_callback): New.
9730 (x86_linux_update_xmltarget): New.
9731 (x86_regsets_info): New.
9732 (amd64_linux_regs_info): New.
9733 (i386_linux_usrregs_info): New.
9734 (i386_linux_regs_info): New.
9735 (x86_linux_regs_info): New.
9736 (x86_arch_setup): Reimplement.
9737 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9738 (x86_emit_ops): Ditto.
9739 (the_low_target): Adjust. Install x86_linux_regs_info,
9740 x86_cannot_fetch_register, and x86_cannot_store_register.
9741 (initialize_low_arch): New.
9742 * linux-ia64-low.c (tdesc_ia64): Declare.
9743 (ia64_fetch_register): Adjust.
9744 (ia64_usrregs_info, regs_info): New globals.
9745 (ia64_regs_info): New function.
9746 (the_low_target): Adjust.
9747 (initialize_low_arch): New function.
9748 * linux-sparc-low.c (tdesc_sparc64): Declare.
9749 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9750 Adjust.
9751 (sparc_arch_setup): New function.
9752 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9753 (the_low_target): Adjust.
9754 (initialize_low_arch): New function.
9755 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9756 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9757 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9758 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9759 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9760 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9761 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9762 (tdesc_powerpc_isa205_vsx64l): Declare.
9763 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9764 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9765 (ppc_set_pc, ppc_get_hwcap): Adjust.
9766 (ppc_usrregs_info): Forward declare.
9767 (!__powerpc64__) ppc_regmap_adjusted: New global.
9768 (ppc_arch_setup): Adjust to the current process'es target
9769 description.
9770 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9771 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9772 (ppc_store_evrregset): Adjust.
9773 (target_regsets): Rename to ...
9774 (ppc_regsets): ... this, and make static.
9775 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9776 (ppc_regs_info): New function.
9777 (the_low_target): Adjust.
9778 (initialize_low_arch): New function.
9779 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9780 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9781 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9782 (tdesc_s390x_linux64v2): Declare.
9783 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9784 (s390_fill_gregset, s390_store_last_break): Adjust.
9785 (target_regsets): Rename to ...
9786 (s390_regsets): ... this, and make static.
9787 (s390_get_pc, s390_set_pc): Adjust.
9788 (s390_get_hwcap): New target_desc parameter, and use it.
9789 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9790 (s390_arch_setup): Adjust to set the current process'es target
9791 description. Don't adjust the regmap.
9792 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9793 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9794 (regs_info_3264): New globals.
9795 (s390_regs_info): New function.
9796 (the_low_target): Adjust.
9797 (initialize_low_arch): New function.
9798 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9799 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9800 [__mips64] (init_registers_mips_linux)
9801 (init_registers_mips_dsp_linux): Delete defines.
9802 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9803 (have_dsp): New global.
9804 (mips_read_description): New, based on mips_arch_setup.
9805 (mips_arch_setup): Reimplement.
9806 (get_usrregs_info): New function.
9807 (mips_cannot_fetch_register, mips_cannot_store_register)
9808 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9809 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9810 (target_regsets): Rename to ...
9811 (mips_regsets): ... this, and make static.
9812 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9813 (dsp_regs_info, regs_info): New globals.
9814 (mips_regs_info): New function.
9815 (the_low_target): Adjust.
9816 (initialize_low_arch): New function.
9817 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9818 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9819 Declare.
9820 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9821 (arm_read_description): New, with bits factored from
9822 arm_arch_setup.
9823 (arm_arch_setup): Reimplement.
9824 (target_regsets): Rename to ...
9825 (arm_regsets): ... this, and make static.
9826 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9827 (arm_regs_info): New function.
9828 (the_low_target): Adjust.
9829 (initialize_low_arch): New function.
9830 * linux-m68k-low.c (tdesc_m68k): Declare.
9831 (target_regsets): Rename to ...
9832 (m68k_regsets): ... this, and make static.
9833 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9834 (m68k_regs_info): New function.
9835 (m68k_arch_setup): New function.
9836 (the_low_target): Adjust.
9837 (initialize_low_arch): New function.
9838 * linux-sh-low.c (tdesc_sharch): Declare.
9839 (target_regsets): Rename to ...
9840 (sh_regsets): ... this, and make static.
9841 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9842 (sh_regs_info, sh_arch_setup): New functions.
9843 (the_low_target): Adjust.
9844 (initialize_low_arch): New function.
9845 * linux-bfin-low.c (tdesc_bfin): Declare.
9846 (bfin_arch_setup): New function.
9847 (bfin_usrregs_info, regs_info): New globals.
9848 (bfin_regs_info): New function.
9849 (the_low_target): Adjust.
9850 (initialize_low_arch): New function.
9851 * linux-cris-low.c (tdesc_cris): Declare.
9852 (cris_arch_setup): New function.
9853 (cris_usrregs_info, regs_info): New globals.
9854 (cris_regs_info): New function.
9855 (the_low_target): Adjust.
9856 (initialize_low_arch): New function.
9857 * linux-cris-low.c (tdesc_crisv32): Declare.
9858 (cris_arch_setup): New function.
9859 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9860 (cris_regs_info): New function.
9861 (the_low_target): Adjust.
9862 (initialize_low_arch): New function.
9863 * linux-m32r-low.c (tdesc_m32r): Declare.
9864 (m32r_arch_setup): New function.
9865 (m32r_usrregs_info, regs_info): New globals.
9866 (m32r_regs_info): Adjust.
9867 (initialize_low_arch): New function.
9868 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9869 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9870 (tic6x_usrregs_info): Forward declare.
9871 (tic6x_read_description): New function, based on ...
9872 (tic6x_arch_setup): ... this. Reimplement.
9873 (target_regsets): Rename to ...
9874 (tic6x_regsets): ... this, and make static.
9875 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9876 (tic6x_regs_info): New function.
9877 (the_low_target): Adjust.
9878 (initialize_low_arch): New function.
9879 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9880 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9881 (target_regsets): Rename to ...
9882 (xtensa_regsets): ... this, and make static.
9883 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9884 globals.
9885 (xtensa_arch_setup, xtensa_regs_info): New functions.
9886 (the_low_target): Adjust.
9887 (initialize_low_arch): New function.
9888 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9889 (nios2_arch_setup): Set the current process'es tdesc.
9890 (target_regsets): Rename to ...
9891 (nios2_regsets): ... this.
9892 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9893 (nios2_regs_info): New function.
9894 (the_low_target): Adjust.
9895 (initialize_low_arch): New function.
a261b8f5
PA
9896 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9897 (aarch64_arch_setup): Set the current process'es tdesc.
9898 (target_regsets): Rename to ...
9899 (aarch64_regsets): ... this.
9900 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9901 (aarch64_regs_info): New function.
9902 (the_low_target): Adjust.
9903 (initialize_low_arch): New function.
3aee8918
PA
9904 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9905 globals.
9906 (target_regsets): Rename to ...
9907 (tile_regsets): ... this.
9908 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9909 (tile_regs_info): New function.
9910 (tile_arch_setup): Set the current process'es tdesc.
9911 (the_low_target): Adjust.
9912 (initialize_low_arch): New function.
9913 * spu-low.c (tdesc_spu): Declare.
9914 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9915 * win32-arm-low.c (tdesc_arm): Declare.
9916 (arm_arch_setup): New function.
9917 (the_low_target): Install arm_arch_setup instead of
9918 init_registers_arm.
9919 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9920 (init_windows_x86): Rename to ...
9921 (i386_arch_setup): ... this. Set `win32_tdesc'.
9922 (the_low_target): Adjust.
9923 * win32-low.c (win32_tdesc): New global.
9924 (child_add_thread): Don't create the thread cache here.
9925 (do_initial_child_stuff): Set the new process'es tdesc.
9926 * win32-low.h (struct target_desc): Forward declare.
9927 (win32_tdesc): Declare.
9928 * lynx-i386-low.c (tdesc_i386): Declare global.
9929 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9930 * lynx-low.c (lynx_tdesc): New global.
9931 (lynx_add_process): Set the new process'es tdesc.
9932 * lynx-low.h (struct target_desc): Forward declare.
9933 (lynx_tdesc): Declare global.
9934 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9935 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9936 * nto-low.c (nto_tdesc): New global.
9937 (do_attach): Set the new process'es tdesc.
9938 * nto-low.h (struct target_desc): Forward declare.
9939 (nto_tdesc): Declare.
9940 * nto-x86-low.c (tdesc_i386): Declare.
9941 (nto_x86_arch_setup): Set `nto_tdesc'.
9942
b1fbec62
GB
99432013-06-04 Gary Benson <gbenson@redhat.com>
9944
9945 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9946 to qSupported response when appropriate.
9947 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9948 with nonzero-length annex.
9949 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9950 arguments supplied in annex.
9951
d1ec4ce7
DE
99522013-05-31 Doug Evans <dje@google.com>
9953
ac44adcb 9954 PR server/15594
d1ec4ce7
DE
9955 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9956 64 bits in 64-cross-32 environment.
9957
9b25f2d3
PA
99582013-05-28 Pedro Alves <palves@redhat.com>
9959
9960 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9961 (aarch64-without-fpu.c): Delete rule.
9962 * configure.srv (aarch64*-*-linux*): Remove references to
9963 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9964 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9965 declaration.
9966
6740dc9c
PA
99672013-05-24 Pedro Alves <palves@redhat.com>
9968
9969 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9970 instead of strchr/decode_address. Error if the range isn't split
9971 with a ','. Don't assume there's be a ':' in the action.
9972
c2d6af84
PA
99732013-05-23 Yao Qi <yao@codesourcery.com>
9974 Pedro Alves <palves@redhat.com>
9975
9976 * linux-low.c (lwp_in_step_range): New function.
9977 (linux_wait_1): If the thread was range stepping and stopped
9978 outside the stepping range, report the stop to GDB. Otherwise,
9979 continue stepping. Add range stepping debug output.
9980 (linux_set_resume_request): Copy the step range from the resume
9981 request to the lwp.
9982 (linux_supports_range_stepping): New.
9983 (linux_target_ops) <supports_range_stepping>: Set to
9984 linux_supports_range_stepping.
9985 * linux-low.h (struct linux_target_ops)
9986 <supports_range_stepping>: New field.
9987 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9988 * linux-x86-low.c (x86_supports_range_stepping): New.
9989 (the_low_target) <supports_range_stepping>: Set to
9990 x86_supports_range_stepping.
9991 * server.c (handle_v_cont): Handle 'r' action.
9992 (handle_v_requests): Append ";r" if the target supports range
9993 stepping.
9994 * target.h (struct thread_resume) <step_range_start,
9995 step_range_end>: New fields.
9996 (struct target_ops) <supports_range_stepping>:
9997 New field.
9998 (target_supports_range_stepping): New macro.
9999
58794e1a
JB
100002013-05-17 Joel Brobecker <brobecker@adacore.com>
10001
10002 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10003 confusion in comment.
10004
d631c5a7
JB
100052013-05-17 Joel Brobecker <brobecker@adacore.com>
10006
10007 * lynx-low.c (struct process_info_private): New type.
10008 (lynx_add_process): New function.
10009 (lynx_create_inferior, lynx_attach): Replace calls to
10010 add_process by calls to lynx_add_process.
10011 (lynx_resume): If PTID is null, then try using
10012 current_process()->private->last_wait_event_ptid.
10013 Add comments.
10014 (lynx_clear_inferiors): Delete. The contents of that function
10015 has been inlined in lynx_mourn;
10016 (lynx_wait_1): Save the ptid in the process's private data.
10017 (lynx_mourn): Free the process' private data. Replace call
10018 to lynx_clear_inferiors by call to clear_inferiors.
10019
96f7a20f
YQ
100202013-05-17 Yao Qi <yao@codesourcery.com>
10021
10022 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10023 the right place.
10024
db0dfaa0
LM
100252013-05-16 Luis Machado <lgustavo@codesourcery.com>
10026
10027 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10028 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10029 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10030 PT_TEXT_END_ADDR guards. Update comments.
10031 (linux_target_op) <read_offsets>: Conditionally define to
10032 linux_read_offsets if the target is UCLIBC and if it defines
10033 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10034
68f5f838
SL
100352013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10036 Andrew Jenner <andrew@codesourcery.com>
10037
10038 * Makefile.in (SFILES): Add linux-nios2-low.c.
10039 (clean): Add action to delete nios2-linux.c.
10040 (nios2-linux.c): New rule.
10041 * configure.srv: Add nios2*-*-linux*.
10042 * linux-nios2-low.c: New.
10043
1ebff1fd
HAQ
100442013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10045
10046 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10047
f6150862
HZ
100482013-04-25 Hui Zhu <hui@codesourcery.com>
10049
10050 PR gdb/15186
f6150862
HZ
10051 * ax.c (ax_printf): Add fflush.
10052
614c279d
TT
100532013-04-22 Tom Tromey <tromey@redhat.com>
10054
10055 * Makefile.in (SFILES): Add filestuff.c.
10056 (OBS): Add filestuff.o.
10057 (filestuff.o): New target.
10058 * config.in, configure: Rebuild.
10059 * configure.ac: Check for fdwalk, pipe2.
10060
7d4e5717
PA
100612013-04-17 Pedro Alves <palves@redhat.com>
10062
10063 * configure.ac (USE_THREAD_DB): Delete variable.
10064 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10065 Don't AC_SUBST USE_THREAD_DB.
10066 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10067 * config.in, configure: Regenerate.
10068
d5c93e41
PA
100692013-04-16 Pedro Alves <palves@redhat.com>
10070
10071 * linux-low.h (struct lwp_info) <thread_known>: Move under
10072 the USE_THREAD_DB #ifdef.
10073
04f5fe89
PA
100742013-04-16 Pedro Alves <palves@redhat.com>
10075
10076 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10077 (linux-low.o): Delete rule.
10078 * linux-low.h: Always include "gdb_thread_db.h" instead of
10079 conditionally including thread_db.h.
10080 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10081 HAVE_THREAD_DB_H.
10082
480b27bf
JK
100832013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10084
10085 * Makefile.in (install-only): Fix make install regression.
10086
43662968
JK
100872013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10088
10089 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10090 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10091 installation.
10092 * gdbserver.1: Remove.
10093
3e74e146
PA
100942013-03-22 Pedro Alves <palves@redhat.com>
10095
10096 * linux-low.c (handle_extended_wait): Don't call
10097 linux_enable_event_reporting.
10098
a8347a2a
TT
100992013-03-15 Tony Theodore <tonyt@logyst.com>
10100
10101 PR build/9098:
10102 * Makefile.in (SHELL): Use @SHELL@.
10103
eeb56fa7
SDJ
101042013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10105
10106 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10107 compiler warning.
10108
4fa7e2ff
JB
101092013-03-13 Joel Brobecker <brobecker@adacore.com>
10110
10111 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10112 Remove extraneous NULL element.
10113
8ddb1965
YQ
101142013-03-13 Yao Qi <yao@codesourcery.com>
10115
10116 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10117 'V' block in trace frame.
10118
9accd112
MM
101192013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10120
10121 * target.h (struct target_ops): Add btrace ops.
10122 (target_supports_btrace): New macro.
10123 (target_enable_btrace): New macro.
10124 (target_disable_btrace): New macro.
10125 (target_read_btrace): New macro.
10126 * gdbthread.h (struct thread_info): Add btrace field.
10127 * server.c: Include btrace-common.h.
10128 (handle_btrace_general_set): New function.
10129 (handle_btrace_enable): New function.
10130 (handle_btrace_disable): New function.
10131 (handle_general_set): Call handle_btrace_general_set.
10132 (handle_qxfer_btrace): New function.
10133 (struct qxfer qxfer_packets[]): Add btrace entry.
10134 * inferiors.c (remove_thread): Disable btrace.
10135 * linux-low: Include linux-btrace.h.
10136 (linux_low_enable_btrace): New function.
10137 (linux_low_read_btrace): New function.
10138 (linux_target_ops): Add btrace ops.
10139 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10140 Add srv_linux_btrace=yes.
10141 (x86_64-*-linux*): Add linux-btrace.o.
10142 Add srv_linux_btrace=yes.
10143 * configure.ac: Define HAVE_LINUX_BTRACE.
10144 * config.in: Regenerated.
10145 * configure: Regenerated.
10146
5cc22e4c
MM
101472013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10148
10149 * server.c (handle_qxfer): Preserve error message if -3 is
10150 returned.
10151 (qxfer): Document the -3 return value.
10152
7c97f91e
MM
101532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10154
10155 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10156 (linux_btrace_h): New variable.
10157 (linux-btrace.o): New rule.
10158
be9a119c 101592013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10160 Hafiz Abid Qadeer <abidh@codesourcery.com>
10161
10162 * tracepoint.c (trace_buffer_size): New global.
10163 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10164 (init_trace_buffer): Change to one-argument function. Allocate
10165 trace buffer memory.
10166 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10167 handle QTBuffer:size packet.
10168 (cmd_bigqtbuffer_size): New function.
10169 (initialize_tracepoint): Call init_trace_buffer with
10170 DEFAULT_TRACE_BUFFER_SIZE.
10171 * server.c (handle_query): Add QTBuffer:size in the
10172 supported packets.
10173
e64f7499
YQ
101742013-03-07 Yao Qi <yao@codesourcery.com>
10175
10176 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10177 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10178 of -1.
10179 (cmd_qtsp): Adjust condition. Do post increment.
10180 Set cur_action and cur_step_action back to 0.
10181
f0ae6fc3
PA
101822013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10183
10184 PR server/15236
10185 * linux-low.c (linux_write_memory): Return early success if LEN is
10186 zero.
10187
b5b0b0af
CV
101882013-03-05 Corinna Vinschen <vinschen@redhat.de>
10189
334ad4a8 10190 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10191
589bc927
TT
101922013-02-28 Tom Tromey <tromey@redhat.com>
10193
10194 * configure.ac: Invoke AC_SYS_LARGEFILE.
10195 * configure, config.in: Rebuild.
10196
dfe07582
CV
101972013-02-28 Corinna Vinschen <vinschen@redhat.com>
10198
10199 * win32-low.c: Throughout, fix format strings and casts of
10200 printf-like functions to avoid type related warnings on all
10201 platforms.
10202 (get_child_debug_event): Print dwDebugEventCode as hex since
10203 that's how it's usually documented.
10204
736cd585
YQ
102052013-02-28 Yao Qi <yao@codesourcery.com>
10206
10207 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10208 pulongest.
10209
e1f58301
JW
102102013-02-27 Jiong Wang <jiwang@tilera.com>
10211
10212 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10213 (reg-tilegx32.c): New rule.
10214 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10215 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10216 different register info initializer according to elf class.
10217 (init_registers_tilgx32): New function. The tilegx32 register info
10218 initializer.
10219 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10220 (tile_store_gregset): Likewise.
10221
d171ca78
YQ
102222013-02-27 Yao Qi <yao@codesourcery.com>
10223
10224 * server.c (process_point_options): Print debug message when
10225 debug_threads is true.
10226
282bbdf3
YQ
102272013-02-26 Yao Qi <yao@codesourcery.com>
10228
10229 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10230
aca22551
PA
102312013-02-19 Pedro Alves <palves@redhat.com>
10232 Kai Tietz <ktietz@redhat.com>
10233
10234 PR gdb/15161
10235
10236 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10237 instead of strtoul to extract address from packet.
10238 (process_serial_event) <'z'>: Likewise.
10239
4f3cee1c
YQ
102402013-02-18 Yao Qi <yao@codesourcery.com>
10241
10242 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10243
8e1d55a3
PA
102442013-02-14 Pedro Alves <palves@redhat.com>
10245
10246 Plug memory leak.
10247
10248 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10249 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10250
458820da
PA
102512013-02-14 Pedro Alves <palves@redhat.com>
10252
10253 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10254
baea0dae
PA
102552013-02-14 Pedro Alves <palves@redhat.com>
10256
10257 * tracepoint.c (save_string): Delete.
10258 (add_tracepoint_action): Use savestring instead of save_string.
10259
0b1afbb3
PA
102602013-02-12 Pedro Alves <palves@redhat.com>
10261
10262 * linux-xtensa-low.c: Ditto.
10263 * xtensa-xtregs.c: Ditto.
10264
8a4ac37e
PA
102652013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10266
10267 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10268 thread_db.
10269
148de6bb
MS
102702013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10271
10272 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10273 aarch64_num_wp_regs and aarch64_num_bp_regs to
10274 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10275
55fac6e0
MS
102762013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10277
10278 * linux-aarch64-low.c (ps_get_thread_area): Replace
10279 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10280
176eb98c
MS
102812013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10282 Marcus Shawcroft <marcus.shawcroft@arm.com>
10283 Nigel Stephens <nigel.stephens@arm.com>
10284 Yufeng Zhang <yufeng.zhang@arm.com>
10285
10286 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10287 (aarch64.c, aarch64-without-fpu.c): New targets.
10288 * configure.srv (aarch64*-*-linux*): New.
10289 * linux-aarch64-low.c: New file.
10290
56f7af9c
MS
102912013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10292
43aaf8b6 10293 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10294 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10295 (dequeue_one_deferred_signal, linux_resume_one_thread)
10296 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10297 (linux_tracefork_grandchild, linux_test_for_tracefork)
10298 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10299 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10300 where the argument is 0.
10301
60f662b0
YQ
103022013-01-25 Yao Qi <yao@codesourcery.com>
10303
10304 * event-loop.c: Include "queue.h".
10305 (gdb_event_p): New typedef.
10306 (struct gdb_event) <next_event>: Remove.
10307 (event_queue): Change to QUEUE(gdb_event_p).
10308 (async_queue_event): Remove.
10309 (gdb_event_xfree): New.
10310 (initialize_event_loop): New.
10311 (process_event): Use API from QUEUE.
10312 (wait_for_event): Likewise.
10313 * server.c (main): Call initialize_event_loop.
10314 * server.h (initialize_event_loop): Declare.
10315
5ae4861a
YQ
103162013-01-18 Yao Qi <yao@codesourcery.com>
10317
10318 * ax.h (struct eval_agent_expr_context): New.
10319 (gdb_eval_agent_expr): Update declaration.
10320 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10321 TFRAME. Add new argument CTX.
10322 * server.h (struct eval_agent_expr_context): Declare.
10323 (agent_mem_read, agent_tsv_read): Update declaration.
10324 (agent_mem_read_string): Likewise.
10325 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10326 (add_traceframe_block): Add new argument TPOINT.
10327 Increase TPOINT->traceframe_usage.
10328 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10329 eval_tracepoint_agent_expr.
10330 (condition_true_at_tracepoint): Likewise.
10331 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10332 (agent_mem_read_string, agent_tsv_read): Likewise.
10333
85e00e85
YQ
103342013-01-16 Yao Qi <yao@codesourcery.com>
10335
10336 * linux-low.c (linux_resume_one_lwp): Don't check
10337 'lwp->bp_reinsert != 0'.
10338
4039cf45
JB
103392013-01-07 Joel Brobecker <brobecker@adacore.com>
10340 Pedro Alves <palves@redhat.com>
10341
10342 * lynx-low.c (ptrace_request_to_str): Define a temporary
10343 macro and use it to simplify this function's implementation.
10344
9044dee2
JB
103452013-01-07 Joel Brobecker <brobecker@adacore.com>
10346
10347 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10348 sets errno.
10349
e6352c8f
JB
103502013-01-07 Joel Brobecker <brobecker@adacore.com>
10351
10352 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10353
50681a27
JB
103542013-01-07 Joel Brobecker <brobecker@adacore.com>
10355
10356 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10357
3f6e77ef
JB
103582013-01-07 Joel Brobecker <brobecker@adacore.com>
10359
10360 * lynx-low.c (lynx_resume): Use the resume_info parameter
10361 to determine the ptid for the lynx_ptrace call, unless
10362 it is equal to minus_one_ptid, in which case we use the
10363 ptid of the current_inferior.
10364 (lynx_wait_1): After having received a thread create/exit
10365 event, resume the inferior's execution using the signaling
10366 thread's ptid, rather than the old ptid.
10367
7fda33ae
JB
103682013-01-07 Joel Brobecker <brobecker@adacore.com>
10369
10370 * lynx-low.c (lynx_resume): Delete variable ret.
10371
b9786c74
JB
103722013-01-01 Joel Brobecker <brobecker@adacore.com>
10373
10374 * gdbreplay.c (gdbreplay_version): Update copyright year.
10375 * server.c (gdbserver_version): Likewise.
10376
8b93d60f
JB
103772012-12-17 Joel Brobecker <brobecker@adacore.com>
10378
10379 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10380 new thread.
10381
037335a7
JB
103822012-12-17 Joel Brobecker <brobecker@adacore.com>
10383
10384 * lynx-low.c (ptrace_request_to_str): Add handling for
10385 PTRACE_GETTRACESIG.
10386
52d4cbd8
JB
103872012-12-17 Joel Brobecker <brobecker@adacore.com>
10388
10389 * lynx-low.c (lynx_attach): Delete variable new_process.
10390
ab8f6ca9
JB
103912012-12-17 Joel Brobecker <brobecker@adacore.com>
10392
10393 * lynx-low.c (lynx_create_inferior): Delete variable
10394 new_process.
10395
78cbc024
JB
103962012-12-17 Joel Brobecker <brobecker@adacore.com>
10397
10398 * lynx-low.c (ptrace_request_to_str): Do not handle
10399 PTRACE_GETTHREADLIST if this macro does not exist.
10400
14a00470
YQ
104012012-12-15 Yao Qi <yao@codesourcery.com>
10402
10403 * Makefile.in (OBS): Add notif.o.
10404 * notif.c, notif.h: New.
10405 * server.c: Include "notif.h".
10406 (struct vstop_notif) <next>: Remove.
10407 <base>: New field.
10408 (queue_stop_reply): Update.
10409 (push_event, send_next_stop_reply): Remove.
10410 (discard_queued_stop_replies): Update.
10411 (notif_stop): New variable.
10412 (handle_v_stopped): Remove.
10413 (handle_v_requests): Don't call handle_v_stopped. Call
10414 handle_ack_notif instead.
10415 (queue_stop_reply_callback): Call notif_event_enque instead
10416 of queue_stop_reply.
10417 (handle_status): Don't call send_next_stop_reply, call
10418 notif_write_event instead.
10419 (kill_inferior_callback): Likewise.
10420 (detach_or_kill_inferior_callback): Likewise.
10421 (main): Call initialize_notif.
10422 (process_serial_event): Call QUEUE_is_empty.
10423 (handle_target_event): Call notif_push instead of push event.
10424 * server.h (push_event): Remove declaration.
10425
61c125b9
TT
104262012-12-10 Tom Tromey <tromey@redhat.com>
10427
10428 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10429 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10430 macros.
10431 (.c.o): Rewrite.
10432 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10433 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10434 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10435 (amd64-linux-ipa.o, ax.o): Rewrite.
10436 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10437 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10438 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10439 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10440 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10441 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10442 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10443 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10444 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10445 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10446 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10447 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10448 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10449 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10450 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10451 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10452 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10453 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10454 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10455 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10456 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10457 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10458 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10459 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10460 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10461 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10462 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10463 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10464 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10465 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10466 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10467 (reg-tilegx.o): Remove.
10468 (all_object_files): New macro.
10469 Include .deps files.
10470 * aclocal.m4, configure: Rebuild.
10471 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10472 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10473 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10474
e90e9ad9
TT
104752012-12-05 Tom Tromey <tromey@redhat.com>
10476
10477 PR gdb/14917:
10478 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10479
02d403bf 104802012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10481
10482 * configure.ac: Check for linux/perf_event.h.
10483 * config.in: Regenerated.
10484 * configure: Regenerated.
10485
0270a750
PA
104862012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10487
10488 * hostio.c (handle_readlink): Decrease buffer size
10489 parameter passed to readlink by one byte.
10490
8c29b58e
YQ
104912012-11-26 Yao Qi <yao@codesourcery.com>
10492
10493 * configure.ac (build_warnings): Append '-Wempty-body'.
10494 * configure: Regenerated.
10495 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10496 body.
10497
8bdce1ff
PM
104982012-11-15 Pierre Muller <muller@sourceware.org>
10499
10500 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10501 * config.in: Regenerate.
10502 * configure: Regenerate.
10503 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10504 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10505 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10506 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10507 header.
10508 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10509 instead of <sys/wait.h> header.
10510 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10511
02d403bf 105122012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10513
10514 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10515 (various make rules): Remove -DGDBSERVER
10516
fbd5db48
YQ
105172012-11-09 Yao Qi <yao@codesourcery.com>
10518
10519 * spu-low.c (current_ptid): Move it to ..
10520 * gdbthread.h: ... here. New.
10521 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10522 * server.c (myresume, process_serial_event): Likewise.
10523 * thread-db.c (thread_db_find_new_threads): Likewise.
10524 * tracepoint.c (run_inferior_command): Likewise.
10525
b3dc46ff
AB
105262012-10-01 Andrew Burgess <aburgess@broadcom.com>
10527
10528 * server.c (handle_search_memory_1): Include access length in
10529 warning message.
10530
07c04788
HPN
105312012-09-05 Michael Brandt <michael.brandt@axis.com>
10532
10533 * linux-crisv32-low.c: Fix compile errors.
10534
918d227b
YQ
105352012-09-04 Yao Qi <yao@codesourcery.com>
10536
10537 * tracepoint.c (cmd_qtsv): Adjust debug message.
10538 Don't check CUR_TPOINT.
10539
18c1b81a
YQ
105402012-08-28 Yao Qi <yao@codesourcery.com>
10541
10542 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10543 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10544 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10545 Remove declarations of xmalloc, xreallloc, xstrdup and
10546 freeargv.
10547 * Makefile.in (libiberty_h): New.
10548 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10549 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10550
dc82f37b
YQ
105512012-08-23 Yao Qi <yao@codesourcery.com>
10552
10553 * server.h: Remove declaration of 'xsnprintf'.
10554
406b1477
KS
105552012-08-22 Keith Seitz <keiths@redhat.com>
10556
10557 * server.h: Include build-gnulib-gbserver/config.h.
10558 * gdbreplay.c: Likewise.
10559
e6712ff1
DE
105602012-08-08 Doug Evans <dje@google.com>
10561
10562 * Makefile.in (SFILES): Add gdb_vecs.c.
10563 (OBS): Add gdb_vecs.o.
10564 (gdb_vecs_h, host_defs_h): New variables.
10565 (thread-db.o): Add $(gdb_vecs_h) dependency.
10566 (gdb_vecs.o): New rule.
10567 * thread-db.c: #include "gdb_vecs.h".
10568 (thread_db_load_search): Use a vector to iterate over path elements.
10569 Handle text appearing after "$pdir".
10570
10571 * configure.ac: Add check for strstr.
10572 * config.in: Regenerate.
10573 * configure: Regenerate.
10574
7c3270ae
UW
105752012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10576
10577 * hostio.c (handle_pread): If pread fails, fall back to attempting
10578 lseek/read.
10579 (handle_pwrite): Likewise for pwrite.
10580
b62e2b27
UW
105812012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10582
10583 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10584 between unsupported TYPE and unimplementable ADDR/LEN combination.
10585 (arm_insert_point): Act on new return value.
10586
78a99e91
PA
105872012-07-31 Pedro Alves <palves@redhat.com>
10588
10589 * server.c (process_point_options): Only skip tokens if we find
10590 one that is unrecognized. Don't treat 'X' specially while
10591 skipping unrecognized tokens.
10592
fcf303ab
UW
105932012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10594
10595 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10596 to 4-byte-align HW breakpoint addresses for Thumb.
10597
7255706c
YQ
105982012-07-27 Yao Qi <yao@codesourcery.com>
10599
10600 PR remote/14161.
10601
10602 * server.h: Declare gdb_agent_about_to_close.
10603 * target.c (kill_inferior): Include "agent.h".
10604 New. Send command 'kill'.
10605 * target.h (kill_inferior): Removed macro.
10606 * tracepoint.c (gdb_agent_about_to_close): New.
10607 (gdb_agent_helper_thread): Handle command 'close'.
10608 Wait endlessly until the inferior stops.
10609 Install gdb_agent_remove_socket to atexit hook.
10610 (agent_socket_name): New static variable.
10611 (gdb_agent_socket_init): Replace local variable 'name' with
10612 'agent_socket_name'.
10613 (gdb_agent_remove_socket): New.
10614
5a3f286f
YQ
106152012-07-27 Yao Qi <yao@codesourcery.com>
10616
10617 * server.c (process_point_options): Stop at 'X' when parsing.
10618
961bd387
ME
106192012-07-19 Michael Eager <eager@eagercon.com>
10620
a261b8f5 10621 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10622 to hw_execute.
10623 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10624 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10625 hardware breakpoint.
10626
aa7c7447
JK
106272012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10628
10629 * gdbserver/linux-low.c (initialize_low): Call
10630 linux_ptrace_init_warnings.
10631
7f216e7c
DE
106322012-07-02 Doug Evans <dje@google.com>
10633
10634 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10635 pointer to int.
10636
d3ce09f5
SS
106372012-07-02 Stan Shebs <stan@codesourcery.com>
10638
10639 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10640 (ax.o): Add it to build rule.
10641 (ax-ipa.o): Ditto.
10642 (OBS): Add format.o.
10643 (IPA_OBS): Add format.o.
10644 * server.c (handle_query): Claim support for breakpoint commands.
10645 (process_point_options): Add command case.
10646 (process_serial_event): Leave running if there are printfs in
10647 effect.
10648 * mem-break.h (any_persistent_commands): Declare.
10649 (add_breakpoint_commands): Declare.
10650 (gdb_no_commands_at_breakpoint): Declare.
10651 (run_breakpoint_commands): Declare.
10652 * mem-break.c (struct point_command_list): New struct.
10653 (struct breakpoint): New field command_list.
10654 (any_persistent_commands): New function.
10655 (add_commands_to_breakpoint): New function.
10656 (add_breakpoint_commands): New function.
10657 (gdb_no_commands_at_breakpoint): New function.
10658 (run_breakpoint_commands): New function.
10659 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10660 locally.
10661 * ax.c: Include format.h.
10662 (ax_printf): New function.
10663 (gdb_eval_agent_expr): Add printf opcode.
10664
2f8f6aed
YQ
106652012-06-13 Yao Qi <yao@codesourcery.com>
10666
10667 * server.c (start_inferior): Remove duplicated writes to fields
10668 'last_resume_kind' and 'last_status' of 'current_inferior'.
10669
0c9070b3
YQ
106702012-06-12 Yao Qi <yao@codesourcery.com>
10671 Pedro Alves <palves@redhat.com>
10672
10673 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10674 comment.
10675 * server.c (handle_v_cont): Extend comment.
10676
c52daf70
YQ
106772012-06-11 Yao Qi <yao@codesourcery.com>
10678
10679 * linux-low.c (linux_attach): Add 'static'.
10680
d38bbb0a
YQ
106812012-06-06 Yao Qi <yao@codesourcery.com>
10682
10683 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10684
89dc0afd
JK
106852012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10686
10687 Fix gcc -flto compilation warning.
10688 * server.c (main): Make variable multi_mode and attach volatile.
10689
75f62ce7
TJB
106902012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10691
10692 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10693 if the platform doesn't know about it.
10694
65f479b6
PA
106952012-05-30 Jeff Kenton <jkenton@tilera.com>
10696
10697 * Makefile.in (SFILES): Add linux-tile-low.c.
10698 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10699 * configure.srv: Handle tilegx-*-linux*.
10700 * linux-tile-low.c: New file.
10701
0c5bf5a9
JK
107022012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10703
10704 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10705
a493e3e2
PA
107062012-05-24 Pedro Alves <palves@redhat.com>
10707
10708 PR gdb/7205
10709
43aaf8b6 10710 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10711
2ea28649
PA
107122012-05-24 Pedro Alves <palves@redhat.com>
10713
10714 PR gdb/7205
10715
10716 Replace target_signal with gdb_signal throughout.
10717
8d409d16
MR
107182012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10719
10720 * linux-low.c (linux_store_registers): Avoid the copying sequence
10721 when no data has been retrieved by ptrace.
10722
23512c01
MGD
107232012-05-22 Will Deacon <will.deacon@arm.com>
10724
10725 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10726 Include asm/ptrace.h.
10727 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10728 already defined.
10729
4934b29e
MR
107302012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10731
10732 * linux-low.c (linux_store_registers): Don't re-retrieve data
10733 with ptrace that has already been obtained from /proc. Always
10734 copy any data retrieved with ptrace to the buffer supplied.
10735
bde24c0a
PA
107362012-05-11 Yao Qi <yao@codesourcery.com>
10737 Pedro Alves <palves@redhat.com>
10738
10739 * linux-low.c (enum stopping_threads_kind): New.
10740 (stopping_threads): Change type to `enum stopping_threads_kind'.
10741 (handle_extended_wait): If stopping and suspending threads, leave
10742 the new_lwp suspended too.
10743 (linux_wait_for_event): Adjust.
10744 (stop_all_lwps): Set `stopping_threads' to
10745 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10746 whether we're suspending threads or just stopping them. Assert no
10747 recursion happens.
10748
623b6bdf
YQ
107492012-04-29 Yao Qi <yao@codesourcery.com>
10750
10751 * server.h: Move some code to ...
10752 * gdbthread.h: ... here. New.
10753 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10754 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10755 (nto-low.o, win32-low.o): Likewise.
10756 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10757 * regcache.c, remote-utils.c, server.c: Likewise.
10758 * target.c, tracepoint.c, win32-low.c: Likewise.
10759
f15f9948
TJB
107602012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10761
10762 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10763 (PTRACE_ARG4_TYPE): Likewise.
10764 (PTRACE_XFER_TYPE): Likewise.
10765 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10766 ptrace to PTRACE_ARG3_TYPE.
10767 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10768 (PTRACE_ARG4_TYPE): Likewise.
10769 (PTRACE_XFER_TYPE): Likewise.
10770 (linux_detach_one_lwp): Cast fourth argument of
10771 ptrace to long then PTRACE_ARG4_TYPE.
10772 (regsets_fetch_inferior_registers): Cast third argument of
10773 ptrace to long then PTRACE_ARG3_TYPE.
10774 (regsets_store_inferior_registers): Likewise.
10775
38ea300a
PA
107762012-04-20 Pedro Alves <palves@redhat.com>
10777
10778 * configure: Regenerate.
10779
c971b7fa
PA
107802012-04-19 Pedro Alves <palves@redhat.com>
10781
43aaf8b6 10782 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10783 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10784 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10785 (all, install-only, uninstall, clean-info, all-lib, clean): No
10786 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10787 (maintainer-clean realclean distclean): Use subdir_do.
10788 (subdir_do): New.
10789 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10790 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10791 * acinclude.m4: Include acx_configure_dir.m4.
10792 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10793 calls. Call AC_PROG_RANLIB. Configure gnulib using
10794 ACX_CONFIGURE_DIR.
10795 (GNULIB): New.
10796 (GNULIB_STDINT_H): Adjust.
10797 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10798 * gdbreplay.c: Include build-gnulib/config.h.
10799 * server.h: Likewise.
10800 * aclocal.m4: Regenerate.
10801 * config.in: Regenerate.
10802 * configure: Regenerate.
c971b7fa 10803
809277f8
PA
108042012-04-19 Pedro Alves <palves@redhat.com>
10805
10806 * Makefile.in (LIBGNU, INCGNU): Adjust.
10807 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10808 (all, install-only, uninstall, clean-info, all-lib, clean)
10809 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10810 * configure.ac: Adjust AC_OUTPUT output.
10811 * aclocal.m4: Regenerate.
10812 * configure: Regenerate.
10813
fd9bb8b8
PA
108142012-04-19 Pedro Alves <palves@redhat.com>
10815
10816 * Makefile.in (generated_files): New.
10817 (server_h): Remove the explicit dependency on config.h, and depend
10818 on $generated_files.
10819
1c298c66
PA
108202012-04-19 Pedro Alves <palves@redhat.com>
10821
10822 * Makefile.in (INCGNU): Add -Ignulib.
10823
57c4b50b
PA
108242012-04-19 Pedro Alves <palves@redhat.com>
10825
10826 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10827 (INCGNU): ... this, and spell out -I here.
10828 (GNULIB_LIB): Rename to ...
10829 (LIBGNU): ... this.
10830 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10831
1030e047
PA
108322012-04-19 Pedro Alves <palves@redhat.com>
10833
10834 * config.in: Regenerate.
10835
447d4319
PA
108362012-04-19 Pedro Alves <palves@redhat.com>
10837
10838 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10839 * server.h (memmem): Remove declaration.
10840 * config.in: Regenerate.
10841 * configure: Regenerate.
10842
aad9eab9
YQ
108432012-04-19 Yao Qi <yao@codesourcery.com>
10844
10845 * Makefile.in (SFILES): Add common/vec.c.
10846 (OBS): Add vec.o.
10847 (vec.o): New rule.
10848
3e10640f
YQ
108492012-04-19 Yao Qi <yao@codesourcery.com>
10850
10851 * remote-utils.c (prepare_resume_reply): Replace with macro
10852 target_core_of_thread.
10853 * server.c (handle_qxfer_threads_proper): Likewise.
10854 * target.h (traget_core_of_thread): New macro.
10855
71622373
PA
108562012-04-18 Pedro Alves <palves@redhat.com>
10857
10858 * aclocal.m4: Regenerate.
10859 * configure: Regenerate.
10860
80d26939
YQ
108612012-04-16 Yao Qi <yao@codesourcery.com>
10862
10863 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10864 duplicated on address.
10865
42476b70
YQ
108662012-04-16 Yao Qi <yao@codesourcery.com>
10867
10868 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10869 (struct tracepoint_action_ops) <send>: New field.
10870 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10871 (agent_expr_send, x_tracepoint_action_send): New.
10872 (l_tracepoint_action_send): New.
10873 (cmd_qtdp): Download and install tracepoint
10874 according to `use_agent'.
10875 (run_inferior_command): Add one more parameter `len'.
10876 Update callers.
10877 (tracepoint_send_agent): New.
10878 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10879
7bc83639
YQ
108802012-04-16 Yao Qi <yao@codesourcery.com>
10881
10882 * tracepoint.c (download_tracepoints): Moved to ...
10883 (cmd_qtstart): ... here.
10884
5f18041e
YQ
108852012-04-14 Yao Qi <yao@codesourcery.com>
10886
10887 * tracepoint.c: Include inttypes.h.
10888 (struct collect_memory_action): Use sized types.
10889 (struct tracepoint): Likewise.
10890 (cmd_qtdp, stop_tracing): Update print specifiers.
10891 (cmd_qtp, response_tracepoint): Likewise.
10892 (collect_data_at_tracepoint): Likewise.
10893 (collect_data_at_step): Likewise.
10894
55a8c076
YQ
108952012-04-14 Yao Qi <yao@codesourcery.com>
10896
10897 Import gnulib module inttypes.
10898 * aclocal.m4, config.in, configure: Regenerated.
10899
dc750257
YQ
109002012-04-14 Yao Qi <yao@codesourcery.com>
10901
10902 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10903 Makefile and config.status at last.
10904
0ab5faf9
YQ
109052012-04-13 Yao Qi <yao@codesourcery.com>
10906
10907 * tracepoint.c: Include stdint.h unconditionally.
10908
18f5fd81
TJB
109092012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10910
10911 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10912 on BFD_HAVE_SYS_PROCFS_TYPE.
10913 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10914 * configure: Regenerate.
10915 * config.in: Likewise.
10916
4d47af5c
L
109172012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10918
10919 * Makefile.in (clean): Also remove x32.c x32-linux.c
10920 x32-avx.c x32-avx-linux.c.
10921 (x32.o): New target.
10922 (x32.c): Likewise.
10923 (x32-linux.o): Likewise.
10924 (x32-linux.c): Likewise.
10925 (x32-avx.o): Likewise.
10926 (x32-avx.c): Likewise.
10927 (x32-avx-linux.o): Likewise.
10928 (x32-avx-linux.c): Likewise.
10929
10930 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10931 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10932 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10933 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10934 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10935 i386/x32-avx-linux.xml.
10936
10937 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10938 (init_registers_x32_avx_linux): Likwise.
10939 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10940 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10941
ecedbe58
PA
109422012-04-13 Pedro Alves <palves@redhat.com>
10943
10944 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10945 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10946 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10947 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10948 the sub-make.
10949
c92b5177
L
109502012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10951
10952 * linux-x86-low.c (compat_x32_clock_t): New.
10953 (compat_x32_siginfo_t): Likewise.
10954 (compat_x32_siginfo_from_siginfo): Likewise.
10955 (siginfo_from_compat_x32_siginfo): Likewise.
10956 (linux_is_elf64): Likewise.
10957 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10958 and siginfo_from_compat_x32_siginfo for x32.
10959 (x86_arch_setup): Set linux_is_elf64.
10960
214d508e
L
109612012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10962
10963 PR gdb/13969
10964 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10965 e_machine field.
10966 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10967 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10968 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10969 compatible with process.
10970
c9a1864a
YQ
109712012-04-12 Yao Qi <yao@codesourcery.com>
10972
10973 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10974 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10975 (install-only, install-info, clean): Handle sub dir gnulib.
10976 (all-lib, am--refresh): New targets.
10977 (memmem.o): Remove target.
10978 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10979 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10980 (AC_REPLACE_FUNCS): Remove memmem.
10981 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10982 (AC_OUTPUT): Generate Makefile in gnulib/.
10983 * aclocal.m4, config.in, configure: Regenerated.
10984
367ba2c2
MR
109852012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10986
10987 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10988
9d236627
PA
109892012-04-05 Pedro Alves <palves@redhat.com>
10990
10991 -Werror=strict-aliasing
10992
10993 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10994 pointer.
10995
111217b3
PA
109962012-04-04 Pedro Alves <palves@redhat.com>
10997
10998 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10999 (sparc_store_gregset_from_stack, sparc_store_gregset)
11000 (sparc_breakpoint_at): Fix formatting.
11001
8365dcf5
TJB
110022012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11003
11004 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11005 are available.
11006 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11007 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11008 * config.in: Regenerate.
11009 * configure: Likewise.
11010
689cc2ae
PA
110112012-03-29 Pedro Alves <palves@redhat.com>
11012
11013 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11014 Correct ptrace arguments.
11015
c14dfd32
PA
110162012-03-28 Pedro Alves <palves@redhat.com>
11017
11018 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11019 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11020 (IA64_FR1_REGNUM): New defines.
11021 (ia64_fetch_register): New.
11022 (the_low_target): Install it.
11023 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11024 field.
11025 * linux-low.c (linux_fetch_registers): Try the
11026 the_low_target.fetch_register hook first.
11027
11028 * linux-arm-low.c (the_low_target): Adjust.
11029 * linux-bfin-low.c (the_low_target): Adjust.
11030 * linux-cris-low.c (the_low_target): Adjust.
11031 * linux-crisv32-low.c (the_low_target): Adjust.
11032 * linux-m32r-low.c (the_low_target): Adjust.
11033 * linux-m68k-low.c (the_low_target): Adjust.
11034 * linux-mips-low.c (the_low_target): Adjust.
11035 * linux-ppc-low.c (the_low_target): Adjust.
11036 * linux-s390-low.c (the_low_target): Adjust.
11037 * linux-sh-low.c (the_low_target): Adjust.
11038 * linux-sparc-low.c (the_low_target): Adjust.
11039 * linux-tic6x-low.c (the_low_target): Adjust.
11040 * linux-x86-low.c (the_low_target): Adjust.
11041 * linux-xtensa-low.c (the_low_target): Adjust.
11042
63c88e13
PA
110432012-03-26 Pedro Alves <palves@redhat.com>
11044
11045 * server.c (handle_qxfer_libraries): Don't bail early if
11046 the_target->qxfer_libraries_svr4 is not NULL.
11047
fb723180
PA
110482012-03-26 Pedro Alves <palves@redhat.com>
11049
11050 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11051
0afae3cf
PA
110522012-03-23 Pedro Alves <palves@redhat.com>
11053
11054 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11055 "library-list-svr4" element's start tag when the the DSO list is
11056 empty.
11057
485f1ee4
PA
110582012-03-23 Pedro Alves <palves@redhat.com>
11059
11060 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11061 a variable whose type size is the same as the inferior's pointer
11062 size.
11063
a5362b9a
TS
110642012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11065
11066 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11067 struct siginfo.
11068 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11069 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11070 * linux-low.h: Include <signal.h>.
11071 (struct siginfo): Remove forward declaration.
11072 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11073 struct siginfo.
11074
d226c142
MF
110752012-03-21 Mike Frysinger <vapier@gentoo.org>
11076
11077 * .gitignore: Ignore more files.
11078
122f36ef
PA
110792012-03-19 Pedro Alves <palves@redhat.com>
11080 Jan Kratochvil <jan.kratochvil@redhat.com>
11081
11082 * server.c (cont_thread, general_thread): Add describing comments.
11083 (start_inferior): Clear `cont_thread'.
11084 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11085 of a process.
11086
fc3e5175
YQ
110872012-03-15 Yao Qi <yao@codesourcery.com>
11088
11089 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11090 handling to ...
11091 (cmd_qtdp): ... here.
11092
8d0d92cd
YQ
110932012-03-15 Yao Qi <yao@codesourcery.com>
11094
11095 * tracepoint.c (struct tracepoint_action_ops): New.
11096 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11097 (m_tracepoint_action_download): New.
11098 (r_tracepoint_action_download): New.
11099 (x_tracepoint_action_download): New.
11100 (l_tracepoint_action_download): New.
11101 (add_tracepoint_action): Install `action->ops' according type.
11102 (download_tracepoint_1): Move code `download' function pointer
11103 of various tracepoint_action_ops.
11104
87b0bb13
JK
111052012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11106
11107 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11108 linux_ptrace_attach_warnings.
11109
5f572dec
JK
111102012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11111
11112 * Makefile.in (linux-ptrace.o): New.
11113 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11114 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11115 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11116 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11117 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11118 of these targets.
11119 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11120
f4647387
YQ
111212012-03-08 Yao Qi <yao@codesourcery.com>
11122 Pedro Alves <palves@redhat.com>
11123
11124 Fix PR server/13392.
11125 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11126 offset of JMP insn.
11127 * tracepoint.c (remove_tracepoint): New.
11128 (cmd_qtdp): Call remove_tracepoint when failed to install.
11129
9b224c5e
PA
111302012-03-07 Pedro Alves <palves@redhat.com>
11131
11132 * linux-low.c (get_detach_signal): New.
11133 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11134 Pass on pending signals to PTRACE_DETACH. Check the result of the
11135 ptrace call.
11136 * server.c (program_signals, program_signals_p): New.
11137 (handle_general_set): Handle QProgramSignals.
11138 * server.h (program_signals, program_signals_p): Declare.
11139
e237a7e2
JK
111402012-03-05 Pedro Alves <palves@redhat.com>
11141 Jan Kratochvil <jan.kratochvil@redhat.com>
11142
11143 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11144 New comment why.
11145
5808517f
YQ
111462012-03-03 Yao Qi <yao@codesourcery.com>
11147
11148 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11149 agent_look_up_symbols.
11150
58b4daa5
YQ
111512012-03-03 Yao Qi <yao@codesourcery.com>
11152
11153 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11154 (linux-x86-low.o): Likewise.
11155 * server.h: Remove in_process_agent_loaded.
11156 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11157 common/agent.c.
11158 Update callers.
11159
8ffcbaaf
YQ
111602012-03-03 Yao Qi <yao@codesourcery.com>
11161
11162 * tracepoint.c (gdb_agent_capability): New global.
11163 (in_process_agent_loaded_ust): Renamed to
11164 `in_process_agent_supports_ust'.
11165 Update callers.
11166 (in_process_agent_supports_ust): Call agent_capability_check.
11167 (clear_installed_tracepoints): Assert that agent supports
11168 agent.
11169
d1feda86
YQ
111702012-03-03 Yao Qi <yao@codesourcery.com>
11171
11172 * linux-low.c (linux_supports_agent): New.
11173 (linux_target_ops): Initialize field `supports_agent' with
11174 linux_supports_agent.
11175 * target.h (struct target_ops) <supports_agent>: New.
11176 (target_supports_agent): New macro.
11177 * server.c (handle_general_set): Handle packet 'QAgent'.
11178 (handle_query): Send `QAgent+'.
11179 * Makefile.in (server.o): Depends on agent.h.
11180
2fa291ac
YQ
111812012-03-03 Yao Qi <yao@codesourcery.com>
11182
11183 * Makefile.in (OBS): Add agent.o.
11184 Add new rule for agent.o.
11185 Track dependence of tracepoint.c on agent.h.
11186 * tracepoint.c (run_inferior_command_1):
11187 (run_inferior_command): Call agent_run_command.
11188 (gdb_ust_connect_sync_socket): Deleted. Move it to
11189 common/agent.c.
11190 (resume_thread, stop_thread): Likewise.
11191 (gdb_ust_socket_init): Renamed to ...
11192 (gdb_agent_socket_init): ... New.
11193 (gdb_ust_thread): Renamed to ...
11194 (gdb_agent_helper_thread): ... New.
11195 (gdb_ust_init): Move some code to ...
11196 (gdb_agent_init): ... here. New.
11197 [HAVE_UST]: Call gdb_ust_init.
11198 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11199 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11200 * config.in, configure: Regenerated.
11201
05044653
PA
112022012-03-02 Pedro Alves <palves@redhat.com>
11203
11204 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11205 * linux-low.c (struct simple_pid_list): New.
11206 (stopped_pids): New a struct simple_pid_list pointer.
11207 (add_to_pid_list, pull_pid_from_list): New.
11208 (handle_extended_wait): Don't assume the first signal new children
11209 report is SIGSTOP. Adjust call to pull_pid_from_list.
11210 (linux_wait_for_lwp): Adjust.
11211
8d00225b
YQ
112122012-03-02 Yao Qi <yao@codesourcery.com>
11213
11214 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11215 debug log.
11216
19560ba5
YQ
112172012-03-02 Yao Qi <yao@codesourcery.com>
11218
11219 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11220 `stop_pc' and `tpoint'. Update caller.
11221
1faeff08
MR
112222012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11223
11224 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11225 * linux-low.c (use_linux_regsets): New macro.
11226 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11227 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11228 (linux_register_in_regsets): New function.
11229 (usr_fetch_inferior_registers): Skip registers covered by
11230 regsets.
11231 (usr_store_inferior_registers): Likewise.
11232 (usr_fetch_inferior_registers): New macro.
11233 (usr_store_inferior_registers): Likewise.
11234 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11235 (linux_store_registers): Likewise.
11236 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11237 prototype.
11238 (init_registers_mips64_dsp_linux): Likewise.
11239 (init_registers_mips_linux): New macro.
11240 (init_registers_mips_dsp_linux): Likewise.
11241 (mips_dsp_num_regs): Likewise.
11242 (DSP_BASE, DSP_CONTROL): New fallback macros.
11243 (mips_base_regs): New macro.
11244 (mips_regmap): Use it. Fix the size.
11245 (mips_dsp_regmap): New variable.
11246 (mips_dsp_regset_bitmap): Likewise.
11247 (mips_arch_setup): New function.
11248 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11249 than mips_regmap.
11250 (mips_cannot_store_register): Likewise.
11251 (the_low_target): Update .arch_setup, .num_regs and .regmap
11252 initializers. Add .regset_bitmap initializer.
11253 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11254 initializer.
11255 * linux-bfin-low.c (the_low_target): Likewise.
11256 * linux-cris-low.c (the_low_target): Likewise.
11257 * linux-crisv32-low.c (the_low_target): Likewise.
11258 * linux-ia64-low.c (the_low_target): Likewise.
11259 * linux-m32r-low.c (the_low_target): Likewise.
11260 * linux-m68k-low.c (the_low_target): Likewise.
11261 * linux-ppc-low.c (the_low_target): Likewise.
11262 * linux-s390-low.c (the_low_target): Likewise.
11263 * linux-sh-low.c (the_low_target): Likewise.
11264 * linux-sparc-low.c (the_low_target): Likewise.
11265 * linux-tic6x-low.c (the_low_target): Likewise.
11266 * linux-x86-low.c (the_low_target): Likewise.
11267 * linux-xtensa-low.c (the_low_target): Likewise.
11268 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11269 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11270 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11271 srv_xmlfiles.
11272 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11273 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11274
c03e6ccc
YQ
112752012-02-29 Yao Qi <yao@codesourcery.com>
11276 Pedro Alves <palves@redhat.com>
11277
11278 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11279 `step_over_finished' is true.
11280
644cebc9
PA
112812012-02-27 Pedro Alves <palves@redhat.com>
11282
11283 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11284 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11285
c14d7ab2
PA
112862012-02-27 Pedro Alves <palves@redhat.com>
11287
11288 PR server/9684
11289 * linux-low.c (pid_is_stopped): New.
11290 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11291
412c89dd
LM
112922012-02-25 Luis Machado <lgustavo@codesourcery.com>
11293
11294 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11295 of conditions.
11296
b745defe
MR
112972012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11298
11299 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11300
9f3a5c85
LM
113012012-02-24 Luis Machado <lgustavo@codesourcery>
11302
11303 * server.c (handle_query): Advertise support for target-side
11304 breakpoint condition evaluation.
11305 (process_point_options): New function.
11306 (process_serial_event): When inserting a breakpoint, check for
11307 a target-side condition that should be evaluated.
11308
11309 * mem-break.c: Include regcache.h and ax.h.
11310 (point_cond_list_t): New data structure.
11311 (breakpoint) <cond_list>: New field.
11312 (find_gdb_breakpoint_at): Make non-static.
11313 (delete_gdb_breakpoint_at): Clear any target-side
11314 conditions.
11315 (clear_gdb_breakpoint_conditions): New function.
11316 (add_condition_to_breakpoint): Likewise.
11317 (add_breakpoint_condition): Likewise.
11318 (gdb_condition_true_at_breakpoint): Likewise.
11319 (gdb_breakpoint_here): Return result directly instead
11320 of going through a local variable.
11321
11322 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11323 (clear_gdb_breakpoint_conditions): Likewise.
11324 (add_breakpoint_condition): Likewise.
11325 (gdb_condition_true_at_breakpoint): Likewise.
11326
11327 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11328 (need_step_over_p): Take target-side breakpoint condition into
11329 consideration.
11330
5e1dc496
LM
113312012-02-24 Luis Machado <lgustavo@codesourcery>
11332
11333 * server.h: Include tracepoint.h.
11334 (agent_mem_read, agent_get_trace_state_variable_value,
11335 agent_set_trace_state_variable_value,
11336 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11337 get_set_tsv_func_addr): New prototypes.
11338
11339 * ax.h: New include file.
11340 * ax.c: New source file.
11341
11342 * tracepoint.c: Include ax.h.
11343 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11344 agent_expr, eval_result_type): Move to ax.h.
11345 (parse_agent_expr): Rename to ...
11346 (gdb_parse_agent_expr): ... this, make it non-static and move
11347 to ax.h.
11348 (unparse_agent_expr) Rename to ...
11349 (gdb_unparse_agent_expr): ... this, make it non-static and move
11350 to ax.h.
11351 (eval_agent_expr): Rename to ...
11352 (eval_tracepoint_agent_expr): ... this.
11353 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11354 forward declarations.
11355 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11356 (agent_get_trace_state_variable_value): New function.
11357 (agent_set_trace_state_variable_value): New function.
11358 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11359 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11360 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11361 (condition_true_at_tracepoint): Likewise.
11362 (parse_agent_expr): Rename to ...
11363 (gdb_parse_agent_expr): ... this and move to ax.c.
11364 (unparse_agent_expr): Rename to ...
11365 (gdb_unparse_agent_expr): ... this and move to ax.c.
11366 (gdb_agent_op_name): Move to ax.c.
11367 (eval_agent_expr): Rename to ...
11368 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11369 and move to ax.c.
11370 (eval_tracepoint_agent_expr): New function.
11371 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11372 non-static.
5e1dc496
LM
11373 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11374 ax.c.
11375 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11376 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11377 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11378 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11379 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11380 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11381 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11382 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11383 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11384 (compile_bytecodes): Remove forward declaration.
11385 (is_goto_target): Move to ax.c.
11386 (compile_bytecodes): Move to ax.c and call
11387 agent_get_trace_state_variable_value (...) and
11388 agent_set_trace_state_variable_value (...).
11389
11390 * Makefile.in: Update ax.c and IPA dependencies.
11391
277e4e52
PA
113922012-02-24 Pedro Alves <palves@redhat.com>
11393
11394 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11395 (cmd_bigqtbuffer_circular): ... this. Only handle
11396 'QTBuffer:circular:'.
11397 (handle_tracepoint_general_set): Adjust.
11398
bf4c19f7
YQ
113992012-02-16 Yao Qi <yao@codesourcery.com>
11400
11401 * inferiors.c: Move code to ...
11402 * dll.c: .... here. New.
11403 * server.h: Declare clear_dlls.
11404 * Makefile.in (SFILES): Add dll.c.
11405 (OBS): Add dll.o
11406 (dll.o): New rule.
11407
d73f2619
YQ
114082012-02-11 Yao Qi <yao@codesourcery.com>
11409
11410 * server.c: (handle_monitor_command): Add a new parameter
11411 `own_buf'.
11412 (handle_query): Update caller.
11413
f8255c2a
JB
114142012-02-09 Joel Brobecker <brobecker@adacore.com>
11415
11416 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11417 * configure, config.in: Regenerate.
11418 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11419 is not defined.
11420
da84f473
PA
114212012-02-02 Pedro Alves <palves@redhat.com>
11422
11423 Try SIGKILL first, then PTRACE_KILL.
11424 * linux-low.c (linux_kill_one_lwp): New.
11425 (linux_kill_one_lwp): Rename to ...
11426 (kill_one_lwp_callback): ... this. Use the new
11427 linux_kill_one_lwp.
11428
e886a173
PA
114292012-02-02 Pedro Alves <palves@redhat.com>
11430
11431 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11432 inferior.
11433
be07f1a2
PA
114342012-01-27 Pedro Alves <palves@redhat.com>
11435
11436 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11437 (elf_64_file_p): Make static.
11438 (linux_pid_exe_is_elf_64_file): New.
11439 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11440 Delete declarations.
11441 (linux_pid_exe_is_elf_64_file): Declare.
11442 * linux-x86-low.c (x86_arch_setup): Use
11443 linux_pid_exe_is_elf_64_file.
11444
d8301ad1
JK
114452012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11446
11447 * linux-low.c (linux_wait_for_event_1): Rename to ...
11448 (linux_wait_for_event): ... here and merge it with former
11449 linux_wait_for_event - new variable wait_ptid, use it.
11450 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11451
01b17894
PA
114522012-01-23 Pedro Alves <palves@redhat.com>
11453
11454 * server.c (main): Avoid yet another case of infinite loop while
11455 detaching/killing after a longjmp.
11456
e825046f
JK
114572012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11458
11459 Code cleanup.
11460 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11461
b9e7b9c3
UW
114622012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11463
11464 * hostio.c (handle_readlink): New function.
11465 (handle_vFile): Call it to handle "vFile:readlink" packets.
11466
901f9912
UW
114672012-01-20 Pedro Alves <palves@redhat.com>
11468 Ulrich Weigand <ulrich.weigand@linaro.org>
11469
11470 * server.c (handle_v_requests): Only support vAttach and vRun to
11471 start multiple processes when in extended protocol mode.
11472
fc1ab1a0
PA
114732012-01-17 Pedro Alves <palves@redhat.com>
11474
11475 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11476 memalign plus mprotect to allocate the scratch buffer.
11477
7d5d4e98
PA
114782012-01-13 Pedro Alves <palves@redhat.com>
11479
11480 * server.c (attach_inferior): Clear `cont_thread'.
11481
f128d5e9
PA
114822012-01-13 Pedro Alves <palves@redhat.com>
11483
11484 * server.c (main): Avoid infinite loop while detaching/killing
11485 after a longjmp.
11486
06db92f0
DE
114872012-01-09 Doug Evans <dje@google.com>
11488
11489 * server.c (start_inferior): Set last_ptid in --wrapper case.
11490
32d92999
YQ
114912012-01-06 Yao Qi <yao@codesourcery.com>
11492
11493 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11494 defined.
11495 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11496
5e0a92a9
YQ
114972012-01-04 Yao Qi <yao@codesourcery.com>
11498
11499 * tracepoint.c (cmd_qtdp): Print debug message
11500 for static tracepoint.
11501
ae639e8c
YQ
115022012-01-04 Yao Qi <yao@codesourcery.com>
11503
11504 * tracepoint.c (trace_vdebug): Differentiate debug message
11505 between gdbserver and IPA.
11506
f72429c5
YQ
115072012-01-03 Yao Qi <yao@codesourcery.com>
11508
11509 * tracepoint.c (tracepoint_was_hit): Don't collect for
11510 static tracepoint.
11511
12c3e59c
JB
115122012-01-02 Joel Brobecker <brobecker@adacore.com>
11513
11514 * terminal.h: Reformat copyright header.
11515
67827812
JB
115162012-01-02 Joel Brobecker <brobecker@adacore.com>
11517
11518 * server.c (gdbserver_version): Update copyright year.
11519 * gdbreplay.c (gdbreplay_version): Likewise.
11520
3e52c33d
JK
115212011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11522
11523 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11524
11525 Revert:
11526 2011-12-18 Hui Zhu <teawater@gmail.com>
11527 * linux-low.c (linux_create_inferior): Save return value to ret.
11528
66f1260e
HZ
115292011-12-18 Hui Zhu <teawater@gmail.com>
11530
11531 * linux-low.c (linux_create_inferior): Save return value to ret.
11532
e77616d7
DE
115332011-12-16 Doug Evans <dje@google.com>
11534
e7b06c57
DE
11535 * linux-low.c (linux_create_inferior): If stdio connection,
11536 redirect stdin from /dev/null, stdout to stderr.
11537 * remote-utils.c (remote_is_stdio): New static global.
11538 (remote_connection_is_stdio): New function.
11539 (remote_prepare): Handle stdio connection.
11540 (remote_open): Ditto.
11541 (remote_close): Don't close stdin for stdio connections.
11542 (read_prim,write_prim): New functions. Replace all calls to
11543 read/write to these.
11544 * server.c (main): Watch for "-" argument. Move call to
11545 remote_prepare before start_inferior.
11546 * server.h (STDIO_CONNECTION_NAME): New macro.
11547 (remote_connection_is_stdio): Declare.
11548
e77616d7
DE
11549 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11550 in debugging output.
11551
82067193
YQ
115522011-12-15 Yao Qi <yao@codesourcery.com>
11553
11554 * tracepoint.c: Include sys/syscall.h.
11555 (gdb_ust_thread): Remove preprocessor conditional.
11556
82bfbe7e
PA
115572011-12-14 Pedro Alves <pedro@codesourcery.com>
11558
11559 * linux-low.c (linux_detach_one_lwp): Call
11560 the_low_target.prepare_to_resume before detaching.
11561
712c6575
YQ
115622011-12-14 Yao Qi <yao@codesourcery.com>
11563
11564 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11565 of write.
11566
d54d1edf
YQ
115672011-12-14 Yao Qi <yao@codesourcery.com>
11568
11569 * i386-low.c (i386_low_stopped_data_address): Initialize local
11570 variable `control'.
11571
6210a125
PA
115722011-12-13 Pedro Alves <pedro@codesourcery.com>
11573
11574 PR remote/13492
11575
11576 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11577 DR_CONTROL unless necessary. Extend comments.
11578 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11579 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11580
2ece8244
YQ
115812011-12-13 Yao Qi <yao@codesourcery.com>
11582
11583 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11584 macros.
11585 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11586
784867a5
JK
115872011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11588
11589 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11590 Print new debug message for such case.
11591
6bf36717
JK
115922011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11593
11594 Fix overlapping memcpy.
11595 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11596 the read_inferior_memory transfer.
11597 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11598 write_inferior_memory transfer.
11599 (set_fast_tracepoint_jump): New variable buf. Use it for the
11600 read_inferior_memory and write_inferior_memory transfers.
11601 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11602 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11603 Use it for the write_inferior_memory transfer.
11604 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11605 buffers.
11606
50275556
MR
116072011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11608
11609 * linux-low.c (fetch_register, store_register): Make code
11610 consistent, fix formatting.
11611
7325beb4
MR
116122011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11613
11614 * linux-low.c (usr_store_inferior_registers): Factor out code
11615 to handle individual registers into...
11616 (store_register): ... this new function.
11617
c642a434
UW
116182011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11619
11620 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11621 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11622 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11623 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11624 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11625 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11626 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11627 (srv_xmlfiles): Add new XML files.
11628
11629 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11630 and <sys/uio.h>.
11631 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11632 (init_registers_s390_linux32v1): Add prototype.
11633 (init_registers_s390_linux32v2): Likewise.
11634 (init_registers_s390_linux64v1): Likewise.
11635 (init_registers_s390_linux64v2): Likewise.
11636 (init_registers_s390x_linux64v1): Likewise.
11637 (init_registers_s390x_linux64v2): Likewise.
11638 (s390_num_regs): Increment to 52.
11639 (s390_regmap): Add orig_r2 register.
11640 (s390_num_regs_3264): Increment to 68.
11641 (s390_regmap_3264): Add orig_r2 register.
11642 (s390_collect_ptrace_register): Handle orig_r2 register.
11643 (s390_supply_ptrace_register): Likewise.
11644 (s390_fill_last_break): New function.
11645 (s390_store_last_break): Likewise.
11646 (s390_fill_system_call): New function.
11647 (s390_store_system_call): Likewise.
11648 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11649 register sets.
11650 (s390_check_regset): New function.
11651 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11652 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11653 Update target_regsets for available register sets.
11654
2268b414
JK
116552011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11656 Jan Kratochvil <jan.kratochvil@redhat.com>
11657
11658 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11659 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11660 New.
11661 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11662 * linux-low.h (struct process_info_private): New member r_debug.
11663 * server.c (handle_qxfer_libraries): Call
11664 the_target->qxfer_libraries_svr4.
11665 (handle_qxfer_libraries_svr4): New function.
11666 (qxfer_packets): New entry "libraries-svr4".
11667 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11668 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11669 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11670 PACKET_qXfer_libraries_svr4.
11671
d6db1fab
UW
116722011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11673
11674 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11675 PSW address/mask between 8-byte and 16-byte formats.
11676 (s390_supply_ptrace_register): Likewise.
11677 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11678 basic addressing mode bit.
11679
242f5f1c
SS
116802011-11-24 Stan Shebs <stan@codesourcery.com>
11681
11682 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11683
f196051f
SS
116842011-11-17 Stan Shebs <stan@codesourcery.com>
11685
11686 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11687 (tracing_start_time): New global.
11688 (tracing_stop_time): New global.
11689 (tracing_user_name): New global.
11690 (tracing_notes): New global.
11691 (tracing_stop_note): New global.
11692 (cmd_qtstart): Set traceframe_usage, start_time.
11693 (stop_tracing): Set stop_time.
11694 (cmd_qtstatus): Report additional status.
11695 (cmd_qtp): New function.
11696 (handle_tracepoint_query): Call it.
11697 (cmd_qtnotes): New function.
11698 (handle_tracepoint_general_set): Call it.
11699 (get_timestamp): Rename from tsv_get_timestamp.
11700
405f8e94
SS
117012011-11-14 Stan Shebs <stan@codesourcery.com>
11702 Kwok Cheung Yeung <kcy@codesourcery.com>
11703
11704 * linux-x86-low.c (small_jump_insn): New.
11705 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11706 trampoline and error message, build a trampoline and issue a small
11707 jump instruction to it.
11708 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11709 trampoline and error message.
11710 (x86_get_min_fast_tracepoint_insn_len): New.
11711 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11712 * linux-low.h (struct linux_target_ops): Add arguments to
11713 install_fast_tracepoint_jump_pad operation, add new operation.
11714 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11715 arguments.
11716 (linux_get_min_fast_tracepoint_insn_len): New function.
11717 (linux_target_op): Add new operation.
11718 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11719 (gdb_trampoline_buffer_end): Ditto.
11720 (gdb_trampoline_buffer_error): Ditto.
11721 (struct ipa_sym_addresses): Add fields for new IPA variables.
11722 (symbol_list): Add entries for new IPA variables.
11723 (struct tracepoint): Add fields to hold the address range of the
11724 trampoline used by the tracepoint.
11725 (trampoline_buffer_head): New static variable.
11726 (trampoline_buffer_tail): Ditto.
11727 (claim_trampoline_space): New function.
11728 (have_fast_tracepoint_trampoline_buffer): New function.
11729 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11730 structure.
11731 (install_fast_tracepoint): Ditto, also add error buffer argument.
11732 (cmd_qtminftpilen): New function.
11733 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11734 (fast_tracepoint_from_trampoline_address): New function.
11735 (fast_tracepoint_collecting): Handle trampoline as part of jump
11736 pad space.
11737 (set_trampoline_buffer_space): New function.
11738 (initialize_tracepoint): Initialize new IPA variables.
11739 * target.h (struct target_ops): Add arguments to
11740 install_fast_tracepoint_jump_pad operation, add new
11741 get_min_fast_tracepoint_insn_len operation.
11742 (target_get_min_fast_tracepoint_insn_len): New.
11743 (install_fast_tracepoint_jump_pad): Add arguments.
11744 * server.h (IPA_BUFSIZ): Define.
11745 * linux-i386-ipa.c: Include extra header files.
11746 (initialize_fast_tracepoint_trampoline_buffer): New function.
11747 (initialize_low_tracepoint): Call it.
11748 * server.h (set_trampoline_buffer_space): Declare.
11749 (claim_trampoline_space): Ditto.
11750 (have_fast_tracepoint_trampoline_buffer): Ditto.
11751
1e4d1764
YQ
117522011-11-14 Yao Qi <yao@codesourcery.com>
11753
11754 * server.c (handle_query): Handle InstallInTrace for qSupported.
11755 * tracepoint.c (add_tracepoint): Sort list.
11756 (install_tracepoint, download_tracepoint): New.
11757 (cmd_qtdp): Call them to install and download tracepoints.
11758 (sort_tracepoints): Removed.
11759 (cmd_qtstart): Update.
11760
5c73ff4e
YQ
117612011-11-14 Yao Qi <yao@codesourcery.com>
11762
11763 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11764 * mem-break.h: Declare.
11765 * tracepoint.c (cmd_qtstart): Move some code to ...
11766 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11767 New.
11768 (download_tracepoints): Move some code to ...
11769 (download_tracepoint_1): ... here. New.
11770
86a30030
YQ
117712011-11-08 Yao Qi <yao@codesourcery.com>
11772
11773 * remote-utils.c (relocate_instruction): A comment fix.
11774
8d26e50c
JB
117752011-11-07 Joel Brobecker <brobecker@adacore.com>
11776
11777 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11778 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11779 dr_status_mirror and dr_control_mirror from debug_reg_state.
11780 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11781 (i386_initial_stuff): Remove use of deleted globals.
11782 (i386_get_thread_context, i386_set_thread_context,
11783 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11784 from debug_reg_state.
11785
a59306a3
YQ
117862011-11-05 Yao Qi <yao@codesourcery.com>
11787
11788 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11789 address as TPOINT's.
11790
3065dfb6
SS
117912011-11-02 Stan Shebs <stan@codesourcery.com>
11792
11793 * tracepoint.c (agent_mem_read_string): New function.
11794 (eval_agent_expr): Call it for tracenz.
11795 * server.c (handle_query): Report support for tracenz.
11796
fd0d8c7c
YQ
117972011-11-02 Yao Qi <yao@codesourcery.com>
11798
11799 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11800
609086b1
YQ
118012011-11-02 Yao Qi <yao@codesourcery.com>
11802
11803 * target.h: Fix a typo in comment.
11804
b9fd1791
PA
118052011-10-31 Pedro Alves <pedro@codesourcery.com>
11806
11807 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11808 clobber the breakpoints' shadows with fast tracepoint jumps.
11809 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11810 * target.c (write_inferior_memory): Also pass MYADDR down to
11811 check_mem_write.
11812
03583c20
UW
118132011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11814
11815 * configure.ac: Check support for personality routine.
11816 * configure: Regenerate.
11817 * config.in: Likewise.
11818 * linux-low.c: Include <sys/personality.h>.
11819 Define ADDR_NO_RANDOMIZE if necessary.
11820 (linux_create_inferior): Disable address space randomization when
11821 forking inferior, if requested.
11822 (linux_supports_disable_randomization): New function.
11823 (linux_target_ops): Install it.
11824 * server.h (disable_randomization): Declare.
11825 * server.c (disable_randomization): New global variable.
11826 (handle_general_set): Handle QDisableRandomization.
11827 (handle_query): Likewise for qSupported.
11828 (main): Support --disable-randomization and --no-disable-randomization
11829 command line arguments.
11830 * target.h (struct target_ops): Add supports_disable_randomization.
11831 (target_supports_disable_randomization): New macro.
11832
723b724b
MF
118332011-09-29 Mike Frysinger <vapier@gentoo.org>
11834
11835 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11836 ifdef check.
11837 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11838 [!PT_GETDSBT] (target_loadmap): New definition.
11839 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11840 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11841 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11842 and PT_GETDSBT to LINUX_LOADMAP.
11843 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11844 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11845
55329a5c 118462011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11847
11848 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11849 (arm_linux_hwbp_cap): New static variable.
11850 (arm_linux_get_hwbp_cap): Replace by ...
11851 (arm_linux_init_hwbp_cap): ... this new function.
11852 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11853 (arm_linux_get_hw_watchpoint_count): Likewise.
11854 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11855 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11856 (arm_prepare_to_resume): Use perror_with_name instead of error.
11857
55329a5c 118582011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11859
11860 * linux-arm-low.c: Include <signal.h>.
11861 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11862 (struct arm_linux_hwbp_cap): New data type.
11863 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11864 (struct arm_linux_hw_breakpoint): New data type.
11865 (MAX_BPTS, MAX_WPTS): Define.
11866 (struct arch_process_info, struct arch_lwp_info): New data types.
11867 (arm_linux_get_hwbp_cap): New function.
11868 (arm_linux_get_hw_breakpoint_count): Likewise.
11869 (arm_linux_get_hw_watchpoint_count): Likewise.
11870 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11871 (arm_hwbp_control_initialize): Likewise.
11872 (arm_hwbp_control_is_enabled): Likewise.
11873 (arm_hwbp_control_is_initialized): Likewise.
11874 (arm_hwbp_control_disable): Likewise.
11875 (arm_linux_hw_breakpoint_equal): Likewise.
11876 (arm_linux_hw_point_initialize): Likewise.
11877 (struct update_registers_data): New data structure.
11878 (update_registers_callback: New function.
11879 (arm_insert_point): Likewise.
11880 (arm_remove_point): Likewise.
11881 (arm_stopped_by_watchpoint): Likewise.
11882 (arm_stopped_data_address): Likewise.
11883 (arm_new_process): Likewise.
11884 (arm_new_thread): Likewise.
11885 (arm_prepare_to_resume): Likewise.
11886 (the_low_target): Register arm_insert_point, arm_remove_point,
11887 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11888 arm_new_thread, and arm_prepare_to_resume.
11889
6b9801d4
SS
118902011-09-15 Stan Shebs <stan@codesourcery.com>
11891
11892 * server.h (struct emit_ops): Add compare-goto fields.
11893 * tracepoint.c (gdb_agent_op_sizes): New table.
11894 (emit_eq_goto): New function.
11895 (emit_ne_goto): New function.
11896 (emit_lt_goto): New function.
11897 (emit_le_goto): New function.
11898 (emit_gt_goto): New function.
11899 (emit_ge_goto): New function.
11900 (is_goto_target): New function.
11901 (compile_bytecodes): Recognize special cases of compare-goto
11902 combinations and call specialized emitters for them.
11903 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11904 (amd64_emit_ne_goto): New function.
11905 (amd64_emit_lt_goto): New function.
11906 (amd64_emit_le_goto): New function.
11907 (amd64_emit_gt_goto): New function.
11908 (amd64_emit_ge_goto): New function.
11909 (amd64_emit_ops): Add the new functions.
11910 (i386_emit_eq_goto): New function.
11911 (i386_emit_ne_goto): New function.
11912 (i386_emit_lt_goto): New function.
11913 (i386_emit_le_goto): New function.
11914 (i386_emit_gt_goto): New function.
11915 (i386_emit_ge_goto): New function.
11916 (i386_emit_ops): Add the new functions.
11917
bf15cbda
SS
119182011-09-08 Stan Shebs <stan@codesourcery.com>
11919
11920 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11921 (i386_emit_epilogue): Restore %ebx.
11922
943ca1dd
JZ
119232011-08-31 Jie Zhang <jzhang918@gmail.com>
11924
11925 * server.c (step_thread): Remove definition.
11926 (process_serial_event): Don't handle Hs.
11927 * server.h (step_thread): Remove declaration.
11928 * target.c (set_desired_inferior): Remove use of step_thread.
11929
e3deef73
LM
119302011-08-24 Luis Machado <lgustavo@codesourcery.com>
11931
11932 * linux-low.c: Include linux-procfs.h.
11933 (linux_attach_lwp_1): Update comments.
11934 (linux_attach): Scan for existing threads when attaching to a
11935 process that is the tgid.
11936 * Makefile.in: Update dependencies.
11937
13da1c97
LM
119382011-08-24 Luis Machado <lgustavo@codesourcery.com>
11939
11940 * configure.srv: Add linux-procfs.o dependencies.
11941
881127c9
YQ
119422011-08-14 Yao Qi <yao@codesourcery.com>
11943
11944 * target.h (struct target_ops): Fix indent.
11945 * win32-low.c (win32_target_ops): Fix comment.
11946
58dbd541
YQ
119472011-08-14 Andrew Jenner <andrew@codesourcery.com>
11948 Yao Qi <yao@codesourcery.com>
11949
11950 * Makefile.in (clean): Remove tic6x-*.c files.
11951 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11952 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11953 (tic6x-c64xp-linux.c): Likewise.
11954 * configure.srv: Add support for tic6x-*-uclinux.
11955 * linux-tic6x-low.c: New.
11956 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11957
78d85199
YQ
119582011-08-14 Andrew Stubbs <ams@codesourcery.com>
11959 Yao Qi <yao@codesourcery.com>
11960
11961 * target.h (struct target_ops): Add read_loadmap.
11962 * linux-low.c (struct target_loadseg): New type.
11963 (struct target_loadmap): New type.
11964 (linux_read_loadmap): New function.
11965 (linux_target_ops): Add linux_read_loadmap.
11966 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11967 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11968 to NULL.
78d85199 11969
a959a88d
EZ
119702011-08-05 Eli Zaretskii <eliz@gnu.org>
11971
11972 * win32-low.c: Include <stdint.h>.
11973
1ced966e
PA
119742011-07-22 Pedro Alves <pedro@codesourcery.com>
11975
11976 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11977 to the inferior here.
11978 (i386_remove_aligned_watchpoint): Ditto.
11979 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11980 fit part of the watchpoint in the debug registers.
11981 (i386_update_inferior_debug_regs): New.
11982 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11983 registers, and only update the inferior on success.
11984 (i386_low_remove_watchpoint): Ditto.
11985
d26e3629
KY
119862011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11987
11988 * linux-low.c (compare_ints, unique, list_threads, show_process,
11989 linux_core_of_thread): Delete.
11990 (linux_target_ops): Change linux_core_of_thread to
11991 linux_common_core_of_thread.
11992 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11993 * utils.c (malloc_failure): Change type of argument.
11994 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11995 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11996 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11997 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11998 (IPA_OBJS): Add common-utils-ipa.o.
11999 (ptid_h, linux_osdata_h): New macros.
12000 (server_h): Add common/common-utils.h, common/xml-utils.h,
12001 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12002 common/ptid.h.
12003 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12004 ptid.o, buffer.o): New rules.
12005 (linux-low.o): Add common/linux-osdata.h as a dependency.
12006 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12007 * configure.ac: Add AC_HEADER_DIRENT check.
12008 * config.in: Regenerate.
12009 * configure: Regenerate.
12010 * remote-utils.c (xml_escape_text): Delete.
12011 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12012 buffer_xml_printf): Move to common/buffer.c.
12013 * server.c (main): Remove call to initialize_inferiors.
12014 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12015 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12016 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12017 internal_error, gdb_assert, gdb_assert_fail): Delete.
12018 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12019 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12020 common/buffer.h.
12021 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12022 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12023 initialize_inferiors): Delete.
12024
2275a1a7
PA
120252011-07-20 Pedro Alves <pedro@codesourcery.com>
12026
12027 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12028 symbol error.
12029
0a5b1e09
PA
120302011-05-31 Pedro Alves <pedro@codesourcery.com>
12031
12032 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12033 assertion.
12034 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12035
6938fd34
YQ
120362011-05-26 Yao Qi <yao@codesourcery.com>
12037
12038 * Makefile.in (thread-db.o): Track dependence to
12039 common/gdb_thread_db.h.
12040 * thread-db.c: include gdb_thread_db.h from right place.
12041
b481f9e0
TT
120422011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12043
12044 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12045 __FILE__ and __LINE__ to internal_error.
12046
98a5dd13
DE
120472011-05-13 Doug Evans <dje@google.com>
12048
12049 * thread-db.c (try_thread_db_load_from_sdir): New function.
12050 (try_thread_db_load_from_dir): New function.
12051 (thread_db_load_search): Handle $sdir, ignore $pdir.
12052 Remove trying of system directories if search of
12053 libthread-db-search-path fails, that is now done via $sdir.
12054
d248b706
KY
120552011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12056
12057 * server.c (handle_query): Add EnableDisableTracepoints to the list
12058 of supported features.
43aaf8b6 12059 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12060 tracepoints.
43aaf8b6
PA
12061 (cmd_qtenable_disable): New.
12062 (cmd_qtstart): Install tracepoints even if disabled.
12063 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12064 receiving a QTEnable or QTDisable packet.
12065 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12066 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12067 tracepoints.
12068 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12069
84e578fb
DE
120702011-05-10 Doug Evans <dje@google.com>
12071
12072 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12073
71f55dd8
DE
120742011-05-04 Doug Evans <dje@google.com>
12075
12076 * linux-low.c (linux_join): Skip process lookup.
12077 * spu-low.c (spu_join): Ditto.
12078 * server.c (join_inferiors_callback): Delete.
12079 (process_serial_event): For 'D' packet (detach) call join_inferior
12080 directly.
12081
4d393d60
JM
120822011-05-04 Joseph Myers <joseph@codesourcery.com>
12083
12084 * README: Don't mention xscale*-*-linux*.
12085 * configure.srv (xscale*-*-linux*): Don't handle target.
12086
b00ad6ff
NF
120872011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12088
12089 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12090 casting pointers.
12091 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12092 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12093 (i386_emit_void_call_2): Likewise.
12094
af96c192
YQ
120952011-04-26 Yao Qi <yao@codesourcery.com>
12096
43aaf8b6
PA
12097 * linux-low.c: Move common macros to linux-ptrace.h.
12098 Include linux-ptrace.h.
af96c192
YQ
12099 * Makefile.in (linux_ptrace_h): New.
12100 (linux-low.o): Depends on linux-ptrace.h.
12101
03f2bd59
JK
121022011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12103
12104 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12105 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12106 (remote_prepare): New function with most of the TCP code from ...
12107 (remote_open): ... here. Detect PORT here unconditionally. Move also
12108 setting transport_is_reliable.
12109 * server.c (run_once): New variable.
12110 (gdbserver_usage): Document it.
12111 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12112 the first run if RUN_ONCE.
12113 * server.h (run_once, remote_prepare): New declarations.
12114
7a9dd1b2
TT
121152011-04-19 Tom Tromey <tromey@redhat.com>
12116
12117 * win32-low.c (handle_load_dll): Remove duplicate "the".
12118
81239425
PM
121192011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12120
12121 Remove support for old Cygwin 1.5 versions.
12122 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12123 function to avoid warning.
12124 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12125 warning.
12126
9e0627f1
PM
121272011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12128
12129 * gdbserver/server.h (Macro _): Define it if not available.
12130
588eebee
MS
121312011-03-14 Michael Snyder <msnyder@vmware.com>
12132
348af9f7 12133 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12134
43f70d4c
JB
121352011-03-10 Joel Brobecker <brobecker@adacore.com>
12136
12137 * Makefile.in (maintainer-clean realclean distclean): Remove
12138 "make ... subdir_do" command.
12139
348af9f7
MS
121402011-03-10 Michael Snyder <msnyder@vmware.com>
12141
12142 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12143
12144 * server.c (handle_v_run): Free alloced buffer on early return.
12145
e637a4f5
YQ
121462011-03-09 Yao Qi <yao@codesourcery.com>
12147
12148 Revert:
12149 2011-03-04 Yao Qi <yao@codesourcery.com>
12150
12151 * Makefile.in: Remove GNU make feature --directory.
12152
12153 2011-03-05 Yao Qi <yao@codesourcery.com>
12154
12155 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12156 (subdir_do): New make target. Copied from gdb/Makefile.
12157 (maintainer-clean, realclean, distclean, clean): Call corresponding
12158 make targets in common/Makefile.
12159
12160 2011-02-11 Yao Qi <yao@codesourcery.com>
12161
12162 * configure.ac: Call AC_PROG_RANLIB.
12163 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12164 * configure: Regenerate.
12165
e6edda56
JK
121662011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12167
12168 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12169
e5141119
JB
121702011-03-06 Yao Qi <yao@codesourcery.com>
12171
12172 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12173
64794aa4
JB
121742011-03-05 Yao Qi <yao@codesourcery.com>
12175
12176 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12177 (subdir_do): New make target. Copied from gdb/Makefile.
12178 (maintainer-clean, realclean, distclean, clean): Call corresponding
12179 make targets in common/Makefile.
12180
7a762829
YQ
121812011-03-04 Yao Qi <yao@codesourcery.com>
12182
12183 * Makefile.in: Remove GNU make feature --directory.
12184
348af9f7
MS
121852011-03-04 Michael Snyder <msnyder@vmware.com>
12186
12187 * server.c (queue_stop_reply): Call xmalloc not malloc.
12188
121892011-03-02 Michael Snyder <msnyder@vmware.com>
12190
12191 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12192
9f72fee2
MS
121932011-02-28 Michael Snyder <msnyder@vmware.com>
12194
588eebee
MS
12195 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12196 (cmd_qtframe): Ditto.
12197 (cmd_qtbuffer): Ditto.
12198 (cmd_bigqtbuffer): Ditto.
12199
9f72fee2
MS
12200 * utils.c (decimal2str): Initialize 'width' to nine, then
12201 don't mess with it.
12202
8040bd49
UW
122032011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12204
12205 * hostio.c (require_data): Free *data, not data.
12206
7e52cbd0
JK
122072011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12208
12209 * hostio.c (require_data): Use free, not xfree.
12210
9130f83e
MS
122112011-02-27 Michael Snyder <msnyder@vmware.com>
12212
4b812f4e
MS
12213 * server.c (handle_query): Discard unused value.
12214
9130f83e
MS
12215 * hostio.c (require_data): Free malloc memory before returning
12216 error.
12217
69d37113
MS
122182011-02-26 Michael Snyder <msnyder@vmware.com>
12219
12220 * linux-low.c (list_threads): Call closedir for dirent.
12221
35f5825a
MS
122222011-02-27 Michael Snyder <msnyder@vmware.com>
12223
2a589cef
MS
12224 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12225 a case statement falls through.
12226
0adea5f7
MS
12227 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12228
35f5825a
MS
12229 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12230 in comparison.
12231
238f1c74
MS
122322011-02-26 Michael Snyder <msnyder@vmware.com>
12233
12234 * utils.c (decimal2str): Eliminate dead code and dead param.
12235 (pulongest): Drop dead param from call to decimal2str.
12236 (plongest): Ditto.
12237
633ff500
JB
122382011-02-24 Joel Brobecker <brobecker@adacore.com>
12239
12240 Revert the following patch (not approved yet):
12241 2011-02-21 Hui Zhu <teawater@gmail.com>
12242 * tracepoint.c (tp_printf): New function.
12243 (eval_agent_expr): Handle gdb_agent_op_printf.
12244
f9c6ff72
HZ
122452011-02-21 Hui Zhu <teawater@gmail.com>
12246
12247 * tracepoint.c (tp_printf): New function.
12248 (eval_agent_expr): Handle gdb_agent_op_printf.
12249
94d5e490
TT
122502011-02-18 Tom Tromey <tromey@redhat.com>
12251
12252 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12253 (tracepoint.o): Likewise.
12254 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12255 (gdb_agent_op_names): Likewise.
12256
c7f96d2b
TT
122572011-02-18 Tom Tromey <tromey@redhat.com>
12258
12259 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12260 gdb_agent_op_rot>: New constants.
12261 (gdb_agent_op_names): Add pick and roll.
12262 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12263 cases.
12264
0feedb2c
JK
122652011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12266
12267 * aclocal.m4: Regenerated with aclocal-1.11.1.
12268
b3b9301e
PA
122692011-02-14 Pedro Alves <pedro@codesourcery.com>
12270
12271 * server.c (handle_qxfer_traceframe_info): New.
12272 (qxfer_packets): Register "traceframe-info".
12273 (handle_query): Report support for qXfer:traceframe-info:read+.
12274 * tracepoint.c (match_blocktype): New.
12275 (traceframe_find_block_type): Rename to ...
12276 (traceframe_walk_blocks): ... this. Add callback filter argument,
12277 and use it.
12278 (traceframe_find_block_type): New, reimplemented on top of
12279 traceframe_walk_blocks.
12280 (build_traceframe_info_xml): New.
12281 (traceframe_read_info): New.
12282 * server.h (traceframe_read_info): Declare.
12283
4f3e6fb7
YQ
122842011-02-11 Yao Qi <yao@codesourcery.com>
12285
12286 * configure.ac: Call AC_PROG_RANLIB.
12287 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12288 * configure: Regenerate.
12289
764880b7
PA
122902011-02-07 Pedro Alves <pedro@codesourcery.com>
12291
12292 * server.c (gdb_read_memory): Change return semantics to allow
12293 partial transfers.
12294 (handle_search_memory_1): Adjust.
12295 (process_serial_event) <'m' packet>: Handle partial transfers.
12296 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12297
1c79eb8a
PA
122982011-01-28 Pedro Alves <pedro@codesourcery.com>
12299
12300 * regcache.c (init_register_cache): Initialize
12301 regcache->register_status.
12302 (free_register_cache): Release regcache->register_status.
12303 (regcache_cpy): Copy register_status.
12304 (registers_to_string): Print 'x's for unavailable registers.
12305 (supply_register): Mark the register's status valid or
12306 unavailable, depending on whether a buffer was passed in or not.
12307 (supply_register_zeroed): New.
12308 (supply_regblock): Mark the registers' status valid or
12309 unavailable, depending on whether a buffer was passed in or not.
12310 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12311 (struct regcache): New `register_status' field.
12312 (supply_register_zeroed): Declare.
12313 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12314 supply_register_zeroed, rather than passing a NULL buffer to
12315 supply_register.
12316 * tracepoint.c (fetch_traceframe_registers): Update comment.
12317
85724a0e
PA
123182011-01-28 Pedro Alves <pedro@codesourcery.com>
12319
12320 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12321 buffer explicit.
12322
d08aafef
PA
123232011-01-25 Pedro Alves <pedro@codesourcery.com>
12324
12325 * server.h (decode_xfer_write): Change prototype.
12326 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12327 and don't extract the annex here.
12328 * server.c (decode_xfer_read): Remove `annex' parameter,
12329 and don't extract the annex here.
12330 (decode_xfer): New.
12331 (struct qxfer): New.
12332 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12333 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12334 (handle_qxfer_statictrace): New functions, abstracted out from
12335 handle_query, and made to use the struct qxfer interface.
12336 (handle_threads_qxfer_proper): Rename to ...
12337 (handle_qxfer_threads_proper): ... this.
12338 (handle_threads_qxfer): Rename to ...
12339 (handle_qxfer_threads): ... this. Adjust.
12340 (qxfer_packets): New array.
12341 (handle_qxfer): New function.
12342 (handle_query): Use handle_qxfer.
12343
493e2a69
MS
123442011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12345
12346 * gdbreplay.c: Shorten lines of >= 80 columns.
12347 * linux-low.c: Ditto.
12348 * linux-ppc-low.c: Ditto.
12349 * linux-s390-low.c: Ditto.
12350 * linux-sparc-low.c: Ditto.
12351 * linux-x86-low.c: Ditto.
12352 * linux-xtensa-low.c: Ditto.
12353 * mem-break.c: Ditto.
12354 * nto-low.c: Ditto.
12355 * regcache.h: Ditto.
12356 * remote-utils.c: Ditto.
12357 * server.c: Ditto.
12358 * server.h: Ditto.
12359 * thread-db.c: Ditto.
12360 * tracepoint.c: Ditto.
12361 * utils.c: Ditto.
12362 * win32-low.h: Ditto.
12363
44944448
JB
123642011-01-05 Joel Brobecker <brobecker@adacore.com>
12365
12366 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12367 update.
12368
71ce852c
JB
123692011-01-01 Joel Brobecker <brobecker@adacore.com>
12370
12371 * server.c (gdbserver_version): Update copyright year in version
12372 output.
12373 * gdbreplay.c (gdbreplay_version): Ditto.
12374
eb826dc6
MF
123752010-12-29 Jie Zhang <jie.zhang@analog.com>
12376
12377 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12378 * linux-bfin-low.c: New file.
12379 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12380 PT_DATA_ADDR for BFIN targets.
12381 * Makefile.in (SFILES): Add linux-bfin-low.c.
12382 (clean): Remove reg-bfin.c.
12383 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12384 * README: Mention supported Blackfin targets.
12385
39ab222a
MF
123862010-12-23 Mike Frysinger <vapier@gentoo.org>
12387
12388 * .gitignore: New file.
12389
a1f2ce7d
MF
123902010-11-16 Mike Frysinger <vapier@gentoo.org>
12391
12392 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12393
f474844c
JZ
123942010-10-22 Jie Zhang <jie@codesourcery.com>
12395
12396 * Makefile.in: Add FLAGS_TO_PASS variable.
12397 (install): Remove dependency of install-only and recursively
12398 invoke make for install-only.
12399
f1048712
DE
124002010-10-04 Doug Evans <dje@google.com>
12401
12402 * Makefile.in (uninstall): Use $(DESTDIR).
12403
b53a1623
PA
124042010-09-24 Pedro Alves <pedro@codesourcery.com>
12405
e6ee044d
PA
12406 PR gdb/11842
12407
b53a1623
PA
12408 * linux-x86-low.c (compat_siginfo_from_siginfo)
12409 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12410 si_code is < 0. Check for si_code == SI_TIMER before checking for
12411 si_code < 0.
12412
fa1bd1e4
JB
124132010-09-13 Joel Brobecker <brobecker@adacore.com>
12414
12415 * lynx-i386-low.c: New file.
12416 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12417
47fac8f8
JB
124182010-09-13 Joel Brobecker <brobecker@adacore.com>
12419
12420 * lynx-low.c (ptrace_request_to_str): Remove handling for
12421 request values that have been removed in LynxOS 5.x.
12422
1adfc54d
JB
124232010-09-13 Joel Brobecker <brobecker@adacore.com>
12424
12425 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12426 <ptrace.h>
12427
c2a66c29
NS
124282010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12429
12430 * configure.ac: Add --enable-inprocess-agent option.
12431 * configure: Rebuilt.
12432
32fcada3
YQ
124332010-09-06 Yao Qi <yao@codesourcery.com>
12434
12435 * linux-low.c (linux_kill): Remove unused variable.
12436 (linux_stabilize_threads): Likewise.
12437 * server.c (start_inferior): Likewise.
12438 (queue_stop_reply_callback): Likewise.
12439 * tracepoint.c (do_action_at_tracepoint): Likewise.
12440
0cccb683
YQ
124412010-09-06 Yao Qi <yao@codesourcery.com>
12442
12443 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12444 on return.
12445
423ec54c
JK
124462010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12447
12448 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12449
12ac6819
PA
124502010-09-06 Pedro Alves <pedro@codesourcery.com>
12451
12452 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12453 "$(IPA_DEPFILES)".
12454
8ed54b31
JB
124552010-09-01 Joel Brobecker <brobecker@adacore.com>
12456
12457 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12458 gdbserver/lynx-ppc-low.c: New files.
12459 * Makefile.in (lynx_low_h): New variable.
12460 (lynx-low.o, lynx-ppc-low.o): New rules.
12461 * configure.ac: On LynxOS, link with -lnetinet.
12462 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12463 * configure: regenerate.
12464
bb0116a4
JB
124652010-09-01 Joel Brobecker <brobecker@adacore.com>
12466
12467 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12468 * configure.ac: Add check for vasprintf and vsnprintf.
12469 * configure, config.in: Regenerate.
12470 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12471
a778ab81 124722010-09-01 Joel Brobecker <brobecker@adacore.com>
12473
12474 * gdbreplay.c: Move include of alloca.h up, next to include of
12475 malloc.h.
12476 * server.h: Add include of malloc.h.
12477 * mem-break.c: Remove include of malloc.h.
12478 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12479
8b034a19 124802010-09-01 Joel Brobecker <brobecker@adacore.com>
12481
12482 * Makefile.in (memmem.o): Build with -Wno-error.
12483
124842010-09-01 Joel Brobecker <brobecker@adacore.com>
12485
12486 * utils.c (xsnprintf): Make non-static.
12487 * server.h: Add xsnprintf declaration.
12488 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12489 replace calls to snprintf by calls to xsnprintf throughout.
12490
124912010-09-01 Joel Brobecker <brobecker@adacore.com>
12492
12493 * configure.ac: Add configure check for alloca.
12494 * configure, config.in: Regenerate.
12495 * server.h: Include alloca.h if it exists.
12496 * gdbreplay.c: Include alloca.h if it exists.
12497
1a981360
PA
124982010-08-28 Pedro Alves <pedro@codesourcery.com>
12499
12500 * linux-low.c (__SIGRTMIN): Define if not already defined.
12501 (linux_create_inferior): Check for __ANDROID__ rather than
12502 __SIGRTMIN.
12503 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12504 are already deferred.
12505 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12506 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12507 stopped and already has a pending signal to report.
12508 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12509 a pending signal to report or is moving out of a jump pad.
12510 (linux_init_signals): Check for __ANDROID__ rather than
12511 __SIGRTMIN.
12512
b4d51a55
PA
125132010-08-28 Pedro Alves <pedro@codesourcery.com>
12514
12515 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12516 debug_threads check. Avoid a linear search when not doing debug
12517 output.
12518
ec48365d
PA
125192010-08-27 Pedro Alves <pedro@codesourcery.com>
12520
12521 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12522 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12523 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12524 (process_event): Change local fd's type to gdb_fildes_t.
12525 (create_file_handler): Adjust prototype.
12526 (delete_file_handler): Adjust prototype.
12527 (handle_file_event): Adjust prototype. Use pfildes.
12528 (create_file_event): Adjsut prototype.
12529 * remote-utils.c (remote_desc, listen_desc): Change type to
12530 gdb_fildes_t.
12531 * server.h: New gdb_fildes_t typedef.
12532 [USE_WIN32API]: Include winsock2.h.
12533 (delete_file_handler, add_file_handler): Adjust prototypes.
12534 (pfildes): Declare.
12535 * utils.c (pfildes): New.
12536
854d88f0
PA
125372010-08-27 Pedro Alves <pedro@codesourcery.com>
12538
12539 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12540 * configure: Regenerate.
12541
0146f85b
PA
125422010-08-27 Pedro Alves <pedro@codesourcery.com>
12543
12544 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12545 (linux_done_accessing_memory): ... this.
12546 (linux_target_ops): Adjust.
12547 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12548 * nto-low.c (nto_target_ops): Adjust comment.
12549 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12550 * spu-low.c (spu_target_ops): Adjust comment.
12551 * target.h (target_ops): Rename unprepare_to_access_memory field
12552 to done_accessing_memory.
12553 (unprepare_to_access_memory): Rename to ...
12554 (done_accessing_memory): ... this.
12555
90d74c30
PA
125562010-08-26 Pedro Alves <pedro@codesourcery.com>
12557
12558 * linux-low.c (linux_prepare_to_access_memory): New.
12559 (linux_unprepare_to_access_memory): New.
12560 (linux_target_ops): Install them.
12561 * server.c (read_memory): Rename to ...
12562 (gdb_read_memory): ... this. Use
12563 prepare_to_access_memory/prepare_to_access_memory.
12564 (write_memory): Rename to ...
12565 (gdb_write_memory): ... this. Use
12566 prepare_to_access_memory/prepare_to_access_memory.
12567 (handle_search_memory_1): Adjust.
12568 (process_serial_event): Adjust.
12569 * target.h (struct target_ops): New fields
12570 prepare_to_access_memory and unprepare_to_access_memory.
12571 (prepare_to_access_memory, unprepare_to_access_memory): New.
12572 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12573 prepare_to_access_memory/prepare_to_access_memory.
12574 * nto-low.c (nto_target_ops): Adjust.
12575 * spu-low.c (spu_target_ops): Adjust.
12576 * win32-low.c (win32_target_ops): Adjust.
12577
fd467969
PA
125782010-08-26 Pedro Alves <pedro@codesourcery.com>
12579
12580 * Makefile.in (WARN_CFLAGS): Get it from configure.
12581 (WERROR_CFLAGS): New.
12582 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12583 * configure.ac: Introduce --enable-werror, which adds -Werror to
12584 the compiler command line. Enabled by default. Disable with
12585 --disable-werror. Add -Wdeclaration-after-statement
12586 Wpointer-arith and -Wformat-nonliteral to warning flags.
12587 * configure: Regenerate.
12588
331e2f5f
PA
125892010-08-26 Pedro Alves <pedro@codesourcery.com>
12590
12591 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12592
e581f2b4
PA
125932010-08-26 Pedro Alves <pedro@codesourcery.com>
12594
12595 * gdbreplay.c (remote_error): New.
12596 (gdbchar): New.
12597 (expect): Use gdbchar. Check for error reading from GDB.
12598 Clarify sync error output.
12599 (play): Check for errors writing to GDB.
12600 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12601 * remote-utils.c (getpkt): Check for errors writing to the remote
12602 descriptor.
12603
3c11dd79
PA
126042010-08-25 Pedro Alves <pedro@codesourcery.com>
12605
12606 * linux-low.c (linux_wait_1): Move non-debugging code out of
12607 `debug_threads' control.
12608
d20a8ad9
PA
126092010-08-25 Pedro Alves <pedro@codesourcery.com>
12610
12611 * linux-low.c (linux_wait_1): Don't set last_status here.
12612 * server.c (push_event, queue_stop_reply_callback): Assert we're
12613 not pushing a TARGET_WAITKIND_IGNORE event.
12614 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12615 (myresume, handle_target_event): Set the thread's last_resume_kind
12616 and last_status from the target returned status.
12617
964e4306
PA
126182010-08-25 Pedro Alves <pedro@codesourcery.com>
12619
12620 PR threads/10729
12621
12622 * linux-x86-low.c (update_debug_registers_callback): New.
12623 (i386_dr_low_set_addr): Use it.
12624 (i386_dr_low_get_addr): New.
12625 (i386_dr_low_set_control): Use update_debug_registers_callback.
12626 (i386_dr_low_get_control): New.
12627 (i386_dr_low_get_status): Adjust.
12628 * linux-low.c (linux_stop_lwp): New.
12629 * linux-low.h (linux_stop_lwp): Declare.
12630
12631 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12632 argument instead of a i386_debug_reg_state.
12633 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12634 a i386_debug_reg_state.
12635 (i386_insert_aligned_watchpoint): Adjust.
12636 (i386_remove_aligned_watchpoint): Adjust.
12637 (i386_low_stopped_data_address): Read the debug registers from the
12638 inferior instead of from the mirrors.
12639 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12640 (i386_dr_low_get_addr): Declare.
12641 (i386_dr_low_get_control): Declare.
12642 (i386_dr_low_get_status): Change prototype.
12643
12644 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12645 (i386_dr_low_get_addr): New.
12646 (i386_dr_low_get_control): New.
12647 (i386_dr_low_get_status): Adjust prototype. Return
12648 dr_status_mirror.
12649 (i386_initial_stuff): Clear dr_status_mirror and
12650 dr_control_mirror.
12651 (i386_get_thread_context): Adjust.
12652 (i386_set_thread_context): Adjust.
12653 (i386_thread_added): Adjust.
12654
5f21a75b
PA
126552010-08-24 Pedro Alves <pedro@codesourcery.com>
12656
12657 * linux-low.h (linux_thread_area): Delete declaration.
12658
3e4c1235
TS
126592010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12660
12661 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12662 after its termination.
12663
1971b033
PA
126642010-08-09 Pedro Alves <pedro@codesourcery.com>
12665
12666 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12667 (gdb_wants_all_stopped): Delete.
12668 (linux_wait_1): Don't call them.
12669 * server.c (handle_v_cont): Tag all threads as want-stopped.
12670 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12671 stopped as "client-wants-stopped".
12672
310444ac
PA
126732010-07-31 Pedro Alves <pedro@codesourcery.com>
12674
12675 * Makefile.in (signals_h): New.
12676 (server_h): Depend on it.
12677 (server.o): Don't depend on $(signals_def).
12678 (signals.o): Depend on $(signals_def).
12679
a19cae16
JK
126802010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12681
12682 * Makefile.in (signals_def): New.
12683 (server_h): Append include/gdb/signals.h and signals_def.
12684 (server.o): Append signals_def.
12685
30d50328
JK
126862010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12687
12688 * server.c (handle_target_event): Use target_signal_to_host for
12689 resume_info.sig initialization.
12690 * target.h (struct thread_resume) <sig>: New comment.
12691
5c3216e2
OS
126922010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12693
c6f46ca0
OS
12694 * server.c (handle_query): strcpy() the returned string from paddress()
12695 instead of sprintf().
5c3216e2
OS
12696 * utils.c (paddress): Return phex_nz().
12697
6bd31874
JB
126982010-07-07 Joel Brobecker <brobecker@adacore.com>
12699
12700 * server.c (handle_v_cont): Call mourn_inferior if process
12701 just exited.
12702 (myresume): Likewise.
12703
0fb4aa4b
PA
127042010-07-01 Pedro Alves <pedro@codesourcery.com>
12705
12706 Static tracepoints, and integration with UST.
12707
12708 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12709 * mem-break.c (uninsert_all_breakpoints)
12710 (reinsert_all_breakpoints): New.
12711 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12712 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12713 (gdb_agent_ust_loaded, helper_thread_id)
12714 (gdb_agent_helper_thread_id): New macros.
12715 (struct ipa_sym_addresses): Add addr_ust_loaded,
12716 addr_helper_thread_id, addr_cmd_buf.
12717 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12718 (in_process_agent_loaded_ust): New.
12719 (write_e_ust_not_loaded): New.
12720 (maybe_write_ipa_ust_not_loaded): New.
12721 (struct collect_static_trace_data_action): New.
12722 (enum tracepoint_type) <static_tracepoint>: New.
12723 (struct tracepoint) <handle>: Mention static tracepoints.
12724 (struct static_tracepoint_ctx): New.
12725 (CMD_BUF_SIZE): New.
12726 (add_tracepoint_action): Handle static tracepoint actions.
12727 (unprobe_marker_at): New.
12728 (clear_installed_tracepoints): Handle static tracepoints.
12729 (cmd_qtdp): Handle static tracepoints.
12730 (probe_marker_at): New.
12731 (cmd_qtstart): Handle static tracepoints.
12732 (response_tracepoint): Handle static tracepoints.
12733 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12734 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12735 (get_context_regcache): Handle static tracepoints.
12736 (do_action_at_tracepoint): Handle static tracepoint actions.
12737 (traceframe_find_block_type): Handle static trace data blocks.
12738 (traceframe_read_sdata): New.
12739 (download_tracepoints): Download static tracepoint actions.
12740 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12741 (GDB_PROBE_NAME): New.
12742 (ust_ops): New.
12743 (GET_UST_SYM): New.
12744 (USTF): New.
12745 (dlsym_ust): New.
12746 (ust_marker_to_static_tracepoint): New.
12747 (gdb_probe): New.
12748 (collect_ust_data_at_tracepoint): New.
12749 (gdb_ust_probe): New.
12750 (UNIX_PATH_MAX, SOCK_DIR): New.
12751 (gdb_ust_connect_sync_socket): New.
12752 (resume_thread, stop_thread): New.
12753 (run_inferior_command): New.
12754 (init_named_socket): New.
12755 (gdb_ust_socket_init): New.
12756 (cstr_to_hexstr): New.
12757 (next_st): New.
12758 (first_marker, next_marker): New.
12759 (response_ust_marker): New.
12760 (cmd_qtfstm, cmd_qtsstm): New.
12761 (unprobe_marker_at, probe_marker_at): New.
12762 (cmd_qtstmat, gdb_ust_thread): New.
12763 (gdb_ust_init): New.
12764 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12765 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12766 (ST_REGENTRY): New.
12767 (x86_64_st_collect_regmap): New.
12768 (X86_64_NUM_ST_COLLECT_GREGS): New.
12769 (AMD64_RIP_REGNUM): New.
12770 (supply_static_tracepoint_registers): New.
12771 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12772 (ST_REGENTRY): New.
12773 (i386_st_collect_regmap): New.
12774 (i386_NUM_ST_COLLECT_GREGS): New.
12775 (supply_static_tracepoint_registers): New.
12776 * server.c (handle_query): Handle qXfer:statictrace:read.
12777 <qSupported>: Report support for StaticTracepoints, and
12778 qXfer:statictrace:read features.
12779 * server.h (traceframe_read_sdata)
12780 (supply_static_tracepoint_registers): Declare.
12781 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12782 (unpack_varlen_hex): Include in IPA build.
12783 * Makefile.in (ustlibs, ustinc): New.
12784 (IPA_OBJS): Add remote-utils-ipa.o.
12785 ($(IPA_LIB)): Link -ldl and -lpthread.
12786 (UST_CFLAGS): New.
12787 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12788 * config.in, configure: Regenerate.
12789
9e4344e5
PA
127902010-06-20 Ian Lance Taylor <iant@google.com>
12791 Pedro Alves <pedro@codesourcery.com>
12792
12793 * linux-x86-low.c (always_true): Delete.
12794 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12795 trying to fool the compiler with always_true.
12796
c6beb2cb
PA
127972010-06-20 Pedro Alves <pedro@codesourcery.com>
12798
12799 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12800 conditions in gdbserver.
12801
d2ed6730
UW
128022010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12803
12804 * spu-low.c (spu_read_memory): Wrap around local store limit.
12805 (spu_write_memory): Likewise.
12806
4e29fb54
PA
128072010-06-15 Pedro Alves <pedro@codesourcery.com>
12808
12809 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12810 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12811 LONGEST uses.
12812 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12813 uses.
12814 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12815 uses with LONGEST uses.
12816
6a271cae
PA
128172010-06-14 Stan Shebs <stan@codesourcery.com>
12818 Pedro Alves <pedro@codesourcery.com>
12819
12820 Bytecode compiler.
12821
12822 * linux-x86-low.c: Include limits.h.
12823 (add_insns): New.
12824 (always_true): New.
12825 (EMIT_ASM): New.
12826 (EMIT_ASM32): New.
12827 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12828 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12829 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12830 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12831 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12832 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12833 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12834 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12835 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12836 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12837 (amd64_emit_void_call_2): New.
12838 (amd64_emit_ops): New.
12839 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12840 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12841 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12842 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12843 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12844 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12845 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12846 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12847 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12848 (i386_emit_stack_adjust, i386_emit_int_call_1)
12849 (i386_emit_void_call_2): New.
12850 (i386_emit_ops): New.
12851 (x86_emit_ops): New.
12852 (the_low_target): Install x86_emit_ops.
12853 * server.h (struct emit_ops): New.
12854 (get_raw_reg_func_addr): Declare.
12855 (current_insn_ptr, emit_error): Declare.
12856 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12857 (set_trace_state_variable_value): New defines.
12858 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12859 addr_get_trace_state_variable_value and
12860 addr_set_trace_state_variable_value.
12861 (symbol_list): New fields for get_raw_reg,
12862 get_trace_state_variable_value and set_trace_state_variable_value.
12863 (condfn): New typedef.
12864 (struct tracepoint): New field `compiled_cond'.
12865 (do_action_at_tracepoint): Clear compiled_cond.
12866 (get_trace_state_variable_value, set_trace_state_variable_value):
12867 Export in the IPA.
12868 (condition_true_at_tracepoint): If there's a compiled condition,
12869 run that.
12870 (current_insn_ptr, emit_error): New globals.
12871 (struct bytecode_address): New.
12872 (get_raw_reg_func_addr): New.
12873 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12874 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12875 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12876 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12877 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12878 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12879 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12880 (compile_tracepoint_condition, compile_bytecodes): New.
12881 * target.h (emit_ops): Forward declare.
12882 (struct target_ops): New field emit_ops.
12883 (target_emit_ops): New.
12884 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12885 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12886 * linux-low.c (linux_emit_ops): New.
12887 (linux_target_ops): Install it.
12888 * linux-low.h (struct linux_target_ops): New field emit_ops.
12889
92b72907
UW
128902010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12891
12892 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12893 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12894
fa593d66
PA
128952010-06-01 Pedro Alves <pedro@codesourcery.com>
12896 Stan Shebs <stan@codesourcery.com>
12897
12898 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12899 (all): Depend on $(extra_libraries).
12900 (install-only): Install the IPA.
12901 (IPA_OBJS, IPA_LIB): New.
12902 (clean): Remove the IPA lib.
12903 (IPAGENT_CFLAGS): New.
12904 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12905 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12906 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12907 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12908 * configure.ac: Check for atomic builtins support in the compiler.
12909 (IPA_DEPFILES, extra_libraries): Define.
12910 * configure.srv (ipa_obj): Add description.
12911 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12912 (i[34567]86-*-linux*): Set ipa_obj.
12913 (x86_64-*-linux*): Set ipa_obj.
12914 * linux-low.c (stabilizing_threads): New.
12915 (supports_fast_tracepoints): New.
12916 (linux_detach): Stabilize threads before detaching.
12917 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12918 the lwp is either not stabilizing, or is moving out of a jump pad.
12919 (linux_fast_tracepoint_collecting): New.
12920 (maybe_move_out_of_jump_pad): New.
12921 (enqueue_one_deferred_signal): New.
12922 (dequeue_one_deferred_signal): New.
12923 (linux_wait_for_event_1): If moving out of a jump pad, defer
12924 pending signals to later.
12925 (linux_stabilize_threads): New.
12926 (linux_wait_1): Check if threads need moving out of jump pads, and
12927 do it if so.
12928 (stuck_in_jump_pad_callback): New.
12929 (move_out_of_jump_pad_callback): New.
12930 (lwp_running): New.
12931 (linux_resume_one_lwp): Handle moving out of jump pads.
12932 (linux_set_resume_request): Dequeue deferred signals.
12933 (need_step_over_p): Also step over fast tracepoint jumps.
12934 (start_step_over): Also uninsert fast tracepoint jumps.
12935 (finish_step_over): Also reinsert fast tracepoint jumps.
12936 (linux_install_fast_tracepoint_jump): New.
12937 (linux_target_ops): Install linux_stabilize_threads and
12938 linux_install_fast_tracepoint_jump_pad.
12939 * linux-low.h (linux_target_ops) <get_thread_area,
12940 install_fast_tracepoint_jump_pad>: New fields.
12941 (struct lwp_info) <collecting_fast_tracepoint,
12942 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12943 (linux_get_thread_area): Declare.
12944 * linux-x86-low.c (jump_insn): New.
12945 (x86_get_thread_area): New.
12946 (append_insns): New.
12947 (push_opcode): New.
12948 (amd64_install_fast_tracepoint_jump_pad): New.
12949 (i386_install_fast_tracepoint_jump_pad): New.
12950 (x86_install_fast_tracepoint_jump_pad): New.
12951 (the_low_target): Install x86_get_thread_area and
12952 x86_install_fast_tracepoint_jump_pad.
12953 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12954 (struct fast_tracepoint_jump): New.
12955 (fast_tracepoint_jump_insn): New.
12956 (fast_tracepoint_jump_shadow): New.
12957 (find_fast_tracepoint_jump_at): New.
12958 (fast_tracepoint_jump_here): New.
12959 (delete_fast_tracepoint_jump): New.
12960 (set_fast_tracepoint_jump): New.
12961 (uninsert_fast_tracepoint_jumps_at): New.
12962 (reinsert_fast_tracepoint_jumps_at): New.
12963 (set_breakpoint_at): Use write_inferior_memory.
12964 (uninsert_raw_breakpoint): Use write_inferior_memory.
12965 (check_mem_read): Mask out fast tracepoint jumps.
12966 (check_mem_write): Mask out fast tracepoint jumps.
12967 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12968 (set_fast_tracepoint_jump): Declare.
12969 (delete_fast_tracepoint_jump)
12970 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12971 (reinsert_fast_tracepoint_jumps_at): Declare.
12972 * regcache.c: Don't compile many functions when building the
12973 in-process agent library.
12974 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12975 the register buffer in the heap.
12976 (free_register_cache): If the register buffer isn't owned by the
12977 regcache, don't free it.
12978 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12979 pre-existing register caches.
12980 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12981 type.
12982 (convert_ascii_to_int): : Constify `from' parameter type.
12983 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12984 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12985 the needed buffer in-place.
12986 (relocate_instruction): New.
12987 * server.c (handle_query) <qSymbols>: If the target supports
12988 tracepoints, give it a chance of looking up symbols. Report
12989 support for fast tracepoints.
12990 (handle_status): Stabilize threads.
12991 (process_serial_event): Adjust.
12992 * server.h (struct fast_tracepoint_jump): Forward declare.
12993 (struct process_info) <fast_tracepoint_jumps>: New field.
12994 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12995 (decode_X_packet, decode_M_packet): Adjust.
12996 (relocate_instruction): Declare.
12997 (in_process_agent_loaded): Declare.
12998 (tracepoint_look_up_symbols): Declare.
12999 (struct fast_tpoint_collect_status): Declare.
13000 (fast_tracepoint_collecting): Declare.
13001 (force_unlock_trace_buffer): Declare.
13002 (handle_tracepoint_bkpts): Declare.
13003 (initialize_low_tracepoint)
13004 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13005 * target.h (struct target_ops) <stabilize_threads,
13006 install_fast_tracepoint_jump_pad>: New fields.
13007 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13008 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13009 [HAVE_STDINT_H]: Include stdint.h.
13010 (trace_debug_1): Rename to ...
13011 (trace_vdebug): ... this.
13012 (trace_debug): Rename to ...
13013 (trace_debug_1): ... this. Add `level' parameter.
13014 (trace_debug): New.
13015 (ATTR_USED, ATTR_NOINLINE): New.
13016 (IP_AGENT_EXPORT): New.
13017 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13018 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13019 (about_to_request_buffer_space, trace_buffer_is_full)
13020 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13021 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13022 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13023 (traceframe_write_count, traceframes_created)
13024 (trace_state_variables)
13025 New renaming defines.
13026 (struct ipa_sym_addresses): New.
13027 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13028 (symbol_list): New.
13029 (ipa_sym_addrs): New.
13030 (all_tracepoint_symbols_looked_up): New.
13031 (in_process_agent_loaded): New.
13032 (write_e_ipa_not_loaded): New.
13033 (maybe_write_ipa_not_loaded): New.
13034 (tracepoint_look_up_symbols): New.
13035 (debug_threads) [IN_PROCESS_AGENT]: New.
13036 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13037 (UNKNOWN_SIDE_EFFECTS): New.
13038 (stop_tracing): New.
13039 (flush_trace_buffer): New.
13040 (stop_tracing_bkpt): New.
13041 (flush_trace_buffer_bkpt): New.
13042 (read_inferior_integer): New.
13043 (read_inferior_uinteger): New.
13044 (read_inferior_data_pointer): New.
13045 (write_inferior_data_pointer): New.
13046 (write_inferior_integer): New.
13047 (write_inferior_uinteger): New.
13048 (struct collect_static_trace_data_action): Delete.
13049 (enum tracepoint_type): New.
13050 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13051 <actions_str, step_actions, step_actions_str>: Only include in
13052 GDBserver.
fa593d66
PA
13053 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13054 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13055 (tracepoints): Use IP_AGENT_EXPORT.
13056 (last_tracepoint): Don't include in the IPA.
13057 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13058 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13059 (alloced_trace_state_variables): New.
13060 (trace_state_variables): Use IP_AGENT_EXPORT.
13061 (traceframe_t): Delete unused variable.
13062 (circular_trace_buffer): Don't include in the IPA.
13063 (trace_buffer_start): Delete.
13064 (struct trace_buffer_control): New.
13065 (trace_buffer_free): Delete.
13066 (struct ipa_trace_buffer_control): New.
13067 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13068 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13069 New.
13070 (trace_buffer_ctrl): New.
13071 (TRACE_BUFFER_CTRL_CURR): New.
13072 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13073 Reimplement as macros.
13074 (trace_buffer_wrap): Delete.
13075 (traceframe_write_count, traceframe_read_count)
13076 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13077 (struct tracepoint_hit_ctx) <type>: New field.
13078 (struct fast_tracepoint_ctx): New.
13079 (memory_barrier): New.
13080 (cmpxchg): New.
13081 (record_tracepoint_error): Update atomically in the IPA.
13082 (clear_inferior_trace_buffer): New.
13083 (about_to_request_buffer_space): New.
13084 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13085 updating the same buffer.
13086 (add_tracepoint): Default the tracepoint's type to trap
13087 tracepoint, and orig_size to -1.
13088 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13089 internal variables.
13090 (create_trace_state_variable): New parameter `gdb'. Handle it.
13091 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13092 (cmd_qtdp): Handle fast tracepoints.
13093 (cmd_qtdv): Adjust.
13094 (max_jump_pad_size): New.
13095 (gdb_jump_pad_head): New.
13096 (get_jump_space_head): New.
13097 (claim_jump_space): New.
13098 (sort_tracepoints): New.
13099 (MAX_JUMP_SIZE): New.
13100 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13101 IPA.
13102 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13103 support. Upload fast traceframes, and delete internal IPA
13104 breakpoints.
13105 (stop_tracing_handler): New.
13106 (flush_trace_buffer_handler): New.
13107 (cmd_qtstop): Upload fast tracepoints.
13108 (response_tracepoint): Handle fast tracepoints.
13109 (tracepoint_finished_step): Upload fast traceframes. Set the
13110 tracepoint hit context's tracepoint type.
13111 (handle_tracepoint_bkpts): New.
13112 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13113 type. Add comment about fast tracepoints.
13114 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13115 non-existing action_str field.
13116 (get_context_regcache): Handle fast tracepoints.
13117 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13118 to the regcache.
13119 (fast_tracepoint_from_jump_pad_address): New.
13120 (fast_tracepoint_from_ipa_tpoint_address): New.
13121 (collecting_t): New.
13122 (force_unlock_trace_buffer): New.
13123 (fast_tracepoint_collecting): New.
13124 (collecting): New.
13125 (gdb_collect): New.
13126 (write_inferior_data_ptr): New.
13127 (target_tp_heap): New.
13128 (target_malloc): New.
13129 (download_agent_expr): New.
13130 (UALIGN): New.
13131 (download_tracepoints): New.
13132 (download_trace_state_variables): New.
13133 (upload_fast_traceframes): New.
13134 (IPA_FIRST_TRACEFRAME): New.
13135 (IPA_NEXT_TRACEFRAME_1): New.
13136 (IPA_NEXT_TRACEFRAME): New.
13137 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13138 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13139 (gdb_jump_pad_buffer_end): New.
13140 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13141 (initialize_tracepoint): Adjust.
13142 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13143 buffer. Initialize the low module.
13144 * utils.c (PREFIX, TOOLNAME): New.
13145 (malloc_failure): Use PREFIX.
13146 (error): In the IPA, an error causes an exit.
13147 (fatal, warning): Use PREFIX.
13148 (internal_error): Use TOOLNAME.
13149 (NUMCELLS): Increase to 10.
13150 * configure, config.in: Regenerate.
13151
d149dd1d
PA
131522010-06-01 Pedro Alves <pedro@codesourcery.com>
13153
13154 * server.c (handle_query) <qSupported>: Do two passes over the
13155 qSupported string to avoid nesting strtok.
13156
f6528abd
JK
131572010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13158
13159 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13160 (CDEPS): New.
13161 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13162 -Wl,--dynamic-list.
13163 * configure: Regenerate.
13164 * proc-service.list: New.
13165
ca2a87a0
JK
131662010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13167
13168 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13169 New comment.
13170
363a6e9f
OS
131712010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13172
13173 * gdbreplay.c (remote_open): Check error return from socket() call by
13174 its equality to -1 not by it being negative.
13175 * remote-utils.c (remote_open): Likewise.
13176
d23b6cb1
PA
131772010-05-23 Pedro Alves <pedro@codesourcery.com>
13178
13179 * config.h: Regenerate.
13180
28d3cf85
MK
131812010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13182
13183 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13184 doesn't provide PTRACE_GET_THREAD_AREA.
13185
fea36a59
MK
131862010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13187
13188 * linux-m68k-low.c: Include <asm/ptrace.h>
13189 (ps_get_thread_area): Implement.
13190
24b066ba
DE
131912010-05-03 Doug Evans <dje@google.com>
13192
13193 * event-loop.c (struct callback_event): New struct.
13194 (callback_list): New global.
13195 (append_callback_event, delete_callback_event): New functions.
13196 (process_callback): New function.
13197 (start_event_loop): Call it.
13198 * remote-utils.c (NOT_SCHEDULED): Define.
13199 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13200 moved out of readchar.
13201 (readchar): Rewrite. Call reschedule before returning.
13202 (reset_readchar): New function.
13203 (remote_close): Call it.
13204 (process_remaining, reschedule): New functions.
13205 * server.h (callback_handler_func): New typedef.
13206 (append_callback_event, delete_callback_event): Declare.
13207
9836d6ea
PA
132082010-05-03 Pedro Alves <pedro@codesourcery.com>
13209
13210 * proc-service.c (ps_pglobal_lookup): Use
13211 thread_db_look_up_one_symbol.
13212 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13213 parameter. Use it instead of all_symbols_looked_up.
13214 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13215 field.
13216 (all_symbols_looked_up): Don't declare.
13217 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13218 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13219 field.
13220 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13221 Set all_symbols_looked_up here.
13222 (thread_db_look_up_one_symbol): New.
13223 (thread_db_get_tls_address): Adjust.
13224 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13225 thread_db object on the heap, and tentatively set it in the
13226 process structure.
13227 (thread_db_init): Don't set all_symbols_looked_up here.
13228 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13229
7984d532
PA
132302010-05-03 Pedro Alves <pedro@codesourcery.com>
13231
13232 * linux-low.c (linux_kill, linux_detach): Adjust.
13233 (status_pending_p_callback): Remove redundant statement. Check
13234 for !TARGET_WAITIKIND_IGNORE, instead of
13235 TARGET_WAITKIND_STOPPED.
13236 (handle_tracepoints): Make sure LWP is locked. Adjust.
13237 (linux_wait_for_event_1): Adjust.
13238 (linux_cancel_breakpoints): New.
13239 (unsuspend_one_lwp): New.
13240 (unsuspend_all_lwps): New.
13241 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13242 (send_sigstop_callback): Change return type to int, add new
13243 `except' parameter and handle it.
13244 (suspend_and_send_sigstop_callback): New.
13245 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13246 pass them down. If SUSPEND, also increment the lwp's suspend
13247 count.
13248 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13249 (need_step_over_p): Don't consider suspended LWPs.
13250 (start_step_over): Adjust.
13251 (proceed_one_lwp): Change return type to int, add new `except'
13252 parameter and handle it.
13253 (unsuspend_and_proceed_one_lwp): New.
13254 (proceed_all_lwps): Use find_inferior instead of
13255 for_each_inferior.
13256 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13257 also decrement the suspend count of LWPs. Pass `except' down,
13258 instead of hacking its suspend count.
13259 (linux_pause_all): Add `freeze' parameter. Adjust.
13260 (linux_unpause_all): New.
13261 (linux_target_ops): Install linux_unpause_all.
13262 * server.c (handle_status): Adjust.
13263 * target.h (struct target_ops): New fields `unpause_all' and
13264 `cancel_breakpoints'. Add new parameter to `pause_all'.
13265 (pause_all): Add new `freeze' parameter.
13266 (unpause_all): New.
13267 (cancel_breakpoints): New.
13268 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13269 cancel breakpoints.
13270 (cmd_qtstart): Pause threads.
13271 (stop_tracing): Pause threads, and cancel breakpoints.
13272 * win32-low.c (win32_target_ops): Adjust.
13273
e471f25b
PA
132742010-05-03 Pedro Alves <pedro@codesourcery.com>
13275
13276 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13277 the inferior right away from here...
13278 (linux_wait_1): ... to here, and adjust to check the thread's
13279 last_resume_kind instead of the lwp's step or stop_expected flags.
13280
1915ef4f
PA
132812010-05-02 Pedro Alves <pedro@codesourcery.com>
13282
13283 * README: Use consistent `GDB' and `GDBserver' spellings.
13284
f9e39928
PA
132852010-05-02 Pedro Alves <pedro@codesourcery.com>
13286
13287 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13288 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13289 (linux_detach_one_lwp): Assume the lwp is stopped.
13290 (any_thread_of): Delete.
13291 (linux_detach): Stop all lwps here. Don't blindly delete all
13292 breakpoints.
13293 (delete_lwp_callback): New.
13294 (linux_mourn): Delete all lwps of the process that is gone.
13295 (linux_wait_1): Don't delete the last lwp of the process here.
13296 * mem-break.h (mark_breakpoints_out): Declare.
13297 * mem-break.c (mark_breakpoints_out): New.
13298 (free_all_breakpoints): Use it.
13299 * server.c (handle_target_event): If the process is gone, mark
13300 breakpoints out.
13301 * thread-db.c (struct thread_db) <create_bp>: New field.
13302 (thread_db_enable_reporting): Fix prototype. Store a thread event
13303 breakpoint reference in the thread_db struct.
13304 (thread_db_load_search): Clear the thread_db object.
13305 (try_thread_db_load_1): Ditto.
13306 (switch_to_process): New.
13307 (disable_thread_event_reporting): Use it.
13308 (remove_thread_event_breakpoints): New.
13309 (thread_db_detach, thread_db_mourn): Use it.
13310
1e7fc18c
PA
133112010-05-01 Pedro Alves <pedro@codesourcery.com>
13312
13313 * linux-low.c (linux_enable_event_reporting): New.
13314 (linux_wait_for_event_1, handle_extended_wait): Use it.
13315
02fc4de7
PA
133162010-04-30 Pedro Alves <pedro@codesourcery.com>
13317
13318 * linux-low.c (linux_kill_one_lwp, linux_kill)
13319 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13320 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13321 SIGSTOP even if the LWP is stopped.
13322 (send_sigstop_callback): New.
13323 (stop_all_lwps): Use send_sigstop_callback instead.
13324 (linux_resume_one_thread): Adjust.
13325 (proceed_one_lwp): Still proceed an LWP that the client has
13326 requested to stop, if we haven't reported it as stopped yet. Make
13327 sure that LWPs the client want stopped, have a pending SIGSTOP.
13328
bc3b5632
DE
133292010-04-26 Doug Evans <dje@google.com>
13330
ae1ada35
DE
13331 * server.c (handle_general_set): Make static.
13332
bc3b5632
DE
13333 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13334 Print received char after testing for error/eof instead of before.
13335 (input_interrupt): Tweak comment.
13336
65730243
DE
133372010-04-23 Doug Evans <dje@google.com>
13338
13339 * server.c (start_inferior): Print inferior argv if --debug.
13340
a8ae7dc0
AR
133412010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13342
13343 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13344 * nto-x86-low.c: Include server.h
13345
1c07cc19
PM
133462010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13347
13348 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13349 be consistent with other sources of this directory.
13350 (init_registers_amd64): Correct name of source file of this function
13351 in the comment.
13352
e0a61e09
PM
133532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13354
13355 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13356 64-bit executables.
13357
54709339
PM
133582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13359
13360 * win32-i386-low.c: Add 64-bit support.
13361 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13362 (init_registers_amd64): Declare.
13363 (mappings): Add 64-bit version of array.
13364 (init_windows_x86): New function.
13365 (the_low_target): Change init_arch field to init_windows_x86.
13366
e8f0053d
PM
133672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13368
13369 * win32-low.c: Adapt to support also 64-bit architecture.
13370 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13371 (get_image_name): Use SIZE_T type for local variable `done'.
13372 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13373 (toolhelp_get_dll_name): Idem.
13374 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13375 Use uintptr_t typecast to avoid warning.
13376 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13377 (handle_exception): Use phex_nz to avoid warning.
13378 (win32_wait): Remove unused local variable `process'.
13379
c481e77e
PM
133802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13381
13382 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13383 `amd64-avx.o'.
13384
12ea4b69
PM
133852010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13386
13387 * configure.ac: Use `ws2_32' library for srv_mingw.
13388 * configure: Regenerate.
13389 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13390 * remote-utils.c: Likewise.
13391
f6d1620c
L
133922010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13393
13394 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13395 if __x86_64__ is defined.
13396
8e642873
PM
133972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13398
13399 * configure: Regenerate.
13400
711e434b
PM
134012010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13402
13403 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13404 * target.h (target_ops): New get_tib_address field.
13405 * win32-low.h (win32_thread_info): Add thread_local_base field.
13406 * win32-low.c (child_add_thread): Add tlb argument.
13407 Set thread_local_base field to TLB.
13408 (get_child_debug_event): Adapt to child_add_thread change.
13409 (win32_get_tib_address): New function.
13410 (win32_target_ops): Set get_tib_address field to
13411 win32_get_tib_address.
13412 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13413
505106cd
PA
134142010-04-12 Pedro Alves <pedro@codesourcery.com>
13415
505106cd
PA
13416 * linux-low.c (linux_mourn): Also remove the process.
13417 * server.c (handle_target_event): Don't remove the process here.
13418 * nto-low.c (nto_mourn): New.
13419 (nto_target_ops): Install it.
13420 * spu-low.c (spu_mourn): New.
13421 (spu_target_ops): Install it.
13422 * win32-low.c (win32_mourn): New.
13423 (win32_target_ops): Install it.
13424
e8470a06
PA
134252010-04-12 Pedro Alves <pedro@codesourcery.com>
13426
13427 * server.h (buffer_xml_printf): Remove redundant `;'.
13428
45ba0d02
PA
134292010-04-12 Pedro Alves <pedro@codesourcery.com>
13430
13431 * regcache.c (set_register_cache): Invalidate regcaches before
13432 changing the register cache layout.
13433 (regcache_invalidate_one): Allow a NULL regcache.
13434 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13435 regcaches before changing the register cache layout or the target
13436 regsets.
13437
59e04013
L
134382010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13439
13440 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13441 variable warning on Linux/x86-64.
13442
8336d594
PA
134432010-04-11 Pedro Alves <pedro@codesourcery.com>
13444
13445 GDBserver disconnected tracing support.
13446
13447 * linux-low.c (linux_remove_process): Delete.
13448 (add_lwp): Don't set last_resume_kind here.
13449 (linux_kill): Use `mourn'.
13450 (linux_detach): Use `thread_db_detach', and `mourn'.
13451 (linux_mourn): New.
13452 (linux_attach_lwp_1): Adjust comment.
13453 (linux_attach): last_resume_kind moved the thread_info; adjust.
13454 (status_pending_p_callback): Adjust.
13455 (linux_wait_for_event_1): Adjust.
13456 (count_events_callback, select_singlestep_lwp_callback)
13457 (select_event_lwp_callback, cancel_breakpoints_callback)
13458 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13459 (proceed_one_lwp): Adjust.
13460 (linux_async): Add debug output.
13461 (linux_thread_stopped): New.
13462 (linux_pause_all): New.
13463 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13464 linux_pause_all.
13465 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13466 (thread_db_free): Delete declaration.
13467 (thread_db_detach, thread_db_mourn): Declare.
13468 * thread-db.c (thread_db_init): Use thread_db_mourn.
13469 (thread_db_free): Delete, split in two.
13470 (disable_thread_event_reporting): New.
13471 (thread_db_detach): New.
13472 (thread_db_mourn): New.
13473
13474 * server.h (struct thread_info) <last_resume_kind>: New field.
13475 <attached>: Add comment.
13476 <gdb_detached>: New field.
13477 (handler_func): Change return type to int.
13478 (handle_serial_event, handle_target_event): Ditto.
13479 (gdb_connected): Declare.
13480 (tracing): Delete.
13481 (disconnected_tracing): Declare.
13482 (stop_tracing): Declare.
13483
13484 * server.c (handle_query) <qSupported>: Report support for
13485 disconnected tracing.
13486 (queue_stop_reply_callback): Account for running threads.
13487 (gdb_wants_thread_stopped): New.
13488 (gdb_wants_all_threads_stopped): New.
13489 (gdb_reattached_process): New.
13490 (handle_status): Clear the `gdb_detached' flag of all processes.
13491 In all-stop, stop all threads.
13492 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13493 (process_serial_event): If the remote connection breaks, or if an
13494 exit was forced with "monitor exit", force an event loop exit.
13495 Handle disconnected tracing on detach.
13496 (handle_serial_event): Adjust.
13497 (handle_target_event): If GDB isn't connected, forward events back
13498 to the inferior, unless the last process exited, in which case,
13499 exit gdbserver. Adjust interface.
13500
13501 * remote-utils.c (remote_open): Don't block in accept. Instead
13502 register an event loop source on the listen socket file
13503 descriptor. Refactor bits into ...
13504 (listen_desc): ... this new global.
13505 (gdb_connected): ... this new function.
13506 (enable_async_notification): ... this new function.
13507 (handle_accept_event): ... this new function.
13508 (remote_close): Clear remote_desc.
13509
13510 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13511
13512 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13513 New fields.
13514 (mourn_inferior): Define.
13515 (target_process_qsupported): Avoid the dangling else problem.
13516 (thread_stopped): Define.
13517 (pause_all): Define.
13518 (target_waitstatus_to_string): Declare.
13519 * target.c (target_waitstatus_to_string): New.
13520
13521 * tracepoint.c (tracing): Make extern.
13522 (disconnected_tracing): New.
13523 (stop_tracing): Make extern. Handle tracing stops due to GDB
13524 disconnecting.
13525 (cmd_qtdisconnected): New.
13526 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13527 (handle_tracepoint_general_set): Handle QTDisconnected.
13528
13529 * event-loop.c (event_handler_func): Change return type to int.
13530 (process_event): Bail out if the event handler wants the event
13531 loop to stop.
13532 (handle_file_event): Ditto.
13533 (start_event_loop): Bail out if the event handler wants the event
13534 loop to stop.
13535
13536 * nto-low.c (nto_target_ops): Adjust.
13537 * spu-low.c (spu_wait): Don't remove the process here.
13538 (spu_target_ops): Adjust.
13539 * win32-low.c (win32_wait): Don't remove the process here.
13540 (win32_target_ops): Adjust.
13541
5d267c4c
PA
135422010-04-11 Pedro Alves <pedro@codesourcery.com>
13543
13544 * regcache.c (realloc_register_cache): Invalidate inferior's
13545 regcache before recreating it.
13546
623ccd72
PA
135472010-04-09 Pedro Alves <pedro@codesourcery.com>
13548
13549 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13550
219f2f23
PA
135512010-04-09 Stan Shebs <stan@codesourcery.com>
13552 Pedro Alves <pedro@codesourcery.com>
13553
13554 * server.h (LONGEST): New.
13555 (struct thread_info) <while_stepping>: New field.
13556 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13557 Declare.
13558 (initialize_tracepoint, handle_tracepoint_general_set)
13559 (handle_tracepoint_query, tracepoint_finished_step)
13560 (tracepoint_was_hit, release_while_stepping_state_list):
13561 (current_traceframe): Declare.
13562 * server.c (handle_general_set): Handle tracepoint packets.
13563 (read_memory): New.
13564 (write_memory): New.
13565 (handle_search_memory_1): Use read_memory.
13566 (handle_query): Report support for conditional tracepoints, trace
13567 state variables, and tracepoint sources. Handle tracepoint
13568 queries.
13569 (main): Initialize the tracepoints module.
13570 (process_serial_event): Handle traceframe reads/writes.
13571
13572 * linux-low.c (handle_tracepoints): New.
13573 (linux_wait_1): Call it.
13574 (linux_resume_one_lwp): Handle while-stepping.
13575 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13576 (linux_target_ops): Install them.
13577 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13578 New field.
13579 * linux-x86-low.c (x86_supports_tracepoints): New.
13580 (the_low_target). Install it.
13581
13582 * mem-break.h (delete_breakpoint): Declare.
13583 * mem-break.c (delete_breakpoint): Make external.
13584
13585 * target.h (struct target_ops): Add `supports_tracepoints',
13586 `read_pc', and `write_pc' fields.
13587 (target_supports_tracepoints): Define.
13588 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13589 (phex_nz): New.
13590
13591 * regcache.h (struct regcache) <registers_owned>: New field.
13592 (init_register_cache, regcache_cpy): Declare.
13593 (regcache_read_pc, regcache_write_pc): Declare.
13594 (register_cache_size): Declare.
13595 (supply_regblock): Declare.
13596 * regcache.c (init_register_cache): New.
13597 (new_register_cache): Use it.
13598 (regcache_cpy): New.
13599 (register_cache_size): New.
13600 (supply_regblock): New.
13601 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13602
219f2f23
PA
13603 * tracepoint.c: New.
13604
13605 * Makefile.in (OBS): Add tracepoint.o.
13606 (tracepoint.o): New rule.
13607
3a13a53b
L
136082010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13609
13610 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13611 (i386-mmx.o): New.
13612 (i386-mmx.c): Likewise.
13613 (i386-mmx-linux.o): Likewise.
13614 (i386-mmx-linux.c): Likewise.
13615
13616 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13617 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13618 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13619 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13620
13621 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13622 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13623 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13624
1570b33e
L
136252010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13626
13627 * Makefile.in (clean): Updated.
13628 (i386-avx.o): New.
13629 (i386-avx.c): Likewise.
13630 (i386-avx-linux.o): Likewise.
13631 (i386-avx-linux.c): Likewise.
13632 (amd64-avx.o): Likewise.
13633 (amd64-avx.c): Likewise.
13634 (amd64-avx-linux.o): Likewise.
13635 (amd64-avx-linux.c): Likewise.
13636
13637 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13638 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13639 (srv_amd64_regobj): Add amd64-avx.o.
13640 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13641 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13642 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13643 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13644 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13645 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13646 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13647
13648 * i387-fp.c: Include "i386-xstate.h".
13649 (i387_xsave): New.
13650 (i387_cache_to_xsave): Likewise.
13651 (i387_xsave_to_cache): Likewise.
13652 (x86_xcr0): Likewise.
13653
13654 * i387-fp.h (i387_cache_to_xsave): Likewise.
13655 (i387_xsave_to_cache): Likewise.
13656 (x86_xcr0): Likewise.
13657
13658 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13659 * linux-crisv32-low.c (target_regsets): Likewise.
13660 * linux-m68k-low.c (target_regsets): Likewise.
13661 * linux-mips-low.c (target_regsets): Likewise.
13662 * linux-ppc-low.c (target_regsets): Likewise.
13663 * linux-s390-low.c (target_regsets): Likewise.
13664 * linux-sh-low.c (target_regsets): Likewise.
13665 * linux-sparc-low.c (target_regsets): Likewise.
13666 * linux-xtensa-low.c (target_regsets): Likewise.
13667
13668 * linux-low.c: Include <sys/uio.h>.
13669 (regsets_fetch_inferior_registers): Support nt_type.
13670 (regsets_store_inferior_registers): Likewise.
13671 (linux_process_qsupported): New.
13672 (linux_target_ops): Add linux_process_qsupported.
13673
13674 * linux-low.h (regset_info): Add nt_type.
13675 (linux_target_ops): Add process_qsupported.
13676
13677 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13678 and <sys/uio.h>.
13679 (init_registers_i386_avx_linux): New.
13680 (init_registers_amd64_avx_linux): Likewise.
13681 (xmltarget_i386_linux_no_xml): Likewise.
13682 (xmltarget_amd64_linux_no_xml): Likewise.
13683 (PTRACE_GETREGSET): Likewise.
13684 (PTRACE_SETREGSET): Likewise.
13685 (x86_fill_xstateregset): Likewise.
13686 (x86_store_xstateregset): Likewise.
13687 (use_xml): Likewise.
13688 (x86_linux_update_xmltarget): Likewise.
13689 (x86_linux_process_qsupported): Likewise.
13690 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13691 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13692 init_registers_i386_linux here. Call
13693 x86_linux_update_xmltarget.
13694 (the_low_target): Add x86_linux_process_qsupported.
13695
13696 * server.c (handle_query): Call target_process_qsupported.
13697
13698 * target.h (target_ops): Add process_qsupported.
13699 (target_process_qsupported): New.
13700
fc7238bb
PA
137012010-04-03 Pedro Alves <pedro@codesourcery.com>
13702
13703 * inferiors.c (add_thread): Set last_status kind to
13704 TARGET_WAITKIND_IGNORE.
13705 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13706 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13707 (linux_wait_1): Move `thread' local definition to block that uses
13708 it. Don't NULL initialize `event_child'.
13709 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13710 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13711 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13712
bdabb078
PA
137132010-04-01 Pedro Alves <pedro@codesourcery.com>
13714
13715 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13716 an extended waitstatus, or by a watchpoint.
13717 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13718 thread was stepping or has been stopped by a watchpoint.
13719
d3bbe7a0
PA
137202010-04-01 Pedro Alves <pedro@codesourcery.com>
13721
13722 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13723 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13724 of another, then delete the previous, and validate all
13725 breakpoints.
13726 (validate_inserted_breakpoint): New.
13727 (delete_disabled_breakpoints): New.
13728 (validate_breakpoints): New.
13729 (check_mem_read): Validate breakpoints before trusting their
13730 shadow. Delete disabled breakpoints.
13731 (check_mem_write): Validate breakpoints before trusting they
13732 should be inserted. Delete disabled breakpoints.
13733 * mem-break.h (validate_breakpoints):
13734 * server.c (handle_query): Validate breakpoints when we see a
13735 qSymbol query.
13736
8b07ae33
PA
137372010-04-01 Pedro Alves <pedro@codesourcery.com>
13738
13739 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13740 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13741 if we could tell there's a GDB breakpoint at stop_pc.
13742 (need_step_over_p): Don't do a step over if we find a GDB
13743 breakpoint at the resume PC.
13744
13745 * mem-break.c (struct raw_breakpoint): New.
13746 (enum bkpt_type): New type `gdb_breakpoint'.
13747 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13748 fields. New field `raw'.
13749 (find_raw_breakpoint_at): New.
13750 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13751 breakpoint instead.
13752 (set_breakpoint_at): Adjust.
13753 (delete_raw_breakpoint): New.
13754 (release_breakpoint): New.
13755 (delete_breakpoint): Rename to...
13756 (delete_breakpoint_1): ... this. Add proc parameter. Use
13757 release_breakpoint. Return ENOENT.
13758 (delete_breakpoint): Reimplement.
13759 (find_breakpoint_at): Delete.
13760 (find_gdb_breakpoint_at): New.
13761 (delete_breakpoint_at): Delete.
13762 (set_gdb_breakpoint_at): New.
13763 (delete_gdb_breakpoint_at): New.
13764 (gdb_breakpoint_here): New.
13765 (set_reinsert_breakpoint): Use release_breakpoint.
13766 (uninsert_breakpoint): Rename to ...
13767 (uninsert_raw_breakpoint): ... this.
13768 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13769 (reinsert_raw_breakpoint): Change parameter type to
13770 raw_breakpoint.
13771 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13772 instead.
13773 (check_breakpoints): Adjust. Use release_breakpoint.
13774 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13775 (breakpoint_inserted_here): Ditto.
13776 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13777 Don't trust the breakpoint's shadow if it is not inserted.
13778 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13779 (delete_all_breakpoints): Adjust.
13780 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13781 use delete_breakpoint_1.
13782
13783 * mem-break.h (breakpoints_supported): Delete declaration.
13784 (set_gdb_breakpoint_at): Declare.
13785 (gdb_breakpoint_here): Declare.
13786 (delete_breakpoint_at): Delete.
13787 (delete_gdb_breakpoint_at): Declare.
13788
13789 * server.h (struct raw_breakpoint): Forward declare.
13790 (struct process_info): New field `raw_breakpoints'.
13791
13792 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13793 breakpoints.
13794
6bf5e0ba
PA
137952010-03-24 Pedro Alves <pedro@codesourcery.com>
13796
13797 * linux-low.c (status_pending_p_callback): Fix comment.
13798 (linux_wait_for_event_1): Move most of the internal breakpoint
13799 handling from here...
13800 (linux_wait_1): ... to here.
13801 (count_events_callback): New.
13802 (select_singlestep_lwp_callback): New.
13803 (select_event_lwp_callback): New.
13804 (cancel_breakpoints_callback): New.
13805 (select_event_lwp): New.
13806 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13807 priority to all LWPs that have had events that should be reported
13808 to the client. Cancel breakpoints when about to reporting the
13809 event to the client, not while stopping lwps. No longer cancel
13810 finished single-steps here.
13811 (cancel_finished_single_step): Delete.
13812 (cancel_finished_single_steps): Delete.
13813
414a389f
PA
138142010-03-24 Pedro Alves <pedro@codesourcery.com>
13815
13816 * mem-break.c (enum bkpt_type): New.
13817 (struct breakpoint): New field `type'.
13818 (set_breakpoint_at): Change return type to struct breakpoint
13819 pointer. Set type to `other_breakpoint' by default.
13820 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13821 in the breakpoint list.
13822 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13823 (reinsert_breakpoint): Rename to ...
13824 (reinsert_raw_breakpoint): ... this.
13825 (reinsert_breakpoints_at): Adjust.
13826 * mem-break.h (struct breakpoint): Declare.
13827 (set_breakpoint_at): Change return type to struct breakpoint
13828 pointer.
13829
2280c721
PA
138302010-03-24 Pedro Alves <pedro@codesourcery.com>
13831
13832 * server.c (handle_query): Assign, not compare.
13833
d50171e4
PA
138342010-03-24 Pedro Alves <pedro@codesourcery.com>
13835
13836 Teach linux gdbserver to step-over-breakpoints.
13837
13838 * linux-low.c (can_hardware_single_step): New.
13839 (supports_breakpoints): New.
13840 (handle_extended_wait): If stopping threads, read the stop pc of
13841 the new cloned LWP.
13842 (get_pc): New.
13843 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13844 low target doesn't support retrieving the PC.
13845 (add_lwp): Set last_resume_kind to resume_continue.
13846 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13847 (linux_attach): Don't clear stop_expected. Set the lwp's
13848 last_resume_kind to resume_stop.
13849 (linux_detach_one_lwp): Don't check for removed breakpoints.
13850 (check_removed_breakpoint): Delete.
13851 (status_pending_p): Rename to ...
13852 (status_pending_p_callback): ... this. Don't check for removed
13853 breakpoints. Don't consider threads that are stopped from GDB's
13854 perspective.
13855 (linux_wait_for_lwp): Always read the stop_pc here.
13856 (cancel_breakpoint): New.
13857 (step_over_bkpt): New global.
13858 (linux_wait_for_event_1): Implement stepping over breakpoints.
13859 (gdb_wants_lwp_stopped): New.
13860 (gdb_wants_all_stopped): New.
13861 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13862 single-step traps here. Store the thread's last reported target
13863 wait status.
13864 (send_sigstop): Don't clear stop_expected. Always set it,
13865 instead.
13866 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13867 (cancel_finished_single_step): New.
13868 (cancel_finished_single_steps): New.
13869 (wait_for_sigstop): Don't cancel finished single-step traps here.
13870 (linux_resume_one_lwp): Don't check for removed breakpoints.
13871 Don't set `step' on non-hardware step archs.
13872 (linux_set_resume_request): Ignore resume_stop requests if already
13873 stopping or stopped. Set the lwp's last_resume_kind.
13874 (resume_status_pending_p): Don't check for removed breakpoints.
13875 (need_step_over_p): New.
13876 (start_step_over): New.
13877 (finish_step_over): New.
13878 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13879 requests. Clear the thread's last reported target waitstatus.
13880 Don't use the `suspended' flag. Don't consider pending breakpoints.
13881 (linux_resume): Start a step-over if necessary.
13882 (proceed_one_lwp): New.
13883 (proceed_all_lwps): New.
13884 (unstop_all_lwps): New.
13885 * linux-low.h (struct lwp_info): Rewrite comment for the
13886 `suspended' flag. Add the `stop_pc' field. Delete the
13887 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13888 Add `'last_resume_kind' and `need_step_over' fields.
13889 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13890 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13891 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13892 (set_raw_breakpoint_at): New.
13893 (set_breakpoint_at): Rewrite to use it.
13894 (reinsert_breakpoint_handler): Delete.
13895 (set_reinsert_breakpoint): New.
13896 (reinsert_breakpoint_by_bp): Delete.
13897 (delete_reinsert_breakpoints): New.
13898 (uninsert_breakpoint): Rewrite.
13899 (uninsert_breakpoints_at): New.
13900 (reinsert_breakpoint): Rewrite.
13901 (reinsert_breakpoints_at): New.
13902 (check_breakpoints): Rewrite.
13903 (breakpoint_here): New.
13904 (breakpoint_inserted_here): New.
13905 (check_mem_read): Adjust.
13906 * mem-break.h (breakpoints_supported, breakpoint_here)
13907 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13908 (reinsert_breakpoint_by_bp): Delete declaration.
13909 (delete_reinsert_breakpoints): Declare.
13910 (reinsert_breakpoint): Delete declaration.
13911 (reinsert_breakpoints_at): Declare.
13912 (uninsert_breakpoint): Delete declaration.
13913 (uninsert_breakpoints_at): Declare.
13914 (check_breakpoints): Adjust prototype.
13915 * server.h: Adjust include order.
13916 (struct thread_info): Declare here. Add a `last_status' field.
13917
30ba68cb
MS
139182010-03-23 Michael Snyder <msnyder@vmware.com>
13919
13920 * server.c (crc32): New function.
13921 (handle_query): Add handling for 'qCRC:' request.
13922
b9a881c2
PA
139232010-03-23 Pedro Alves <pedro@codesourcery.com>
13924
13925 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13926 lwp had been stopped by a watchpoint.
13927
e92d13d5
PA
139282010-03-16 Pedro Alves <pedro@codesourcery.com>
13929
13930 * server.h (internal_error): Declare.
13931 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13932 * utils.c (internal_error): New function.
13933
64daa791
AS
139342010-03-15 Andreas Schwab <schwab@redhat.com>
13935
13936 * configure.srv: Fix typo setting srv_regobj.
13937
f52cd8cd
PA
139382010-03-15 Pedro Alves <pedro@codesourcery.com>
13939
13940 * linux-low.c (fetch_register): Avoid passing a non string literal
13941 format to `error'.
13942 (usr_store_inferior_registers): Ditto.
13943
93ae6fdc
PA
139442010-03-14 Pedro Alves <pedro@codesourcery.com>
13945
13946 * linux-low.c (linux_write_memory): Bail out early if peeking
13947 memory failed.
13948
c3adc08c
PA
139492010-03-14 Pedro Alves <pedro@codesourcery.com>
13950
13951 * linux-low.h (struct lwp_info): New fields
13952 `stopped_by_watchpoint' and `stopped_data_address'.
13953 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13954 here, and cache them in the lwp object.
13955 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13956 directly.
13957 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13958 field.
13959 (linux_stopped_by_watchpoint): Rewrite.
13960 (linux_stopped_data_address): Rewrite.
13961
bce522a2
PA
139622010-03-06 Simo Melenius <simo.melenius@iki.fi>
13963
13964 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13965 switching the current inferior, not before.
13966
90884b2b
L
139672010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13968
13969 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13970 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13971 i386-linux.c and amd64-linux.c.
13972 (reg-i386.o): Removed.
13973 (reg-i386.c): Likewise.
13974 (reg-i386-linux.o): Likewise.
13975 (reg-i386-linux.c): Likewise.
13976 (reg-x86-64.o): Likewise.
13977 (reg-x86-64.c): Likewise.
13978 (reg-x86-64-linux.o): Likewise.
13979 (reg-x86-64-linux.c): Likewise.
13980 (i386.o): New.
13981 (i386.c): Likewise.
13982 (i386-linux.o): Likewise.
13983 (i386-linux.c): Likewise.
13984 (amd64.o): Likewise.
13985 (amd64.c): Likewise.
13986 (amd64-linux.o): Likewise.
13987 (amd64-linux.c): Likewise.
13988
13989 * configure.srv (srv_i386_regobj): New.
13990 (srv_i386_linux_regobj): Likewise.
13991 (srv_amd64_regobj): Likewise.
13992 (srv_amd64_linux_regobj): Likewise.
13993 (srv_i386_32bit_xmlfiles): Likewise.
13994 (srv_i386_64bit_xmlfiles): Likewise.
13995 (srv_i386_xmlfiles): Likewise.
13996 (srv_amd64_xmlfiles): Likewise.
13997 (srv_i386_linux_xmlfiles): Likewise.
13998 (srv_amd64_linux_xmlfiles): Likewise.
13999 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14000 srv_xmlfiles to $srv_i386_xmlfiles.
14001 (i[34567]86-*-mingw32ce*): Likewise.
14002 (i[34567]86-*-mingw*): Likewise.
14003 (i[34567]86-*-nto*): Likewise.
14004 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14005 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14006 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14007 (x86_64-*-linux*): Likewise.
14008
14009 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14010 (init_registers_amd64_linux): New.
14011 (x86_arch_setup): Replace init_registers_x86_64_linux with
14012 init_registers_amd64_linux.
14013
193f13e6
MK
140142010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14015
14016 * configure.ac: Check for libdl. If it is not available link against
14017 static libthread_db.
14018 * configure: Regenerate.
14019
85d721b8
PA
140202010-02-22 Pedro Alves <pedro@codesourcery.com>
14021
14022 PR9605
14023
14024 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14025 handing a read watchpoint.
14026 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14027
6076632b
DE
140282010-02-12 Doug Evans <dje@google.com>
14029
14030 * linux-low.c (linux_supports_tracefork_flag): Document.
14031 (linux_look_up_symbols): Add comment.
14032
3327ccf7
L
140332010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14034
14035 * regcache.c (supply_register): Clear regcache if buf is NULL.
14036
0718675c 140372010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14038 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14039
14040 * inferiors.c (find_inferior): Add function documentation.
14041 (unloaded_dll): Handle the case where the unloaded dll has not
14042 been previously registered in the dll list.
14043
177321bd
DJ
140442010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14045
14046 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14047 (thumb2_breakpoint): New.
14048 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14049
2b009048
DJ
140502010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14051
14052 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14053 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14054 breakpoints.
14055
3be029c7
PA
140562010-01-21 Pedro Alves <pedro@codesourcery.com>
14057
14058 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14059
18f5de3b
JK
140602010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14061
14062 * linux-s390-low.c (s390_collect_ptrace_register)
14063 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14064
3743bb4f
DE
140652010-01-21 Doug Evans <dje@google.com>
14066
14ce3065
DE
14067 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14068 (PTRACE_ARG4_TYPE): New macro.
14069 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14070 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14071 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14072 (usr_store_inferior_registers): Ditto.
14073 (linux_read_memory, linux_write_memory): Ditto.
14074 (linux_test_for_tracefork): Ditto.
14075
3743bb4f
DE
14076 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14077 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14078
8b315be5
PA
140792010-01-21 Pedro Alves <pedro@codesourcery.com>
14080
14081 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14082 target.
14083
85492558
PA
140842010-01-21 Pedro Alves <pedro@codesourcery.com>
14085
14086 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14087 prototype to take a regcache. Adjust.
14088
442ea881
PA
140892010-01-20 Pedro Alves <pedro@codesourcery.com>
14090
14091 * regcache.h (struct thread_info): Forward declare.
14092 (struct regcache): New.
14093 (new_register_cache): Adjust prototype.
14094 (get_thread_regcache): Declare.
14095 (free_register_cache): Adjust prototype.
14096 (registers_to_string, registers_from_string): Ditto.
14097 (supply_register, supply_register_by_name, collect_register)
14098 (collect_register_as_string, collect_register_by_name): Ditto.
14099 * regcache.c (struct inferior_regcache_data): Delete.
14100 (get_regcache): Rename to ...
14101 (get_thread_regcache): ... this. Adjust. Switch inferior before
14102 fetching registers.
14103 (regcache_invalidate_one): Adjust.
14104 (regcache_invalidate): Fix prototype.
14105 (new_register_cache): Return the new register cache.
14106 (free_register_cache): Change prototype.
14107 (realloc_register_cache): Adjust.
14108 (registers_to_string): Change prototype to take a regcache. Adjust.
14109 (registers_from_string): Ditto.
14110 (register_data): Ditto.
14111 (supply_register): Ditto.
14112 (supply_register_by_name): Ditto.
14113 (collect_register): Ditto.
14114 (collect_register_as_string): Ditto.
14115 (collect_register_by_name): Ditto.
14116 * server.c (process_serial_event): Adjust.
14117 * linux-low.h (regset_fill_func, regset_store_func): Change
14118 prototype.
14119 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14120 Change prototype.
14121 * linux-low.c (get_stop_pc): Adjust.
14122 (check_removed_breakpoint): Adjust.
14123 (linux_wait_for_event): Adjust.
14124 (linux_resume_one_lwp): Adjust.
14125 (fetch_register): Add regcache parameter. Adjust.
14126 (usr_store_inferior_registers): Ditto.
14127 (regsets_fetch_inferior_registers): Ditto.
14128 (regsets_store_inferior_registers): Ditto.
14129 (linux_fetch_registers, linux_store_registers): Ditto.
14130 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14131 regcache. Adjust.
43aaf8b6
PA
14132 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14133 Ditto.
442ea881
PA
14134 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14135 prototype to take a regcache.
14136 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14137 * remote-utils.c (convert_ascii_to_int, outreg)
14138 (prepare_resume_reply): Change prototype to take a regcache.
14139 Adjust.
14140 * target.h (struct target_ops) <fetch_registers, store_registers>:
14141 Change prototype to take a regcache.
14142 (fetch_inferior_registers, store_inferior_registers): Change
14143 prototype to take a regcache. Adjust.
14144 * proc-service.c (ps_lgetregs): Adjust.
14145 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14146 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14147 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14148 take a regcache. Adjust.
14149 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14150 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14151 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14152 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14153 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14154 (cris_cannot_fetch_register):
14155 (cris_breakpoint_at): Change prototype to take a regcache.
14156 Adjust.
14157 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14158 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14159 to take a regcache. Adjust.
14160 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14161 Adjust.
14162 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14163 take a regcache. Adjust.
14164 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14165 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14166 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14167 * linux-mips-low.c (mips_get_pc):
14168 (mips_set_pc): Change prototype to take a regcache. Adjust.
14169 (mips_reinsert_addr): Adjust.
14170 (mips_collect_register): Change prototype to take a regcache.
14171 Adjust.
14172 (mips_supply_register):
14173 (mips_collect_register_32bit, mips_supply_register_32bit)
14174 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14175 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14176 * linux-ppc-low.c (ppc_supply_ptrace_register)
14177 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14178 (parse_spufs_run): Adjust.
14179 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14180 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14181 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14182 take a regcache. Adjust.
14183 * linux-s390-low.c (s390_collect_ptrace_register)
14184 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14185 (s390_set_pc): Change prototype to take a regcache. Adjust.
14186 (s390_arch_setup): Adjust.
14187 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14188 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14189 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14190 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14191 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14192 regcache. Adjust.
14193 (sparc_breakpoint_at): Adjust.
14194 * linux-xtensa-low.c (xtensa_fill_gregset):
14195 (xtensa_store_gregset):
14196 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14197 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14198 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14199 prototype to take a regcache. Adjust.
14200 * win32-arm-low.c (arm_fetch_inferior_register)
14201 (arm_store_inferior_register): Change prototype to take a
14202 regcache. Adjust.
14203 * win32-i386-low.c (i386_fetch_inferior_register)
14204 (i386_store_inferior_register): Change prototype to take a
14205 regcache. Adjust.
14206 * win32-low.c (child_fetch_inferior_registers)
14207 (child_store_inferior_registers): Change prototype to take a
14208 regcache. Adjust.
14209 (win32_wait): Adjust.
14210 (win32_fetch_inferior_registers): Change prototype to take a
14211 regcache. Adjust.
14212 (win32_store_inferior_registers): Adjust.
14213 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14214 store_inferior_register>: Change prototype to take a regcache.
14215
60c3d7b0
DE
142162010-01-20 Doug Evans <dje@google.com>
14217
14218 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14219 #ifdef.
14220 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14221 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14222
dc146f7c
VP
142232010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14224
14225 * linux-low.c (linux_core_of_thread): New.
14226 (compare_ints, show_process, list_threads): New.
14227 (linux_qxfer_osdata): Report threads and cores.
14228 (linux_target_op): Register linux_core_of_thread.
14229 * remote-utils.c (prepare_resume_reply): Report the core.
14230 (buffer_xml_printf): Support %d specifier.
14231 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14232 New.
14233 (handle_query): Handle qXfer:threads. Announce availability
14234 thereof.
14235 * target.h (struct target_ops): New field core_of_thread.
14236
7803799a
UW
142372010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14238
14239 * Makefile.in (clean): Remove new generated files.
14240 (reg-s390.o, reg-s390.c): Remove rules.
14241 (reg-s390x.o, reg-s390x.c): Likewise.
14242 (s390-linux32.o, s390-linux32.c): Add rules.
14243 (s390-linux64.o, s390-linux64.c): Likewise.
14244 (s390x-linux64.o, s390x-linux64.c): Likewise.
14245 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14246 * linux-s390-low.c: Include <elf.h>.
14247 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14248 (init_registers_s390): Remove prototype.
14249 (init_registers_s390x): Likewise.
14250 (init_registers_s390_linux32): Add prototype.
14251 (init_registers_s390_linux64): Likewise.
14252 (init_registers_s390x_linux64): Likewise.
14253 (s390_num_regs_3264): New define.
14254 (s390_regmap_3264): New global variable.
14255 (s390_cannot_fetch_register): Remove obsolete check.
14256 (s390_cannot_store_register): Likewise.
14257 (s390_collect_ptrace_register): Handle upper/lower register halves.
14258 (s390_supply_ptrace_register): Likewise.
14259 (s390_fill_gregset): Update to register number changes.
14260 (s390_get_hwcap): New routine.
14261 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14262 Install appropriate regmap and register set.
14263
6e7ffa39
JB
142642010-01-01 Joel Brobecker <brobecker@adacore.com>
14265
14266 * server.c (gdbserver_version): Update copyright year to 2010.
14267 * gdbreplay.c (gdbreplay_version): Likewise.
14268
957f3f49
DE
142692009-12-28 Doug Evans <dje@google.com>
14270
14271 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14272 elf/external.h. Include <elf.h> instead but only if necessary.
14273
ca5c370d
PA
142742009-12-28 Pedro Alves <pedro@codesourcery.com>
14275
14276 * linux-low.c (linux_remove_process): Remove `detaching'
14277 parameter. Don't release/detach from thread_db here.
14278 (linux_kill): Release/detach from thread_db here, ...
14279 (linux_detach): ... and here, before actually detaching.
14280 (linux_wait_1): ... and here, when a process exits.
14281 * thread-db.c (any_thread_of): New.
14282 (thread_db_free): Switch the current inferior to a thread of the
14283 passed in process.
14284
4ee62156
DE
142852009-12-21 Doug Evans <dje@google.com>
14286
d90e6a88
DE
14287 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14288
c5f62d5f
DE
14289 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14290 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14291 warning ifndef __NR_tkill. Move setting of errno there too.
14292 Delete unnecessary resetting of errno after syscall.
14293 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14294
10e86dd7
DE
14295 * configure.ac: Check for dladdr.
14296 * config.in: Regenerate.
14297 * configure: Regenerate.
14298 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14299 (try_thread_db_load): Update.
14300
4ee62156
DE
14301 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14302
00f515da
DE
143032009-12-18 Doug Evans <dje@google.com>
14304
e9464885
DE
14305 * event-loop.c: Include unistd.h if it exists.
14306
07d4f67e
DE
14307 * linux-low.c (my_waitpid): Move definition away from being in
14308 between linux_tracefork_child/linux_test_for_tracefork.
14309
00f515da
DE
14310 * gdb_proc_service.h (psaddr_t): Fix type.
14311 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14312 signature to match glibc.
14313
1de1badb
DE
143142009-12-16 Doug Evans <dje@google.com>
14315
14316 * linux-low.c (linux_read_memory): Fix argument to read.
14317
aeeb81d1
PA
143182009-11-26 Pedro Alves <pedro@codesourcery.com>
14319
14320 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14321 events, don't leave current_inferior pointing at null.
14322
10357975
PA
143232009-11-26 Pedro Alves <pedro@codesourcery.com>
14324
14325 * win32-low.c (LOG): Delete.
14326 (OUTMSG): Output to stderr.
14327 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14328 on compile time LOG macro.
14329 (win32_wait): Fix debug output.
14330
cf6e3471
PA
143312009-11-26 Pedro Alves <pedro@codesourcery.com>
14332
14333 * win32-low.c (win32_add_one_solib): If the dll name is
14334 "ntdll.dll", prepend the system directory to the dll path.
14335
0c85e18e
MK
143362009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14339
9ac544ce 143402009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14341 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14342
14343 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14344 * configure.ac: Check for __mcoldfire__ and set
14345 gdb_cv_m68k_is_coldfire.
14346 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14347 reg-cf.o and reg-m68k.o.
14348 * configure: Regenerated.
14349
fd7dd3e6
PA
143502009-11-16 Pedro Alves <pedro@codesourcery.com>
14351
14352 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14353 Pass it to thread_db_free.
14354 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14355 proper `detaching' argument to linux_remove_process.
14356 * linux-low.h (thread_db_free): Add `detaching' parameter.
14357 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14358 to thread_db_free.
14359 (thread_db_free): Add `detaching' parameter. Only
14360 call td_ta_clear_event if detaching from process.
14361
75aa492e
MK
143622009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14363
14364 * thread-db.c (thread_db_free): Fix typo.
14365
21e1bee4
PP
143662009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14367
14368 PR gdb/10838
14369 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14370
8838b45e
NS
143712009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14372
14373 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14374 with an i686 compiler.
14375 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14376 needed.
14377 * configure: Rebuilt.
14378
8a35fb51
SL
143792009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14380
14381 PR gdb/10783
14382
14383 * server.c (handle_search_memory_1): Correct read_addr initialization
14384 in loop for searching subsequent chunks.
14385
96f15937
PP
143862009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14387
14388 * configure.ac: New --with-libthread-db option.
14389 * thread-db.c: Allow direct dependence on libthread_db.
14390 (thread_db_free): Adjust.
14391 * config.in: Regenerate.
14392 * configure: Likewise.
889bf7c5 14393
5f7d1694
PP
143942009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14395
14396 PR gdb/10757
14397 * thread-db.c (attach_thread): New function.
14398 (maybe_attach_thread): Return success/failure.
14399 (find_new_threads_callback): Adjust.
889bf7c5
PA
14400 (thread_db_find_new_threads): Loop until no new threads.
14401
88e3b899
PA
144022009-10-13 Pedro Alves <pedro@codesourcery.com>
14403
14404 * proc-service.c (ps_lgetregs): Formatting.
14405
cdbfd419
PP
144062009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14407
14408 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14409 * configure.ac: Adjust.
14410 * linux-low.h (struct process_info_private): Move members to struct
14411 thread_db.
14412 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14413 * linux-low.c (linux_remove_process): Adjust.
14414 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14415 * server.c (handle_query): Move code ...
14416 (handle_monitor_command): ... here. New function.
14417 * target.h (struct target_ops): New member.
14418 * thread-db.c (struct thread_db): New.
14419 (libthread_db_search_path): New variable.
14420 (thread_db_create_event, thread_db_enable_reporting)
14421 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14422 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14423 (try_thread_db_load_1, dladdr_to_soname): New functions.
14424 (try_thread_db_load, thread_db_load_search): New functions.
14425 (thread_db_init): Search for libthread_db.
14426 (thread_db_free): New function.
14427 (thread_db_handle_monitor_command): Likewise.
14428 * config.in: Regenerate.
14429 * configure: Regenerate.
889bf7c5 14430
4168d2d6
UW
144312009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14432
14433 * spu-low.c (spu_kill): Wait for inferior to terminate.
14434 Call clear_inferiors.
14435 (spu_detach): Call clear_inferiors.
14436
81ecdfbb
RW
144372009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14438
14439 * aclocal.m4: Regenerate.
14440 * config.in: Likewise.
14441 * configure: Likewise.
14442
0b9ff2c0
UW
144432009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14444
14445 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14446 (parse_spufs_run): New function.
14447 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14448 (ppc_breakpoint_at): Handle SPU breakpoints.
14449
efcbbd14
UW
144502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14451
14452 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14453 (SPUFS_MAGIC): Define.
14454 (spu_enumerate_spu_ids): New function.
14455 (linux_qxfer_spu): New function.
14456 (linux_target_ops): Install linux_qxfer_spu.
14457
f4d9bade
UW
144582009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14459
14460 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14461 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14462 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14463 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14464 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14465 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14466 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14467 (init_registers_powerpc_cell32l): Add prototype.
14468 (init_registers_powerpc_cell64l): Likewise.
14469 (ppc_arch_setup): Detect Cell/B.E. architecture.
14470
96e946ca
RW
144712009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14472
14473 * Makefile.in (datarootdir): New variable.
14474
58d6951d
DJ
144752009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * linux-low.c (linux_write_memory): Update debugging output.
14478 * Makefile.in (clean): Add new descriptions.
14479 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14480 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14481 * configure.srv: Add new files for arm*-*-linux*.
14482 * linux-arm-low.c: Add new declarations.
14483 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14484 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14485 (HWCAP_VFPv3D16): New.
14486 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14487 instead of __IWMMXT__.
14488 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14489 (arm_arch_setup): New.
14490 (target_regsets): Remove #ifdef. Add VFP regset.
14491 (the_low_target): Use arm_arch_setup.
14492
12b42a12
DJ
144932009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14494
14495 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14496 the main thread again.
14497
ac8c974e
AR
144982009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14499
14500 Adding Neutrino gdbserver.
14501 * configure: Regenerated.
14502 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14503 * configure.srv (i[34567]86-*-nto*): New target.
14504 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14505 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14506 (nto_comctrl) [__QNX__]: New function.
14507 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14508
4424e0c3 145092009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14510
14511 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14512 srv_tgtobj.
14513
912cf4ba
PA
145142009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14515 Pedro Alves <pedro@codesourcery.com>
14516
14517 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14518 don't support CONTEXT_EXTENDED_REGISTERS.
14519 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14520 (the_low_target): Install them.
14521 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14522 failing with ERROR_PIPE_NOT_CONNECTED.
14523
aa5ca48f
DE
145242009-06-30 Doug Evans <dje@google.com>
14525 Pierre Muller <muller@ics.u-strasbg.fr>
14526
14527 Add h/w watchpoint support to x86-linux, win32-i386.
14528 * Makefile.in (SFILES): Add i386-low.c
14529 (i386_low_h): Define.
14530 (i386-low.o): Add dependencies.
14531 (linux-x86-low.o): Add i386-low.h dependency.
14532 (win32-i386-low.o): Ditto.
14533 * i386-low.c: New file.
14534 * i386-low.h: New file.
14535 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14536 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14537 * linux-low.c (linux_add_process): Initialize arch_private.
14538 (linux_remove_process): Free arch_private.
14539 (add_lwp): Initialize arch_private.
14540 (delete_lwp): Free arch_private.
14541 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14542 provided.
14543 * linux-low.h (process_info_private): New member arch_private.
14544 (lwp_info): New member arch_private.
14545 (linux_target_ops): New members new_process, new_thread,
14546 prepare_to_resume.
14547 (ptid_of): New macro.
14548 * linux-x86-low.c: Include stddef.h, i386-low.h.
14549 (arch_process_info): New struct.
14550 (arch_lwp_info): New struct.
14551 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14552 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14553 (i386_dr_low_get_status): New function.
14554 (x86_insert_point, x86_remove_point): New functions.
14555 (x86_stopped_by_watchpoint): New function.
14556 (x86_stopped_data_address): New function.
14557 (x86_linux_new_process, x86_linux_new_thread): New functions.
14558 (x86_linux_prepare_to_resume): New function.
14559 (the_low_target): Add entries for insert_point, remove_point,
14560 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14561 prepare_to_resume.
14562 * server.c (debug_hw_points): New global.
14563 (monitor_show_help): Document set debug-hw-points.
14564 (handle_query): Process "set debug-hw-points".
14565 * server.h (debug_hw_points): Declare.
14566 (paddress): Declare.
14567 * utils.c (NUMCELLS, CELLSIZE): New macros.
14568 (get_sell, xsnprintf, paddress): New functions.
14569 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14570 remove_point, stopped_by_watchpoint, stopped_data_address.
14571 * win32-i386-low.c: Include i386-low.h.
14572 (debug_reg_state): Replaces dr.
14573 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14574 (i386_dr_low_get_status): New function.
14575 (i386_insert_point, i386_remove_point): New functions.
14576 (i386_stopped_by_watchpoint): New function.
14577 (i386_stopped_data_address): New function.
14578 (i386_initial_stuff): Update.
14579 (get_thread_context,set_thread_context,i386_thread_added): Update.
14580 (the_low_target): Add entries for insert_point,
14581 remove_point, stopped_by_watchpoint, stopped_data_address.
14582 * win32-low.c (win32_insert_watchpoint): New function.
14583 (win32_remove_watchpoint): New function.
14584 (win32_stopped_by_watchpoint): New function.
14585 (win32_stopped_data_address): New function.
14586 (win32_target_ops): Add entries for insert_watchpoint,
14587 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14588 * win32-low.h (win32_target_ops): New members insert_point,
14589 remove_point, stopped_by_watchpoint, stopped_data_address.
14590
d993e290
PA
145912009-06-25 Pedro Alves <pedro@codesourcery.com>
14592
14593 * server.c (process_serial_event): Re-return unsupported, not
14594 error, if the type isn't recognized. Re-allow supporting only
14595 insert or remove packets. Also call require_running for
14596 breakpoints. Add missing break statement to default case. Tidy.
14597 * target.h (struct target_ops): Rename insert_watchpoint to
14598 insert_point, and remove_watchpoint to remove_point.
14599
14600 * linux-low.h (struct linux_target_ops): Likewise.
14601 * linux-low.c (linux_insert_watchpoint): Rename to ...
14602 (linux_insert_point): ... this. Adjust.
14603 (linux_remove_watchpoint): Rename to ...
14604 (linux_remove_point): ... this. Adjust.
14605 (linux_target_ops): Adjust.
14606 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14607 (cris_insert_point): ... this.
14608 (cris_remove_watchpoint): Rename to ...
14609 (cris_remove_point): ... this.
14610 (the_low_target): Adjust.
14611
0f54c268
PM
146122009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14613
14614 * server.c (handle_v_kill): Pass signal_pid to
14615 kill_inferior if multi_process is zero.
14616
c6314022
AR
146172009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14618
14619 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14620 * target.h (target_ops): Comment for *_watchpoint to make it clear
14621 the functions can get types '0' and '1'.
14622
4463ce24
AR
146232009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14624
14625 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14626 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14627 * regcache.c (get_regcache): Likewise.
14628 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14629 * win32-low.c (child_fetch_inferior_registers): Remove check for
14630 regno 0.
14631
cf8fd78b
PA
146322009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14633 Pedro Alves <pedro@codesourcery.com>
14634
14635 * target.h (struct target_ops) <supports_multi_process>: New
14636 callback.
14637 (target_supports_multi_process): New.
14638 * server.c (handle_query): Even if GDB reports support, only
14639 enable multi-process if the target also supports it. Report
14640 multi-process support only if the target backend supports it.
14641 * linux-low.c (linux_supports_multi_process): New function.
14642 (linux_target_ops): Install it as target_supports_multi_process
14643 callback.
14644
47c0c975
DE
146452009-05-24 Doug Evans <dje@google.com>
14646
e09875d4
DE
14647 Global renaming of find_thread_pid to find_thread_ptid.
14648 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14649 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14650 All callers updated.
14651
e27d73f6
DE
14652 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14653 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14654 directly.
14655
47c0c975
DE
14656 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14657 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14658 (linux_resume_one_lwp): Ditto.
14659
2acc282a
DE
146602009-05-23 Doug Evans <dje@google.com>
14661
14662 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14663 from struct inferior_list_entry * to struct lwp_info *.
14664 All callers updated.
14665
9f1036c1
DE
146662009-05-13 Doug Evans <dje@google.com>
14667
14668 * linux-x86-low.c: Don't include assert.h.
14669 (x86_siginfo_fixup): Use fatal, not assert.
14670 (x86_arch_setup): Fix comment.
14671
d0722149
DE
146722009-05-12 Doug Evans <dje@google.com>
14673
14674 Biarch support for i386/amd64 gdbserver.
14675 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14676 Add linux-x86-low.c.
14677 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14678 (linux-x86-low.o): Add.
14679 * linux-x86-64-low.c: Delete.
14680 * linux-i386-low.c: Delete.
14681 * linux-x86-low.c: New file.
14682 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14683 linux-x86-low.o.
14684 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14685 linux-x86-low.o.
14686 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14687 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14688 (linux_child_pid_to_exec_file): New function.
14689 (elf_64_header_p, elf_64_file_p): New functions.
14690 (siginfo_fixup): New function.
14691 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14692 give target a chance to convert layout.
14693 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14694 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14695
fdeb2a12
DE
146962009-05-07 Doug Evans <dje@google.com>
14697
14698 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14699 (regsets_store_inferior_registers): Ditto.
14700
a6dbe5df
PA
147012009-05-06 Pedro Alves <pedro@codesourcery.com>
14702
14703 PR server/10048
14704
14705 * linux-low.c (must_set_ptrace_flags): Delete.
14706 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14707 of the global.
14708 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14709 `lwp->must_set_ptrace_flags' instead.
ba42693b 14710 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14711 (linux_wait_1): ... not here.
14712
5091eb23
DE
147132009-04-30 Doug Evans <dje@google.com>
14714
9f767825
DE
14715 * inferiors.c (started_inferior_callback): New function.
14716 (attached_inferior_callback): New function.
14717 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14718 * server.c (print_started_pid, print_attached_pid): New functions.
14719 (detach_or_kill_for_exit): New function.
14720 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14721 * server.h (have_started_inferiors_p): Declare.
14722 (have_attached_inferiors_p): Declare.
14723
5091eb23
DE
14724 * inferiors.c (remove_process): Fix memory leak, free process.
14725 * linux-low.c (linux_remove_process): New function.
14726 (linux_kill): Call it instead of remove_process.
14727 (linux_detach, linux_wait_1): Ditto.
14728
155c8968
PA
147292009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14730
14731 * configure.srv: Add x86 Windows CE target.
14732
7fe519cb
UW
147332009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14734
14735 * inferiors.c (get_thread_process): Make global.
14736 * server.h (get_thread_process): Add prototype.
14737 * thread-db.c (find_one_thread): Use get_thread_process
14738 instead of current_process.
14739 (thread_db_get_tls_address): Do not crash if called when
14740 thread layer is not yet initialized.
14741
5472f405
UW
147422009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14743
14744 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14745 * spu-low.c (current_tid): Rename to ...
14746 (current_ptid): ... this.
14747 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14748 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14749 ptid_get_lwp (current_ptid) instead of current_tid.
14750 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14751 instead of current_tid. Use find_process_pid to verify pid
14752 argument is valid. Pass proper argument to remove_process.
14753 (spu_thread_alive): Compare current_ptid instead of current_tid.
14754 (spu_resume): Likewise.
14755
55ac2b99
PA
147562009-04-02 Pedro Alves <pedro@codesourcery.com>
14757
14758 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14759 variable.
14760
95954743
PA
147612009-04-01 Pedro Alves <pedro@codesourcery.com>
14762
14763 Implement the multiprocess extensions, and add linux multiprocess
14764 support.
14765
14766 * server.h (ULONGEST): Declare.
14767 (struct ptid, ptid_t): New.
14768 (minus_one_ptid, null_ptid): Declare.
14769 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14770 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14771 (struct inferior_list_entry): Change `id' type from unsigned from
14772 to ptid_t.
14773 (struct sym_cache, struct breakpoint, struct
14774 process_info_private): Forward declare.
14775 (struct process_info): Declare.
14776 (current_process): Declare.
14777 (all_processes): Declare.
14778 (initialize_inferiors): Declare.
14779 (add_thread): Adjust to use ptid_t.
14780 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14781 (add_process, remove_process, find_thread_pid): Declare.
14782 (find_inferior_id): Adjust to use ptid_t.
14783 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14784 (multi_process): Declare.
14785 (push_event): Adjust to use ptid_t.
14786 (read_ptid, write_ptid): Declare.
14787 (prepare_resume_reply): Adjust to use ptid_t.
14788 (clear_symbol_cache): Declare.
14789 * inferiors.c (all_processes): New.
14790 (null_ptid, minus_one_ptid): New.
14791 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14792 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14793 (add_thread): Change unsigned long to ptid. Remove gdb_id
14794 parameter. Adjust.
14795 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14796 (gdb_id_to_thread): Rename to ...
14797 (find_thread_pid): ... this. Change unsigned long to ptid.
14798 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14799 (loaded_dll, pull_pid_from_list): Adjust.
14800 (add_process, remove_process, find_process_pid)
14801 (get_thread_process, current_process, initialize_inferiors): New.
14802 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14803 (struct target_waitstatus) <related_pid>: Ditto.
14804 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14805 return type to int.
14806 (struct target_ops) <join>: Add `pid' argument.
14807 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14808 (struct target_ops) <wait>: Add `ptid' field. Change return type
14809 to ptid.
14810 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14811 (mywait): Add `ptid' argument. Change return type to ptid_t.
14812 (target_pid_to_str): Declare.
14813 * target.c (set_desired_inferior): Adjust to use ptids.
14814 (mywait): Add new `ptid' argument. Adjust.
14815 (target_pid_to_str): New.
14816 * mem-break.h (free_all_breakpoints): Declare.
14817 * mem-break.c (breakpoints): Delelete.
14818 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14819 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14820 to use per-process breakpoint list.
14821 (free_all_breakpoints): New.
14822 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14823 (symbol_cache, all_symbols_looked_up): Delete.
14824 (hexchars): New.
14825 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14826 read_ptid): New.
14827 (prepare_resume_reply): Change ptid argument's type from unsigned
14828 long to ptid_t. Adjust. Implement W;process and X;process.
14829 (free_sym_cache, clear_symbol_cache): New.
14830 (look_up_one_symbol): Adjust to per-process symbol cache. *
14831 * server.c (cont_thread, general_thread, step_thread): Change type
14832 to ptid_t.
14833 (attached): Delete.
14834 (multi_process): New.
14835 (last_ptid): Change type to ptid_t.
14836 (struct vstop_notif) <ptid>: Change type to ptid_t.
14837 (queue_stop_reply, push_event): Change `ptid' argument's type to
14838 ptid_t.
14839 (discard_queued_stop_replies): Add `pid' argument.
14840 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14841 changes. Don't reference the `attached' global.
14842 (attach_inferior): Adjust to mywait interface changes.
14843 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14844 features. Handle and report "multiprocess+". Handle
14845 "qAttached:PID".
14846 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14847 changes.
14848 (handle_v_kill): New.
14849 (handle_v_stopped): Adjust to use target_pid_to_str.
14850 (handle_v_requests): Allow multiple attaches and runs when
14851 multiprocess extensions are in effect. Handle "vKill".
14852 (myresume): Adjust to use ptids.
14853 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14854 (handle_status): Adjust to discard_queued_stop_replies interface
14855 change.
14856 (first_thread_of, kill_inferior_callback)
14857 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14858 (main): Call initialize_inferiors. Adjust to use ptids, killing
14859 and detaching from all inferiors. Handle multiprocess packet
14860 variants.
14861 * linux-low.h: Include gdb_proc_service.h.
14862 (struct process_info_private): New.
14863 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14864 <lwpid_of>: Use ptid_get_lwp.
14865 (get_lwp_thread): Adjust.
14866 (struct lwp_info): Add `dead' member.
14867 (find_lwp_pid): Declare.
14868 * linux-low.c (thread_db_active): Delete.
14869 (new_inferior): Adjust comment.
14870 (inferior_pid): Delete.
14871 (linux_add_process): New.
14872 (handle_extended_wait): Adjust.
14873 (add_lwp): Change unsigned long to ptid.
14874 (linux_create_inferior): Add process to processes table. Adjust
14875 to use ptids. Don't set new_inferior here.
14876 (linux_attach_lwp): Rename to ...
14877 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14878 it. Adjust to use ptids.
14879 (linux_attach_lwp): New.
14880 (linux_attach): Add process to processes table. Don't set
14881 new_inferior here.
14882 (struct counter): New.
14883 (second_thread_of_pid_p, last_thread_of_process_p): New.
14884 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14885 multiple processes.
14886 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14887 processes. Remove process from process table.
14888 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14889 to multiple processes.
14890 (any_thread_of): New.
14891 (linux_detach): Add `pid' argument, and handle it. Remove process
14892 from processes table.
14893 (linux_join): Add `pid' argument. Handle it.
14894 (linux_thread_alive): Change unsighed long argument to ptid_t.
14895 Consider dead lwps as not being alive.
14896 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14897 threads we're not interested in.
14898 (same_lwp, find_lwp_pid): New.
14899 (linux_wait_for_lwp): Change `pid' argument's type from int to
14900 ptid_t. Adjust.
14901 (linux_wait_for_event): Rename to ...
14902 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14903 from int to ptid_t. Adjust.
14904 (linux_wait_for_event): New.
14905 (linux_wait_1): Add `ptid' argument. Change return type to
14906 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14907 that exit from the process table.
14908 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14909 Adjust.
14910 (mark_lwp_dead): New.
14911 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14912 stopping all threads, mark its main lwp as dead.
14913 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14914 ptids.
14915 (fetch_register, usr_store_inferior_registers)
14916 (regsets_fetch_inferior_registers)
14917 (regsets_store_inferior_registers, linux_read_memory)
14918 (linux_write_memory): Inline `inferior_pid'.
14919 (linux_look_up_symbols): Adjust to use per-process
14920 `thread_db_active'.
14921 (linux_request_interrupt): Adjust to use ptids.
14922 (linux_read_auxv): Inline `inferior_pid'.
14923 (initialize_low): Don't reference thread_db_active.
14924 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14925 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14926 (ps_getpid): Return the pid of the current inferior.
14927 * thread-db.c (proc_handle, thread_agent): Delete.
14928 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14929 per-process data.
14930 (find_one_thread): Change argument type to ptid_t. Adjust to
14931 per-process data.
14932 (maybe_attach_thread): Adjust to per-process data and ptids.
14933 (thread_db_find_new_threads): Ditto.
14934 (thread_db_init): Ditto.
14935 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14936 processes table. Adjust to use ptids.
14937 (spu_kill, spu_detach): Adjust interface. Remove process from
14938 processes table.
14939 (spu_join, spu_thread_alive): Adjust interface.
14940 (spu_wait): Adjust interface. Remove process from processes
14941 table. Adjust to use ptids.
14942 * win32-low.c (current_inferior_tid): Delete.
14943 (current_inferior_ptid): New.
14944 (debug_event_ptid): New.
14945 (thread_rec): Take a ptid. Adjust.
14946 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14947 (child_delete_thread): Ditto.
14948 (do_initial_child_stuff): Add `attached' argument. Add process to
14949 processes table.
14950 (child_fetch_inferior_registers, child_store_inferior_registers):
14951 Adjust.
14952 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14953 (win32_attach): Pass 1 to do_initial_child_stuff.
14954 (win32_kill): Adjust interface. Remove process from processes
14955 table.
14956 (win32_detach): Ditto.
14957 (win32_join): Adjust interface.
14958 (win32_thread_alive): Take a ptid.
14959 (win32_resume): Adjust to use ptids.
14960 (get_child_debug_event): Ditto.
14961 (win32_wait): Adjust interface. Remove exiting process from
14962 processes table.
14963
bd99dc85
PA
149642009-04-01 Pedro Alves <pedro@codesourcery.com>
14965
14966 Non-stop mode support.
14967
14968 * server.h (non_stop): Declare.
14969 (gdb_client_data, handler_func): Declare.
14970 (delete_file_handler, add_file_handler, start_event_loop):
14971 Declare.
14972 (handle_serial_event, handle_target_event, push_event)
14973 (putpkt_notif): Declare.
14974 * target.h (enum resume_kind): New.
14975 (struct thread_resume): Replace `step' field by `kind' field.
14976 (TARGET_WNOHANG): Define.
14977 (struct target_ops) <wait>: Add `options' argument.
14978 <supports_non_stop, async, start_non_stop>: New fields.
14979 (target_supports_non_stop, target_async): New.
14980 (start_non_stop): Declare.
14981 (mywait): Add `options' argument.
14982 * target.c (mywait): Add `options' argument. Print child exit
14983 notifications here.
14984 (start_non_stop): New.
14985 * server.c (non_stop, own_buf, mem_buf): New globals.
14986 (struct vstop_notif): New.
14987 (notif_queue): New global.
14988 (queue_stop_reply, push_event, discard_queued_stop_replies)
14989 (send_next_stop_reply): New.
14990 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14991 interface changes.
14992 (attach_inferior): In non-stop mode, don't wait for the target
14993 here.
14994 (handle_general_set): Handle QNonStop.
14995 (handle_query): When handling qC, return the current general
14996 thread, instead of the first thread of the list.
14997 (handle_query): If the backend supports non-stop mode, include
14998 QNonStop+ in the qSupported query response.
14999 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15000 and non-stop mode.
15001 (handle_v_attach, handle_v_run): Handle non-stop mode.
15002 (handle_v_stopped): New.
15003 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15004 (myresume): Adjust to use resume_kind. Handle non-stop.
15005 (queue_stop_reply_callback): New.
15006 (handle_status): Handle non-stop mode.
15007 (main): Clear non_stop flag on reconnection. Use the event-loop.
15008 Refactor serial protocol handling from here ...
15009 (process_serial_event): ... to this new function. When GDB
15010 selects any thread, select one here. In non-stop mode, wait until
15011 GDB acks all pending events before exiting.
15012 (handle_serial_event, handle_target_event): New.
15013 * remote-utils.c (remote_open): Install remote_desc in the event
15014 loop.
15015 (remote_close): Remove remote_desc from the event loop.
15016 (putpkt_binary): Rename to...
15017 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15018 (putpkt_binary): New as wrapper around putpkt_binary_1.
15019 (putpkt_notif): New.
15020 (prepare_resume_reply): In non-stop mode, don't change the
15021 general_thread.
15022 * event-loop.c: New.
15023 * Makefile.in (OBJ): Add event-loop.o.
15024 (event-loop.o): New rule.
15025
15026 * linux-low.h (pid_of): Moved here.
15027 (lwpid_of): New.
15028 (get_lwp_thread): Use lwpid_of.
15029 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15030 * linux-low.c (pid_of): Delete.
15031 (inferior_pid): Use lwpid_of.
15032 (linux_event_pipe): New.
15033 (target_is_async_p): New.
15034 (delete_lwp): New.
15035 (handle_extended_wait): Use lwpid_of.
15036 (add_lwp): Don't set lwpid field.
15037 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15038 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15039 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15040 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15041 first. Adjust to linux_wait_for_event interface changes. Use
15042 lwpid_of.
15043 (linux_detach): Don't delete the main lwp here.
15044 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15045 (status_pending_p): Don't consider explicitly suspended lwps.
15046 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15047 pointer. Add OPTIONS argument. Change return type to int. Use
15048 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15049 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15050 pointer. Add status pointer argument. Return a pid instead of a
15051 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15052 changes. In non-stop mode, don't switch to a random thread.
15053 (linux_wait): Rename to...
15054 (linux_wait_1): ... this. Add target_options argument, and handle
15055 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15056 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15057 clean exit and signal exit code. Don't stop all threads in
15058 non-stop mode. In all-stop mode, only stop all threads when
15059 reporting a stop to GDB. Handle explicit thread stop requests.
15060 (async_file_flush, async_file_mark): New.
15061 (linux_wait): New.
15062 (send_sigstop): Use lwpid_of.
15063 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15064 interface changes. In non-stop mode, don't switch to a random
15065 thread.
15066 (linux_resume_one_lwp): Use lwpid_of.
15067 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15068 (linux_resume_one_thread): ... this. Handle resume_stop. In
15069 non-stop mode, don't look for pending flag in all threads.
15070 (resume_status_pending_p): Don't consider explicitly suspended
15071 threads.
15072 (my_waitpid): Reimplement. Emulate __WALL.
15073 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15074 Use lwpid_of.
15075 (sigchld_handler, linux_supports_non_stop, linux_async)
15076 (linux_start_non_stop): New.
15077 (linux_target_ops): Register linux_supports_non_stop, linux_async
15078 and linux_start_non_stop.
15079 (initialize_low): Install SIGCHLD handler.
15080 * thread-db.c (thread_db_create_event, find_one_thread)
15081 (thread_db_get_tls_address): Use lwpid_of.
15082 * win32-low.c (win32_detach): Adjust to use resume_kind.
15083 (win32_wait): Add `options' argument.
15084 * spu-low.c (spu_resume): Adjust to use resume_kind.
15085 (spu_wait): Add `options' argument.
15086
5b1c542e
PA
150872009-04-01 Pedro Alves <pedro@codesourcery.com>
15088
15089 Decouple target code from remote protocol.
15090
15091 * target.h (enum target_waitkind): New.
15092 (struct target_waitstatus): New.
15093 (struct target_ops) <wait>: Return an unsigned long. Take a
15094 target_waitstatus pointer instead of a char pointer.
15095 (mywait): Likewise.
15096 * target.c (mywait): Change prototype to return an unsigned long.
15097 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15098 * server.h (thread_from_wait, old_thread_from_wait): Delete
15099 declarations.
15100 (prepare_resume_reply): Change prototype to take a
15101 target_waitstatus.
15102 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15103 (last_status, last_ptid): New.
15104 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15105 pid instead of a signal.
15106 (attach_inferior): Remove "status" and "signal" parameters.
15107 Adjust.
15108 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15109 not as an address.
15110 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15111 (handle_v_requests, myresume): Remove "status" and "signal"
15112 parameters. Adjust.
15113 (handle_status): New.
15114 (main): Delete local `status'. Adjust.
15115 * remote-utils.c: Include target.h.
15116 (prepare_resume_reply): Change prototype to take a
15117 target_waitstatus. Adjust.
15118
15119 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15120 interface.
15121 * spu-low.c (spu_wait): Adjust.
15122 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15123 Delete.
15124 (win32_wait): Adjust.
15125
2bd7c093
PA
151262009-04-01 Pedro Alves <pedro@codesourcery.com>
15127
15128 * target.h (struct thread_resume): Delete leave_stopped member.
15129 (struct target_ops): Add a `n' argument to the `resume' callback.
15130 * server.c (start_inferior): Adjust.
15131 (handle_v_cont, myresume): Adjust.
15132 * linux-low.c (check_removed_breakpoint): Adjust to resume
15133 interface change, and to removed leave_stopped field.
15134 (resume_ptr): Delete.
15135 (struct thread_resume_array): New.
15136 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15137 resume interface change.
15138 (linux_continue_one_thread, linux_queue_one_thread)
15139 (resume_status_pending_p): Check if the resume field is NULL
15140 instead of checking the leave_stopped member.
15141 (linux_resume): Adjust to the target resume interface change.
15142 * spu-low.c (spu_resume): Adjust to the target resume interface
15143 change.
15144 * win32-low.c (win32_detach, win32_resume): Ditto.
15145
c35fafde
PA
151462009-04-01 Pedro Alves <pedro@codesourcery.com>
15147
15148 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15149 flag.
15150 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15151 pending.
15152 (linux_continue_one_thread): Only preserve the stepping flag if
15153 there's a pending breakpoint.
15154
0a59d50b
PA
151552009-03-31 Pedro Alves <pedro@codesourcery.com>
15156
15157 * server.c (main): After the inferior having exited, call
15158 remote_close before exiting gdbserver.
15159
f04c6d38
TJB
151602009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15161
15162 Fix size of FPSCR in Power 7 processors.
15163 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15164 (PPC_FEATURE_HAS_DFP): New #define.
15165 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15166 size of the FPSCR.
15167
78e5cee6
PA
151682009-03-23 Pedro Alves <pedro@codesourcery.com>
15169
15170 * server.c (handle_query) Whitespace and formatting.
15171
1b3f6016
PA
151722009-03-22 Pedro Alves <pedro@codesourcery.com>
15173
15174 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15175 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15176 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15177 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15178 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15179 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15180 Makefile.in, configure.ac: Fix whitespace throughout.
15181 * configure: Regenerate.
15182
a07b2135
PA
151832009-03-22 Pedro Alves <pedro@codesourcery.com>
15184
15185 * inferiors.c (find_inferior): Make it safe for the callback
15186 function to delete the currently iterated inferior.
15187
67cc2626
PA
151882009-03-22 Pedro Alves <pedro@codesourcery.com>
15189
15190 * Makefile.in (linuw_low_h): Move higher.
15191 (thread-db.o): Depend on $(linux_low_h).
15192
54a0b537
PA
151932009-03-17 Pedro Alves <pedro@codesourcery.com>
15194
15195 Rename "process" to "lwp" throughout.
15196
15197 * linux-low.c (all_processes): Rename to...
15198 (all_lwps): ... this.
15199 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15200 (add_process): Rename to ...
15201 (add_lwp): ... this. Adjust.
15202 (linux_create_inferior): Adjust.
15203 (linux_attach_lwp): Adjust.
15204 (linux_attach): Adjust.
15205 (linux_kill_one_process): Rename to ...
15206 (linux_kill_one_lwp): ... this. Adjust.
15207 (linux_kill): Adjust.
15208 (linux_detach_one_process): Rename to ...
15209 (linux_detach_one_lwp): ... this. Adjust.
15210 (linux_detach): Adjust.
15211 (check_removed_breakpoint): Adjust.
15212 (status_pending_p): Adjust.
15213 (linux_wait_for_process): Rename to ...
15214 (linux_wait_for_lwp): ... this. Adjust.
15215 (linux_wait_for_event): Adjust.
15216 (send_sigstop): Adjust.
15217 (wait_for_sigstop): Adjust.
15218 (stop_all_processes): Rename to ...
15219 (stop_all_lwps): ... this.
15220 (linux_resume_one_process): Rename to ...
15221 (linux_resume_one_lwp): ... this. Adjust.
15222 (linux_set_resume_request, linux_continue_one_thread)
15223 (linux_queue_one_thread, resume_status_pending_p)
15224 (usr_store_inferior_registers, regsets_store_inferior_registers)
15225 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15226 Adjust.
15227 * linux-low.h (get_process): Rename to ...
15228 (get_lwp): ... this. Adjust.
15229 (get_thread_process): Rename to ...
15230 (get_thread_lwp): ... this. Adjust.
15231 (get_process_thread): Rename to ...
15232 (get_lwp_thread): ... this. Adjust.
15233 (struct process_info): Rename to ...
15234 (struct lwp_info): ... this.
15235 (all_processes): Rename to ...
15236 (all_lwps): ... this.
15237 * proc-service.c (ps_lgetregs): Adjust.
15238 * thread-db.c (thread_db_create_event, find_one_thread)
15239 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15240
0b16c5cf
PA
152412009-03-14 Pedro Alves <pedro@codesourcery.com>
15242
15243 * server.c (handle_query): Handle "qAttached".
15244
32de4b9d
NS
152452009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15246
15247 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15248 GPLv3, update license URL.
15249
2aecd87f
DE
152502009-03-01 Doug Evans <dje@google.com>
15251
93efd302 15252 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15253 (server_h): Add gdb_signals.h.
15254 (signals.o): Update.
15255 * server.h (target_signal_from_host,target_signal_to_host_p)
15256 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15257
86b1f9c5
PM
152582009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15259
15260 * remote-utils.c (getpkt): Also generate remote-debug
15261 information if noack_mode is set.
15262
4aa995e1
PA
152632009-02-06 Pedro Alves <pedro@codesourcery.com>
15264
15265 * server.c (handle_query): Report qXfer:siginfo:read and
15266 qXfer:siginfo:write as supported and handle them.
15267 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15268 * linux-low.c (linux_xfer_siginfo): New.
15269 (linux_target_ops): Set it.
15270
62709adf
PA
152712009-01-26 Pedro Alves <pedro@codesourcery.com>
15272
15273 * server.c (gdbserver_usage): Mention --remote-debug.
15274 (main): Accept '--remote-debug' switch.
15275
aef93bd7
DE
152762009-01-18 Doug Evans <dje@google.com>
15277
15278 * regcache.c (new_register_cache): No need to check result of xcalloc.
15279 * server.c (handle_search_memory): Back out calls to xmalloc,
15280 result is checked and error is returned to user upon failure.
15281 (handle_query): Ditto. Add more checks for result of malloc.
15282 (handle_v_cont): Check result of malloc, report error back to
15283 user upon failure.
15284 (handle_v_run): Ditto. Call freeargv.
15285 * server.h (freeargv): Declare.
15286 * utils.c (freeargv): New fn.
15287
54363045
DE
152882009-01-15 Doug Evans <dje@google.com>
15289
f626972c
DE
15290 * gdbreplay.c (perror_with_name): Make arg const char *.
15291 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15292 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15293 * utils.c (perror_with_name): Make arg const char *.
54363045 15294
18aae699
PA
152952009-01-14 Pedro Alves <pedro@codesourcery.com>
15296
15297 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15298 when handling a EXIT_PROCESS_DEBUG_EVENT.
15299
ff703abe
JB
153002009-01-06 Joel Brobecker <brobecker@adacore.com>
15301
15302 * gdbreplay.c (gdbreplay_version): Update copyright year.
15303 * server.c (gdbserver_version): Likewise.
15304
f21cc1a2 153052009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15306
15307 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15308 (handle_extended_wait): Improve comment.
0e21c1ec 15309
bca929d3
DE
153102008-12-13 Doug Evans <dje@google.com>
15311
15312 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15313 * server.h (ATTR_MALLOC): New macro.
15314 (xmalloc,xcalloc,xstrdup): Declare.
15315 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15316 * inferiors.c: Ditto.
15317 * linux-low.c: Ditto.
15318 * mem-break.c: Ditto.
15319 * regcache.c: Ditto.
15320 * remote-utils.c: Ditto.
15321 * server.c: Ditto.
15322 * target.c: Ditto.
15323 * win32-low.c: Ditto.
15324
97438e3f
DE
153252008-12-12 Doug Evans <dje@google.com>
15326
896c7fbb
DE
15327 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15328 in debugging printf.
15329
97438e3f
DE
15330 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15331
e3b886f8
DE
153322008-12-09 Doug Evans <dje@google.com>
15333
15334 * linux-low.h (struct process_info): Delete member tid, unused.
15335 * thread-db.c (find_one_thread): Update.
15336 (maybe_attach_thread): Update.
15337
07e059b5
VP
153382008-12-02 Pedro Alves <pedro@codesourcery.com>
15339
889bf7c5
PA
15340 * target.h (struct target_ops): Add qxfer_osdata member.
15341 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15342 and dirent.h.
15343 (linux_qxfer_osdata): New functions.
15344 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15345 callback.
15346 * server.c (handle_query): Handle "qXfer:osdata:read:".
15347 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15348 (buffer_xml_printf): New functions.
15349 * server.h (struct buffer): New.
15350 (buffer_grow_str, buffer_grow_str0): New macros.
15351 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15352 (buffer_xml_printf): Declare.
07e059b5 15353
4cab47ab
DE
153542008-11-24 Doug Evans <dje@google.com>
15355
15356 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15357
f142445f
DJ
153582008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15359
15360 * server.c (handle_v_run): Always use the supplied argument list.
15361
d0107bb6 153622008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15363
d0107bb6
BW
15364 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15365 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15366
2c4ad781
TJB
153672008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15368
15369 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15370 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15371 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15372 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15373 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15374 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15375 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15376 XML target descriptions.
15377 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15378 when inferior is running on an ISA 2.05 or later processor. Add
15379 special case to return offset for full 64-bit slot of FPSCR when
15380 in 32-bits.
15381
dfb64f85
DJ
153822008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15383
15384 * Makefile.in (SFILES, clean): Added sparc64 files.
15385 (reg-sparc64.o, reg-sparc64.c): New.
15386 * configure.srv (sparc*-*-linux*): New configuration.
15387 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15388 syscall arguments for SPARC.
15389 (regsets_store_inferior_registers): Likewise.
15390 * linux-sparc-low.c: New file.
15391
66b6e1dd
DE
153922008-10-21 Doug Evans <dje@google.com>
15393
15394 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15395 (READLINE_DIR,READLINE_DEP): Delete.
15396 (INTERNAL_CFLAGS): Update.
15397 (LINTFLAGS): Update.
15398
9b710a42
PA
153992008-10-10 Pedro Alves <pedro@codesourcery.com>
15400
15401 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15402 whole argv from the last run, not just argv[0].
15403
5822d809
PA
154042008-09-08 Pedro Alves <pedro@codesourcery.com>
15405
15406 * regcache.c (new_register_cache): Return NULL if the register
15407 cache size isn't known yet.
15408 (free_register_cache): Avoid dereferencing a NULL regcache.
15409
74aac56f
DJ
154102008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15411
15412 * configure.srv: Merge MIPS and MIPS64.
15413
400b20f5
MR
154142008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15415
15416 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15417
677c5bb1
LM
154182008-08-18 Luis Machado <luisgpm@br.ibm.com>
15419
15420 * Makefile.in: Add required vsx dependencies.
15421
15422 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15423 Declare init_registers_powerpc_vsx32l.
15424 Declare init_registers_powerpc_vsx64l.
15425 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15426 (ppc_arch_setup): Check for VSX in hwcap.
15427 (ppc_fill_vsxregset): New function.
15428 (ppc_store_vsxregset): New function.
15429 Add new VSX entry in regset_info target_regsets.
15430
15431 * configure.srv: Add new VSX dependencies.
15432
a6f3e723
SL
154332008-08-12 Pedro Alves <pedro@codesourcery.com>
15434
15435 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15436 (remote_open): Set or clear transport_is_reliable.
15437 (putpkt_binary): Don't expect acks in noack mode.
15438 (getpkt): Don't send ack/nac in noack mode.
15439 * server.c (handle_general_set): Handle QStartNoAckMode.
15440 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15441 qSupported.
15442 (main): Reset noack_mode on every connection.
15443 * server.h (noack_mode): Declare.
15444
a417dc56
RW
154452008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15446
15447 * Makefile.in (GDBREPLAY_OBS): New variable.
15448 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15449
3221518c
UW
154502008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15451 Daniel Jacobowitz <dan@codesourcery.com>
15452
15453 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15454 (usr_store_inferior_registers): Likewise.
15455 (regsets_store_inferior_registers): Likewise.
15456
ec56be1b
PA
154572008-07-31 Rolf Jansen <rj@surtec.com>
15458 Pedro Alves <pedro@codesourcery.com>
15459
15460 * configure.ac: Check for memmem declaration.
15461 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15462 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15463 (disable_packet_qfThreadInfo): Unconditionally compile.
15464 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15465 * configure, config.in: Regenerate.
15466
2fe5e3ff
DE
154672008-07-28 Doug Kwan <dougkwan@google.com>
15468
15469 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15470 (linux_write_memory): Remove declaration of errno.
15471
836acd6d
UW
154722008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15473
15474 * linux-low.c (handle_extended_wait): Do not use "status"
15475 variable uninitialized.
15476
aeba519e
PA
154772008-07-07 Pedro Alves <pedro@codesourcery.com>
15478
15479 * server.c (handle_v_attach): Inhibit reporting dll changes.
15480
db42f210
PA
154812008-06-27 Pedro Alves <pedro@codesourcery.com>
15482
15483 * remote-utils.c (prepare_resume_reply): If requested, don't
15484 output "thread:TID" in the T stop reply.
15485
15486 * server.c (disable_packet_vCont, disable_packet_Tthread)
15487 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15488 (handle_query): If requested, disable support for qC, qfThreadInfo
15489 and qsThreadInfo.
15490 (handle_v_requests): If requested, disable support for vCont.
15491 (gdbserver_show_disableable): New.
15492 (main): Handle --disable-packet and --disable-packet=LIST.
15493
15494 * server.h (disable_packet_vCont, disable_packet_Tthread)
15495 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15496
8e4c5421
CD
154972008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15498
15499 * server.c (gdbserver_usage): Mention --version.
15500
6e23a804
DJ
155012008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15502
15503 * Makefile.in (gdbreplay.o): New rule.
15504
90aa6a40
JM
155052008-06-06 Joseph Myers <joseph@codesourcery.com>
15506
15507 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15508 message, not gdbserver.
15509
c16158bc 155102008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15511 Nathan Sidwell <nathan@codesourcery.com>
15512 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15513
15514 * acinclude.m4: Include ../../config/acx.m4.
15515 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15516 * configure, config.in: Regenerate.
15517 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15518 * server.c (gdbserver_version): Print PKGVERSION.
15519 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15520 (main): Adjust gdbserver_usage calls.
15521 * gdbreplay.c (version, host_name): Add declarations.
15522 (gdbreplay_version, gdbreplay_usage): New.
15523 (main): Accept --version and --help options.
15524
aeb75bf5
DJ
155252008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15526
15527 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15528 (arm_breakpoint_at): Handle Thumb.
15529 (the_low_target): Add comment.
15530
76b233dd
UW
155312008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15532
15533 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15534
08388c79
DE
155352008-05-09 Doug Evans <dje@google.com>
15536
a3c83fae
DE
15537 * server.h (decode_search_memory_packet): Declare.
15538 * remote-utils.c (decode_search_memory_packet): New fn.
15539 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15540 (handle_search_memory): New fn.
15541 (handle_query): Process qSearch:memory packets.
15542
bb9c3d36
UW
155432008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15544
15545 * regcache.c (registers_length): Remove.
15546 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15547 full register packet.
15548 * regcache.h (registers_length): Remove prototype.
15549 * server.h (PBUFSIZ): Define to 16384.
15550
7284e1be
UW
155512008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15552
15553 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15554 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15555 powerpc-64l.o, and powerpc-altivec64l.o.
15556 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15557 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15558 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15559 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15560 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15561 to srv_xmlfiles.
15562
15563 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15564 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15565 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15566 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15567 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15568 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15569 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15570 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15571 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15572 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15573 (clean): Update.
15574
15575 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15576 (init_registers_powerpc_32l): ... this new prototype.
15577 (init_registers_powerpc_32): Remove, replace by ...
15578 (init_registers_powerpc_altivec32l): ... this new prototype.
15579 (init_registers_powerpc_e500): Remove, replace by ...
15580 (init_registers_powerpc_e500l): ... this new prototype.
15581 (init_registers_ppc64): Remove, replace by ...
15582 (init_registers_powerpc_64l): ... this new prototype.
15583 (init_registers_powerpc_64): Remove, replace by ...
15584 (init_registers_powerpc_altivec64l): ... this new prototype.
15585 (ppc_num_regs): Set to 73.
15586 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15587 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15588 (ppc_cannot_store_register): Handle orig_r3 and trap.
15589 (ppc_arch_setup): Update init_registers_... calls.
15590 (ppc_fill_gregset): Handle orig_r3 and trap.
15591
15592 * inferiors.c (clear_inferiors): Reset current_inferior.
15593
fdc59709
PB
155942008-04-23 Paolo Bonzini <bonzini@gnu.org>
15595
889bf7c5
PA
15596 * acinclude.m4: Add override.m4.
15597 * configure: Regenerate.
fdc59709 15598
c9b2f845
UW
155992008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15600
15601 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15602 initial call to init_register_ppc64.
15603
550512b8
UW
156042008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15605
43aaf8b6
PA
15606 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15607 single powerpc*-*-linux* case.
550512b8
UW
15608 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15609
b6430ec3
UW
156102008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15611
15612 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15613 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15614 from reg_xmlfiles.
15615 * linux-ppc-low.c: Include <elf.h>.
15616 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15617 (ppc_hwcap): New global variable.
15618 (ppc_regmap): Remove __SPE__ #ifdef sections.
15619 (ppc_regmap_e500): New global variable.
15620 (ppc_cannot_store_register): Update __SPE__ special case.
15621 (ppc_get_hwcap): New function.
15622 (ppc_arch_setup): Use it to determine whether inferior supports
15623 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15624 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15625 Do not access registers if target does not support AltiVec.
15626 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15627 Do not access registers if target does not support SPE.
15628 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15629
52fa2412
UW
156302008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15631
15632 * linux-low.c (disabled_regsets, num_regsets): New.
15633 (use_regsets_p): Delete.
15634 (linux_wait_for_process): Clear disabled_regsets.
15635 (regsets_fetch_inferior_registers): Check and set it.
15636 (regsets_store_inferior_registers): Likewise.
15637 (linux_fetch_registers, linux_store_registers): Do not use
15638 use_regsets_p.
15639 (initialize_low): Allocate disabled_regsets.
15640
e28b3332
DJ
156412008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15642
15643 * Makefile.in (LIBOBJS): New.
15644 (OBS): Use LIBOBJS.
15645 (memmem.o): New rule.
15646 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15647 * configure: Regenerated.
15648
4536995d
UW
156492008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15650
15651 * server.c (handle_query): Never return "unsupported" for
15652 qXfer:features:read queries.
15653
221c031f
UW
156542008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15655
15656 * server.c (get_features_xml): Fix inverted condition.
15657 (handle_query): Always support qXfer:feature:read.
15658
ccd213ac
DJ
156592008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15660
15661 * server.c (wrapper_argv): New.
15662 (start_inferior): Handle wrapper_argv. If set, expect an extra
15663 trap.
15664 (gdbserver_usage): Document --wrapper.
15665 (main): Parse --wrapper.
15666
6fe305f7
UW
156672008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15668
15669 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15670 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15671 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15672 (ppc_set_pc): Likewise.
15673 (ppc_arch_setup): New function.
15674 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15675 of collect_register.
889bf7c5 15676 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15677
5b0a002e
UW
156782008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15679
15680 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15681 instead of linux-ppc64-low.o.
15682 * linux-ppc64-low.c: Remove file.
15683 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15684 (linux-ppc64-low.o): Remove rule.
15685
15686 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15687 (init_registers_powerpc_64): Likewise.
15688 (ppc_regmap): Conditionally define depending on __powerpc64__.
15689 (ppc_cannot_store_register): Do not special-case "fpscr" when
15690 compiled on __powerpc64__.
15691 (ppc_collect_ptrace_register): New function.
15692 (ppc_supply_ptrace_register): New function.
15693 (ppc_breakpoint): Change type to "unsigned int".
15694 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15695 (the_low_target): Conditionally provide initializers for the
889bf7c5 15696 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15697 collect_ptrace_register and supply_ptrace_register members.
15698
9b4b61c8
UW
156992008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15700
15701 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15702 * server.c (gdbserver_xmltarget): Define.
15703 (get_features_xml): Use it to replace "target.xml" and arch_string.
15704
15705 * configure.srv: Remove srv_xmltarget. Add XML files that were
15706 mentioned there to srv_xmlfiles instead. Remove conditional tests
15707 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15708 srv_xmlfiles and srv_regobj to include all possible choices.
15709 * configure.ac (srv_xmltarget): Remove.
15710 (srv_xmlfiles): Do not add "target.xml".
15711 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15712 checks for supplementary target information.
15713 * configure: Regenerate.
15714 * Makefile.in (XML_TARGET): Remove.
15715 (target.xml): Remove rule.
15716 (clean): Do not clean up target.xml.
15717 (.PRECIOUS): Do not mention target.xml.
15718
15719 * target.h (struct target_ops): Remove arch_string member.
15720 * linux-low.c (linux_arch_string): Remove.
15721 (linux_target_ops): Remove arch_string initializer.
15722 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15723 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15724 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15725 * spu-low.c (spu_arch_string): Remove.
15726 (spu_target_ops): Remove arch_string initializer.
15727 * win32-low.c (win32_arch_string): Remove.
15728 (win32_target_ops): Remove arch_string initializer.
15729 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15730 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15731 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15732
ee1a7ae4
UW
157332008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15734
15735 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15736 by collect_ptrace_register and supply_ptrace_register hooks.
15737 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15738 instead of checking for the_low_target.left_pad_xfer.
15739 (usr_store_inferior_registers): Use collect_ptrace_register callback
15740 instead of checking for the_low_target.left_pad_xfer.
15741
15742 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15743 (s390_supply_ptrace_register): Likewise.
15744 (s390_fill_gregset): Call s390_collect_ptrace_register.
15745 (the_low_target): Update.
15746
15747 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15748 (ppc_supply_ptrace_register): Likewise.
15749 (the_low_target): Update.
15750
15751 * linux-i386-low.c (the_low_target): Update.
15752 * linux-x86-64-low.c (the_low_target): Update.
15753
d61ddec4
UW
157542008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15755
15756 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15757 reg-s390.o and reg-s390x.o.
15758
15759 * linux-low.c (new_inferior): New global variable.
15760 (linux_create_inferior, linux_attach): Set it.
15761 (linux_wait_for_process): Call the_low_target.arch_setup after the
15762 target has stopped for the first time.
15763 (initialize_low): Do not call the_low_target.arch_setup.
15764
15765 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15766 (s390_set_pc): Likewise.
15767 (s390_arch_setup): New function.
15768 (the_low_target): Use s390_arch_setup as arch_setup routine.
15769
15770 * regcache.c (realloc_register_cache): New function.
15771 (set_register_cache): Call it for each existing regcache.
15772
d05b4ac3
UW
157732008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15774
15775 * server.h (init_registers): Remove prototype.
15776
15777 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15778 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15779 instead of init_registers ().
15780 * linux-arm-low.c (init_registers_arm): Add prototype.
15781 (init_registers_arm_with_iwmmxt): Likewise.
15782 (the_low_target): Add initializer for arch_setup field.
15783 * linux-cris-low.c (init_registers_cris): Add prototype.
15784 (the_low_target): Add initializer for arch_setup field.
15785 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15786 (the_low_target): Add initializer for arch_setup field.
15787 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15788 (the_low_target): Add initializer for arch_setup field.
15789 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15790 (the_low_target): Add initializer for arch_setup field.
15791 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15792 (the_low_target): Add initializer for arch_setup field.
15793 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15794 (the_low_target): Add initializer for arch_setup field.
15795 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15796 (init_registers_mips64_linux): Likewise.
15797 (the_low_target): Add initializer for arch_setup field.
15798 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15799 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15800 (the_low_target): Add initializer for arch_setup field.
15801 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15802 (init_registers_powerpc_64): Likewise.
15803 (the_low_target): Add initializer for arch_setup field.
15804 * linux-s390-low.c (init_registers_s390): Add prototype.
15805 (init_registers_s390x): Likewise.
15806 (the_low_target): Add initializer for arch_setup field.
15807 * linux-sh-low.c (init_registers_sh): Add prototype.
15808 (the_low_target): Add initializer for arch_setup field.
15809 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15810 (the_low_target): Add initializer for arch_setup field.
15811 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15812 (the_low_target): Add initializer for arch_setup field.
15813
15814 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15815 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15816 instead of init_registers ().
15817 * win32-arm-low.c (init_registers_arm): Add prototype.
15818 (the_low_target): Add initializer for arch_setup field.
15819 * win32-i386-low.c (init_registers_i386): Add prototype.
15820 (the_low_target): Add initializer for arch_setup field.
15821
15822 * spu-low.c (init_registers_spu): Add prototype.
15823 (initialize_low): Call initialie_registers_spu () instead of
15824 initialize_registers ().
15825
fd96d250
PA
158262008-02-19 Pedro Alves <pedro@codesourcery.com>
15827
15828 * server.c (handle_v_requests): When handling the vRun and vAttach
15829 packets, if already debugging a process, don't kill it. Return an
15830 error instead.
15831
d41b6bb4
DJ
158322008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15833
15834 * server.c (handle_query): Correct length check.
15835
5ac588cf
PA
158362008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15837
15838 * win32-low.c (do_initial_child_stuff): Add process handle
15839 parameter. Set current_process_handle and current_process_id from the
15840 parameters. Clear globals.
15841 (win32_create_inferior): Don't set current_process_handle and
15842 current_process_id here. Instead pass them on the call to
15843 do_initial_child_stuff.
15844 (win32_attach): Likewise.
15845 (win32_clear_inferiors): New.
15846 (win32_kill): Don't close the current process handle or the
15847 current thread handle here. Instead call win32_clear_inferiors.
15848 (win32_detach): Don't open a new handle to the process. Call
15849 win32_clear_inferiors.
15850 (win32_join): Don't rely on current_process_handle; open a new
15851 handle using the process id.
15852 (win32_wait): Call win32_clear_inferiors when the inferior process
15853 has exited.
15854
ecd7ecbc
DJ
158552008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15856
15857 * server.c (monitor_show_help): Add "exit".
15858
1525d545
MG
158592008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15860
ecd7ecbc 15861 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15862 (clean): Add reg-xtensa.c.
15863 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15864 * configure.srv (xtensa*-*-linux*) New target.
15865 * linux-xtensa-low.c: New.
15866 * xtensa-xtregs.c: New.
1525d545 15867
59a016f0
PA
158682008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15869
15870 * hostio.c: Don't include errno.h.
15871 (errno_to_fileio_errno): Move to hostio-errno.
15872 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15873 error number outputting to the target->hostio_last_error callback.
15874 (hostio_packet_error): Use FILEIO_EINVAL directly.
15875 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15876 calls to hostio_error.
15877 * hostio-errno.c: New.
15878 * server.h (hostio_last_error_from_errno): Declare.
15879 * target.h (target_ops): Add hostio_last_error member.
15880 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15881 as hostio_last_error handler.
889bf7c5 15882 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15883 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15884 (wince_hostio_last_error): New functions.
15885 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15886 as hostio_last_error handler.
15887 (win32_target_ops) [!_WIN32_WCE]: Register
15888 hostio_last_error_from_errno as hostio_last_error handler.
15889 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15890 (hostio-errno.o): New rule.
15891 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15892 * configure.srv (srv_hostio_err_objs): New variable. Default to
15893 hostio-errno.o.
15894 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15895 * configure: Regenerate.
15896
2d717e4f
DJ
158972008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15898
15899 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15900 (linux_kill, linux_detach): Clean up the process list.
15901 * remote-utils.c (remote_open): Improve port number parsing.
15902 (putpkt_binary, input_interrupt): Only send interrupts if the target
15903 is running.
15904 * server.c (extended_protocol): Make static.
15905 (attached): Define earlier.
15906 (exit_requested, response_needed, program_argv): New variables.
15907 (target_running): New.
15908 (start_inferior): Clear attached here.
15909 (attach_inferior): Set attached here.
15910 (require_running): Define.
15911 (handle_query): Use require_running and target_running. Implement
15912 "monitor exit".
15913 (handle_v_attach, handle_v_run): New.
15914 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15915 (gdbserver_usage): Update.
15916 (main): Redo argument parsing. Handle --debug and --multi. Handle
15917 --attach along with other options or after the port. Save
15918 program_argv. Support no initial program. Resynchronize
15919 communication with GDB after an error. Handle "monitor exit".
15920 Use require_running and target_running. Always allow the extended
15921 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15922 restart in extended mode.
15923 * README: Refer to the GDB manual. Update --attach usage.
15924
7407e2de
AS
159252007-12-20 Andreas Schwab <schwab@suse.de>
15926
15927 * linux-low.c (STACK_SIZE): Define.
15928 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15929 (linux_test_for_tracefork): Likewise.
15930
b65d95c5
DJ
159312007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15932
15933 * linux-low.c (linux_wait_for_event): Update messages. Do not
15934 reinsert auto-delete breakpoints.
15935 * mem-break.c (struct breakpoint): Change return type of handler to
15936 int.
15937 (set_breakpoint_at): Update handler type.
15938 (reinsert_breakpoint_handler): Return 1 instead of calling
15939 delete_breakpoint.
15940 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15941 setting a new one.
15942 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15943 * mem-break.h (set_breakpoint_at): Update handler type.
15944 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15945 * win32-low.c (auto_delete_breakpoint): New.
15946 (get_child_debug_event): Use it.
15947
4e799345
DJ
159482007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15949
15950 * configure.ac: Check for pread and pwrite.
15951 * hostio.c (handle_pread): Fall back to lseek and read.
15952 (handle_pwrite): Fall back to lseek and write.
15953 * config.in, configure: Regenerated.
15954
27524b67
DJ
159552007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15956
15957 * server.c (myresume): Add own_buf argument.
15958 (main): Update calls.
15959
a20d5e98
DJ
159602007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15961
15962 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15963 * remote-utils.c (remote_open): Do not call disable_async_io.
15964 (block_async_io): Delete.
15965 (unblock_async_io): Make static.
15966 (initialize_async_io): New.
15967 * server.c (handle_v_cont): Handle async I/O here.
15968 (myresume): Likewise. Move other common resume tasks here...
15969 (main): ... from here. Call initialize_async_io. Disable async
15970 I/O before the main loop.
15971 * server.h (initialize_async_io): Declare.
15972 (block_async_io, unblock_async_io): Delete prototypes.
15973 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15974
b79d787e
DJ
159752007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15976
15977 * remote-utils.c (readchar): Allow binary data in received messages.
15978
d97903b2
PA
159792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15980
15981 * win32-low.c (attaching): New global.
15982 (win32_create_inferior): Clear the `attaching' global.
15983 (win32_attach): Set the `attaching' global.
15984 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15985 attaching. Only set a breakpoint at the entry point if not
15986 attaching.
15987
311de423
PA
159882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15989
15990 * server.c (main): Don't report dll events on the initial
15991 connection on attaches.
15992
6c2d16d2
PA
159932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15994
15995 * server.c (main): Relax numerical bases supported for the pid of
15996 the --attach command line argument.
15997
5ca906e6
PA
159982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15999
16000 * win32-low.c (win32_attach): Call OpenProcess before
16001 DebugActiveProcess, not after. Add last error output to error
16002 call.
16003
9c6c8194
PA
160042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16005
16006 * win32-low.c (win32_get_thread_context)
16007 (win32_set_thread_context): New functions.
16008 (thread_rec): Use win32_get_thread_context.
16009 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16010 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16011 field.
16012
4d5d1aaa
PA
160132007-12-03 Leo Zayas
16014 Pedro Alves <pedro_alves@portugalmail.pt>
16015
16016 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16017 global variables.
16018 (child_add_thread): Minor cleanup.
16019 (child_continue): Resume artificially suspended threads before
16020 calling ContinueDebugEvent.
16021 (suspend_one_thread): New.
16022 (fake_breakpoint_event): New.
16023 (get_child_debug_event): Change return type to int. Check here if
16024 gdb sent an interrupt request. If a soft interrupt was requested,
16025 fake a breakpoint event. Return 0 if there is no event to handle,
16026 and 1 otherwise.
16027 (win32_wait): Don't check here if gdb sent an interrupt request.
16028 Ensure there is a valid event to handle.
16029 (win32_request_interrupt): Add soft interruption method as last
16030 resort.
16031
c436e841
PA
160322007-12-03 Leo Zayas
16033 Pedro Alves <pedro_alves@portugalmail.pt>
16034
16035 * win32-low.h (win32_thread_info): Add descriptions to the
16036 structure members. Replace `suspend_count' counter by a
16037 `suspended' flag.
16038 * win32-low.c (thread_rec): Update condition of when to get the
16039 context from the inferior. Rely on ContextFlags being set if it
16040 has already been retrieved. Only suspend the inferior thread if
16041 we haven't already. Warn if that fails.
16042 (continue_one_thread): s/suspend_count/suspended/. Only call
16043 ResumeThread once. Warn if that fails.
16044
e7b5fa67
PA
160452007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16046
16047 * win32-low.c (win32_wait): Don't read from the inferior when it
16048 has already exited.
16049
a385171d
PA
160502007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16051
16052 * Makefile.in (win32_low_h): New variable.
16053 (win32-low.o): Add dependency on $(win32_low_h).
16054 (win32-arm-low.o, win32-i386-low.o): New rules.
16055
f80c84b3
DJ
160562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16057
16058 * hostio.c: Correct copyright year.
16059
a6b151f1
DJ
160602007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16061
16062 * Makefile.in (OBS): Add hostio.o.
16063 (hostio.o): New rule.
16064 * server.h (handle_vFile): Declare.
16065 * hostio.c: New file.
16066 * server.c (handle_v_requests): Take packet_len and new_packet_len
16067 for binary packets. Call handle_vFile.
16068 (main): Update call to handle_v_requests.
16069
f9387fc3
DJ
160702007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16071
16072 * linux-low.c: Include <sched.h>.
16073
51c2684e
DJ
160742007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16075
16076 * linux-low.c (linux_tracefork_grandchild): New.
16077 (linux_tracefork_child): Use clone.
16078 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16079
75f83163
JB
160802007-10-31 Joel Brobecker <brobecker@adacore.com>
16081
16082 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16083
da5898ce
DJ
160842007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16085
16086 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16087
24a09b5f
DJ
160882007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16089
16090 * inferiors.c (change_inferior_id): Delete.
16091 (add_pid_to_list, pull_pid_from_list): New.
16092 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16093 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16094 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16095 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16096 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16097 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16098 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16099 (using_threads): Always set to 1.
16100 (handle_extended_wait): New.
16101 (add_process): Do not set TID.
16102 (linux_create_inferior): Set must_set_ptrace_flags.
16103 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16104 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16105 (linux_thread_alive): Rename TID argument to LWPID.
16106 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16107 (linux_wait_for_event): Do not use TID or check using_threads. Update
16108 call to dead_thread_notify. Call handle_extended_wait.
16109 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16110 (send_sigstop): Delete sigstop_sent.
16111 (wait_for_sigstop): Avoid TID.
16112 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16113 (linux_test_for_tracefork): New.
16114 (linux_lookup_signals): Use thread_db_active and
16115 linux_supports_tracefork_flag.
16116 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16117 * linux-low.h (get_process_thread): Avoid TID.
16118 (struct process_ifo): Move thread_known and tid to the end. Remove
16119 sigstop_sent.
16120 (linux_attach_lwp, thread_db_init): Update prototypes.
16121 * server.h (change_inferior_id): Delete prototype.
16122 (add_pid_to_list, pull_pid_from_list): New prototypes.
16123 * thread-db.c (thread_db_use_events): New.
16124 (find_first_thread): Rename to...
16125 (find_one_thread): ...this. Update callers and messages. Do not
16126 call fatal. Check thread_db_use_events. Do not call
16127 change_inferior_id or new_thread_notify.
16128 (maybe_attach_thread): Update. Do not call new_thread_notify.
16129 (thread_db_init): Set thread_db_use_events. Check use_events.
16130 * utils.c (fatal, warning): Correct message prefix.
16131
30ed0a8f
DJ
161322007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16133
16134 * Makefile.in (clean): Remove new files.
16135 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16136 (powerpc-64.o, powerpc-64.c): New rules.
16137 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16138 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16139 with SPE.
16140 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16141 SPE targets.
16142 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16143 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16144 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16145 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16146 (target_regsets): Add AltiVec and SPE register sets.
16147 * configure.ac: Check for AltiVec and SPE.
16148 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16149 (ppc_fill_vrregset, ppc_store_vrregset): New.
16150 (target_regsets): Add AltiVec register set.
16151 * configure: Regenerated.
16152
fd462a61
DJ
161532007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16154
16155 * linux-low.c (O_LARGEFILE): Define.
16156 (linux_read_memory): Use /proc/PID/mem.
16157 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16158 * configure, config.in: Regenerated.
16159
69f223ed
DJ
161602007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16161
16162 * linux-low.c (linux_wait_for_event): Do not pass signals while
16163 single-stepping.
16164
aec18585
PA
161652007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16166
16167 * win32-low.c (create_process): New.
16168 (win32_create_inferior): Use create_process instead of
16169 CreateProcess. If create_process failed retry appending an ".exe"
16170 suffix. Store the GetLastError result immediatelly after
16171 create_process calls and use it on the call to error.
16172
34d86ddd
PA
161732007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16174
16175 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16176
5a0e3bd0
JB
161772007-08-23 Joel Brobecker <brobecker@adacore.com>
16178
16179 * configure.ac: Switch license to GPLv3.
16180
f88c79e6
MS
161812007-08-01 Michael Snyder <msnyder@access-company.com>
16182
16183 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16184
6b3d9b83
PA
161852007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16186
16187 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16188 typedef.
16189 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16190 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16191 CloseToolhelp32Snapshot.
16192 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16193 CloseToolhelp32Snapshot.
16194
c588c53c
MS
161952007-07-27 Michael Snyder <michael.snyder@access-company.com>
16196
16197 * server.c (main): Check for inferior exit before main loop.
16198
aa0403d9
PA
161992007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16200
16201 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16202 instead of on tmp_desc.
16203
255e7678
DJ
162042007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16205 Daniel Jacobowitz <dan@codesourcery.com>
16206
16207 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16208 (add_thread): Minor cleanups.
16209 (clear_inferiors): Move lower in the file. Clear the DLL
16210 list.
16211 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16212 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16213 (xml_escape_text): New.
16214 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16215 for qSupported.
16216 (handle_v_cont): Report errors.
16217 (gdbserver_version): Update.
16218 (main): Correct size of own_buf. Do not report initial DLL events.
16219 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16220 (unloaded_dll, xml_escape_text): New.
16221 * win32-low.c (enum target_waitkind): Update comments.
16222 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16223 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16224 (win32_EnumProcessModules, win32_GetModuleInformation)
16225 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16226 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16227 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16228 (win32_Module32First, win32_Module32Next, load_toolhelp)
16229 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16230 (get_child_debug_event): Handle DLL events.
16231 (win32_wait): Likewise.
16232
0d37add9
DJ
162332007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16234
16235 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16236 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16237
45e2715e
PA
162382007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16239
16240 * win32-low.c (handle_output_debug_string): Ignore event if not
16241 waiting.
16242
c5674cf1
PA
162432007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16244
16245 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16246
2bbe3cc1
DJ
162472007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16248
16249 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16250
ae13219e
DJ
162512007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * inferiors.c (change_inferior_id): Add comment.
16254 * linux-low.c (check_removed_breakpoint): Add an early
16255 prototype. Improve debug output.
16256 (linux_attach): Doc update.
16257 (linux_detach_one_process, linux_detach): Clean up before releasing
16258 each process.
16259 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16260 * linux-low.h (struct process_info): Doc improvement.
16261 * mem-break.c (delete_all_breakpoints): New.
16262 * mem-break.h (delete_all_breakpoints): New prototype.
16263 * thread-db.c (find_first_thread): New.
16264 (thread_db_create_event): Call it instead of
16265 thread_db_find_new_threads. Clean up unused variables.
16266 (maybe_attach_thread): Remove first thread handling.
16267 (thread_db_find_new_threads): Use find_first_thread.
16268 (thread_db_get_tls_address): Likewise.
16269
4105de34
DJ
162702007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16271
16272 * thread-db.c (thread_db_find_new_threads): Add prototype.
16273 (thread_db_create_event): Check for the main thread before adding
16274 a new thread.
16275 (maybe_attach_thread): Only enable event reporting if TID == 0.
16276 (thread_db_get_tls_address): Check for new threads.
16277
2b876972
DJ
162782007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16279
16280 * linux-low.c (linux_create_inferior): Try execv before execvp.
16281 * spu-low.c (spu_create_inferior): Likewise.
16282
7a245884
DJ
162832007-06-13 Mike Frysinger <vapier@gentoo.org>
16284
16285 * linux-low.c (linux_create_inferior): Change execv to execvp.
16286 * spu-low.c (spu_create_inferior): Likewies.
16287
117ce543
DJ
162882007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16289
16290 * Makefile.in (clean): Clean new files instead of deleted ones.
16291 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16292 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16293 rules.
16294 * configure.srv: Specify XML files and new regformats for MIPS and
16295 MIPS64 GNU/Linux.
16296 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16297 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16298 an entry for the restart register.
16299 (mips_cannot_fetch_register, mips_cannot_store_register)
16300 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16301 register names to match the XML descriptions.
16302 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16303 restart register instead of $0.
16304
0e7f50da
UW
163052007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16306 Markus Deuling <deuling@de.ibm.com>
16307
16308 * remote-utils.c (decode_xfer_write): New function.
16309 * server.h (decode_xfer_write): Add prototype.
16310 * server.c (handle_query): Add PACKET_LEN argument. Support
16311 qXfer:spu:read and qXfer:spu:write packets.
16312 (main): Pass packet_len to handle_query.
16313 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16314 * target.h (target_ops): Add qxfer_spu.
16315
374c1d38
UW
163162007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16317
16318 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16319 accessing non-seekable spufs files.
16320
bb63802a
UW
163212007-05-16 Markus Deuling <deuling@de.ibm.com>
16322
889bf7c5 16323 * server.c (handle_query): Add reply for qC packet.
bb63802a 16324
7390519e
PA
163252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16326 Leo Zayas <lerele@champenstudios@com>
16327
16328 * server.h (check_remote_input_interrupt_request): New function.
16329 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16330 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16331 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16332 (check_remote_input_interrupt_request): New function.
16333 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16334 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16335 winapi_GenerateConsoleCtrlEvent): New typedefs.
16336 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16337 to 250 ms.
16338 (win32_wait): Check for remote interrupt request
16339 with check_remote_input_interrupt_request.
16340 (win32_request_interrupt): New function.
16341 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16342
34b34921
PA
163432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16344
16345 * win32-low.c (debug_registers_changed,
16346 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16347 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16348 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16349 (thread_rec): Get context using the low target.
16350 (child_add_thread): Call thread_added on the low target,
16351 which does the same thing.
16352 (regptr): Delete.
16353 (do_initial_child_stuff): Remove debug registers references.
16354 Set context using the low target. Resume threads after
16355 setting the contexts.
16356 (child_continue): Remove dead variable. Remove debug
16357 registers references.
16358 (child_fetch_inferior_registers): Go through the low target.
16359 (do_child_store_inferior_registers): Remove.
16360 (child_store_inferior_registers): Go through the low target.
16361 (win32_resume): Remove debug registers references.
16362 Set context using the low target.
16363 (handle_exception): Change return type to void. Don't record
16364 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16365 first chance exception.
889bf7c5 16366 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16367 goto loop. Always return after waiting for debug event.
16368 (win32_wait): Convert to switch statement. Handle spurious
16369 events.
16370
16371 * win32-i386-low.c (debug_registers_changed,
16372 debug_registers_used): New.
16373 (initial_stuff): Rename to ...
16374 (i386_initial_stuff): ... this. Clear debug registers
16375 state variables.
16376 (store_debug_registers): Delete.
16377 (i386_get_thread_context): New.
16378 (load_debug_registers): Delete.
16379 (i386_set_thread_context): New.
16380 (i386_thread_added): New.
16381 (single_step): Rename to ...
16382 (i386_single_step): ... this.
16383 (do_fetch_inferior_registers): Rename to ...
16384 (i386_fetch_inferior_register): ... this.
16385 (i386_store_inferior_register): New.
16386 (the_low_target): Adapt to new interface.
16387
16388 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16389 (arm_get_thread_context): New.
16390 (arm_set_thread_context): New.
16391 (regptr): New.
16392 (do_fetch_inferior_registers): Rename to ...
16393 (arm_fetch_inferior_register): ... this.
16394 (arm_store_inferior_register): New.
16395 (arm_wince_breakpoint): Reimplement as unsigned long.
16396 (arm_wince_breakpoint_len): Define.
16397 (the_low_target): Adapt to new interface.
16398
16399 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16400 load_debug_registers. Add get_thread_context, set_thread_context,
16401 thread_added and store_inferior_register. Rename
16402 fetch_inferior_registers to fetch_inferior_register.
16403 (regptr): Remove declaration.
16404
dd6953e1
PA
164052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16406
16407 * linux-low.c (linux_detach): Change return type to int. Return 0.
16408 * spu-low.c (spu_detach): Likewise.
16409
444d6139
PA
164102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16411
16412 * target.h (target_ops): Change return type of detach to int.
16413 Add join.
16414 (join_inferior): New.
16415 * server.c (main): Don't skip detach support on mingw32.
16416 If the inferior doesn't support detaching return error.
16417 Call join_inferior instead of using waitpid.
16418 * linux-low.c (linux_join): New.
16419 (linux_target_op): Add linux_join.
16420 * spu-low.c (spu_join): New.
16421 (spu_target_ops): Add spu_join.
16422 * win32-low.c (win32_detach): Adapt to new interface.
16423 Reopen current_process_handle before detaching. Issue a child
16424 resume before detaching.
16425 (win32_join): New.
16426 (win32_target_op): Add win32_join.
16427
1d5315fe
PA
164282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16429
16430 * win32-low.c (win32-attach): Fix return value.
16431 * target.h (target_ops): Describe ATTACH return values.
16432
bf914831
PA
164332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16434
16435 * win32-low.c (GETPROCADDRESS): Define.
16436 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16437 (winapi_DebugSetProcessKillOnExit): Likewise.
16438 (win32_create_inferior): Force usage of ansi CreateProcessA.
16439 (win32_attach): Use GETPROCADDRESS.
16440 (win32_detach): Likewise.
16441
f72f3e60
PA
164422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16443
16444 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16445
ed50f18f
PA
164462007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16447
16448 * win32-low.c: Commit leftover changes from 2007-03-29.
16449
0c2ead7e
DJ
164502007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16453 fields short instead of int. Add explicit padding.
16454 (i387_cache_to_fsave): Remove unnecessary casts.
16455 (i387_fsave_to_cache): Doc fix.
16456 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16457
73725ff3
DJ
164582007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16459
16460 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16461 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16462
d99f33d8
PA
164632007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16464
16465 * configure.srv (arm*-*-mingw32ce*): Move near the other
16466 arm targets.
16467
68070c10
PA
164682007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16469
2482afc6 16470 * configure.ac: Add errno checking.
68070c10
PA
16471 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16472 sys/file.h and malloc.h.
16473 (AC_CHECK_DECLS): Add perror.
16474 (srv_mingwce): Handle.
2482afc6 16475 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16476 win32-i386-low.o to srv_tgtobj.
16477 (i[34567]86-*-mingw*): Likewise.
16478 (arm*-*-mingw32ce*): Add case.
16479 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16480 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16481 [__MINGW32CE__] (strerror): New function.
16482 [__MINGW32CE__] (errno): Define to GetLastError.
16483 [__MINGW32CE__] (COUNTOF): New macro.
16484 (remote_open): Remove extra close call.
16485 * mem-break.c (delete_breakpoint_at): New function.
16486 * mem-break.h (delete_breakpoint_at): Declare.
16487 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16488 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16489 [USE_WIN32API] (read, write): Add char* casts.
16490 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16491 * server.h: Include wincecompat.h on Windows CE.
16492 [HAVE_ERRNO_H]: Check.
16493 (perror): Declare if not declared.
16494 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16495 (perror_with_name): Remove errno declaration.
16496 * wincecompat.h: New.
16497 * wincecompat.c: New.
16498 * win32-low.h: New.
16499 * win32-arm-low.c: New.
16500 * win32-i386-low.c: New.
16501 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16502 (OUTMSG2): Make it safe.
16503 (_T): New macro.
16504 (COUNTOF): New macro.
16505 (NUM_REGS): Get it from the low target.
16506 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16507 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16508 (thread_rec): Let low target handle debug registers.
16509 (child_add_thread): Likewise.
16510 (child_init_thread_list): Likewise.
16511 (continue_one_thread): Likewise.
16512 (regptr): New.
16513 (do_child_fetch_inferior_registers): Move to ...
16514 * win32-i386-low.c: ... here, and rename to ...
16515 (do_fetch_inferior_registers): ... this.
889bf7c5 16516 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16517 Go through the low target.
16518 (do_child_store_inferior_registers): Use regptr.
16519 (strwinerror): New function.
16520 (win32_create_inferior): Handle Windows CE.
16521 Use strwinerror instead of strerror on Windows error
16522 codes. Add program to the error output.
16523 Don't close the main thread handle on Windows CE.
16524 (win32_attach): Use coredll.dll on Windows CE.
16525 (win32_kill): Close current process and current
16526 thread handles.
16527 (win32_detach): Use coredll.dll on Windows CE.
16528 (win32_resume): Let low target handle debug registers, and
16529 step request.
16530 (handle_exception): Add/Remove initial breakpoint. Avoid
16531 non-existant WSTOPSIG on Windows CE.
16532 (win32_read_inferior_memory): Cast to remove warning.
16533 (win32_arch_string): Go through the low target.
16534 (initialize_low): Call set_breakpoint_data with the low
16535 target's breakpoint.
16536 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16537 FOP_REGNUM, mappings): Move to ...
16538 * win32-i386-low.c: ... here.
16539 * win32-low.c (win32_thread_info): Move to ...
16540 * win32-low.h: ... here.
16541 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16542 win32-arm-low.c and wincecompat.c.
16543 (all:): Add $EXEEXT.
16544 (install-only:): Likewise.
16545 (gdbserver:): Likewise.
16546 (gdbreplay:): Likewise.
16547 * config.in: Regenerate.
16548 * configure: Regenerate.
16549
41093d81
PA
165502007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16551
16552 * win32-low.c: Rename typedef thread_info to
16553 win32_thread_info throughout.
16554
544afa54
PA
165552007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16556
16557 * win32-i386-low.c: Rename to ...
16558 * win32-low.c: ... this.
16559 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16560 * Makefile.in: Likewise.
16561
bce7165d
PA
165622007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16563
16564 * remote-utils.c (monitor_output): Constify msg parameter.
16565 * server.h (monitor_output): Likewise.
16566 * win32-i386-low.c (handle_output_debug_string): New.
16567 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16568 handle_output_debug_string.
16569 (get_child_debug_event): Likewise.
16570
506c7aa0
DJ
165712007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16572
16573 * server.c (main): Correct strtoul check.
16574
42c81e2a
DJ
165752007-03-27 Jon Ringle <jon@ringle.org>
16576
16577 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16578
9453113a
DJ
165792007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16580
16581 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16582
64a69107
DJ
165832007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16584
16585 * terminal.h: Check HAVE_SGTTY_H.
16586
165872007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16588
16589 * remote-utils.c (remote_open): Print out the assigned port number.
16590
c74d0ad8
DJ
165912007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16592
16593 * remote-utils.c (monitor_output): New function.
16594 * server.c (debug_threads): Define here.
16595 (monitor_show_help): New function.
16596 (handle_query): Handle qRcmd.
16597 (main): Do not handle 'd' packet.
16598 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16599 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16600 of debug_threads.
16601
de7c3b4a
PA
166022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16603
16604 * Makefile.in (EXEEXT): New.
16605 (clean): Use $(EXEEXT).
16606
ef57601b
PA
166072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16608
16609 * target.h (target_ops): Rename send_signal to request_interrupt,
16610 and remove enum target_signal parameter.
16611 * linux-low.c (linux_request_interrupt): Rename from
16612 linux_send_signal, and always send SIGINT.
16613 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16614 and always send SIGINT.
16615 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16616 of send_signal.
16617 (input_interrupt): Likewise.
16618
820f2bda
PA
166192007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16620
16621 * server.c (get_features_xml): Check if target implemented
16622 arch_string.
16623 * win32-i386-low.c (win32_arch_string): New.
16624 (win32_target_ops): Add win32_arch_string as arch_string member.
16625
ab39bf24
UW
166262007-02-22 Markus Deuling <deuling@de.ibm.com>
16627
16628 * spu-low.c (spu_arch_string): New.
16629 (spu_target_ops): Add spu_arch_string.
16630
61ff6e04
DJ
166312007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16632
16633 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16634 * configure.ac: Do not check for terminal.h.
16635 * configure, config.in: Regenerated.
16636
fb1e4ffc
DJ
166372007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16638
16639 * Makefile.in (OBS): Add $(XML_BUILTIN).
16640 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16641 (clean): Update.
16642 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16643 (arm-with-iwmmxt.c): New.
16644 * config.in, configure: Regenerate.
16645 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16646 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16647 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16648 (arm*-*-linux*): Add iWMMXt and regset support.
16649 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16650 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16651 (arm_store_wmmxregset, target_regsets): New.
16652 * server.c (get_features_xml): Take annex argument. Check builtin
16653 XML documents.
16654 (handle_query): Handle multiple annexes.
16655
0f48aa01
DJ
166562007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * remote-utils.c [USE_WIN32API] (read, write): Define.
16659 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16660 write.
16661
23181151
DJ
166622007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16663
16664 * linux-i386-low.c (the_low_target): Set arch_string.
16665 * linux-x86-64-low.c (the_low_target): Likewise.
16666 * linux-low.c (linux_arch_string): New.
16667 (linux_target_ops): Add it.
16668 * linux-low.h (struct linux_target_ops): Add arch_string.
16669 * server.c (write_qxfer_response): Use const void * for DATA.
16670 (get_features_xml): New.
16671 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16672 * target.h (struct target_ops): Add arch_string method.
16673
9d606399
DJ
166742007-01-03 Denis Pilat <denis.pilat@st.com>
16675 Daniel Jacobowitz <dan@codesourcery.com>
16676
16677 * linux-low.c (linux_kill): Handle being called with no threads.
16678 * win32-i386-low.c (win32_kill): Likewise.
16679 (get_child_debug_event): Clear current_process_handle.
16680
166812006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16682 Daniel Jacobowitz <dan@codesourcery.com>
16683
16684 * remote-utils.c (remote_open): Check the type of specified
16685 serial port devices before opening them.
16686 * server.c (main): Kill the inferior if an error occurs during
16687 the first remote_open.
16688
a5e13d24
DJ
166892006-12-05 Markus Deuling <deuling@de.ibm.com>
16690
16691 * README: Update supported targets.
16692
186947f7
DJ
166932006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16694
16695 * Makefile.in (clean): Remove reg-mips64.c.
16696 (reg-mips64.c, reg-mips64.o): New rules.
16697 * configure.srv: Handle mips64. Include regset support for mips.
16698 * linux-mips-low.c (union mips_register): New.
16699 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16700 (mips_breakpoint, mips_breakpoint_at): Use int.
16701 (mips_collect_register, mips_supply_register)
16702 (mips_collect_register_32bit, mips_supply_register_32bit)
16703 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16704 (mips_store_fpregset, target_regsets): New.
16705 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16706
a13e2c95
UW
167072006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16708
16709 * configure.srv: Add target "spu*-*-*".
16710 * Makefile.in (clean): Remove reg-spu.c.
16711 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16712 * spu-low.c: New file.
16713
cb7283db
DJ
167142006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16715
16716 * configure.ac: Correct td_thr_tls_get_addr test.
16717 * configure: Regenerated.
16718
89be2091
DJ
167192006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16720
16721 * linux-low.c (linux_wait_for_event): Reformat. Use the
16722 pass_signals array.
16723 * remote-utils.c (decode_address_to_semicolon): New.
16724 * server.c (pass_signals, handle_general_set): New.
16725 (handle_query): Mention QPassSignals for qSupported.
16726 (main): Call handle_general_set.
16727 * server.h (pass_signals, decode_address_to_semicolon): New.
16728
000ef4f0
DJ
167292006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16730
16731 * server.c (handle_query): Correct error handling for read_auxv.
16732
b7149293
UW
167332005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16734
16735 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16736 and srv_linux_thread_db to yes.
16737 * linux-s390-low.c (s390_fill_gregset): New function.
16738 (target_regsets): Define data structure.
16739
dae5f5cf
DJ
167402006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16743 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16744 * config.in, configure: Regenerated.
16745 * inferiors.c (gdb_id_to_thread): New function.
16746 (gdb_id_to_thread_id): Use it.
16747 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16748 * linux-low.h (struct process_info): Add th member.
16749 (thread_db_get_tls_address): New prototype.
16750 * remote-utils.c (decode_address): Make non-static.
16751 * server.c (handle_query): Handle qGetTLSAddr.
16752 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16753 * target.h (struct target_ops): Add get_tls_address.
16754 * thread-db.c (maybe_attach_thread): Save the thread handle.
16755 (thread_db_get_tls_address): New.
16756
32ca6d61
DJ
167572006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16758
16759 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16760 (linux_resume_one_process): Take a siginfo_t *. Update all
16761 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16762 (struct pending_signals): Add a siginfo_t.
16763 (linux_wait_for_process): Always set last_status.
16764 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16765 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16766 * linux-low.h (struct process_info): Add last_status.
16767
5ffff7c1
DJ
167682006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * remote-utils.c (try_rle): New function.
16771 (putpkt_binary): Use it.
16772
8695c747
DJ
167732006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16774
16775 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16776 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16777 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16778 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16779 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16780 point registers.
16781
290fadea
RS
167822006-08-08 Richard Sandiford <richard@codesourcery.com>
16783
16784 * server.c (terminal_fd): New variable.
16785 (old_foreground_pgrp): Likewise.
16786 (restore_old_foreground_pgrp): New function.
16787 (start_inferior): Record the terminal file descriptor in terminal_fd
16788 and its original foreground group in old_foreground_pgrp. Register
16789 restore_old_foreground_pgrp with atexit().
16790
9f2e1e63
DJ
167912006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16792
16793 * server.c (handle_query): Correct qPart to qXfer.
16794
b80864fb
DJ
167952006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16796
16797 * configure.ac: Check for more headers which are missing on
16798 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16799 * configure.srv: Add Cygwin and mingw32.
16800 * remote-utils.c: Don't include headers unconditionally which
16801 are missing on mingw32. Include <winsock.h> for mingw32.
16802 (remote_open): Adjust for mingw32 support. Flush
16803 standard error after writing to it.
16804 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16805 (unblock_async_io, enable_async_io, disable_async_io)
16806 (readchar, getpkt): Update for Winsock support.
16807 (prepare_resume_reply): Expect a protocol signal number.
16808 * server.c: Disable <sys/wait.h> on mingw32.
16809 (start_inferior): Adjust for mingw32 support. Flush
16810 standard error after writing to it.
16811 (attach_inferior): Likewise. Use protocol signal
16812 numbers.
16813 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16814 and names.
16815 * win32-i386-low.c: New file.
16816 * Makefile.in (XM_CLIBS): Set.
16817 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16818 (win32-i386-low.o): New dependency rule.
16819 * linux-low.c (linux_wait): Use target signal numbers.
16820 * target.h (struct target_ops): Doc fix.
16821 * server.h (target_signal_to_name): New prototype.
16822 * gdbreplay.c: Don't include headers unconditionally which
16823 are missing on mingw32. Include <winsock.h> for mingw32.
16824 (remote_close, remote_open): Adjust for Winsock support.
16825 * configure, config.in: Regenerated.
16826
0876f84a
DJ
168272006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16828
16829 * server.c (decode_xfer_read, write_qxfer_response): New.
16830 (handle_query): Take a packet length argument. Handle
16831 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16832 the qSupported response.
16833 (main): Update call to handle_query.
16834
01f9e8fa
DJ
168352006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16836
16837 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16838 (putpkt_binary): Renamed from putpkt and adjusted for binary
16839 data.
16840 (putpkt): New wrapper for putpkt_binary.
16841 (readchar): Don't mask off the high bit.
16842 (decode_X_packet): New function.
16843 * server.c (main): Call putpkt_binary if a handler sets the packet
16844 length. Save the length of the incoming packet. Handle 'X'.
16845 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16846
be2a5f71
DJ
168472006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16848
16849 * server.c (handle_query): Handle qSupported.
16850
ea025f5f
DJ
168512006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16852
16853 * remote-utils.c (all_symbols_looked_up): New variable.
16854 (look_up_one_symbol): Check it.
16855 * server.h (look_up_one_symbol): New declaration.
16856 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16857
9308fc88
DJ
168582006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16859
16860 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16861 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16862 (PTRACE_GET_THREAD_AREA): Define.
16863 (ps_get_thread_area): New function.
16864
52fb6437
NS
168652006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16866
16867 * configure.srv (m68k*-*-uclinux*): New target.
16868 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16869 (linux_resume_one_process): Remove extraneous cast.
16870 (linux_read_offsets): New.
16871 (linux_target_op): Add linux_read_offsets on mmuless systems.
16872 * server.c (handle_query): Add qOffsets logic.
16873 * target.h (struct target_ops): Add read_offsets.
16874
21b0f40c
DJ
168752006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16876
16877 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16878 (PTRACE_GET_THREAD_AREA): Define.
16879 (ps_get_thread_area): New function.
16880 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16881 (linux-x86-64-low.o): Update.
16882
0050a760
DJ
168832006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16884
16885 * configure.ac: Remove checks for prfpregset_t.
16886 * gdb_proc_service.h: New file.
16887 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16888 new "gdb_proc_service.h".
16889 * proc-service.c: Likewise.
16890 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16891 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16892 * Makefile.in (gdb_proc_service_h): Updated.
16893 * configure, config.in: Regenerated.
16894
b92a518e
DJ
168952006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16896
16897 * remote-utils.c (prepare_resume_reply): Move declaration
16898 of gdb_id_from_wait to the top of the block.
16899
545587ee
DJ
169002006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16901
16902 * linux-low.c (regsets_store_inferior_registers): Read the regset
16903 from the target before filling it.
16904
9db87ebd
DJ
169052006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16906
16907 * server.c (attach_inferior): Return SIGTRAP for a successful
16908 attach.
16909
dd24457d
DJ
169102006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16911
16912 * Makefile.in (OBS): Add version.o.
16913 (STAGESTUFF): Delete.
16914 (version.o): Add dependencies.
16915 (version.c): Replace rule.
16916 (clean): Remove version.c.
16917 * server.c (gdbserver_version): New.
16918 (gdbserver_usage): Use printf.
16919 (main): Handle --version and --help.
16920 * server.h (version, host_name): Add declarations.
16921
6f0f660e
EZ
169222005-12-23 Eli Zaretskii <eliz@gnu.org>
16923
889bf7c5
PA
16924 * linux-arm-low.c:
16925 * linux-arm-low.c:
16926 * inferiors.c:
16927 * i387-fp.h:
16928 * i387-fp.c:
16929 * gdbreplay.c:
16930 * regcache.c:
16931 * proc-service.c:
16932 * mem-break.h:
16933 * mem-break.c:
16934 * linux-x86-64-low.c:
16935 * linux-sh-low.c:
16936 * linux-s390-low.c:
16937 * linux-ppc64-low.c:
16938 * linux-ppc-low.c:
16939 * linux-mips-low.c:
16940 * linux-m68k-low.c:
16941 * linux-m32r-low.c:
16942 * linux-low.h:
16943 * linux-low.c:
16944 * linux-ia64-low.c:
16945 * linux-i386-low.c:
16946 * linux-crisv32-low.c:
16947 * thread-db.c:
16948 * terminal.h:
16949 * target.h:
16950 * target.c:
16951 * server.h:
16952 * server.c:
16953 * remote-utils.c:
16954 * regcache.h:
16955 * utils.c:
16956 * Makefile.in:
16957 * configure.ac:
6f0f660e
EZ
16958 * gdbserver.1: Add (C) after Copyright. Update the FSF
16959 address.
16960
9d1fb177
DJ
169612005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16962
16963 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16964 (arm_breakpoint_at): Recognize both breakpoints.
16965 (the_low_target): Use the correct breakpoint instruction.
16966
011a70c2
DJ
169672005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16968
16969 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16970 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16971 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16972 (the_low_target): Update.
16973
7fb85e41
AS
169742005-10-25 Andreas Schwab <schwab@suse.de>
16975
16976 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16977
16978 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16979 (ia64_num_regs): Reduce to 462.
16980
3db0444b
DJ
169812005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16982
16983 * acinclude.m4: Correct quoting.
16984 * aclocal.m4: Regenerated.
16985
16986 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16987 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16988 (thread_db_init): Call thread_db_err_str.
16989 * configure.ac: Check for TD_VERSION.
16990 * config.in, configure: Regenerated.
16991
bee0189a
DJ
169922005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16993
16994 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16995
e9d25b98
DJ
169962005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16997
16998 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16999 is not available. Define HAVE_PTRACE_GETREGS if it is.
17000 * config.in, configure: Regenerated.
17001 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17002 * linux-i386-low.c, linux-m68k-low.c: Update to use
17003 HAVE_PTRACE_GETREGS.
17004 * linux-low.c (regsets_fetch_inferior_registers)
17005 (regsets_store_inferior_registers): Only return 0 if we processed
17006 GENERAL_REGS.
17007 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17008 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17009
a06660f7
DJ
170102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17011
17012 * inferiors.c (struct thread_info): Add gdb_id.
17013 (add_thread): Add gdb_id argument.
17014 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17015 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17016 calls to add_thread.
17017 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17018 * server.c (handle_query): Use thread_to_gdb_id.
17019 (handle_v_cont, main): Use gdb_id_to_thread_id.
17020 * server.h (add_thread): Update prototype.
17021 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17022 prototypes.
17023
5a1f5858
DJ
170242005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17025
17026 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17027 left-padded registers.
17028 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17029 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17030
e122f1f5
SE
170312005-07-01 Steve Ellcey <sje@cup.hp.com>
17032
17033 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17034 * configure: Regenerate.
17035 * config.in: Regenerate.
17036 * server.h (NEED_DECLARATION_STRERROR):
17037 Replace with !HAVE_DECL_STRERROR.
17038
d592fa2f
DJ
170392005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17040
17041 * linux-low.c (linux_wait, linux_send_signal): Don't test
17042 an unsigned long variable for > 0 if it could be MAX_ULONG.
17043 * server.c (myresume): Likewise.
17044 * target.c (set_desired_inferior): Likewise.
17045
ccbd4912
MK
170462005-06-13 Mark Kettenis <kettenis@gnu.org>
17047
17048 * configure.ac: Simplify and improve check for socklen_t.
17049 * configure, config.in: Regenerate.
17050
f450004a
DJ
170512005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17052
17053 * acconfig.h: Remove.
17054 * configure.ac: Add a test for socklen_t. Use three-argument
17055 AC_DEFINE throughout.
17056 * config.in: Regenerated using autoheader 2.59.
17057 * configure: Regenerated.
17058
17059 * gdbreplay.c (socklen_t): Provide a default.
17060 (remote_open): Use socklen_t.
17061 * remote-utils.c (socklen_t): Provide a default.
17062 (remote_open): Use socklen_t.
17063 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17064 unsigned char.
17065
17066 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17067 char for buffers.
17068 * linux-low.c (linux_read_memory, linux_write_memory)
17069 (linux_read_auxv): Likewise.
17070 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17071 (check_mem_write): Likewise.
17072 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17073 Likewise.
17074 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17075 (registers_from_string, register_data): Likewise.
17076 * server.c (handle_query, main): Likewise.
17077 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17078 (decode_M_packet): Likewise.
17079 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17080 * target.h (struct target_ops): Update read_memory, write_memory,
17081 and read_auxv.
17082 (read_inferior_memory, write_inferior_memory): Update.
17083 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17084 to unsigned char *.
17085 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17086 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17087 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17088 linux-s390-low.c, linux-sh-low.c: Update for changes in
17089 read_inferior_memory and the_low_target->breakpoint.
17090
eee84df1
DJ
170912005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17092
17093 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17094 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17095 * configure.srv: Add powerpc64-*-linux*.
17096 * linux-ppc64-low.c: New file.
17097
45b134e5
OF
170982005-05-23 Orjan Friberg <orjanf@axis.com>
17099
17100 * linux-cris-low.c: New file with support for CRIS.
17101 * linux-crisv32-low.c: Ditto for CRISv32.
17102 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17103 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17104 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17105 reg-crisv32.o, and reg-crisv32.c to make rules.
17106 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17107 recognized targets.
17108
48d93c75
UW
171092005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17110
17111 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17112 of sizeof (PTRACE_XFER_TYPE).
17113 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17114
e013ee27
OF
171152005-05-12 Orjan Friberg <orjanf@axis.com>
17116
889bf7c5 17117 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17118 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17119 pointers for hardware watchpoint support.
17120 * linux-low.h (struct linux_target_ops): Ditto.
17121 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17122 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17123 to linux_target_ops.
17124 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17125 reply packet.
17126 * server.c (main): Recognize 'Z' and 'z' packets.
17127
b0ded00b
UW
171282005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17129
17130 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17131 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17132 (the_low_target): Add new members.
17133
8643e2ad
DJ
171342005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17135
17136 * proc-service.c (ps_lgetregs): Search all_processes instead of
17137 all_threads.
17138
fc620387
DJ
171392005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17140
17141 * server.c (start_inferior): Change return type to int.
17142 (attach_inferior): Change sigptr to int *.
17143 (handle_v_cont, handle_v_requests): Change signal to int *.
17144 (main): Change signal to int.
17145
171462005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17147
17148 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17149 * configure.srv: Add m32r*-*-linux*.
17150 * linux-m32r-low.c: New file.
17151
e0e76420
DJ
171522005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17153
17154 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17155
a1928bad
DJ
171562005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17157
17158 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17159 Take unsigned long arguments for PIDs.
17160 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17161 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17162 (wait_for_sigstop, linux_resume_one_process)
17163 (regsets_fetch_inferior_registers, linux_send_signal)
17164 (linux_read_auxv): Likewise. Update the types of variables holding
17165 PIDs. Update format string specifiers.
17166 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17167 * remote-utils.c (prepare_resume_reply): Likewise.
17168 * server.c (cont_thread, general_thread, step_thread)
17169 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17170 unsigned long.
17171 (handle_query): Update format specifiers.
17172 (handle_v_cont, main): Use strtoul for thread IDs.
17173 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17174 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17175 (general_thread, step_thread, thread_from_wait)
17176 (old_thread_from_wait): Update.
17177 * target.h (struct thread_resume): Use unsigned long for THREAD.
17178 (struct target_ops): Use unsigned long for arguments to attach and
17179 thread_alive.
17180
dcdb98d2
DJ
171812005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17182
17183 * acinclude.m4: Include bfd/bfd.m4 directly.
17184 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17185 <agriffis@toolchain.org>.
17186 * aclocal.m4, configure: Regenerated.
17187
bec39cab
AC
171882005-01-07 Andrew Cagney <cagney@gnu.org>
17189
17190 * configure.ac: Rename configure.in, require autoconf 2.59.
17191 * configure: Re-generate.
17192
434c4c77
DJ
171932004-12-08 Daniel Jacobowitz <dan@debian.org>
17194
17195 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17196 LIBS when finished.
17197 * aclocal.m4: Regenerated.
17198 * configure: Regenerated.
17199
db1d3e1b
AS
172002004-11-21 Andreas Schwab <schwab@suse.de>
17201
17202 * linux-m68k-low.c (m68k_num_gregs): Define.
17203 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17204 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17205 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17206 (m68k_breakpoint_at): New. Add to the_low_target.
17207
17208 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17209 srv_linux_thread_db to yes.
17210
43360365
JB
172112004-10-20 Joel Brobecker <brobecker@gnat.com>
17212
17213 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17214 (ARCH_SET_FS): Likewise.
17215 (ARCH_GET_FS): Likewise.
17216 (ARCH_GET_GS): Likewise.
17217
fd500816
DJ
172182004-10-16 Daniel Jacobowitz <dan@debian.org>
17219
17220 * linux-i386-low.c (ps_get_thread_area): New.
17221 * linux-x86-64-low.c (ps_get_thread_area): New.
17222 * linux-low.c: Include <sys/syscall.h>.
17223 (linux_kill_one_process): Don't kill the first thread here.
17224 (linux_kill): Kill the first thread here.
17225 (kill_lwp): New function.
17226 (send_sigstop, linux_send_signal): Use it.
17227 * proc-service.c: Clean up #ifdefs.
17228 (fpregset_info): Delete.
17229 (ps_lgetregs): Update and enable implementation.
17230 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17231 implementations.
17232 * remote-utils.c (struct sym_cache, symbol_cache): New.
17233 (input_interrupt): Print a clearer message.
17234 (async_io_enabled): New variable.
17235 (enable_async_io, disable_async_io): Use it. Update comments.
17236 (look_up_one_symbol): Use the symbol cache.
17237 * thread-db.c (thread_db_look_up_symbols): New function.
17238 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17239
f6de3c42
DJ
172402004-10-16 Daniel Jacobowitz <dan@debian.org>
17241
17242 * configure.in: Test for -rdynamic.
17243 * configure: Regenerated.
17244 * Makefile (INTERNAL_LDFLAGS): New.
17245 (gdbserver, gdbreplay): Use it.
17246
2c0fc042
AC
172472004-09-02 Andrew Cagney <cagney@gnu.org>
17248
17249 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17250
075b3282
DJ
172512004-03-23 Daniel Jacobowitz <drow@mvista.com>
17252
17253 * linux-low.c (linux_wait): Clear all_processes list also.
17254
fa6a77dc
DJ
172552004-03-12 Daniel Jacobowitz <drow@mvista.com>
17256
17257 * linux-low.c: Include <errno.h>. Remove extern declaration of
17258 errno.
17259
6d782a97
DJ
172602004-03-12 Daniel Jacobowitz <drow@mvista.com>
17261
17262 * gdbreplay.c, server.h, utils.c: Update copyright years.
17263
3a7fb99b
DJ
172642004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17265
17266 * server.c (main): Print child status or termination signal from
17267 variable 'signal', not 'sig'.
17268
c3e735a6
DJ
172692004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17270
17271 * linux-low.c (linux_read_memory): Change return type to
17272 int. Check for and return error from ptrace().
17273 * target.c (read_inferior_memory): Change return type to int. Pass
17274 back return status from the_target->read_memory().
17275 * target.h (struct target_ops): Adapt *read_memory() prototype.
17276 Update comment.
17277 (read_inferior_memory): Adapt prototype.
17278 * server.c (main): Return an error packet if
17279 read_inferior_memory() returns an error.
17280
a59d1c82
DJ
172812004-03-04 Daniel Jacobowitz <drow@mvista.com>
17282
17283 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17284 Unify with other clean targets.
17285
dc3f8883
DJ
172862004-02-29 Daniel Jacobowitz <drow@mvista.com>
17287
17288 * server.c (handle_v_cont): Call set_desired_inferior.
17289
89a208da
DJ
172902004-02-29 Daniel Jacobowitz <drow@mvista.com>
17291
17292 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17293
62ea82f5
DJ
172942004-02-29 Daniel Jacobowitz <drow@mvista.com>
17295
17296 * linux-low.c (linux_wait): Unblock async I/O.
17297 (linux_resume): Block and enable async I/O.
17298 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17299 * server.h (block_async_io, unblock_async_io): Add prototypes.
17300
6910d122
DJ
173012004-02-29 Daniel Jacobowitz <drow@mvista.com>
17302
17303 * remote-utils.c (remote_open): Print a status notice after
17304 opening a TCP port.
17305 * server.c (attach_inferior): Print a status notice after
17306 attaching.
17307
173082004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17309
17310 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17311
c89dc5d4
DJ
173122004-02-26 Daniel Jacobowitz <drow@mvista.com>
17313
17314 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17315 error packet.
17316 * server.c, target.h: Update copyright years.
17317
4b8dad4a
RM
173182004-02-25 Roland McGrath <roland@redhat.com>
17319
17320 * target.h (struct target_ops): New member `read_auxv'.
17321 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17322 * linux-low.c (linux_read_auxv): New function.
17323 (linux_target_ops): Initialize `read_auxv' member to that.
17324
d7446758
JB
173252004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17326
17327 Committed by Jim Blandy <jimb@redhat.com>.
17328
17329 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17330 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17331 instead of GPR_SIZE to distiguish s390 and s390x targets.
17332
5544ad89
DJ
173332004-01-31 Daniel Jacobowitz <drow@mvista.com>
17334
17335 * linux-low.c: Update copyright year.
17336 (check_removed_breakpoint): Clear pending_is_breakpoint.
17337 (linux_set_resume_request, linux_queue_one_thread)
17338 (resume_status_pending_p): New functions.
17339 (linux_continue_one_thread): Use process->resume.
17340 (linux_resume): Only resume threads if there are no pending events.
17341 * linux-low.h (struct process_info): Add resume request
17342 pointer.
17343
2a68b70e
DJ
173442004-01-30 Daniel Jacobowitz <drow@mvista.com>
17345
17346 * regcache.c (new_register_cache): Clear the allocated register
17347 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17348
64386c31
DJ
173492003-10-13 Daniel Jacobowitz <drow@mvista.com>
17350
17351 * linux-low.c (linux_resume): Take a struct thread_resume *
17352 argument.
17353 (linux_wait): Update call.
17354 (resume_ptr): New static variable.
17355 (linux_continue_one_thread): Renamed from
17356 linux_continue_one_process. Use resume_ptr.
17357 (linux_resume): Use linux_continue_one_thread.
17358 * server.c (handle_v_cont, handle_v_requests): New functions.
17359 (myresume): New function.
17360 (main): Handle 'v' case.
17361 * target.h (struct thread_resume): New type.
17362 (struct target_ops): Change argument of "resume" to struct
17363 thread_resume *.
17364 (myresume): Delete macro.
17365
c938e9b0
L
173662003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17367
17368 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17369 (uninstall): Support DESTDIR.
17370
7f313d07
BC
17371Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17372
17373 * configure.srv: Add xscale*linux copy of arm*linux entry.
17374
3b2fc2ea
DJ
173752003-07-24 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * linux-arm-low.c (arm_reinsert_addr): New function.
17378 (the_low_target): Add arm_reinsert_addr.
17379
1c0a559e
MK
173802003-07-08 Mark Kettenis <kettenis@gnu.org>
17381
17382 * mem-break.c: Remove whitespace at end of file.
17383
43d5792c
DJ
173842003-06-28 Daniel Jacobowitz <drow@mvista.com>
17385
17386 * configure.in: Check whether we need to prototype strerror.
17387 * server.h: Optionally prototype strerror.
17388 * gdbreplay.c (perror_with_name): Use strerror.
17389 * linux-low.c (linux_attach_lwp): Use strerror.
17390 * utils.c (perror_with_name): Use strerror.
17391 * config.in, configure: Regenerated.
17392
c8a86edf
DJ
173932003-06-28 Daniel Jacobowitz <drow@mvista.com>
17394
17395 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17396 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17397
73d37363
DJ
173982003-06-20 Daniel Jacobowitz <drow@mvista.com>
17399
17400 * Makefile.in (SFILES): Update.
17401 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17402 low-sun3.c: Remove files.
17403
6ad8ae5c
DJ
174042003-06-17 Daniel Jacobowitz <drow@mvista.com>
17405
17406 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17407 (linux_detach_one_process, linux_detach): New functions.
17408 (linux_target_ops): Add linux_detach.
17409 * server.c (main): Handle 'D' packet.
17410 * target.h (struct target_ops): Add "detach" member.
17411 (detach_inferior): Define.
17412
1581182a
MK
174132003-06-13 Mark Kettenis <kettenis@gnu.org>
17414
17415 From Kelley Cook <kelleycook@wideopenwest.com>:
17416 * configure.srv: Accept i[34567]86 variants.
17417
e5379b03
DJ
174182003-06-05 Daniel Jacobowitz <drow@mvista.com>
17419
17420 * linux-low.c (linux_wait_for_event): Correct comment typos.
17421 (linux_resume_one_process): Call check_removed_breakpoint.
17422 (linux_send_signal): New function.
17423 (linux_target_ops): Add linux_send_signal.
17424 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17425 of kill.
17426 * target.h (struct target_ops): Add send_signal.
17427
2ff29de4
JB
174282003-05-29 Jim Blandy <jimb@redhat.com>
17429
17430 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17431 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17432 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17433 away part of the register's value.
17434
254787d4
DJ
174352003-03-26 Daniel Jacobowitz <drow@mvista.com>
17436
17437 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17438 (linux_wait_for_event, linux_init_signals): Likewise.
17439
94e10508
DJ
174402003-03-17 Daniel Jacobowitz <drow@mvista.com>
17441
17442 * configure.in: Check for stdlib.h.
17443 * configure: Regenerated.
17444 * config.in: Regenerated.
17445
4c0711e0
DJ
174462003-01-04 Andreas Schwab <schwab@suse.de>
17447
17448 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17449
ef66e766
AC
174502003-01-02 Andrew Cagney <ac131313@redhat.com>
17451
17452 * Makefile.in: Remove obsolete code.
17453
a1358604
DJ
174542002-11-20 Daniel Jacobowitz <drow@mvista.com>
17455
17456 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17457 defined(PT_FPR0_HI).
17458
23ce3b1c
DJ
174592002-11-17 Stuart Hughes <seh@zee2.com>
17460
17461 * linux-arm-low.c (arm_num_regs): Increase.
17462 (arm_regmap): Include status register.
17463
174642002-11-17 Daniel Jacobowitz <drow@mvista.com>
17465
17466 * linux-low.c (register_addr): Remove incorrect -1 check.
17467
a9fa9f7d
DJ
174682002-08-29 Daniel Jacobowitz <drow@mvista.com>
17469
17470 * linux-low.c (linux_create_inferior): Call setpgid. Return
17471 the new PID.
17472 (unstopped_p, linux_signal_pid): Remove.
17473 (linux_target_ops): Remove linux_signal_pid.
17474 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17475 global instead of target method.
17476 * target.h (struct target_ops): Remove signal_pid. Update comment
17477 for create_inferior.
17478 * server.c (signal_pid): New variable.
17479 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17480 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17481 (attach_inferior): Set signal_pid.
17482
17574093
DJ
174832002-08-23 Daniel Jacobowitz <drow@mvista.com>
17484
17485 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17486
174872002-08-20 Jim Blandy <jimb@redhat.com>
17488
17489 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17490 default for this.
17491
174922002-08-01 Andrew Cagney <cagney@redhat.com>
17493
17494 * Makefile.in: Make chill references obsolete.
17495
174962002-07-24 Kevin Buettner <kevinb@redhat.com>
17497
17498 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17499 * configure: Regenerate.
17500 * config.in: Regenerate.
17501
175022002-07-09 David O'Brien <obrien@FreeBSD.org>
17503
17504 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17505 (perror_with_name, remote_close, remote_open, expect, play): Static.
17506
175072002-07-04 Michal Ludvig <mludvig@suse.cz>
17508
4b8dad4a 17509 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17510 byte offsets instead of an array of indexes.
17511 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17512
175132002-06-13 Daniel Jacobowitz <drow@mvista.com>
17514
17515 * regcache.c: Add comment.
17516
175172002-06-11 Daniel Jacobowitz <drow@mvista.com>
17518
17519 * thread-db.c: New file.
17520 * proc-service.c: New file.
17521 * acinclude.m4: New file.
17522 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17523 proc-service.o, and thread-db.o.
17524 (linux-low.o): Add USE_THREAD_DB.
17525 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17526 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17527 * aclocal.m4: Regenerated.
17528 * config.in: Regenerated.
17529 * configure: Regenerated.
17530 * configure.in: Check for proc_service.h, sys/procfs.h,
17531 thread_db.h, and linux/elf.h headrs.
17532 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17533 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17534 Check for -lthread_db and thread support.
17535 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17536 PowerPC, and SuperH.
17537 * i387-fp.c: Constify arguments.
17538 * i387-fp.h: Likewise.
17539 * inferiors.c: (struct thread_info): Renamed from
17540 `struct inferior_info'. Remove PID member. Use generic inferior
17541 list header. All uses updated.
17542 (inferiors, signal_pid): Removed.
17543 (all_threads): New variable.
17544 (get_thread): Define.
17545 (add_inferior_to_list): New function.
17546 (for_each_inferior): New function.
17547 (change_inferior_id): New function.
17548 (add_inferior): Removed.
17549 (remove_inferior): New function.
17550 (add_thread): New function.
17551 (free_one_thread): New function.
17552 (remove_thread): New function.
17553 (clear_inferiors): Use for_each_inferior and free_one_thread.
17554 (find_inferior): New function.
17555 (find_inferior_id): New function.
17556 (inferior_target_data): Update argument type.
17557 (set_inferior_target_data): Likewise.
17558 (inferior_regcache_data): Likewise.
17559 (set_inferior_regcache_data): Likewise.
17560 * linux-low.c (linux_bp_reinsert): Remove.
17561 (all_processes, stopping_threads, using_thrads)
17562 (struct pending_signals, debug_threads, pid_of): New.
17563 (inferior_pid): Replace with macro.
17564 (struct inferior_linux_data): Remove.
17565 (get_stop_pc, add_process): New functions.
17566 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17567 Use add_process and add_thread.
17568 (linux_attach_lwp): New function, based on old linux_attach. Use
17569 add_process and add_thread. Set stop_expected for new threads.
17570 (linux_attach): New function.
17571 (linux_kill_one_process): New function.
17572 (linux_kill): Kill all LWPs.
17573 (linux_thread_alive): Use find_inferior_id.
17574 (check_removed_breakpoints, status_pending_p): New functions.
17575 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17576 Update. Use WNOHANG. Wait for cloned processes also. Update process
17577 struct for the found process.
17578 (linux_wait_for_event): New function.
17579 (linux_wait): Use it. Support LWPs.
17580 (send_sigstop, wait_for_sigstop, stop_all_processes)
17581 (linux_resume_one_process, linux_continue_one_process): New functions.
17582 (linux_resume): Support LWPs.
17583 (REGISTER_RAW_SIZE): Remove.
17584 (fetch_register): Use register_size instead. Call supply_register.
17585 (usr_store_inferior_registers): Likewise. Call collect_register.
17586 Fix recursive case.
17587 (regsets_fetch_inferior_registers): Improve error message.
17588 (regsets_store_inferior_registers): Add debugging.
17589 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17590 (unstopped_p, linux_signal_pid): New functions.
17591 (linux_target_ops): Add linux_signal_pid.
17592 (linux_init_signals): New function.
17593 (initialize_low): Call it. Initialize using_threads.
17594 * regcache.c (inferior_regcache_data): Add valid
17595 flag.
17596 (get_regcache): Fetch registers lazily. Add fetch argument
17597 and update all callers.
17598 (regcache_invalidate_one, regcache_invalidate): New
17599 functions.
17600 (new_register_cache): Renamed from create_register_cache.
17601 Return the new regcache.
17602 (free_register_cache): Change argument to a void *.
17603 (registers_to_string, registers_from_string): Call get_regcache
17604 with fetch flag set.
17605 (register_data): Make static. Pass fetch flag to get_regcache.
17606 (supply_register): Call get_regcache with fetch flag clear.
17607 (collect_register): Call get_regcache with fetch flag set.
17608 (collect_register_as_string): New function.
17609 * regcache.h: Update.
17610 * remote-utils.c (putpkt): Flush after debug output and use
17611 stderr.
17612 Handle input interrupts while waiting for an ACK.
17613 (input_interrupt): Use signal_pid method.
17614 (getpkt): Flush after debug output and use stderr.
17615 (outreg): Use collect_register_as_string.
17616 (new_thread_notify, dead_thread_notify): New functions.
17617 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17618 and general_thread.
17619 (look_up_one_symbol): Flush after debug output.
17620 * server.c (step_thread, server_waiting): New variables.
17621 (start_inferior): Don't use signal_pid. Update call to mywait.
17622 (attach_inferior): Update call to mywait.
17623 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17624 (main): Don't fetch/store registers explicitly. Use
17625 set_desired_inferior. Support proposed ``Hs'' packet. Update
17626 calls to mywait.
17627 * server.h: Update.
17628 (struct inferior_list, struct_inferior_list_entry): New.
17629 * target.c (set_desired_inferior): New.
17630 (write_inferior_memory): Constify.
17631 (mywait): New function.
17632 * target.h: Update.
17633 (struct target_ops): New signal_pid method.
17634 (mywait): Removed macro, added prototype.
17635
17636 * linux-low.h (regset_func): Removed.
17637 (regset_fill_func, regset_store_func): New.
17638 (enum regset_type): New.
17639 (struct regset_info): Add type field. Use new operation types.
17640 (struct linux_target_ops): stop_pc renamed to get_pc.
17641 Add decr_pc_after_break and breakpoint_at.
17642 (get_process, get_thread_proess, get_process_thread)
17643 (strut process_info, all_processes, linux_attach_lwp)
17644 (thread_db_init): New.
17645
17646 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17647 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17648 (the_low_target): Add new members.
17649 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17650 (i386_store_fpxregset): Constify.
17651 (target_regsets): Add new kind identifier.
17652 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17653 (i386_set_pc): Add debugging.
17654 (i386_breakpoint_at): New function.
17655 (the_low_target): Add new members.
17656 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17657 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17658 (mips_breakpoint_at): New.
17659 (the_low_target): Add new members.
17660 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17661 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17662 (the_low_target): Add new members.
17663 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17664 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17665 (the_low_target): Add new members.
17666 * linux-x86-64-low.c (target_regsets): Add new kind
17667 identifier.
17668
176692002-05-15 Daniel Jacobowitz <drow@mvista.com>
17670
17671 From Martin Pool <mbp@samba.org>:
17672 * server.c (gdbserver_usage): New function.
17673 (main): Call it.
17674
176752002-05-14 Daniel Jacobowitz <drow@mvista.com>
17676
17677 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17678 stop_at -> stop_pc.
17679
176802002-05-04 Andrew Cagney <ac131313@redhat.com>
17681
17682 * Makefile.in: Remove obsolete code.
17683
176842002-04-24 Michal Ludvig <mludvig@suse.cz>
17685
17686 * linux-low.c (regsets_fetch_inferior_registers),
17687 (regsets_store_inferior_registers): Removed cast to int from
17688 ptrace() calls.
17689 * regcache.h: Added declaration of struct inferior_info.
17690
176912002-04-20 Daniel Jacobowitz <drow@mvista.com>
17692
17693 * inferiors.c (struct inferior_info): Add regcache_data.
17694 (add_inferior): Call create_register_cache.
17695 (clear_inferiors): Call free_register_cache.
17696 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17697 * regcache.c (struct inferior_regcache_data): New.
17698 (registers): Remove.
17699 (get_regcache): New function.
17700 (create_register_cache, free_register_cache): New functions.
17701 (set_register_cache): Don't initialize the register cache here.
17702 (registers_to_string, registers_from_string, register_data): Call
17703 get_regcache.
17704 * regcache.h: Add prototypes.
17705 * server.h: Likewise.
17706
177072002-04-20 Daniel Jacobowitz <drow@mvista.com>
17708
17709 * mem-break.c: New file.
17710 * mem-break.h: New file.
17711 * Makefile.in: Add mem-break.o rule; update server.h
17712 dependencies.
17713 * inferiors.c (struct inferior_info): Add target_data
17714 member.
17715 (clear_inferiors): Free target_data member if set.
17716 (inferior_target_data, set_inferior_target_data): New functions.
17717 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17718 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17719 * linux-low.c (linux_bp_reinsert): New variable.
17720 (struct inferior_linux_data): New.
17721 (linux_create_inferior): Use set_inferior_target_data.
17722 (linux_attach): Likewise. Call add_inferior.
17723 (linux_wait_for_one_inferior): New function.
17724 (linux_wait): Call it.
17725 (linux_write_memory): Add const.
17726 (initialize_low): Call set_breakpoint_data.
17727 * linux-low.h (struct linux_target_ops): Add breakpoint
17728 handling members.
17729 * server.c (attach_inferior): Remove extra add_inferior
17730 call.
17731 * server.h: Include mem-break.h. Update inferior.c
17732 prototypes.
17733 * target.c (read_inferior_memory)
17734 (write_inferior_memory): New functions.
17735 * target.h (read_inferior_memory)
17736 (write_inferior_memory): Change macros to prototypes.
17737 (struct target_ops): Update comments. Add const to write_memory
17738 definition.
17739
177402002-04-11 Daniel Jacobowitz <drow@mvista.com>
17741
17742 * linux-low.c (usr_store_inferior_registers): Support
17743 registers which are allowed to fail to store.
17744 * linux-low.h (linux_target_ops): Likewise.
17745 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17746 (ppc_cannot_store_register): FPSCR may not be storable.
17747
177482002-04-09 Daniel Jacobowitz <drow@mvista.com>
17749
17750 * server.h: Include <string.h> if HAVE_STRING_H.
17751 * ChangeLog: Correct paths in last ChangeLog entry.
17752
177532002-04-09 Daniel Jacobowitz <drow@mvista.com>
17754
17755 * linux-low.h: Remove obsolete prototypes.
17756 (struct linux_target_ops): New.
17757 (extern the_low_target): New.
17758 * linux-low.c (num_regs, regmap): Remove declarations.
17759 (register_addr): Use the_low_target explicitly.
17760 (fetch_register): Likewise.
17761 (usr_fetch_inferior_registers): Likewise.
17762 (usr_store_inferior_registers): Likewise.
17763 * linux-arm-low.c (num_regs): Remove.
17764 (arm_num_regs): Define.
17765 (arm_regmap): Renamed from regmap, made static.
17766 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17767 made static.
17768 (arm_cannot_store_register): Renamed from cannot_store_register,
17769 made static.
17770 (the_low_target): New.
17771 * linux-i386-low.c (num_regs): Remove.
17772 (i386_num_regs): Define.
17773 (i386_regmap): Renamed from regmap, made static.
17774 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17775 made static.
17776 (i386_cannot_store_register): Renamed from cannot_store_register,
17777 made static.
17778 (the_low_target): New.
17779 * linux-ia64-low.c (num_regs): Remove.
17780 (ia64_num_regs): Define.
17781 (ia64_regmap): Renamed from regmap, made static.
17782 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17783 made static.
17784 (ia64_cannot_store_register): Renamed from cannot_store_register,
17785 made static.
17786 (the_low_target): New.
17787 * linux-m68k-low.c (num_regs): Remove.
17788 (m68k_num_regs): Define.
17789 (m68k_regmap): Renamed from regmap, made static.
17790 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17791 made static.
17792 (m68k_cannot_store_register): Renamed from cannot_store_register,
17793 made static.
17794 (the_low_target): New.
17795 * linux-mips-low.c (num_regs): Remove.
17796 (mips_num_regs): Define.
17797 (mips_regmap): Renamed from regmap, made static.
17798 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17799 made static.
17800 (mips_cannot_store_register): Renamed from cannot_store_register,
17801 made static.
17802 (the_low_target): New.
17803 * linux-ppc-low.c (num_regs): Remove.
17804 (ppc_num_regs): Define.
17805 (ppc_regmap): Renamed from regmap, made static.
17806 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17807 made static.
17808 (ppc_cannot_store_register): Renamed from cannot_store_register,
17809 made static.
17810 (the_low_target): New.
17811 * linux-s390-low.c (num_regs): Remove.
17812 (s390_num_regs): Define.
17813 (s390_regmap): Renamed from regmap, made static.
17814 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17815 made static.
17816 (s390_cannot_store_register): Renamed from cannot_store_register,
17817 made static.
17818 (the_low_target): New.
17819 * linux-sh-low.c (num_regs): Remove.
17820 (sh_num_regs): Define.
17821 (sh_regmap): Renamed from regmap, made static.
17822 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17823 made static.
17824 (sh_cannot_store_register): Renamed from cannot_store_register,
17825 made static.
17826 (the_low_target): New.
17827 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17828 (the_low_target): New.
17829
178302002-04-09 Daniel Jacobowitz <drow@mvista.com>
17831
17832 * Makefile.in: Add stamp-h target.
17833 * configure.in: Create stamp-h.
17834 * configure: Regenerated.
17835
178362002-04-09 Daniel Jacobowitz <drow@mvista.com>
17837
17838 * inferiors.c: New file.
17839 * target.c: New file.
17840 * target.h: New file.
17841 * Makefile.in: Add target.o and inferiors.o. Update
17842 dependencies.
17843 * linux-low.c (inferior_pid): New static variable,
17844 moved from server.c.
17845 (linux_create_inferior): Renamed from create_inferior.
17846 Call add_inferior. Return 0 on success instead of a PID.
17847 (linux_attach): Renamed from myattach.
17848 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17849 (linux_thread_alive): Renamed from mythread_alive.
17850 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17851 child dies.
17852 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17853 (regsets_store_inferior_registers): Correct error message.
17854 Add missing ``return 0''.
17855 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17856 (linux_store_registers): Renamed from store_inferior_registers.
17857 (linux_read_memory): Renamed from read_inferior_memory.
17858 (linux_write_memory): Renamed from write_inferior_memory.
17859 (linux_target_ops): New structure.
17860 (initialize_low): Call set_target_ops ().
17861 * remote-utils.c (unhexify): New function.
17862 (hexify): New function.
17863 (input_interrupt): Send signals to ``signal_pid''.
17864 * server.c (inferior_pid): Remove.
17865 (start_inferior): Update create_inferior call.
17866 (attach_inferior): Call add_inferior.
17867 (handle_query): New function.
17868 (main): Call handle_query for `q' packets.
17869 * server.h: Include "target.h". Remove obsolete prototypes.
17870 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17871
178722002-04-09 Daniel Jacobowitz <drow@mvista.com>
17873
17874 * Makefile.in: Add WARN_CFLAGS. Update configury
17875 dependencies.
17876 * configure.in: Check for <string.h>
17877 * configure: Regenerate.
17878 * config.in: Regenerate.
17879 * gdbreplay.c: Include needed system headers.
17880 (remote_open): Remove strchr prototype.
17881 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17882 * regcache.c (supply_register): Change buf argument to const void *.
17883 (supply_register_by_name): Likewise.
17884 (collect_register): Change buf argument to void *.
17885 (collect_register_by_name): Likewise.
17886 * regcache.h: Add missing prototypes.
17887 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17888 * server.c (handle_query): New function.
17889 (attached): New static variable, moved out of main.
17890 (main): Quiet longjmp clobber warnings.
17891 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17892 * utils.c (error): Remove NORETURN.
17893 (fatal): Likewise.
This page took 2.144127 seconds and 4 git commands to generate.