]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Convert amd64-linux target descriptions
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b4570e4b
YQ
12017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * Makefile.in (arch-amd64.o): New rule.
4 * configure.srv: Append arch-amd64.o.
5 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6 (get_ipa_tdesc): Call amd64_linux_read_description.
7 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
8 and init_registers_amd64_XXX.
9 * linux-x86-low.c (x86_linux_read_description): Call
10 amd64_linux_read_description.
11 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
12 (initialize_low_arch): Don't call init_registers_x32_XXX and
13 init_registers_amd64_XXX.
14 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
15 and tdesc_amd64_XXX.
16 [__x86_64__] (amd64_tdesc_test): New function.
17 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
18 and init_registers_amd64_XXX.
19 * linux-x86-tdesc.c: Include arch/amd64.h.
20 (xcr0_to_tdesc_idx): New function.
21 (i386_linux_read_description): New function.
22 (amd64_get_ipa_tdesc_idx): New function.
23 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
24 (amd64_get_ipa_tdesc): Declare.
25
d1f28ea2
YQ
262017-09-05 Yao Qi <yao.qi@linaro.org>
27
28 * configure.srv (srv_i386_linux_xmlfiles): Remove
29 i386/i386-XXX-linux.xml from it.
30
25a93583
YQ
312017-09-05 Yao Qi <yao.qi@linaro.org>
32
33 * configure.srv: Set srv_i386_linux_regobj empty if $development
34 is false.
35 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
36 initialize_low_tdesc.
37 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
38 with #if initialize_low_tdesc.
39 * linux-x86-tdesc-selftest.c: New file.
40 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
41
5f035c07
YQ
422017-09-05 Yao Qi <yao.qi@linaro.org>
43
44 * Makefile.in (arch-i386.o): New rule.
45 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
46 (x86_64-*-linux*): Likewise.
47 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
48 include arch/i386.h.
49 (i386_linux_read_description): Remove code and call
50 i386_create_target_description.
51 * tdesc.c (allocate_target_description): New function.
52 * tdesc.h (set_tdesc_architecture): Remove declaration.
53 (set_tdesc_osabi): Likewise.
54
0abe8a89
YQ
552017-09-05 Yao Qi <yao.qi@linaro.org>
56
57 * linux-x86-tdesc.c: Don't include <inttypes.h>.
58 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
59 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
60 .xmltarget.
61 * server.c (get_features_xml): Call tdesc_get_features_xml.
62 * tdesc.c (set_tdesc_architecture): New function.
63 (set_tdesc_osabi): New function.
64 (tdesc_get_features_xml): New function.
65 (tdesc_create_feature): Add an argument.
66 * tdesc.h (struct target_desc) <features>: New field.
67 <arch, osabi>: New field.
68 (~target_desc): xfree features, arch, and osabi.
69 (target_desc::oerator==): Don't compare .xmltarget.
70 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
71 (set_tdesc_osabi): Likewise.
72 (tdesc_get_features_xml): Likewise.
73
0a188386
YQ
742017-09-05 Yao Qi <yao.qi@linaro.org>
75
76 * linux-x86-tdesc.c: Include selftest.h.
77 (i386_tdesc_test): New function.
78 (initialize_low_tdesc): Call selftests::register_test.
79 * tdesc.h: Include regdef.h.
80 (target_desc): Override operator == and !=.
81
f49ff000
YQ
822017-09-05 Yao Qi <yao.qi@linaro.org>
83
84 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
85 (ipa_obj): Likewise.
86 * linux-i386-ipa.c: Include common/x86-xstate.h
87 (get_ipa_tdesc): Call i386_linux_read_description.
88 (initialize_low_tracepoint): Don't call init_registers_XXX
89 functions, call initialize_low_tdesc instead.
90 * linux-x86-low.c (x86_linux_read_description): Call
91 i386_linux_read_description.
92 (initialize_low_arch): Don't call init_registers_i386_XXX
93 functions, call initialize_low_tdesc.
94 * linux-x86-tdesc.c: New file.
95 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
96 (i386_get_ipa_tdesc_idx): Declare.
97 (i386_get_ipa_tdesc): Declare.
98 (initialize_low_tdesc): Declare.
99
2b68ef2f
YQ
1002017-09-05 Yao Qi <yao.qi@linaro.org>
101
102 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
103 instead of 0.
104
f7000548
YQ
1052017-09-05 Yao Qi <yao.qi@linaro.org>
106
107 * Makefile.in (IPA_OBJS): Add vec-ipa.o
108 * regcache.c (get_thread_regcache): Use VEC_length.
109 (init_register_cache): Likewise.
110 (regcache_cpy): Likewise.
111 (registers_to_string): Iterate reg_defs via VEC_iterate.
112 (find_regno): Likewise.
113 (find_register_by_number): Use VEC_index.
114 (register_size): Call find_register_by_number.
115 (register_data): Call find_register_by_number.
116 (supply_regblock): Use VEC_length.
117 (regcache_raw_read_unsigned): Likewise.
118 * tdesc.c (init_target_desc): Iterate reg_defs via
119 VEC_iterate.
120 (default_description): Update initializer.
121 (copy_target_description): Don't update field num_registers.
122 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
123 <num_registers>: Remove.
124
50a421ac
SM
1252017-09-04 Simon Marchi <simon.marchi@ericsson.com>
126
127 * Makefile.in (.SECONDARY): Define target.
128
23fdd69e
SM
1292017-09-03 Simon Marchi <simon.marchi@ericsson.com>
130
131 * linux-low.c (linux_wait_1): Adjust.
132 * server.c (queue_stop_reply_callback): Adjust.
133
0a2dde4a
SDJ
1342017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
135
136 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
137 QEnvironmentUnset and QEnvironmentReset packets.
138 (handle_query): Inform remote that QEnvironmentHexEncoded,
139 QEnvironmentUnset and QEnvironmentReset are supported.
140
6afd337d
SM
1412017-08-25 Simon Marchi <simon.marchi@ericsson.com>
142
143 * inferiors.h (inferior_target_data): Rename to ...
144 (thread_target_data): ... this.
145 (inferior_regcache_data): Rename to ...
146 (thread_regcache_data): ... this.
147 (set_inferior_regcache_data): Rename to ...
148 (set_thread_regcache_data): ... this.
149 * inferiors.c (inferior_target_data): Rename to ...
150 (thread_target_data): ... this.
151 (inferior_regcache_data): Rename to ...
152 (thread_regcache_data): ... this.
153 (set_inferior_regcache_data): Rename to ...
154 (set_thread_regcache_data): ... this.
155 (free_one_thread): Update.
156 * linux-low.h (get_thread_lwp): Update.
157 * regcache.c (get_thread_regcache): Update.
158 (regcache_invalidate_thread): Update.
159 (free_register_cache_thread): Update.
160 * win32-i386-low.c (update_debug_registers_callback): Update.
161 (win32_get_current_dr): Update.
162 * win32-low.c (thread_rec): Update.
163 (delete_thread_info): Update.
164 (continue_one_thread): Update.
165 (suspend_one_thread): Update.
166
a160cc46
SM
1672017-08-24 Simon Marchi <simon.marchi@ericsson.com>
168
169 * inferiors.c (set_inferior_target_data): Remove.
170 * inferiors.h (set_inferior_target_data): Remove.
171
6d580b63
YQ
1722017-08-18 Yao Qi <yao.qi@linaro.org>
173
174 * Makefile.in (OBS): Add selftest.o.
175 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
176 * configure, config.in: Re-generated.
177 * server.c: Include common/sefltest.h.
178 (captured_main): Handle option --selftest.
179
f5a29eb0
YQ
1802017-08-09 Yao Qi <yao.qi@linaro.org>
181
182 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
183 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
184 i386-avx-mpx.o and i386-mmx.o.
185 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
186 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
187 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
188 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
189 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
190 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
191 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
192 i386/amd64-avx-mpx.xml.
193
57757c2f
YQ
1942017-08-09 Yao Qi <yao.qi@linaro.org>
195
196 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
197 and x32-avx-avx512.o.
198 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
199 i386/x32-avx-avx512.xml.
200
229d26fc
SM
2012017-07-26 Simon Marchi <simon.marchi@ericsson.com>
202
203 * tracepoint.h (enum class fast_tpoint_collect_result): New
204 enumeration.
205 (fast_tracepoint_collecting): Change return type to
206 fast_tpoint_collect_result.
207 * tracepoint.c (fast_tracepoint_collecting): Likewise.
208 * linux-low.h: Include tracepoint.h.
209 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
210 fast_tpoint_collect_result.
211 * linux-low.c (handle_tracepoints): Adjust.
212 (linux_fast_tracepoint_collecting): Change return type to
213 fast_tpoint_collect_result.
214 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
215 linux_wait_1, stuck_in_jump_pad_callback,
216 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
217 proceed_one_lwp): Adjust to type change.
218
2e1e43e1
YQ
2192017-07-10 Yao Qi <yao.qi@linaro.org>
220
221 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
222
adc764e7
YQ
2232017-06-29 Yao Qi <yao.qi@linaro.org>
224
225 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
226 Remove.
227 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
228
a206891a
SM
2292017-06-20 Simon Marchi <simon.marchi@ericsson.com>
230
231 * Makefile.in (IPA_OBJS): Sort and format one item per line.
232
9a6c7d9c
SDJ
2332017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
234
235 * linux-low.c (linux_create_inferior): Adjust code to access the
236 environment information via 'gdb_environ' class.
237 * lynx-low.c (lynx_create_inferior): Likewise.
238 * server.c (our_environ): Make it an instance of 'gdb_environ'.
239 (get_environ): Return a pointer to 'our_environ'.
240 (captured_main): Initialize 'our_environ'.
241 * server.h (get_environ): Adjust prototype.
242 * spu-low.c (spu_create_inferior): Adjust code to access the
243 environment information via 'gdb_environ' class.
244
ae3e2ccf
SM
2452017-06-17 Simon Marchi <simon.marchi@ericsson.com>
246
247 * linux-low.c (linux_read_memory, linux_write_memory): Remove
248 usage of "register" keyword.
249
3e019bdc
SM
2502017-06-17 Simon Marchi <simon.marchi@ericsson.com>
251
252 * configure: Re-generate.
253
8465943a
SM
2542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
255
256 * configure: Re-generate.
257
cf0dd6f0
SM
2582017-06-17 Simon Marchi <simon.marchi@ericsson.com>
259
260 * Makefile.in (COMPILE.pre): Add "-x c++".
261
9845682b
SDJ
2622017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
263
264 * fork-child.c: Conditionally include <signal.h>.
265
aefd8b33
SDJ
2662017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
267
268 * server.c (handle_general_set): Handle new packet
269 "QStartupWithShell".
270 (handle_query): Add "QStartupWithShell" to the list of supported
271 packets.
272 (gdbserver_usage): Add help text explaining the
273 new "--startup-with-shell" and "--no-startup-with-shell" CLI
274 options.
275 (captured_main): Recognize and act upon the presence of the new
276 CLI options.
277
2090129c
SDJ
2782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
279 Pedro Alves <palves@redhat.com>
280
281 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
282 * configure: Regenerate.
283 * configure.srv (srv_linux_obj): Add "fork-child.o" and
284 "fork-inferior.o".
285 (i[34567]86-*-lynxos*): Likewise.
286 (spu*-*-*): Likewise.
287 * fork-child.c: New file.
288 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
289 and "environ.h".
290 (linux_ptrace_fun): New function.
291 (linux_create_inferior): Adjust function prototype to reflect
292 change on "target.h". Adjust function code to use
293 "fork_inferior".
294 (linux_request_interrupt): Delete "signal_pid".
295 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
296 (lynx_ptrace_fun): New function.
297 (lynx_create_inferior): Adjust function prototype to reflect
298 change on "target.h". Adjust function code to use
299 "fork_inferior".
300 * nto-low.c (nto_create_inferior): Adjust function prototype and
301 code to reflect change on "target.h". Update comments.
302 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
303 "common-terminal.h" and "environ.h".
304 (terminal_fd): Moved to fork-child.c.
305 (old_foreground_pgrp): Likewise.
306 (restore_old_foreground_pgrp): Likewise.
307 (last_status): Make it global.
308 (last_ptid): Likewise.
309 (our_environ): New variable.
310 (startup_with_shell): Likewise.
311 (program_name): Likewise.
312 (program_argv): Rename to...
313 (program_args): ...this.
314 (wrapper_argv): New variable.
315 (start_inferior): Delete function.
316 (get_exec_wrapper): New function.
317 (get_exec_file): Likewise.
318 (get_environ): Likewise.
319 (prefork_hook): Likewise.
320 (post_fork_inferior): Likewise.
321 (postfork_hook): Likewise.
322 (postfork_child_hook): Likewise.
323 (handle_v_run): Update code to deal with arguments coming from the
324 remote host. Update calls from "start_inferior" to
325 "create_inferior".
326 (captured_main): Likewise. Initialize environment variable. Call
327 "have_job_control".
328 * server.h (post_fork_inferior): New prototype.
329 (get_environ): Likewise.
330 (last_status): Declare.
331 (last_ptid): Likewise.
332 (signal_pid): Likewise.
333 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
334 (spu_ptrace_fun): New function.
335 (spu_create_inferior): Adjust function prototype to reflect change
336 on "target.h". Adjust function code to use "fork_inferior".
337 * target.c (target_terminal_init): New function.
338 (target_terminal_inferior): Likewise.
339 (target_terminal_ours): Likewise.
340 * target.h: Include <vector>.
341 (struct target_ops) <create_inferior>: Update prototype.
342 (create_inferior): Update macro.
343 * utils.c (gdb_flush_out_err): New function.
344 * win32-low.c (win32_create_inferior): Adjust function prototype
345 and code to reflect change on "target.h".
346
043a4934
SDJ
3472017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
348
349 * inferiors.c (switch_to_thread): New function.
350
15652511
SDJ
3512017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
352
353 * Makefile.in (SFILE): Add "common/job-control.c".
354 (OBS): Add "job-control.o".
355
21ea5acd
SDJ
3562017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
357
358 * Makefile: Remove "@host_makefile_frag@".
359
e13cb306
PA
3602017-05-05 Pedro Alves <palves@redhat.com>
361
362 * configure: Regenerate.
363
c94fee56
SDJ
3642017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
365
366 * configure: Regenerate.
367
a0ff9e1a
SM
3682017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
369
370 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
371 software_single_step change of return type to
372 std::vector<CORE_ADDR>.
373 * linux-low.c (install_software_single_step_breakpoints):
374 Likewise.
375 * linux-low.h (install_software_single_step_breakpoints):
376 Likewise.
377
be628ab8
SDJ
3782017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
379
380 * remote-utils.c: Include "gdb_termios.h" instead of
381 "terminal.h".
382 * terminal.h: Delete file.
383
7c5ded6a
SDJ
3842017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
385
386 * server.c: Include <vector>.
387 <program_argv, wrapper_argv>: Convert to std::vector.
388 (start_inferior): Rewrite function to use C++.
389 (handle_v_run): Likewise. Update code that calculates the argv
390 based on the vRun packet; use C++.
391 (captured_main): Likewise.
392
436252de
SM
3932017-04-06 Simon Marchi <simon.marchi@ericsson.com>
394
395 * server.c (handle_v_cont): Initialize thread_resume::thread
396 with null_ptid.
397
9bf2a700
PA
3982017-04-05 Pedro Alves <palves@redhat.com>
399
400 * configure: Regenerate.
401
a121b7c1
PA
4022017-04-05 Pedro Alves <palves@redhat.com>
403
404 * gdbreplay.c (sync_error): Constify.
405 * linux-x86-low.c (push_opcode): Constify.
406
21c8a587
PA
4072017-04-05 Pedro Alves <palves@redhat.com>
408
409 * win32-low.c (get_child_debug_event)
410 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
411 Report TARGET_WAITKIND_SPURIOUS instead.
412
fb32b4f7
PA
4132017-04-05 Pedro Alves <palves@redhat.com>
414
415 * remote-utils.c (remote_prepare, remote_open): Constify.
416 * remote-utils.h (remote_prepare, remote_open): Constify.
417 * server.c (captured_main): Constify 'port' handling.
418
65dd1e59
SM
4192017-04-04 Simon Marchi <simon.marchi@ericsson.com>
420
421 * Makefile.in (clean): Clear .deps.
422
8fa5b777
SM
4232017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
424
425 * .gitignore: Remove generated files, replace with wildcard.
426 * (clean): Replace removal of generated files with wildcard.
427 (version.c): Replace with...
428 (version-generated.c): ...this.
429 (xml-builtin.c): Replace with...
430 (xml-builtin-generated.c): ...this.
431 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
432 (%.c: *regformats*): Replace with...
433 (%-generated.c: *regformats*): ...this.
434
a12e714b
MF
4352017-03-27 Max Filippov <jcmvbkbc@gmail.com>
436
437 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
438 (xtensa_fill_gregset): Call collect_register_by_name for
439 threadptr register.
440 (xtensa_store_gregset): Call supply_register_by_name for
441 threadptr register.
442
1a09b50a
MF
4432017-03-27 Max Filippov <jcmvbkbc@gmail.com>
444
445 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
446 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
447 (xtensa_store_gregset): Call supply_register for all registers in
448 a0_regnum..a0_regnum + C0_NREGS range.
449
1a01e7c6
SM
4502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
451
452 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
453 (ax-ipa.o: ax.c): Remove.
454 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
455 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
456 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
457 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
458 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
459
36bc18a8
SM
4602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
461
462 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
463 (print-utils-ipa.o: ../common/print-utils.c): Remove.
464 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
465 (errors-ipa.o: ../common/errors.c): Remove.
466 (format-ipa.o: ../common/format.c): Remove.
467 (common-utils-ipa.o: ../common/common-utils.c): Remove.
468
a8ebe3d5
SM
4692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
470
471 * Makefile.in (%-ipa.o: %.c): New rule.
472 (tracepoint-ipa.o: tracepoint.c): Remove.
473 (utils-ipa.o: utils.c): Remove.
474 (remote-utils-ipa.o: remote-utils.c): Remove.
475 (regcache-ipa.o: regcache.c): Remove.
476 (i386-linux-ipa.o: i386-linux.c): Remove.
477 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
478 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
479 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
480 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
481 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
482 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
483 (amd64-linux-ipa.o: amd64-linux.c): Remove.
484 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
485 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
486 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
487 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
488 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
489 (aarch64-ipa.o: aarch64.c): Remove.
490 (s390-linux32-ipa.o: s390-linux32.c): Remove.
491 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
492 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
493 (s390-linux64-ipa.o: s390-linux64.c): Remove.
494 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
495 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
496 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
497 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
498 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
499 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
500 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
501 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
502 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
503 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
504 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
505 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
506 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
507 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
508 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
509 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
510 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
511 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
512 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
513 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
514 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
515 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
516 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
517 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
518 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
519 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
520 (tdesc-ipa.o: tdesc.c): Remove.
521 (x32-linux-ipa.o: x32-linux.c): Remove.
522 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
523 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
524
50cfacb7
SM
5252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
526
527 * Makefile.in (%.o: ../arch/%.c): New rule.
528 (arm.o: ../arch/arm.c): Remove.
529 (arm-linux.o: ../arch/arm-linux.c): Remove.
530 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
531 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
532
c5a22423
SM
5332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
534
535 * Makefile.in (%.o: ../nat/%.c): New rule.
536 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
537 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
538 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
539 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
540 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
541 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
542 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
543 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
544 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
545 (linux-personality.o: ../nat/linux-personality.c): Remove.
546 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
547 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
548 (x86-linux.o: ../nat/x86-linux.c): Remove.
549 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
550 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
551
6bda016b
SM
5522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
553
554 * Makefile.in (%.o: ../common/%.c): New rule.
555 (signals.o: ../common/signals.c): Remove.
556 (print-utils.o: ../common/print-utils.c): Remove.
557 (rsp-low.o: ../common/rsp-low.c): Remove.
558 (common-utils.o: ../common/common-utils.c): Remove.
559 (posix-strerror.o: ../common/posix-strerror.c): Remove.
560 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
561 (vec.o: ../common/vec.c): Remove.
562 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
563 (xml-utils.o: ../common/xml-utils.c): Remove.
564 (ptid.o: ../common/ptid.c): Remove.
565 (buffer.o: ../common/buffer.c): Remove.
566 (format.o: ../common/format.c): Remove.
567 (filestuff.o: ../common/filestuff.c): Remove.
568 (agent.o: ../common/agent.c): Remove.
569 (errors.o: ../common/errors.c): Remove.
570 (environ.o: ../common/environ.c): Remove.
571 (common-debug.o: ../common/common-debug.c): Remove.
572 (cleanups.o: ../common/cleanups.c): Remove.
573 (common-exceptions.o: ../common/common-exceptions.c): Remove.
574 (fileio.o: ../common/fileio.c): Remove.
575 (common-regcache.o: ../common/common-regcache.c): Remove.
576 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
577 (new-op.o: ../common/new-op.c): Remove.
578 (btrace-common.o: ../common/btrace-common.c): Remove.
579
21122961
SM
5802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
581
582 * Makefile.in (%.o: ../target/%.c): New rule.
583 (waitstatus.o: ../target/waitstatus.c): Remove.
584
c362e621
SM
5852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
586
587 * Makefile.in
588 (%.c: ../regformats/%.dat,
589 (%.c: ../regformats/arm/%.dat,
590 (%.c: ../regformats/i386/%.dat,
591 (%.c: ../regformats/rs6000/%.dat): New rules.
592 (aarch64.c): Remove.
593 (reg-arm.c): Remove.
594 (arm-with-iwmmxt.c): Remove.
595 (arm-with-vfpv2.c): Remove.
596 (arm-with-vfpv3.c): Remove.
597 (arm-with-neon.c): Remove.
598 (reg-bfin.c): Remove.
599 (reg-cris.c): Remove.
600 (reg-crisv32.c): Remove.
601 (i386.c): Remove.
602 (i386-linux.c): Remove.
603 (i386-avx.c): Remove.
604 (i386-avx-linux.c): Remove.
605 (i386-avx-avx512.c): Remove.
606 (i386-avx-avx512-linux.c): Remove.
607 (i386-mpx.c): Remove.
608 (i386-mpx-linux.c): Remove.
609 (i386-avx-mpx-avx512-pku.c): Remove.
610 (i386-avx-mpx-avx512-pku-linux.c): Remove.
611 (i386-avx-mpx.c): Remove.
612 (i386-avx-mpx-linux.c): Remove.
613 (i386-mmx.c): Remove.
614 (i386-mmx-linux.c): Remove.
615 (reg-ia64.c): Remove.
616 (reg-m32r.c): Remove.
617 (reg-m68k.c): Remove.
618 (reg-cf.c): Remove.
619 (mips-linux.c): Remove.
620 (mips-dsp-linux.c): Remove.
621 (mips64-linux.c): Remove.
622 (mips64-dsp-linux.c): Remove.
623 (nios2-linux.c): Remove.
624 (powerpc-32.c): Remove.
625 (powerpc-32l.c): Remove.
626 (powerpc-altivec32l.c): Remove.
627 (powerpc-cell32l.c): Remove.
628 (powerpc-vsx32l.c): Remove.
629 (powerpc-isa205-32l.c): Remove.
630 (powerpc-isa205-altivec32l.c): Remove.
631 (powerpc-isa205-vsx32l.c): Remove.
632 (powerpc-e500l.c): Remove.
633 (powerpc-64l.c): Remove.
634 (powerpc-altivec64l.c): Remove.
635 (powerpc-cell64l.c): Remove.
636 (powerpc-vsx64l.c): Remove.
637 (powerpc-isa205-64l.c): Remove.
638 (powerpc-isa205-altivec64l.c): Remove.
639 (powerpc-isa205-vsx64l.c): Remove.
640 (s390-linux32.c): Remove.
641 (s390-linux32v1.c): Remove.
642 (s390-linux32v2.c): Remove.
643 (s390-linux64.c): Remove.
644 (s390-linux64v1.c): Remove.
645 (s390-linux64v2.c): Remove.
646 (s390-te-linux64.c): Remove.
647 (s390-vx-linux64.c): Remove.
648 (s390-tevx-linux64.c): Remove.
649 (s390x-linux64.c): Remove.
650 (s390x-linux64v1.c): Remove.
651 (s390x-linux64v2.c): Remove.
652 (s390x-te-linux64.c): Remove.
653 (s390x-vx-linux64.c): Remove.
654 (s390x-tevx-linux64.c): Remove.
655 (tic6x-c64xp-linux.c): Remove.
656 (tic6x-c64x-linux.c): Remove.
657 (tic6x-c62x-linux.c): Remove.
658 (reg-sh.c): Remove.
659 (reg-sparc64.c): Remove.
660 (reg-spu.c): Remove.
661 (amd64.c): Remove.
662 (amd64-linux.c): Remove.
663 (amd64-avx.c): Remove.
664 (amd64-avx-linux.c): Remove.
665 (amd64-avx-avx512.c): Remove.
666 (amd64-avx-avx512-linux.c): Remove.
667 (amd64-mpx.c): Remove.
668 (amd64-mpx-linux.c): Remove.
669 (amd64-avx-mpx-avx512-pku.c): Remove.
670 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
671 (amd64-avx-mpx.c): Remove.
672 (amd64-avx-mpx-linux.c): Remove.
673 (x32.c): Remove.
674 (x32-linux.c): Remove.
675 (x32-avx.c): Remove.
676 (x32-avx-linux.c): Remove.
677 (x32-avx-avx512.c): Remove.
678 (x32-avx-avx512-linux.c): Remove.
679 (reg-xtensa.c): Remove.
680 (reg-tilegx.c): Remove.
681 (reg-tilegx32.c): Remove.
682
1672e0d9
SDJ
6832017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
684
685 * Makefile.in (SFILES): Add "common/environ.c".
686 (OBJS): Add "common/environ.h".
687
239b6d10
WT
6882017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
689
690 * configure.ac: Check if the fs_base and gs_base members of
691 `struct user_regs_struct' exist.
692 * config.in: Regenerated.
693 * configure: Likewise.
694
694b382c
AT
6952017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
696
697 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
698 target_read_memory.
699 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
700 (get_next_pcs_syscall_next_pc): Likewise.
701
7dc53023
LM
7022016-12-23 Luis Machado <lgustavo@codesourcery.com>
703
704 * win32-i386-low.c: Fix incorrect reference to a couple source files.
705 * nto-x86-low.c: Likewise.
706
ad02e4fe
SM
7072016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
708
709 * Makefile.in: Include disable-implicit-rules.mk.
710
dcb07cfa
PA
7112016-11-23 Pedro Alves <palves@redhat.com>
712
713 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
714 (debug_vprintf): Use std::chrono::steady_clock instead of
715 gettimeofday. Use '.' instead of ':'.
716 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
717 (get_timestamp): Use std::chrono::steady_clock instead of
718 gettimeofday.
719
8629c02c
SM
7202016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
721
722 * Makefile.in: Fix whitespace formatting.
723
b593ecca
SM
7242016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
725
726 * Makefile.in (SFILES, OBS): Flatten list and order
727 alphabetically.
728
9986ba08
PA
7292016-11-23 Pedro Alves <palves@redhat.com>
730
731 * event-loop.c (handle_file_event): Use warning.
732 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
733 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
734 Use warning.
735
4eefa7bc
PA
7362016-11-23 Pedro Alves <palves@redhat.com>
737
738 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
739 output.
740 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
741 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
742 debug_printf and debug_flush for debug output.
743 * server.c (handle_general_set): Likewise.
744 * thread-db.c (try_thread_db_load): Use debug_printf for debug
745 output.
746
5443506e
SM
7472016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
748
749 * Makefile.in (.c.o): Replace rule with ...
750 (%.o: %.c): ... this one.
751
3b165252
SM
7522016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
753
754 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
755 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
756 make.
757 * configure.ac: Remove checks for the make program.
758 * configure: Re-generate.
759
0bcda685
PA
7602016-10-28 Pedro Alves <palves@redhat.com>
761
762 * Makefile.in (CXX_DIALECT): Get from configure.
763 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
764 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
765 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
766 * config.in: Regenerate.
767 * configure: Regenerate.
768
c3805894
YQ
7692016-10-27 Yao Qi <yao.qi@linaro.org>
770
771 * linux-low.c (linux_supports_range_stepping): Return true if
772 can_software_single_step return true.
773
89342618
YQ
7742016-10-27 Yao Qi <yao.qi@linaro.org>
775
776 * inferiors.c (find_inferior_in_random): New function.
777 * inferiors.h (find_inferior_in_random): Declare.
778 * linux-low.c (linux_wait_for_event_filtered): Call
779 find_inferior_in_random instead of find_inferior.
780
e3652c84
YQ
7812016-10-27 Yao Qi <yao.qi@linaro.org>
782
783 * linux-low.c (linux_wait_1): If single-step breakpoints are
784 inserted, remove them.
785
5a04c4cf
PA
7862016-10-26 Pedro Alves <palves@redhat.com>
787
788 * linux-low.c (handle_extended_wait): Link parent/child fork
789 threads.
790 (linux_wait_1): Unlink them.
791 (linux_set_resume_request): Ignore resume requests for
792 already-resumed and unhandled fork child threads.
793 * linux-low.h (struct lwp_info) <fork_relative>: New field.
794 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
795 New functions.
796 (handle_v_requests) <vCont>: Don't call require_running.
797 * server.h (in_queued_stop_replies): New declaration.
798
cb93dc7f
YQ
7992016-10-24 Yao Qi <yao.qi@linaro.org>
800
801 PR server/20733
802 * linux-aarch64-low.c (append_insns): Cast the return value to
803 'uint32_t *'.
804
a1078bea
YQ
8052016-10-10 Yao Qi <yao.qi@linaro.org>
806
807 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
808
1fb77080
SDJ
8092016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
810
811 * target.c (target_supports_multi_process): New function, moved
812 from...
813 * target.h (target_supports_multi_process): ... here. Remove
814 macro.
815
39b5a3b9
TT
8162016-10-05 Tom Tromey <tom@tromey.com>
817
818 PR remote/20655:
819 * tracepoint.c (handle_tracepoint_bkpts): Check
820 ipa_error_tracepoint, not ipa_stopping_tracepoint.
821
c1d0b70a
YQ
8222016-10-05 Yao Qi <yao.qi@linaro.org>
823
824 * configure.srv: Update the path of arm-*.xml files.
825
0a69eedb
YQ
8262016-10-05 Terry Guo <terry.guo@arm.com>
827 Yao Qi <yao.qi@linaro.org>
828
829 * Makefile.in: Adjust the path of rules.
830 * configure.srv: Update the path of xml files.
831 * regformats/arm-with-iwmmxt.dat: Regenerated.
832 * regformats/arm-with-neon.dat: Likewise.
833 * regformats/arm-with-vfpv2.dat: Likewise.
834 * regformats/arm-with-vfpv3.dat Likewise.
835
17e16485
YQ
8362016-09-30 Yao Qi <yao.qi@linaro.org>
837
838 PR gdbserver/20627
839 * target.c (target_stop_and_wait): Don't call
840 target_continue_no_signal, use resume_stop instead.
841
edeeb602
YQ
8422016-09-26 Yao Qi <yao.qi@linaro.org>
843
844 * linux-low.c (linux_wait_1): Call debug_exit.
845
503b1c39
PA
8462016-09-23 Pedro Alves <palves@redhat.com>
847
848 * Makefile.in (SFILES): Add common/new-op.c.
849 (OBS): Add common/new-op.o.
850 (new-op.o): New rule.
851
74172ecf
SM
8522016-09-21 Simon Marchi <simon.marchi@ericsson.com>
853
854 * .gitinore: Ignore more files.
855
fc6cda2e
YQ
8562016-09-21 Yao Qi <yao.qi@linaro.org>
857
858 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
859 23.
860
bc1e6c81
SDJ
8612016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
862
863 * server.c (start_inferior): Call target_mourn_inferior instead of
864 mourn_inferior; pass ptid_t argument to it.
865 (resume): Likewise.
866 (handle_target_event): Likewise.
867 * target.c (target_mourn_inferior): New function.
868 * target.h (mourn_inferior): Delete macro.
869
0e00e962
AA
8702016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
871
872 * linux-low.c (lwp_is_stepping): New function.
873
1d8cb77d
CL
8742016-09-06 Carl Love <cel@us.ibm.com>
875
876 * server.c (start_inferior): Fixed comment, requested comment change
877 didn't get updated correctly. Removed reference to ptrace () call as
878 it is only true on Linux systems.
879
7313bced
CL
8802016-09-06 Carl Love <cel@us.ibm.com>
881
882 * server.c (start_inferior): Do not call
883 function target_post_create_inferior () if the
884 inferior process has already exited.
885
cf6de44d
PA
8862016-09-05 Pedro Alves <palves@redhat.com>
887
888 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
889 (COMPILE.pre, CC_LD): Use CXX directly.
890 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
891 * acinclude.m4: Don't include build-with-cxx.m4.
892 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
893 * configure: Regenerate.
894
c1da6748
AT
8952016-09-02 Akash Trehan <akash.trehan123@gmail.com>
896
897 PR gdb/19495
898 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
899 call writing data to own_buf.
900
f2b9e3df
SDJ
9012016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
902
903 * target.c (mywait): Call target_wait instead of
904 the_target->wait.
905 (target_wait): New function.
906
049a8570
SDJ
9072016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
908
909 * server.c (start_inferior): New variable 'ptid'. Replace calls
910 to the_target->resume by target_continue{,_no_signal}, depending
911 on the case.
912 * target.c (target_stop_and_wait): Call target_continue_no_signal
913 instead of the_target->resume.
914 (target_continue): New function.
915
3aa5cfa0
AT
9162016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
917
918 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
919
754653a7
AZ
9202016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
921
922 PR server/20491
923 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
924 ps_prochandle.
925 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
926 * linux-arm-low.c (ps_get_thread_area): Likewise.
927 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
928 * linux-m68k-low.c (ps_get_thread_area): Likewise.
929 * linux-mips-low.c (ps_get_thread_area): Likewise.
930 * linux-nios2-low.c (ps_get_thread_area): Likewise.
931 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
932 * linux-x86-low.c (ps_get_thread_area): Likewise.
933 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
934
ed036b40
PA
9352016-08-19 Pedro Alves <palves@redhat.com>
936
937 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
938
c8ef42ee
PA
9392016-08-19 Pedro Alves <palves@redhat.com>
940
941 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
942 comment. Use memcpy instead of casting through unsigned long.
943
9c235a72
PA
9442016-08-19 Pedro Alves <palves@redhat.com>
945
946 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
947 allocating around 0x80000000.
948
201506da
PA
9492016-08-19 Pedro Alves <palves@redhat.com>
950
951 PR gdb/20415
952 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
953 (x32-avx512-linux-ipa.o): New rules.
954 * configure.ac (x86_64-*-linux*): New x32 check.
955 * configure.srv (ipa_x32_linux_regobj): New.
956 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
957 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
958 descriptions.
959 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
960 descriptions.
961 * configure: Regenerate.
962
f348d89a
PA
9632016-08-09 Pedro Alves <palves@redhat.com>
964
965 PR gdb/18653
966 * Makefile.in (OBS): Add signals-state-save-restore.o.
967 (signals-state-save-restore.o): New rule.
968 * config.in: Regenerate.
969 * configure: Regenerate.
970 * linux-low.c: Include "signals-state-save-restore.h".
971 (linux_create_inferior): Call
972 restore_original_signals_state.
973 * server.c: Include "dispositions-save-restore.h".
974 (captured_main): Call save_original_signals_state.
975
1baf5149
PA
9762016-08-05 Pedro Alves <palves@redhat.com>
977
978 * configure: Regenerate.
979
fcd4a73d
YQ
9802016-08-04 Yao Qi <yao.qi@linaro.org>
981
982 * linux-low.c (regsets_fetch_inferior_registers): Check
983 errno is ESRCH or not.
984
979659d0
YQ
9852016-08-02 Yao Qi <yao.qi@linaro.org>
986
987 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
988 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
989 (thread_db_load_search): Update.
990 (try_thread_db_load_1): Don't look for td_ta_event_addr,
991 td_ta_set_event and td_ta_event_getmsg.
992
6598661d
PA
9932016-07-26 Pedro Alves <palves@redhat.com>
994
995 PR server/20414
996 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
997 of unsigned long for 64-bit registers and use uint32_t instead of
998 unsigned int for 32-bit registers.
999
9cf12d57
PA
10002016-07-26 Pedro Alves <palves@redhat.com>
1001
1002 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1003 to 'ptrace'.
1004
305450ed
TT
10052016-07-21 Tom Tromey <tom@tromey.com>
1006
1007 * configure: Rebuild.
1008
2583da7c
YQ
10092016-07-21 Yao Qi <yao.qi@linaro.org>
1010
1011 * mem-break.c (find_gdb_breakpoint): Cast bp to
1012 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1013
21536b36
YQ
10142016-07-21 Yao Qi <yao.qi@linaro.org>
1015
1016 * server.c (handle_v_requests): Support s and S actions
1017 if target_supports_software_single_step return true.
1018
8901d193
YQ
10192016-07-21 Yao Qi <yao.qi@linaro.org>
1020
1021 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1022 is resume_step, call maybe_hw_step.
1023 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1024 and unstop them.
1025 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1026 breakpoints or not.
1027 (proceed_one_lwp): If resume request is resume_step, install
1028 reinsert breakpoints and call maybe_hw_step.
1029
0e9a339e
YQ
10302016-07-21 Yao Qi <yao.qi@linaro.org>
1031
1032 * linux-low.c (proceed_one_lwp): Declare.
1033 (linux_resume_one_thread): Remove local variable 'step'.
1034 Lift code enqueue signal. Call proceed_one_lwp instead of
1035 linux_resume_one_lwp.
1036
4281b351
YQ
10372016-07-21 Yao Qi <yao.qi@linaro.org>
1038
1039 * linux-low.c (linux_resume_one_thread): Call
1040 enqueue_pending_signal.
1041
984a2c04
YQ
10422016-07-21 Yao Qi <yao.qi@linaro.org>
1043
1044 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1045 * inferiors.c (do_restore_current_thread_cleanup): New function.
1046 (make_cleanup_restore_current_thread): Likewise.
1047 * linux-low.c (install_software_single_step_breakpoints): Call
1048 make_cleanup_restore_current_thread. Switch current_thread to
1049 thread.
1050
bec903c9
YQ
10512016-07-21 Yao Qi <yao.qi@linaro.org>
1052
1053 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1054 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1055 (clone_one_breakpoint): Likewise.
1056 (delete_reinsert_breakpoints): Change parameter to thread.
1057 Callers updated.
1058 (has_reinsert_breakpoints): Likewise.
1059 (uninsert_reinsert_breakpoints): Likewise.
1060 (reinsert_reinsert_breakpoints): Likewise.
1061 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1062 (delete_reinsert_breakpoints): Likewise.
1063 (reinsert_reinsert_breakpoints): Likewise.
1064 (uninsert_reinsert_breakpoints): Likewise.
1065 (has_reinsert_breakpoints): Likewise.
1066
63c40ec7
YQ
10672016-07-21 Yao Qi <yao.qi@linaro.org>
1068
1069 * inferiors.c (get_thread_process): Make parameter const.
1070 * inferiors.h (get_thread_process): Update declaration.
1071 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1072 Add new parameters child_thread and parent_thread. Callers
1073 updated.
1074 * mem-break.h (clone_all_breakpoints): Update declaration.
1075
9aa76cd0
YQ
10762016-07-21 Yao Qi <yao.qi@linaro.org>
1077
1078 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1079 <command_list, handler>: Remove.
1080 (struct gdb_breakpoint): New.
1081 (struct other_breakpoint): New.
1082 (struct reinsert_breakpoint): New.
1083 (is_gdb_breakpoint): New function.
1084 (any_persistent_commands): Update command_list if
1085 is_gdb_breakpoint returns true.
1086 (set_breakpoint): Create breakpoints according to their types.
1087 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1088 (set_gdb_breakpoint_1): Likewise.
1089 (set_gdb_breakpoint): Likewise.
1090 (clear_breakpoint_conditions): Change parameter type to
1091 'struct gdb_breakpoint *'.
1092 (clear_breakpoint_commands): Likewise.
1093 (clear_breakpoint_conditions_and_commands): Likewise.
1094 (add_condition_to_breakpoint): Likewise.
1095 (add_breakpoint_condition): Likewise.
1096 (add_commands_to_breakpoint): Likewise.
1097 (check_breakpoints): Check other_breakpoint.
1098 (clone_one_breakpoint): Clone breakpopint according to its type.
1099 * mem-break.h (struct gdb_breakpoint): Declare.
1100 (set_gdb_breakpoint): Update declaration.
1101 (clear_breakpoint_conditions_and_commands): Likewise.
1102 (add_breakpoint_condition): Likewise.
1103 (add_breakpoint_commands): Likewise.
1104 * server.c (process_point_options): Change parameter type to
1105 'struct gdb_breakpoint *'.
1106
811f8301
YQ
11072016-07-21 Yao Qi <yao.qi@linaro.org>
1108
1109 * mem-break.c (set_breakpoint_at): Rename it to ...
1110 (set_breakpoint_type_at): ... it.
1111 (set_breakpoint_at): Call set_breakpoint_type_at.
1112 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1113 * mem-break.h (set_breakpoint_at): Update comments.
1114
b1c51e36
CLT
11152016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1116
1117 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1118 to buf parameter.
1119 (nios2_store_gregset): Likewise.
1120
ced2dffb
PA
11212016-07-01 Pedro Alves <palves@redhat.com>
1122 Antoine Tremblay <antoine.tremblay@ericsson.com>
1123
1124 * linux-low.c: Change interface to take the target lwp_info
1125 pointer directly and return void. Handle detaching from a zombie
1126 thread.
1127 (linux_detach_lwp_callback): New function.
1128 (linux_detach): Detach from the leader thread after detaching from
1129 the clone threads.
1130
2ac09a5b
YQ
11312016-06-28 Yao Qi <yao.qi@linaro.org>
1132
1133 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1134 for variable new_offset.
1135 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1136 (aarch64_ftrace_insn_reloc_cb): Likewise.
1137 (aarch64_ftrace_insn_reloc_tb): Likewise.
1138 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1139 PRIx64 instead of PRIx32.
1140
79e7fd4f
YQ
11412016-06-28 Yao Qi <yao.qi@linaro.org>
1142
1143 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1144 (the_low_target): Install arm_get_syscall_trapinfo.
1145
061fc021
YQ
11462016-06-28 Yao Qi <yao.qi@linaro.org>
1147
1148 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1149 function.
1150 (the_low_target): Install aarch64_get_syscall_trapinfo.
1151
4cc32bec
YQ
11522016-06-28 Yao Qi <yao.qi@linaro.org>
1153
1154 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1155 Callers updated.
1156 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1157 Remove parameter sysno.
1158 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1159 sysret.
1160
782c1122
AA
11612016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1162
1163 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1164 (s390_emit_ne_goto): Likewise.
1165 (s390_emit_lt_goto): Likewise.
1166 (s390_emit_le_goto): Likewise.
1167 (s390_emit_gt_goto): Likewise.
1168 (s390_emit_ge_goto): Likewise.
1169 (s390x_emit_eq_goto): Likewise.
1170 (s390x_emit_ne_goto): Likewise.
1171 (s390x_emit_lt_goto): Likewise.
1172 (s390x_emit_le_goto): Likewise.
1173 (s390x_emit_gt_goto): Likewise.
1174 (s390x_emit_ge_goto): Likewise.
1175 (s390_emit_ops_impl): Mark variable static.
1176 (s390x_emit_ops): Likewise.
1177
2e7b624b
YQ
11782016-06-17 Yao Qi <yao.qi@linaro.org>
1179
1180 * linux-low.c (handle_extended_wait): Call
1181 uninsert_reinsert_breakpoints for the parent process. Remove
1182 reinsert breakpoints from the child process. Reinsert them to
1183 the parent process when vfork is done.
1184 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1185 (reinsert_reinsert_breakpoints): New function.
1186 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1187 (reinsert_reinsert_breakpoints): Declare.
1188
8a81c5d7
YQ
11892016-06-17 Yao Qi <yao.qi@linaro.org>
1190
1191 * linux-low.c (handle_extended_wait): If the parent is doing
1192 step-over, remove the reinsert breakpoints from the forked child.
1193
f50bf8e5
YQ
11942016-06-17 Yao Qi <yao.qi@linaro.org>
1195
1196 * linux-low.c (unsuspend_all_lwps): Declare.
1197 (linux_low_filter_event): If thread exited, call finish_step_over.
1198 If step-over is finished, unsuspend other threads.
1199
8376a3cb
YQ
12002016-06-17 Yao Qi <yao.qi@linaro.org>
1201
1202 * linux-low.c (linux_resume_one_lwp_throw): Assert
1203 has_reinsert_breakpoints returns false.
1204 * mem-break.c (delete_disabled_breakpoints): Assert
1205 bp type isn't reinsert_breakpoint.
1206
f79b145d
YQ
12072016-06-17 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-low.c (maybe_hw_step): New function.
1210 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1211 (finish_step_over): Switch current_thread to lwp temporarily,
1212 and assert has_reinsert_breakpoints returns true.
1213 (proceed_one_lwp): Call maybe_hw_step.
1214 * mem-break.c (has_reinsert_breakpoints): New function.
1215 * mem-break.h (has_reinsert_breakpoints): Declare.
1216
0ae534d2
JT
12172016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1218
1219 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1220
fcdad592
YQ
12212016-05-17 Yao Qi <yao.qi@linaro.org>
1222
1223 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1224 instead of find_inferior.
1225
9e784964
YQ
12262016-05-05 Yao Qi <yao.qi@linaro.org>
1227
1228 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1229 Initialize res to zero.
1230
cf2ebb6e
YQ
12312016-05-05 Yao Qi <yao.qi@linaro.org>
1232
1233 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1234 to uint32_t.
1235
c1aebf87
UW
12362016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1237
1238 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1239 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1240 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1241
35fd2deb 12422016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1243 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1244
1245 * tracepoint.c (write_inferior_int8): New function.
1246 (cmd_qtenable_disable): Write enable flag using
1247 write_inferior_int8.
1248
484b3c32
YQ
12492016-04-25 Yao Qi <yao.qi@linaro.org>
1250
1251 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1252 (need_step_over_p): Return zero if the LWP has pending signals
1253 can be delivered on software single step target.
1254
85ba7d86
YQ
12552016-04-25 Yao Qi <yao.qi@linaro.org>
1256
1257 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1258 return instead of error.
1259
3539aa13
YQ
12602016-04-22 Yao Qi <yao.qi@linaro.org>
1261
1262 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1263 to 23.
1264
5b061e98
YQ
12652016-04-22 Yao Qi <yao.qi@linaro.org>
1266
1267 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1268 signal when stepping over breakpoint with software single
1269 step.
1270
3451269c
PA
12712016-04-21 Pedro Alves <palves@redhat.com>
1272
1273 * linux-s390-low.c (s390_collect_ptrace_register)
1274 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1275 add casts.
1276 (s390_check_regset): Use void * instead of gdb_byte *.
1277
a2358508
PA
12782016-04-20 Pedro Alves <palves@redhat.com>
1279
1280 * configure: Renegerate.
1281
6885166d
YQ
12822016-04-20 Yao Qi <yao.qi@linaro.org>
1283
1284 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1285 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1286 number 16.
1287 (arm_store_gregset): Likewise.
1288
2b863f51
WT
12892016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1290
1291 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1292 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1293 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1294 (amd64-avx-mpx-linux.c): New rules.
1295 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1296 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1297 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1298 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1299 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1300 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1301 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1302 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1303 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1304 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1305 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1306 * linux-x86-low.c (x86_linux_read_description): Add case for
1307 X86_XSTATE_AVX_MPX_MASK.
1308 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1309 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1310 init_registers_i386_avx_mpx_linux.
1311 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1312 (initialize_low_tracepoint): Call
1313 init_registers_i386_avx_mpx_linux.
1314 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1315 (initialize_low_tracepoint): Call
1316 init_registers_amd64_avx_mpx_linux.
1317 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1318 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1319 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1320 declarations.
1321
9b30624b
PA
13222016-04-18 Pedro Alves <palves@redhat.com>
1323
1324 * configure: Regenerate.
1325
45e3745e
AT
13262016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1327
1328 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1329 (aarch64_emit_sub): Likewise.
1330
2afc13ff
PA
13312016-04-12 Pedro Alves <palves@redhat.com>
1332
1333 * utils.c (prepare_to_throw_exception): Delete.
1334
6e774b13
SM
13352016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1336
1337 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1338
4dca19f8
MK
13392016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1340
1341 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1342
d0a9981f
MK
13432016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1344
1345 * linux-aarch64-ipa.c: Add <elf.h> include.
1346 * linux-ppc-ipa.c: Add <elf.h> include.
1347 * linux-s390-ipa.c: Add <elf.h> include.
1348
252db07e
MK
13492016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1350
1351 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1352 (get_raw_reg_ptr): Likewise.
1353 (get_trace_state_variable_value_ptr): Likewise.
1354 (set_trace_state_variable_value_ptr): Likewise.
1355 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1356 char *.
1357
14e2b6d9
MK
13582016-03-31 Wei-cheng Wang <cole945@gmail.com>
1359 Marcin Kościelnicki <koriakin@0x04.net>
1360
1361 PR/17221
1362 * linux-ppc-low.c (emit_insns): New function.
1363 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1364 (ppc_emit_prologue): New function.
1365 (ppc_emit_epilogue): New function.
1366 (ppc_emit_add): New function.
1367 (ppc_emit_sub): New function.
1368 (ppc_emit_mul): New function.
1369 (ppc_emit_lsh): New function.
1370 (ppc_emit_rsh_signed): New function.
1371 (ppc_emit_rsh_unsigned): New function.
1372 (ppc_emit_ext): New function.
1373 (ppc_emit_zero_ext): New function.
1374 (ppc_emit_log_not): New function.
1375 (ppc_emit_bit_and): New function.
1376 (ppc_emit_bit_or): New function.
1377 (ppc_emit_bit_xor): New function.
1378 (ppc_emit_bit_not): New function.
1379 (ppc_emit_equal): New function.
1380 (ppc_emit_less_signed): New function.
1381 (ppc_emit_less_unsigned): New function.
1382 (ppc_emit_ref): New function.
1383 (ppc_emit_const): New function.
1384 (ppc_emit_reg): New function.
1385 (ppc_emit_pop): New function.
1386 (ppc_emit_stack_flush): New function.
1387 (ppc_emit_swap): New function.
1388 (ppc_emit_stack_adjust): New function.
1389 (ppc_emit_call): New function.
1390 (ppc_emit_int_call_1): New function.
1391 (ppc_emit_void_call_2): New function.
1392 (ppc_emit_if_goto): New function.
1393 (ppc_emit_goto): New function.
1394 (ppc_emit_eq_goto): New function.
1395 (ppc_emit_ne_goto): New function.
1396 (ppc_emit_lt_goto): New function.
1397 (ppc_emit_le_goto): New function.
1398 (ppc_emit_gt_goto): New function.
1399 (ppc_emit_ge_goto): New function.
1400 (ppc_write_goto_address): New function.
1401 (ppc_emit_ops_impl): New static variable.
1402 (ppc64v1_emit_prologue): New function.
1403 (ppc64v2_emit_prologue): New function.
1404 (ppc64_emit_epilogue): New function.
1405 (ppc64_emit_add): New function.
1406 (ppc64_emit_sub): New function.
1407 (ppc64_emit_mul): New function.
1408 (ppc64_emit_lsh): New function.
1409 (ppc64_emit_rsh_signed): New function.
1410 (ppc64_emit_rsh_unsigned): New function.
1411 (ppc64_emit_ext): New function.
1412 (ppc64_emit_zero_ext): New function.
1413 (ppc64_emit_log_not): New function.
1414 (ppc64_emit_bit_and): New function.
1415 (ppc64_emit_bit_or): New function.
1416 (ppc64_emit_bit_xor): New function.
1417 (ppc64_emit_bit_not): New function.
1418 (ppc64_emit_equal): New function.
1419 (ppc64_emit_less_signed): New function.
1420 (ppc64_emit_less_unsigned): New function.
1421 (ppc64_emit_ref): New function.
1422 (ppc64_emit_const): New function.
1423 (ppc64v1_emit_reg): New function.
1424 (ppc64v2_emit_reg): New function.
1425 (ppc64_emit_pop): New function.
1426 (ppc64_emit_stack_flush): New function.
1427 (ppc64_emit_swap): New function.
1428 (ppc64v1_emit_call): New function.
1429 (ppc64v2_emit_call): New function.
1430 (ppc64v1_emit_int_call_1): New function.
1431 (ppc64v2_emit_int_call_1): New function.
1432 (ppc64v1_emit_void_call_2): New function.
1433 (ppc64v2_emit_void_call_2): New function.
1434 (ppc64_emit_if_goto): New function.
1435 (ppc64_emit_eq_goto): New function.
1436 (ppc64_emit_ne_goto): New function.
1437 (ppc64_emit_lt_goto): New function.
1438 (ppc64_emit_le_goto): New function.
1439 (ppc64_emit_gt_goto): New function.
1440 (ppc64_emit_ge_goto): New function.
1441 (ppc64v1_emit_ops_impl): New static variable.
1442 (ppc64v2_emit_ops_impl): New static variable.
1443 (ppc_emit_ops): New function.
1444 (linux_low_target): Wire in ppc_emit_ops.
1445
a2174ba4
MK
14462016-03-31 Wei-cheng Wang <cole945@gmail.com>
1447 Marcin Kościelnicki <koriakin@0x04.net>
1448
1449 PR/17221
1450 * Makefile.in: Add powerpc-*-ipa.o
1451 * configure.srv: Add ipa_obj for powerpc*-linux.
1452 * linux-ppc-ipa.c: New file.
1453 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1454 includes.
1455 (PPC_FIELD): New macro.
1456 (PPC_SEXT): New macro.
1457 (PPC_OP6): New macro.
1458 (PPC_BO): New macro.
1459 (PPC_LI): New macro.
1460 (PPC_BD): New macro.
1461 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1462 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1463 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1464 (ppc_get_thread_area): New function.
1465 (is_elfv2_inferior): New function.
1466 (gen_ds_form): New function.
1467 (GEN_STD): New macro.
1468 (GEN_STDU): New macro.
1469 (GEN_LD): New macro.
1470 (GEN_LDU): New macro.
1471 (gen_d_form): New function.
1472 (GEN_ADDI): New macro.
1473 (GEN_ADDIS): New macro.
1474 (GEN_LI): New macro.
1475 (GEN_LIS): New macro.
1476 (GEN_ORI): New macro.
1477 (GEN_ORIS): New macro.
1478 (GEN_LWZ): New macro.
1479 (GEN_STW): New macro.
1480 (GEN_STWU): New macro.
1481 (gen_xfx_form): New function.
1482 (GEN_MFSPR): New macro.
1483 (GEN_MTSPR): New macro.
1484 (GEN_MFCR): New macro.
1485 (GEN_MTCR): New macro.
1486 (GEN_SYNC): New macro.
1487 (GEN_LWSYNC): New macro.
1488 (gen_x_form): New function.
1489 (GEN_OR): New macro.
1490 (GEN_MR): New macro.
1491 (GEN_LWARX): New macro.
1492 (GEN_STWCX): New macro.
1493 (GEN_CMPW): New macro.
1494 (gen_md_form): New function.
1495 (GEN_RLDICL): New macro.
1496 (GEN_RLDICR): New macro.
1497 (gen_i_form): New function.
1498 (GEN_B): New macro.
1499 (GEN_BL): New macro.
1500 (gen_b_form): New function.
1501 (GEN_BNE): New macro.
1502 (GEN_LOAD): New macro.
1503 (GEN_STORE): New macro.
1504 (gen_limm): New function.
1505 (gen_atomic_xchg): New function.
1506 (gen_call): New function.
1507 (ppc_relocate_instruction): New function.
1508 (ppc_install_fast_tracepoint_jump_pad): New function.
1509 (ppc_get_min_fast_tracepoint_insn_len): New function.
1510 (ppc_get_ipa_tdesc_idx): New function.
1511 (the_low_target): Wire in the new functions.
1512 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1513 tdescs.
1514 * linux-ppc-tdesc.h: New file.
1515
a13c4696
MK
15162016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1517
1518 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1519 (alloc_jump_pad_buffer): New function.
1520 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1521 (alloc_jump_pad_buffer): New function.
1522 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1523 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1524 (alloc_jump_pad_buffer): New function.
1525 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1526 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1527 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1528 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1529
1cda1512
MK
15302016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1531
1532 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1533 * linux-amd64-ipa.c: Likewise.
1534 * linux-i386-ipa.c: Likewise.
1535 * linux-s390-ipa.c: Likewise.
1536 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1537 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1538 set_trace_state_variable_value_ptr.
1539 (struct ipa_sym_addresses): Likewise.
1540 (symbol_list): Likewise.
1541 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1542 accessing gdb_collect directly.
1543 (gdb_collect_ptr_type): New typedef.
1544 (get_raw_reg_ptr_type): New typedef.
1545 (get_trace_state_variable_value_ptr_type): New typedef.
1546 (set_trace_state_variable_value_ptr_type): New typedef.
1547 (gdb_collect_ptr): New global.
1548 (get_raw_reg_ptr): New global.
1549 (get_trace_state_variable_value_ptr): New global.
1550 (set_trace_state_variable_value_ptr): New global.
1551 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1552 accessing get_raw_reg directly.
1553 (get_get_tsv_func_addr): Likewise for
1554 get_trace_state_variable_value_ptr.
1555 (get_set_tsv_func_addr): Likewise for
1556 set_trace_state_variable_value_ptr.
1557 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1558
72fb5488
SM
15592016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1560
1561 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1562
28170b88
MK
15632016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1564
1565 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1566 packets.
1567 (relocate_instruction): Remove own_buf.
1568 * server.c (own_buf): Make global.
1569 (handle_v_requests): Make global.
1570 * server.h (own_buf): New declaration.
1571 (handle_v_requests): New prototype.
1572
f39e8743
MK
15732016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1574
1575 PR 18377
1576 * linux-s390-low.c (add_insns): New function.
1577 (s390_emit_prologue): New function.
1578 (s390_emit_epilogue): New function.
1579 (s390_emit_add): New function.
1580 (s390_emit_sub): New function.
1581 (s390_emit_mul): New function.
1582 (s390_emit_lsh): New function.
1583 (s390_emit_rsh_signed): New function.
1584 (s390_emit_rsh_unsigned): New function.
1585 (s390_emit_ext): New function.
1586 (s390_emit_log_not): New function.
1587 (s390_emit_bit_and): New function.
1588 (s390_emit_bit_or): New function.
1589 (s390_emit_bit_xor): New function.
1590 (s390_emit_bit_not): New function.
1591 (s390_emit_equal): New function.
1592 (s390_emit_less_signed): New function.
1593 (s390_emit_less_unsigned): New function.
1594 (s390_emit_ref): New function.
1595 (s390_emit_if_goto): New function.
1596 (s390_emit_goto): New function.
1597 (s390_write_goto_address): New function.
1598 (s390_emit_litpool): New function.
1599 (s390_emit_const): New function.
1600 (s390_emit_call): New function.
1601 (s390_emit_reg): New function.
1602 (s390_emit_pop): New function.
1603 (s390_emit_stack_flush): New function.
1604 (s390_emit_zero_ext): New function.
1605 (s390_emit_swap): New function.
1606 (s390_emit_stack_adjust): New function.
1607 (s390_emit_set_r2): New function.
1608 (s390_emit_int_call_1): New function.
1609 (s390_emit_void_call_2): New function.
1610 (s390_emit_eq_goto): New function.
1611 (s390_emit_ne_goto): New function.
1612 (s390_emit_lt_goto): New function.
1613 (s390_emit_le_goto): New function.
1614 (s390_emit_gt_goto): New function.
1615 (s390_emit_ge_goto): New function.
1616 (s390x_emit_prologue): New function.
1617 (s390x_emit_epilogue): New function.
1618 (s390x_emit_add): New function.
1619 (s390x_emit_sub): New function.
1620 (s390x_emit_mul): New function.
1621 (s390x_emit_lsh): New function.
1622 (s390x_emit_rsh_signed): New function.
1623 (s390x_emit_rsh_unsigned): New function.
1624 (s390x_emit_ext): New function.
1625 (s390x_emit_log_not): New function.
1626 (s390x_emit_bit_and): New function.
1627 (s390x_emit_bit_or): New function.
1628 (s390x_emit_bit_xor): New function.
1629 (s390x_emit_bit_not): New function.
1630 (s390x_emit_equal): New function.
1631 (s390x_emit_less_signed): New function.
1632 (s390x_emit_less_unsigned): New function.
1633 (s390x_emit_ref): New function.
1634 (s390x_emit_if_goto): New function.
1635 (s390x_emit_const): New function.
1636 (s390x_emit_call): New function.
1637 (s390x_emit_reg): New function.
1638 (s390x_emit_pop): New function.
1639 (s390x_emit_stack_flush): New function.
1640 (s390x_emit_zero_ext): New function.
1641 (s390x_emit_swap): New function.
1642 (s390x_emit_stack_adjust): New function.
1643 (s390x_emit_int_call_1): New function.
1644 (s390x_emit_void_call_2): New function.
1645 (s390x_emit_eq_goto): New function.
1646 (s390x_emit_ne_goto): New function.
1647 (s390x_emit_lt_goto): New function.
1648 (s390x_emit_le_goto): New function.
1649 (s390x_emit_gt_goto): New function.
1650 (s390x_emit_ge_goto): New function.
1651 (s390_emit_ops): New function.
1652 (struct linux_target_ops): Fill in emit_ops hook.
1653
abd9baf9
MK
16542016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1655
1656 PR 18377
1657 * Makefile.in: Add s390 IPA files.
1658 * configure.srv: Build IPA for s390.
1659 * linux-s390-ipa.c: New file.
1660 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1661 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1662 (tdesc_s390_linux32): Likewise.
1663 (init_registers_s390_linux32v1): Likewise.
1664 (tdesc_s390_linux32v1): Likewise.
1665 (init_registers_s390_linux32v2): Likewise.
1666 (tdesc_s390_linux32v2): Likewise.
1667 (init_registers_s390_linux64): Likewise.
1668 (tdesc_s390_linux64): Likewise.
1669 (init_registers_s390_linux64v1): Likewise.
1670 (tdesc_s390_linux64v1): Likewise.
1671 (init_registers_s390_linux64v2): Likewise.
1672 (tdesc_s390_linux64v2): Likewise.
1673 (init_registers_s390_te_linux64): Likewise.
1674 (tdesc_s390_te_linux64): Likewise.
1675 (init_registers_s390_vx_linux64): Likewise.
1676 (tdesc_s390_vx_linux64): Likewise.
1677 (init_registers_s390_tevx_linux64): Likewise.
1678 (tdesc_s390_tevx_linux64): Likewise.
1679 (init_registers_s390x_linux64): Likewise.
1680 (tdesc_s390x_linux64): Likewise.
1681 (init_registers_s390x_linux64v1): Likewise.
1682 (tdesc_s390x_linux64v1): Likewise.
1683 (init_registers_s390x_linux64v2): Likewise.
1684 (tdesc_s390x_linux64v2): Likewise.
1685 (init_registers_s390x_te_linux64): Likewise.
1686 (tdesc_s390x_te_linux64): Likewise.
1687 (init_registers_s390x_vx_linux64): Likewise.
1688 (tdesc_s390x_vx_linux64): Likewise.
1689 (init_registers_s390x_tevx_linux64): Likewise.
1690 (tdesc_s390x_tevx_linux64): Likewise.
1691 (have_hwcap_s390_vx): New static variable.
1692 (s390_arch_setup): Fill have_hwcap_s390_vx.
1693 (s390_get_thread_area): New function.
1694 (s390_ft_entry_gpr_esa): New const.
1695 (s390_ft_entry_gpr_zarch): New const.
1696 (s390_ft_entry_misc): New const.
1697 (s390_ft_entry_fr): New const.
1698 (s390_ft_entry_vr): New const.
1699 (s390_ft_main_31): New const.
1700 (s390_ft_main_64): New const.
1701 (s390_ft_exit_fr): New const.
1702 (s390_ft_exit_vr): New const.
1703 (s390_ft_exit_misc): New const.
1704 (s390_ft_exit_gpr_esa): New const.
1705 (s390_ft_exit_gpr_zarch): New const.
1706 (append_insns): New function.
1707 (s390_relocate_instruction): New function.
1708 (s390_install_fast_tracepoint_jump_pad): New function.
1709 (s390_get_min_fast_tracepoint_insn_len): New function.
1710 (s390_get_ipa_tdesc_idx): New function.
1711 (struct linux_target_ops): Wire in the above functions.
1712 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1713 * linux-s390-tdesc.h: New file.
1714
a4105d04
MK
17152016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1716
1717 * linux-s390-low.c (s390_supports_tracepoints): New function.
1718 (struct linux_target_ops): Fill supports_tracepoints hook.
1719
35ac8b3e
YQ
17202016-03-18 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-low.c (lwp_signal_can_be_delivered): New function.
1723 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1724
94610ec4
YQ
17252016-03-18 Yao Qi <yao.qi@linaro.org>
1726
1727 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1728 0 if signal is enqueued. Remove 'signal' from one debugging
1729 message. Move one debugging message to some lines below.
1730 Remove code setting 'signal' to 0.
1731
80aea927
YQ
17322016-03-18 Yao Qi <yao.qi@linaro.org>
1733
1734 * linux-low.c (linux_low_filter_event): Remove redundant
1735 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1736
b04fd3be
MK
17372016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1738
1739 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1740 (struct linux_target_ops): Wire in the above.
1741
c40c8d4b
YQ
17422016-03-03 Yao Qi <yao.qi@linaro.org>
1743
1744 * linux-low.c: Update comments to start_step_over.
1745
0f8288ae
YQ
17462016-03-03 Yao Qi <yao.qi@linaro.org>
1747
1748 PR server/19736
1749 * linux-low.c (handle_extended_wait): Set child suspended
1750 if event_lwp->bp_reinsert isn't zero.
1751
fdbd04a8
YQ
17522016-03-02 Yao Qi <yao.qi@linaro.org>
1753
1754 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1755 enqueue_pending_signal.
1756
6896a8fa
MK
17572016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1758
1759 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1760 is actually loaded.
1761
ab503087
MK
17622016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1763
1764 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1765 (s390_regmap_3264) [!__s390x__]: New global.
1766 (s390_collect_ptrace_register): Skip map entries containing -1.
1767 (s390_supply_ptrace_register): Ditto.
1768 (s390_fill_gprs_high): New function.
1769 (s390_store_gprs_high): New function.
1770 (s390_regsets): Add NT_S390_HIGH_GPRS.
1771 (s390_get_hwcap): Enable on 31-bit.
1772 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1773 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1774 Detect NT_S390_HIGH_GPRS.
1775 (s390_usrregs_info_3264): Enable on 31-bit.
1776 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1777 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1778
ae91f625
MK
17792016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1780
1781 PR gdb/13808
1782 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1783 * configure.srv: Ditto.
1784 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1785 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1786 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1787 (init_registers_amd64_linux): Remove prototype.
1788 (tdesc_amd64_linux): Remove declaration.
1789 (get_ipa_tdesc): New function.
1790 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1791 initialize remaining tdescs.
1792 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1793 (init_registers_i386_linux): Remove prototype.
1794 (tdesc_i386_linux): Remove declaration.
1795 (get_ipa_tdesc): New function.
1796 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1797 initialize remaining tdescs.
1798 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1799 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1800 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1801 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1802 (x86_get_ipa_tdesc_idx): New function.
1803 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1804 * linux-x86-tdesc.h: New file.
1805 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1806 (target_get_ipa_tdesc_idx): New macro.
1807 * tracepoint.c (ipa_tdesc_idx): New macro.
1808 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1809 (symbol_list): Add ipa_tdesc_idx.
1810 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1811 (ipa_tdesc): Remove.
1812 (ipa_tdesc_idx): New variable.
1813 (get_context_regcache): Use get_ipa_tdesc.
1814 (gdb_collect): Ditto.
1815 (gdb_probe): Ditto.
1816 * tracepoint.h (get_ipa_tdesc): New prototype.
1817 (ipa_tdesc): Remove.
1818
e7ad2f14
PA
18192016-02-24 Pedro Alves <palves@redhat.com>
1820
1821 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1822 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1823 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1824 Factor out common code between the USE_SIGTRAP_SIGINFO and
1825 !USE_SIGTRAP_SIGINFO blocks.
1826 (linux_low_filter_event): Call save_stop_reason instead of
1827 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1828 Update comments.
1829 (linux_wait_1): Update comments.
1830
657f9cde
WW
18312016-02-24 Wei-cheng Wang <cole945@gmail.com>
1832
1833 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1834 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1835 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1836 ppc_insert_point, ppc_remove_point.
1837
b00b61e1
MK
18382016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1839
1840 * linux-s390-low.c (s390_supports_z_point_type): New function.
1841 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1842
553cb527
YQ
18432016-02-16 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1846 PC. Get pc from regcache_read_pc.
1847
a5652c21
YQ
18482016-02-12 Yao Qi <yao.qi@linaro.org>
1849
1850 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1851 or linux_get_pc_32bit.
1852 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1853
ed443b61
YQ
18542016-02-12 Yao Qi <yao.qi@linaro.org>
1855
1856 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1857 arm_linux_get_next_pcs_fixup.
1858
020ecd38
MK
18592016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1860
1861 * tracepoint.c (x_tracepoint_action_download): Change
1862 write_inferior_data_ptr to write_inferior_data_pointer.
1863 (cmd_qtstart): Likewise.
1864 (write_inferior_data_ptr): Remove.
1865 (download_agent_expr): Change write_inferior_data_ptr to
1866 write_inferior_data_pointer.
1867 (download_tracepoint_1): Likewise.
1868 (download_tracepoint): Likewise.
1869 (download_trace_state_variables): Likewise.
1870
7cae9051
WW
18712016-02-11 Wei-cheng Wang <cole945@gmail.com>
1872 Marcin Kościelnicki <koriakin@0x04.net>
1873
1874 * tracepoint.c (struct tracepoint_action_ops): Remove.
1875 (struct tracepoint_action): Remove ops.
1876 (m_tracepoint_action_download, r_tracepoint_action_download)
1877 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1878 size and offset accordingly.
1879 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1880 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1881 (tracepoint_action_send, tracepoint_action_download): New functions.
1882 Helpers for trace action handlers.
1883 (add_tracepoint_action): Remove setup actions ops.
1884 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1885
9f6a71b4
YQ
18862016-02-10 Yao Qi <yao.qi@linaro.org>
1887
1888 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1889
1e94266c
SM
18902016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1891
1892 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1893 to AC_OUTPUT.
1894 * configure: Regenerate.
1895
8adce034
SM
18962016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1897
1898 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1899 void * to gdb_byte *.
1900 * linux-low.c (siginfo_fixup): Likewise.
1901 (linux_xfer_siginfo): Likewise.
1902 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1903 Likewise.
1904 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1905
93813b37
WT
19062016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1907
1908 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1909 to srv_tgtobj.
1910 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1911 to srv_tgtobj.
1912 * linux-x86-low.c [__x86_64__]: Include
1913 "nat/amd64-linux-siginfo.h".
1914 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1915 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1916 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1917 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1918 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1919 (cpt_si_fd, si_timerid, si_overrun): Move from
1920 nat/amd64-linux-siginfo.c.
1921 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1922
8424cc97
SM
19232016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * server.c (skip_to_semicolon): Remove.
1926 (process_point_options): Use strchrnul instead of
1927 skip_to_semicolon.
1928
4d18591b
YQ
19292016-01-26 Yao Qi <yao.qi@linaro.org>
1930
1931 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1932 * linux-low.c (install_software_single_step_breakpoints): Don't
1933 call regcache_read_pc.
1934 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1935 argument pc.
1936
d8020970
YQ
19372016-01-26 Yao Qi <yao.qi@linaro.org>
1938
1939 * linux-low.c (install_software_single_step_breakpoints): Call
1940 regcache_read_pc instead of get_pc.
1941
8b207339
YQ
19422016-01-26 Yao Qi <yao.qi@linaro.org>
1943
1944 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1945 (unblock_async_io): Rename to ...
1946 (block_unblock_async_io): ... it. New function.
1947 (enable_async_io): Don't install SIGIO handler. Unblock it
1948 instead.
1949 (disable_async_io): Don't ignore SIGIO. Block it instead.
1950 (initialize_async_io): Install SIGIO handler. Don't call
1951 unblock_async_io.
1952
18879fef
YQ
19532016-01-26 Yao Qi <yao.qi@linaro.org>
1954
1955 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1956 first character is '\003', call *the_target->request_interrupt.
1957
a0f8e08a
YQ
19582016-01-25 Yao Qi <yao.qi@linaro.org>
1959
1960 * remote-utils.c (new_thread_notify): Remove.
1961 (dead_thread_notify): Likewise.
1962 * remote-utils.h (new_thread_notify): Remove declaration.
1963 (dead_thread_notify): Likewise.
1964
cc5fd9ab
MK
19652016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1966
1967 * gdb.trace/pending.exp: Fix expected message on continue.
1968
99e8eb11
MK
19692016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1970
1971 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1972 it works properly on big-endian machines where sizeof (CORE_ADDR)
1973 != sizeof (void *).
1974
a994041d
PA
19752016-01-21 Pedro Alves <palves@redhat.com>
1976
1977 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1978 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1979 * configure: Regenerate.
1980
f7a6a40d
YQ
19812016-01-21 Yao Qi <yao.qi@linaro.org>
1982
1983 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1984 is_thumb and set it according to CPSR saved on the stack.
1985 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1986 arm_sigreturn_next_pc.
1987
6f69e520
YQ
19882016-01-18 Yao Qi <yao.qi@linaro.org>
1989
1990 * linux-low.c (linux_set_pc_64bit): New function.
1991 (linux_get_pc_64bit): New function.
1992 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1993 Declare.
1994 * linux-sparc-low.c (debug_threads): Remove declaration.
1995 (sparc_get_pc): Remove.
1996 (the_low_target): Use linux_get_pc_64bit instead of
1997 sparc_get_pc.
1998 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1999 (the_low_target): Use linux_get_pc_64bit and
2000 linux_set_pc_64bit.
2001
276d4552
YQ
20022016-01-18 Yao Qi <yao.qi@linaro.org>
2003
2004 * linux-arm-low.c (debug_threads): Remove declaration.
2005 (arm_get_pc, arm_set_pc): Remove.
2006 (the_low_target): Use linux_get_pc_32bit and
2007 linux_set_pc_32bit.
2008 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2009 (the_low_target): Use linux_get_pc_32bit and
2010 linux_set_pc_32bit.
2011 * linux-cris-low.c (debug_threads): Remove declaration.
2012 (cris_get_pc, cris_set_pc,): Remove.
2013 (the_low_target): Use linux_get_pc_32bit and
2014 linux_set_pc_32bit.
2015 * linux-crisv32-low.c (debug_threads): Remove declaration.
2016 (cris_get_pc, cris_set_pc): Remove.
2017 (the_low_target): Use linux_get_pc_32bit and
2018 linux_set_pc_32bit.
2019 * linux-low.c: Include inttypes.h.
2020 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2021 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2022 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2023 (the_low_target): Use linux_get_pc_32bit and
2024 linux_set_pc_32bit.
2025 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2026 (the_low_target): Use linux_get_pc_32bit and
2027 linux_set_pc_32bit.
2028 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2029 (the_low_target): Use linux_get_pc_32bit and
2030 linux_set_pc_32bit.
2031 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2032 (the_low_target): Use linux_get_pc_32bit and
2033 linux_set_pc_32bit.
2034 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2035 (the_low_target): Use linux_get_pc_32bit and
2036 linux_set_pc_32bit.
2037
eb0edac8
GB
20382016-01-18 Gary Benson <gbenson@redhat.com>
2039
2040 * configure.ac (AC_FUNC_FORK): New check.
2041 * config.in: Regenerate.
2042 * configure: Likewise.
2043
1b451dda
YQ
20442016-01-14 Yao Qi <yao.qi@linaro.org>
2045
2046 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2047 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2048 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2049 arm_get_next_pcs_ctor.
2050
82075af2
JS
20512016-01-12 Josh Stone <jistone@redhat.com>
2052 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2053
2054 * inferiors.h: Include "gdb_vecs.h".
2055 (struct process_info): Add syscalls_to_catch.
2056 * inferiors.c (remove_process): Free syscalls_to_catch.
2057 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2058 syscall_return stops.
2059 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2060 * server.c (handle_general_set): Handle QCatchSyscalls.
2061 (handle_query): Report support for QCatchSyscalls.
2062 * target.h (struct target_ops): Add supports_catch_syscall.
2063 (target_supports_catch_syscall): New macro.
2064 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2065 (struct lwp_info): Add syscall_state.
2066 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2067 Maintain syscall_state and syscalls_to_catch across exec.
2068 (get_syscall_trapinfo): New function, proxy to the_low_target.
2069 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2070 (linux_low_filter_event): Toggle syscall_state entry/return for
2071 syscall traps, and set it ignored for all others.
2072 (gdb_catching_syscalls_p): New function.
2073 (gdb_catch_this_syscall_p): New function.
2074 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2075 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2076 (linux_supports_catch_syscall): New function.
2077 (linux_target_ops): Install it.
2078 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2079 (the_low_target): Install it.
2080
8f13a3ce
MF
20812016-01-12 Mike Frysinger <vapier@gentoo.org>
2082
2083 * acinclude.m4: Include new ../warning.m4 file.
2084 * configure: Regenerated.
2085 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2086
5b3da067
MF
20872016-01-12 Mike Frysinger <vapier@gentoo.org>
2088
2089 * ax.c (is_goto_target): Mark static.
2090 * linux-low.c (register_addr): Likewise.
2091 (linux_fetch_registers, linux_store_registers): Likewise.
2092 * mem-break.c (any_persistent_commands): Fix old prototype.
2093 (add_commands_to_breakpoint): Mark static.
2094 * regcache.c (find_register_by_name): Delete unused func.
2095 * remote-utils.c (hex_or_minus_one): Mark static.
2096 * server.c (monitor_show_help): Mark static.
2097 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2098 handle_v_requests): Likewise.
2099
bc504a31
PA
21002016-01-12 Pedro Alves <palves@redhat.com>
2101
2102 Remove use of the registered trademark symbol throughout.
2103
5a0dd67a
YQ
21042016-01-08 Yao Qi <yao.qi@linaro.org>
2105
2106 * remote-utils.c (getpkt): If c is '\003', call target hook
2107 request_interrupt.
2108
b2ca446f
YQ
21092016-01-06 Yao Qi <yao.qi@linaro.org>
2110
2111 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2112 linux-aarch32-low.c.
2113 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2114 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2115 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2116 (thumb2_breakpoint): Declare.
2117 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2118 linux-aarch32-low.h.
2119 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2120 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2121 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2122
edd88788
JB
21232016-01-01 Joel Brobecker <brobecker@adacore.com>
2124
2125 * gdbreplay.c (gdbreplay_version): Change copyright year in
2126 version message.
2127 * server.c (gdbserver_version): Likewise.
2128
65da7f14
PP
21292015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2130
2131 * server.c (crc32_table): Delete.
2132 (crc32): Use libiberty's xcrc32 function.
2133
4abd5ed2
JB
21342015-12-22 Joel Brobecker <brobecker@adacore.com>
2135
2136 * lynx-low.c (lynx_delete_thread_callback): New function.
2137 (lynx_mourn): Properly delete our process and all of its
2138 threads. Remove call to clear_inferiors.
2139
0e50fe5c
JB
21402015-12-22 Joel Brobecker <brobecker@adacore.com>
2141
2142 * target.c (thread_search_callback): Add check that
2143 the thread_stopped target callback is not NULL before
2144 calling it.
2145
35adc03f
YQ
21462015-12-21 Yao Qi <yao.qi@linaro.org>
2147
2148 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2149 arm breakpoint.
2150
bd2b2909
AT
21512015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2152
2153 * server.c (handle_query): Call target_supports_software_single_step.
2154
7fe5e27e
AT
21552015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2156
2157 * linux-low.c (single_step): New function.
2158 (linux_resume_one_lwp_throw): Call single_step.
2159 (start_step_over): Likewise.
2160
d9311bfa
AT
21612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2162
2163 * Makefile.in (SFILES): Append arch/arm-linux.c,
2164 arch/arm-get-next-pcs.c.
2165 (arm-linux.o): New rule.
2166 (arm-get-next-pcs.o): New rule.
2167 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2168 arm-linux.o.
2169 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2170 to linux-aarch32-low.c.
2171 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2172 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2173 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2174 (thumb2_breakpoint_len): Likewise.
2175 (arm_is_thumb_mode): Make non-static.
2176 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2177 from linux-aarch32-low.c.
2178 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2179 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2180 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2181 (thumb2_breakpoint_len): Likewise.
2182 (arm_is_thumb_mode): New declaration.
2183 * linux-arm-low.c: Include arch/arm-linux.h
2184 aarch/arm-get-next-pcs.h, sys/syscall.h.
2185 (get_next_pcs_ops): New struct.
2186 (get_next_pcs_addr_bits_remove): New function.
2187 (get_next_pcs_is_thumb): New function.
2188 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2189 (arm_sigreturn_next_pc): Likewise.
2190 (get_next_pcs_syscall_next_pc): Likewise.
2191 (arm_gdbserver_get_next_pcs): Likewise.
2192 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2193 Initialize.
2194 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2195 * server.h: Include gdb_vecs.h.
2196
68ce2059
AT
21972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2198
2199 * Makefile.in (SFILES): Append common/common-regcache.c.
2200 (OBS): Append common-regcache.o.
2201 (common-regcache.o): New rule.
2202 * regcache.c (init_register_cache): Initialize cache to
2203 REG_UNAVAILABLE.
2204 (regcache_raw_read_unsigned): New function.
2205 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2206 register_status enum.
2207
fa5308bd
AT
22082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2209
2210 * linux-aarch64-low.c (the_low_targets): Rename
2211 breakpoint_reinsert_addr to get_next_pcs.
2212 * linux-arm-low.c (the_low_targets): Likewise.
2213 * linux-bfin-low.c (the_low_targets): Likewise.
2214 * linux-cris-low.c (the_low_targets): Likewise.
2215 * linux-crisv32-low.c (the_low_targets): Likewise.
2216 * linux-low.c (can_software_single_step): Likewise.
2217 (install_software_single_step_breakpoints): New function.
2218 (start_step_over): Use install_software_single_step_breakpoints.
2219 * linux-low.h: New CORE_ADDR vector.
2220 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2221 get_next_pcs.
2222 * linux-mips-low.c (the_low_targets): Likewise.
2223 * linux-nios2-low.c (the_low_targets): Likewise.
2224 * linux-sparc-low.c (the_low_targets): Likewise.
2225
4a6ed09b
PA
22262015-12-17 Pedro Alves <palves@redhat.com>
2227
2228 * linux-low.c (linux_kill_one_lwp): Remove references to
2229 LinuxThreads.
2230 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2231 to 'kill'.
2232 (linux_init_signals): Delete.
2233 (initialize_low): Adjust.
2234 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2235
7544db95
PA
22362015-12-16 Pedro Alves <palves@redhat.com>
2237
2238 * configure.ac (compiler warning flags): When testing a
2239 -Wno-foo option, check whether -Wfoo works instead.
2240 * configure: Regenerate.
2241
8020350c
DB
22422015-12-11 Don Breazeal <donb@codesourcery.com>
2243
2244 * server.c (process_serial_event): Don't exit from gdbserver
2245 in remote mode if there are still active inferiors.
2246
db91f502
YQ
22472015-12-11 Yao Qi <yao.qi@linaro.org>
2248
2249 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2250 arm_breakpoint_at if the process is 32-bit.
2251
b37a6290
YQ
22522015-12-11 Yao Qi <yao.qi@linaro.org>
2253
2254 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2255 arm breakpoint.
2256
17b1509a
YQ
22572015-12-07 Yao Qi <yao.qi@linaro.org>
2258
2259 * configure.srv: Append arm.o to srv_tgtobj for
2260 aarch64*-*-linux* target.
2261 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2262 from linux-arm-low.c.
2263 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2264 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2265 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2266 (thumb2_breakpoint_len): Likewise.
2267 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2268 (arm_breakpoint_kinds): Likewise.
2269 (arm_breakpoint_kind_from_pc): Likewise.
2270 (arm_sw_breakpoint_from_kind): Likewise.
2271 (arm_breakpoint_kind_from_current_state): Likewise.
2272 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2273 (arm_sw_breakpoint_from_kind): Declare.
2274 (arm_breakpoint_kind_from_current_state): Declare.
2275 (arm_breakpoint_at): Declare.
2276 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2277 arm_sw_breakpoint_from_kind if process is 32-bit.
2278 (aarch64_breakpoint_kind_from_pc): New function.
2279 (aarch64_breakpoint_kind_from_current_state): New function.
2280 (the_low_target): Initialize fields breakpoint_kind_from_pc
2281 and breakpoint_kind_from_current_state.
2282 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2283 linux-aarch32-low.c.
2284 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2285 (arm_breakpoint, arm_breakpoint_len): Likewise.
2286 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2287 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2288 (arm_is_thumb_mode): Likewise.
2289 (arm_breakpoint_at): Likewise.
2290 (arm_breakpoint_kind_from_pc): Likewise.
2291 (arm_sw_breakpoint_from_kind): Likewise.
2292 (arm_breakpoint_kind_from_current_state): Likewise.
2293
2294 Revert:
2295 2015-08-04 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2298 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2299 * server.c (extended_protocol): Remove "static".
2300 * server.h (extended_protocol): Declare it.
2301
ece66d65
JS
23022015-12-04 Josh Stone <jistone@redhat.com>
2303
2304 * target.h (struct target_ops) <arch_setup>: Rename to ...
2305 (struct target_ops) <post_create_inferior>: ... this.
2306 (target_arch_setup): Rename to ...
2307 (target_post_create_inferior): ... this, calling post_create_inferior.
2308 * server.c (start_inferior): Update target_arch_setup calls to
2309 target_post_create_inferior.
2310 * linux-low.c (linux_low_ptrace_options): Forward declare.
2311 (linux_arch_setup): Update its comment for general use.
2312 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2313 (struct linux_target_ops): Use linux_post_create_inferior.
2314 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2315 to post_create_inferior.
2316 * nto-low.c (struct nto_target_ops): Likewise.
2317 * spu-low.c (struct spu_target_ops): Likewise.
2318 * win32-low.c (struct win32_target_ops): Likewise.
2319
e58c48b4
AT
23202015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2321
2322 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2323
fbec8956
AT
23242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2325
2326 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2327 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2328 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2329 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2330 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2331 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2332 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2333 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2334 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2335 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2336 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2337 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2338
9b4c5f87
AT
23392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2340
2341 * linux-low.c (linux_look_up_symbols): Don't call
2342 linux_supports_traceclone.
2343 * linux-low.h (thread_db_init): Remove use_events argument.
2344 * thread-db.c (thread_db_use_event): Remove global variable.
2345 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2346 (struct thread_db) <td_create_bp>: Remove field.
2347 (thread_db_create_event): Remove function.
2348 (thread_db_enable_reporting): Likewise.
2349 (find_one_thread): Don't check for thread_db_use_events.
2350 (attach_thread): Likewise.
2351 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2352 (try_thread_db_load_1): Don't check for thread_db_use_events.
2353 (thread_db_init): Remove use_events argument and thread events
2354 handling.
2355 (remove_thread_event_breakpoints): Remove function.
2356 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2357
7d00775e
AT
23582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2359
2360 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2361 New function.
2362 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2363 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2364 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2365 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2366 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2367 Initialize.
2368 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2369 New function.
2370 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2371 * linux-low.c (can_hardware_single_step): Use
2372 supports_hardware_single_step.
2373 (can_software_single_step): New function.
2374 (start_step_over): Call can_software_single_step.
2375 (linux_supports_hardware_single_step): New function.
2376 (struct target_ops) <supports_software_single_step>: Initialize.
2377 * linux-low.h (struct linux_target_ops)
2378 <supports_hardware_single_step>: Initialize.
2379 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2380 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2381 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2382 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2383 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2384 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2385 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2386 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2387 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2388 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2389 Initialize.
2390 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2391 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2392 Initialize.
2393 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2394 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2395 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2396 New function.
2397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2398 * target.h (struct target_ops): <supports_software_single_step>:
2399 New field.
2400 (target_supports_software_single_step): New macro.
2401
2d97cd35
AT
24022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2403
2404 * linux-low.c (linux_wait_1): Fix pc advance condition.
2405 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2406 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2407
769ef81f
AT
24082015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2409
2410 * linux-arm-low.c (arm_is_thumb_mode): New function.
2411 (arm_breakpoint_at): Use arm_is_thumb_mode.
2412 (arm_breakpoint_kind_from_current_state): New function.
2413 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2414 Initialize.
2415 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2416 (linux_breakpoint_kind_from_current_state): New function.
2417 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2418 * linux-low.h (struct linux_target_ops)
2419 <breakpoint_kind_from_current_state>: New field.
2420 * target.h (struct target_ops): Likewise.
2421 (target_breakpoint_kind_from_current_state): New macro.
2422
1bebeeca
PA
24232015-11-30 Pedro Alves <palves@redhat.com>
2424
2425 * linux-low.c (linux_resume): Wake up the event loop before
2426 returning.
2427
a67a9fae
PA
24282015-11-30 Pedro Alves <palves@redhat.com>
2429
2430 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2431 check.
2432 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2433 to -1.
2434 * target.c (struct thread_search): New structure.
2435 (thread_search_callback): New function.
2436 (prev_general_thread): New global.
2437 (prepare_to_access_memory, done_accessing_memory): New functions.
2438 * target.h (prepare_to_access_memory, done_accessing_memory):
2439 Replace macros with function declarations.
2440
f2faf941
PA
24412015-11-30 Pedro Alves <palves@redhat.com>
2442
2443 PR 14618
2444 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2445 report TARGET_WAITKIND_NO_RESUMED.
2446 * remote-utils.c (prepare_resume_reply): Handle
2447 TARGET_WAITKIND_NO_RESUMED.
2448 * server.c (report_no_resumed): New global.
2449 (handle_query) <qSupported>: Handle "no-resumed+". Report
2450 "no-resumed+" support.
2451 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2452 return error if the client doesn't support no-resumed events.
2453 (push_stop_notification): New function.
2454 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2455 events if the client supports them.
2456
a681f9c9
PA
24572015-11-30 Pedro Alves <palves@redhat.com>
2458
2459 * linux-low.c (thread_still_has_status_pending_p): Don't check
2460 vCont;t here.
2461 (lwp_resumed): New function.
2462 (status_pending_p_callback): Return early if the LWP is not
2463 supposed to be resumed.
2464
65706a29
PA
24652015-11-30 Pedro Alves <palves@redhat.com>
2466
2467 * linux-low.c (handle_extended_wait): Assert that the LWP's
2468 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2469 thread create events, leave the new child's status pending.
2470 (linux_low_filter_event): If GDB wants to hear about thread exit
2471 events, leave the LWP marked dead and don't delete it.
2472 (linux_wait_for_event_filtered): Don't check for thread exit.
2473 (filter_exit_event): New function.
2474 (linux_wait_1): Use it, when returning an exit event.
2475 (linux_resume_one_lwp_throw): Assert that the LWP's
2476 waitstatus is TARGET_WAITKIND_IGNORE.
2477 * remote-utils.c (prepare_resume_reply): Handle
2478 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2479 * server.c (report_thread_events): New global.
2480 (handle_general_set): Handle QThreadEvents.
2481 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2482 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2483 TARGET_WAITKIND_THREAD_EXITED.
2484 * server.h (report_thread_events): Declare.
2485
56cf4bed
PA
24862015-11-30 Pedro Alves <palves@redhat.com>
2487
2488 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2489 the thread's last_resume_kind was resume_stop.
2490
500c1d85
PA
24912015-11-30 Pedro Alves <palves@redhat.com>
2492
2493 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2494 before returning.
2495
de979965
PA
24962015-11-30 Pedro Alves <palves@redhat.com>
2497
2498 * server.c (handle_v_requests): Handle vCtrlC.
2499
34c65914
PA
25002015-11-30 Pedro Alves <palves@redhat.com>
2501
2502 * gdbthread.h (find_any_thread_of_pid): Declare.
2503 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2504 functions.
2505 * server.c (handle_query): If current_thread is NULL, look for
2506 another thread of the selected process.
2507
79efa585 25082015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2509 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2510
2511 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2512 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2513 name in reply.
2514 * target.h (struct target_ops) <thread_name>: New field.
2515 (target_thread_name): New macro.
2516
80d82c19
JB
25172015-11-23 Joel Brobecker <brobecker@adacore.com>
2518
2519 * regcache.h (regcache_invalidate_pid): Add declaration.
2520 * regcache.c (regcache_invalidate_pid): New function, extracted
2521 from regcache_invalidate.
2522 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2523 Add trivial documentation comment.
2524 * lynx-low.c: Use regcache_invalidate_pid instead of
2525 regcache_invalidate.
2526
64da5dd5
JB
25272015-11-23 Joel Brobecker <brobecker@adacore.com>
2528
2529 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2530 and Elf64_auxv_t if the target is Android.
2531
37ce4055
DE
25322015-11-22 Doug Evans <xdje42@gmail.com>
2533
2534 * target.h: #include <sys/types.h>.
2535
06e03fff
PA
25362015-11-19 Pedro Alves <palves@redhat.com>
2537
2538 * linux-low.c (linux_process_qsupported): Change prototype.
2539 Adjust.
2540 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2541 Change prototype.
2542 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2543 and adjust to loop over all features.
2544 * server.c (handle_query) <qSupported>: Adjust to call
2545 target_process_qsupported once, passing it a vector of unprocessed
2546 features.
2547 * target.h (struct target_ops) <process_qsupported>: Change
2548 prototype.
2549 (target_process_qsupported): Adjust.
2550
9a084706
PA
25512015-11-19 Pedro Alves <palves@redhat.com>
2552
2553 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2554 mode.
2555 * configure: Regenerate.
2556
dad44a1f
PA
25572015-11-19 Pedro Alves <palves@redhat.com>
2558
2559 * configure: Regenerate.
2560
231c0592
YQ
25612015-11-19 Yao Qi <yao.qi@linaro.org>
2562
2563 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2564 type to uint32_t.
2565
6c1c9a8b
YQ
25662015-11-19 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2569 (struct aarch64_operand): Move enum out.
2570
9caa3311
YQ
25712015-11-19 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2574 struct user_fpsimd_state *.
2575 (aarch64_store_fpregset): Likewise.
2576
6a69a054
YQ
25772015-11-19 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2580 struct user_pt_regs *.
2581 (aarch64_store_gregset): Likewise.
2582
1798301e
PA
25832015-11-18 Pedro Alves <palves@redhat.com>
2584
2585 * Makefile.in (all_object_files): Add $IPA_OBJS.
2586
ce7715e2
PA
25872015-11-17 Pedro Alves <palves@redhat.com>
2588
2589 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2590 GDB_SIGNAL_0 and gdb_signal_to_string.
2591
c0879059
PA
25922015-11-17 Pedro Alves <palves@redhat.com>
2593
2594 * win32-low.c (handle_output_debug_string): Remove parameter.
2595 (win32_kill): Remove our_status local and adjust call to
2596 handle_output_debug_string.
2597 (get_child_debug_event): Adjust call to
2598 handle_output_debug_string.
2599
1996e237
SM
26002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2601
2602 * linux-mips-low.c (mips_fill_gregset): Add cast.
2603 (mips_store_gregset): Likewise.
2604 (mips_fill_fpregset): Likewise.
2605 (mips_store_fpregset): Likewise.
2606
cbec665b
SM
26072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2608
2609 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2610 priv.
2611
eb3e3c67
SM
26122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2613
2614 * linux-mips-low.c (mips_linux_new_thread): Change type of
2615 watch_type to enum target_hw_bp_type.
2616
171de4b8
SM
26172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2618
2619 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2620 Change return type to arm_hwbp_type.
2621
04248ead
SM
26222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2623
2624 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2625 (arm_store_gregset): Likewise.
2626 * linux-arm-low.c (arm_get_hwcap): Likewise.
2627 (arm_read_description): Likewise.
2628
04b3479c
SM
26292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2630
2631 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2632
2bc84e8a
SM
26332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2636 (ppc_fill_vsxregset): Likewise.
2637 (ppc_store_vsxregset): Likewise.
2638 (ppc_fill_vrregset): Likewise.
2639 (ppc_store_vrregset): Likewise.
2640 (ppc_fill_evrregset): Likewise.
2641 (ppc_store_evrregset): Likewise.
2642
e6c5bb05
SM
26432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2644
2645 * linux-ppc-low.c (ppc_usrregs_info): Remove
2646 forward-declaration.
2647 (ppc_arch_setup): Move lower in file.
2648
7ea45d72
SM
26492015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2650
2651 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2652 (ps_pdwrite): Likewise.
2653
69291610
HW
26542015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2655
2656 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2657 to after assert checks.
2658
b42945fd
SM
26592015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2660
2661 * proc-service.c (ps_pdread): Add/adjust casts.
2662 (ps_pdwrite): Add/adjust casts.
2663
d6f85c84
SM
26642015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2665
2666 * server.c (handle_search_memory_1): Cast return value of
2667 memmem.
2668
f98cd059
SM
26692015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2670
2671 * server.c (write_qxfer_response): Change type of data to
2672 gdb_byte *.
2673
d2412fa5
PA
26742015-10-29 Pedro Alves <palves@redhat.com>
2675
2676 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2677
c17414a2
PA
26782015-10-29 Pedro Alves <palves@redhat.com>
2679
2680 * tracepoint.c (clear_installed_tracepoints): Add casts.
2681
e053fbc4
PA
26822015-10-29 Pedro Alves <palves@redhat.com>
2683
2684 * server.c (handle_v_cont, process_serial_event): Add enum
2685 gdb_signal casts to signal parsing code.
2686
add67df8
PA
26872015-10-29 Pedro Alves <palves@redhat.com>
2688
2689 * linux-low.h (NULL_REGSET): Define.
2690 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2691 * linux-arm-low.c (arm_regsets): Likewise.
2692 * linux-crisv32-low.c (cris_regsets): Likewise.
2693 * linux-m68k-low.c (m68k_regsets): Likewise.
2694 * linux-mips-low.c (mips_regsets): Likewise.
2695 * linux-nios2-low.c (nios2_regsets): Likewise.
2696 * linux-ppc-low.c (ppc_regsets): Likewise.
2697 * linux-s390-low.c (s390_regsets): Likewise.
2698 * linux-sh-low.c (sh_regsets): Likewise.
2699 * linux-sparc-low.c (sparc_regsets): Likewise.
2700 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2701 * linux-tile-low.c (tile_regsets): Likewise.
2702 * linux-x86-low.c (x86_regsets): Likewise.
2703 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2704
50bc912a
PA
27052015-10-29 Pedro Alves <palves@redhat.com>
2706
2707 * linux-low.h (NULL_REGSET): Define.
2708 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2709 * linux-arm-low.c (arm_regsets): Likewise.
2710 * linux-crisv32-low.c (cris_regsets): Likewise.
2711 * linux-m68k-low.c (m68k_regsets): Likewise.
2712 * linux-mips-low.c (mips_regsets): Likewise.
2713 * linux-nios2-low.c (nios2_regsets): Likewise.
2714 * linux-ppc-low.c (ppc_regsets): Likewise.
2715 * linux-s390-low.c (s390_regsets): Likewise.
2716 * linux-sh-low.c (sh_regsets): Likewise.
2717 * linux-sparc-low.c (sparc_regsets): Likewise.
2718 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2719 * linux-tile-low.c (tile_regsets): Likewise.
2720 * linux-x86-low.c (x86_regsets): Likewise.
2721 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2722
682b2546
DE
27232015-10-26 Doug Evans <dje@google.com>
2724
2725 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2726
963843d4
DE
27272015-10-26 Doug Evans <dje@google.com>
2728
2729 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2730
d41401ac
DE
27312015-10-26 Doug Evans <dje@google.com>
2732
2733 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2734 for debug_printf.
2735 (attach_thread, find_new_threads_callback): Ditto.
2736
3db28855
AT
27372015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2738
2739 * mem-break.h (set_breakpoint_data): Remove.
2740
fb78e89c
AT
27412015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2742
2743 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2744 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2745 (initialize_low): Remove set_breakpoint_data call.
2746 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2747 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2748 (initialize_low): Remove set_breakpoint_data call.
2749 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2750 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2751 (initialize_low): Remove set_breakpoint_data call.
2752
2e6ee069
AT
27532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2754
2755 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2756 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2757 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2758 * target.h (target_breakpoint_kind_from_pc): New macro.
2759
1652a986
AT
27602015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2761
2762 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2763 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2764 the default breakpoint kind.
2765
abeead09
AT
27662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2767
2768 * linux-arm-low.c (arm_supports_z_point_type): Add software
2769 breakpoint support.
2770
b0b4b501
AT
27712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2772
2773 * linux-arm-low.c: Refactor breakpoint definitions.
2774 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2775 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2776
8689682c
AT
27772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2778
2779 * Makefile.in: Add arm.c/o.
2780 * configure.srv: Likewise.
2781 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2782 (arm_breakpoint_kind_from_pc): New function.
2783 (arm_sw_breakpoint_from_kind): Return proper kind.
2784 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2785
27165294
AT
27862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2787
2788 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2789 removal.
2790 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2791 (struct raw_breakpoint) <size>: Remove.
2792 (struct raw_breakpoint) <kind>: Add.
2793 (bp_size): New function.
2794 (bp_opcode): Likewise.
2795 (find_raw_breakpoint_at): Adjust for kind.
2796 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2797 (remove_memory_breakpoint): Adjust for kind call bp_size.
2798 (set_raw_breakpoint_at): Adjust for kind.
2799 (set_breakpoint): Likewise.
2800 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2801 (delete_raw_breakpoint): Adjust for kind.
2802 (delete_breakpoint): Likewise.
2803 (find_gdb_breakpoint): Likewise.
2804 (set_gdb_breakpoint_1): Likewise.
2805 (set_gdb_breakpoint): Likewise.
2806 (delete_gdb_breakpoint_1): Likewise.
2807 (delete_gdb_breakpoint): Likewise.
2808 (uninsert_raw_breakpoint): Likewise.
2809 (reinsert_raw_breakpoint): Likewise.
2810 (set_breakpoint_data): Remove.
2811 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2812 (check_mem_read): Adjust for kind call bp_size.
2813 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2814 (clone_one_breakpoint): Adjust for kind.
2815 * mem-break.h (set_gdb_breakpoint): Likewise.
2816 (delete_gdb_breakpoint): Likewise.
2817 * server.c (process_serial_event): Likewise.
2818
dd373349
AT
28192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2820
2821 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2822 (struct linux_target_ops) <breakpoint>: Remove.
2823 (struct linux_target_ops) <breakpoint_len>: Remove.
2824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2826 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2827 (arm_sw_breakpoint_from_kind): New function.
2828 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2829 (struct linux_target_ops) <breakpoint>: Remove.
2830 (struct linux_target_ops) <breakpoint_len>: Remove.
2831 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2832 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2833 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2834 (struct linux_target_ops) <breakpoint>: Remove.
2835 (struct linux_target_ops) <breakpoint_len>: Remove.
2836 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2837 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2838 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2839 (struct linux_target_ops) <breakpoint>: Remove.
2840 (struct linux_target_ops) <breakpoint_len>: Remove.
2841 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2842 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2843 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2844 and sw_breakpoint_from_kind to increment the pc.
2845 (linux_breakpoint_kind_from_pc): New function.
2846 (linux_sw_breakpoint_from_kind): New function.
2847 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2848 (initialize_low): Call breakpoint_kind_from_pc and
2849 sw_breakpoint_from_kind to replace breakpoint_data/len.
2850 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2851 New field.
2852 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2853 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2854 (struct linux_target_ops) <breakpoint>: Remove.
2855 (struct linux_target_ops) <breakpoint_len>: Remove.
2856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2857 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2858 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2859 (struct linux_target_ops) <breakpoint>: Remove.
2860 (struct linux_target_ops) <breakpoint_len>: Remove.
2861 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2862 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2863 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2864 (struct linux_target_ops) <breakpoint>: Remove.
2865 (struct linux_target_ops) <breakpoint_len>: Remove.
2866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2868 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2869 (struct linux_target_ops) <breakpoint>: Remove.
2870 (struct linux_target_ops) <breakpoint_len>: Remove.
2871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2873 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2874 (struct linux_target_ops) <breakpoint>: Remove.
2875 (struct linux_target_ops) <breakpoint_len>: Remove.
2876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2877 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2878 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2879 (struct linux_target_ops) <breakpoint>: Remove.
2880 (struct linux_target_ops) <breakpoint_len>: Remove.
2881 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2882 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2883 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2884 (struct linux_target_ops) <breakpoint>: Remove.
2885 (struct linux_target_ops) <breakpoint_len>: Remove.
2886 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2888 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2889 (struct linux_target_ops) <breakpoint>: Remove.
2890 (struct linux_target_ops) <breakpoint_len>: Remove.
2891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2893 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2894 (struct linux_target_ops) <breakpoint>: Remove.
2895 (struct linux_target_ops) <breakpoint_len>: Remove.
2896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2898 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2899 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2900 (struct linux_target_ops) <breakpoint>: Remove.
2901 (struct linux_target_ops) <breakpoint_len>: Remove.
2902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2904 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2905 (struct linux_target_ops) <breakpoint>: Remove.
2906 (struct linux_target_ops) <breakpoint_len>: Remove.
2907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2909
4cd98a19
AT
29102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2911
2912 * linux-cris-low.c (cris_get_pc): Remove void arg.
2913
774ee6d2
AR
29142015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2915
2916 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2917 variable name.
2918
833dcd29
AR
29192015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2920
2921 * inferiors.c (thread_pid_matches_callback): New function.
2922 (find_thread_process): New function.
2923 (remove_thread): Reset current_thread.
2924 (remove_process): Assert threads have been removed first.
2925
8d689ee5
YQ
29262015-10-15 Yao Qi <yao.qi@linaro.org>
2927
2928 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2929 if it is 3.
2930 (aarch64_remove_point): Likewise.
2931 * regcache.c (regcache_register_size): New function.
2932
1c2e1515
YQ
29332015-10-12 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-aarch64-low.c: Update all callers as emit_load_store
2936 is renamed to aarch64_emit_load_store.
2937
e1c587c3
YQ
29382015-10-12 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-aarch64-low.c: Update all callers of function renaming
2941 from emit_insn to aarch64_emit_insn.
2942
b6542f81
YQ
29432015-10-12 Yao Qi <yao.qi@linaro.org>
2944
2945 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2946 arch/aarch64-insn.h.
2947 (struct aarch64_memory_operand): Likewise.
2948 (ENCODE): Likewise.
2949 (emit_insn): Move to arch/aarch64-insn.c.
2950 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2951 (emit_load_store): Move to arch/aarch64-insn.c.
2952 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2953 (can_encode_int32): Remove.
2954
246994ce
YQ
29552015-10-12 Yao Qi <yao.qi@linaro.org>
2956
2957 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2958 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2959 (aarch64_relocate_instruction): Likewise.
2960 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2961 (struct aarch64_insn_visitor): Likewise.
2962
0badd99f
YQ
29632015-10-12 Yao Qi <yao.qi@linaro.org>
2964
2965 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2966 (struct aarch64_insn_visitor): New.
2967 (struct aarch64_insn_relocation_data): New.
2968 (aarch64_ftrace_insn_reloc_b): New function.
2969 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2970 (aarch64_ftrace_insn_reloc_cb): Likewise.
2971 (aarch64_ftrace_insn_reloc_tb): Likewise.
2972 (aarch64_ftrace_insn_reloc_adr): Likewise.
2973 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2974 (aarch64_ftrace_insn_reloc_others): Likewise.
2975 (visitor): New.
2976 (aarch64_relocate_instruction): Use visitor.
2977
dfaffe9d
YQ
29782015-10-12 Yao Qi <yao.qi@linaro.org>
2979
2980 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2981 int. Add argument buf.
2982 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2983 aarch64_relocate_instruction.
2984
70b439f0
YQ
29852015-10-12 Yao Qi <yao.qi@linaro.org>
2986
2987 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2988 argument insn. Remove local variable insn. Don't call
2989 target_read_uint32.
2990 (aarch64_install_fast_tracepoint_jump_pad): Call
2991 target_read_uint32.
2992
7781c06f
YQ
29932015-09-30 Yao Qi <yao.qi@linaro.org>
2994
2995 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2996 (emit_load_store_pair): Likewise.
2997
9a3c8263
SM
29982015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2999
3000 * dll.c (match_dll): Add cast(s).
3001 (unloaded_dll): Likewise.
3002 * linux-low.c (second_thread_of_pid_p): Likewise.
3003 (delete_lwp_callback): Likewise.
3004 (count_events_callback): Likewise.
3005 (select_event_lwp_callback): Likewise.
3006 (linux_set_resume_request): Likewise.
3007 * server.c (accumulate_file_name_length): Likewise.
3008 (emit_dll_description): Likewise.
3009 (handle_qxfer_threads_worker): Likewise.
3010 (visit_actioned_threads): Likewise.
3011 * thread-db.c (any_thread_of): Likewise.
3012 * tracepoint.c (same_process_p): Likewise.
3013 (match_blocktype): Likewise.
3014 (build_traceframe_info_xml): Likewise.
3015
224c3ddb
SM
30162015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3017
3018 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3019 assignment.
3020 (gdb_unparse_agent_expr): Likewise.
3021 * hostio.c (require_data): Likewise.
3022 (handle_pread): Likewise.
3023 * linux-low.c (disable_regset): Likewise.
3024 (fetch_register): Likewise.
3025 (store_register): Likewise.
3026 (get_dynamic): Likewise.
3027 (linux_qxfer_libraries_svr4): Likewise.
3028 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3029 (set_fast_tracepoint_jump): Likewise.
3030 (uninsert_fast_tracepoint_jumps_at): Likewise.
3031 (reinsert_fast_tracepoint_jumps_at): Likewise.
3032 (validate_inserted_breakpoint): Likewise.
3033 (clone_agent_expr): Likewise.
3034 * regcache.c (init_register_cache): Likewise.
3035 * remote-utils.c (putpkt_binary_1): Likewise.
3036 (decode_M_packet): Likewise.
3037 (decode_X_packet): Likewise.
3038 (look_up_one_symbol): Likewise.
3039 (relocate_instruction): Likewise.
3040 (monitor_output): Likewise.
3041 * server.c (handle_search_memory): Likewise.
3042 (handle_qxfer_exec_file): Likewise.
3043 (handle_qxfer_libraries): Likewise.
3044 (handle_qxfer): Likewise.
3045 (handle_query): Likewise.
3046 (handle_v_cont): Likewise.
3047 (handle_v_run): Likewise.
3048 (captured_main): Likewise.
3049 * target.c (write_inferior_memory): Likewise.
3050 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3051 * tracepoint.c (init_trace_buffer): Likewise.
3052 (add_tracepoint_action): Likewise.
3053 (add_traceframe): Likewise.
3054 (add_traceframe_block): Likewise.
3055 (cmd_qtdpsrc): Likewise.
3056 (cmd_qtdv): Likewise.
3057 (cmd_qtstatus): Likewise.
3058 (response_source): Likewise.
3059 (response_tsv): Likewise.
3060 (cmd_qtnotes): Likewise.
3061 (gdb_collect): Likewise.
3062 (initialize_tracepoint): Likewise.
3063
afbe19f8
PL
30642015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3065
3066 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3067 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3068 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3069 <NOP>: New.
3070 (enum aarch64_condition_codes): New enum.
3071 (w0): New static global.
3072 (fp): Likewise.
3073 (lr): Likewise.
3074 (struct aarch64_memory_operand) <type>: New
3075 MEMORY_OPERAND_POSTINDEX type.
3076 (postindex_memory_operand): New helper function.
3077 (emit_ret): New function.
3078 (emit_load_store_pair): New function, factored out of emit_stp
3079 with support for MEMORY_OPERAND_POSTINDEX.
3080 (emit_stp): Rewrite using emit_load_store_pair.
3081 (emit_ldp): New function.
3082 (emit_load_store): Likewise.
3083 (emit_ldr): Mention post-index instruction in comment.
3084 (emit_ldrh): New function.
3085 (emit_ldrb): New function.
3086 (emit_ldrsw): Mention post-index instruction in comment.
3087 (emit_str): Likewise.
3088 (emit_subs): New function.
3089 (emit_cmp): Likewise.
3090 (emit_and): Likewise.
3091 (emit_orr): Likewise.
3092 (emit_orn): Likewise.
3093 (emit_eor): Likewise.
3094 (emit_mvn): Likewise.
3095 (emit_lslv): Likewise.
3096 (emit_lsrv): Likewise.
3097 (emit_asrv): Likewise.
3098 (emit_mul): Likewise.
3099 (emit_sbfm): Likewise.
3100 (emit_sbfx): Likewise.
3101 (emit_ubfm): Likewise.
3102 (emit_ubfx): Likewise.
3103 (emit_csinc): Likewise.
3104 (emit_cset): Likewise.
3105 (emit_nop): Likewise.
3106 (emit_ops_insns): New helper function.
3107 (emit_pop): Likewise.
3108 (emit_push): Likewise.
3109 (aarch64_emit_prologue): New function.
3110 (aarch64_emit_epilogue): Likewise.
3111 (aarch64_emit_add): Likewise.
3112 (aarch64_emit_sub): Likewise.
3113 (aarch64_emit_mul): Likewise.
3114 (aarch64_emit_lsh): Likewise.
3115 (aarch64_emit_rsh_signed): Likewise.
3116 (aarch64_emit_rsh_unsigned): Likewise.
3117 (aarch64_emit_ext): Likewise.
3118 (aarch64_emit_log_not): Likewise.
3119 (aarch64_emit_bit_and): Likewise.
3120 (aarch64_emit_bit_or): Likewise.
3121 (aarch64_emit_bit_xor): Likewise.
3122 (aarch64_emit_bit_not): Likewise.
3123 (aarch64_emit_equal): Likewise.
3124 (aarch64_emit_less_signed): Likewise.
3125 (aarch64_emit_less_unsigned): Likewise.
3126 (aarch64_emit_ref): Likewise.
3127 (aarch64_emit_if_goto): Likewise.
3128 (aarch64_emit_goto): Likewise.
3129 (aarch64_write_goto_address): Likewise.
3130 (aarch64_emit_const): Likewise.
3131 (aarch64_emit_call): Likewise.
3132 (aarch64_emit_reg): Likewise.
3133 (aarch64_emit_pop): Likewise.
3134 (aarch64_emit_stack_flush): Likewise.
3135 (aarch64_emit_zero_ext): Likewise.
3136 (aarch64_emit_swap): Likewise.
3137 (aarch64_emit_stack_adjust): Likewise.
3138 (aarch64_emit_int_call_1): Likewise.
3139 (aarch64_emit_void_call_2): Likewise.
3140 (aarch64_emit_eq_goto): Likewise.
3141 (aarch64_emit_ne_goto): Likewise.
3142 (aarch64_emit_lt_goto): Likewise.
3143 (aarch64_emit_le_goto): Likewise.
3144 (aarch64_emit_gt_goto): Likewise.
3145 (aarch64_emit_ge_got): Likewise.
3146 (aarch64_emit_ops_impl): New static global variable.
3147 (aarch64_emit_ops): New target function, return
3148 &aarch64_emit_ops_impl.
3149 (struct linux_target_ops): Install it.
3150
bb903df0
PL
31512015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3152
3153 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3154 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3155 aarch64-ipa.o.
3156 * linux-aarch64-ipa.c: New file.
3157 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3158 and endian.h.
3159 (aarch64_get_thread_area): New target method.
3160 (extract_signed_bitfield): New helper function.
3161 (aarch64_decode_ldr_literal): New function.
3162 (enum aarch64_opcodes): New enum.
3163 (struct aarch64_register): New struct.
3164 (struct aarch64_operand): New struct.
3165 (x0): New static global.
3166 (x1): Likewise.
3167 (x2): Likewise.
3168 (x3): Likewise.
3169 (x4): Likewise.
3170 (w2): Likewise.
3171 (ip0): Likewise.
3172 (sp): Likewise.
3173 (xzr): Likewise.
3174 (aarch64_register): New helper function.
3175 (register_operand): Likewise.
3176 (immediate_operand): Likewise.
3177 (struct aarch64_memory_operand): New struct.
3178 (offset_memory_operand): New helper function.
3179 (preindex_memory_operand): Likewise.
3180 (enum aarch64_system_control_registers): New enum.
3181 (ENCODE): New macro.
3182 (emit_insn): New helper function.
3183 (emit_b): New function.
3184 (emit_bcond): Likewise.
3185 (emit_cb): Likewise.
3186 (emit_tb): Likewise.
3187 (emit_blr): Likewise.
3188 (emit_stp): Likewise.
3189 (emit_ldp_q_offset): Likewise.
3190 (emit_stp_q_offset): Likewise.
3191 (emit_load_store): Likewise.
3192 (emit_ldr): Likewise.
3193 (emit_ldrsw): Likewise.
3194 (emit_str): Likewise.
3195 (emit_ldaxr): Likewise.
3196 (emit_stxr): Likewise.
3197 (emit_stlr): Likewise.
3198 (emit_data_processing_reg): Likewise.
3199 (emit_data_processing): Likewise.
3200 (emit_add): Likewise.
3201 (emit_sub): Likewise.
3202 (emit_mov): Likewise.
3203 (emit_movk): Likewise.
3204 (emit_mov_addr): Likewise.
3205 (emit_mrs): Likewise.
3206 (emit_msr): Likewise.
3207 (emit_sevl): Likewise.
3208 (emit_wfe): Likewise.
3209 (append_insns): Likewise.
3210 (can_encode_int32_in): New helper function.
3211 (aarch64_relocate_instruction): New function.
3212 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3213 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3214 (struct linux_target_ops): Install aarch64_get_thread_area,
3215 aarch64_install_fast_tracepoint_jump_pad and
3216 aarch64_get_min_fast_tracepoint_insn_len.
3217
787749ea
PL
32182015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3219
3220 * Makefile.in (aarch64-insn.o): New rule.
3221 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3222
9812b2e6
YQ
32232015-09-21 Yao Qi <yao.qi@linaro.org>
3224
3225 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3226
18fe412b
YQ
32272015-09-21 Yao Qi <yao.qi@linaro.org>
3228
3229 * tracepoint.c (max_jump_pad_size): Remove.
3230
a0cc84cd
YQ
32312015-09-18 Yao Qi <yao.qi@linaro.org>
3232
3233 * linux-aarch64-low.c: Don't include sys/uio.h.
3234 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3235
d78908cf
WW
32362015-09-16 Wei-cheng Wang <cole945@gmail.com>
3237
3238 * tracepoint.c (eval_result_type): Change prototype.
3239 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3240
d57e0d50
PA
32412015-09-15 Pedro Alves <palves@redhat.com>
3242
3243 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3244 Check whether to report exec events instead of checking whether
3245 multiprocess is enabled.
3246
5a676acc
PA
32472015-09-15 Pedro Alves <palves@redhat.com>
3248
3249 PR remote/18965
3250 * remote-utils.c (prepare_resume_reply): Merge
3251 TARGET_WAITKIND_VFORK_DONE switch case with the
3252 TARGET_WAITKIND_FORKED case.
3253
7c5d0fad
YQ
32542015-09-15 Yao Qi <yao.qi@linaro.org>
3255
3256 * server.c (handle_query): Check string comparison using
3257 "else if" instead of "if".
3258
750ce8d1
YQ
32592015-09-15 Yao Qi <yao.qi@linaro.org>
3260
3261 * server.c (vCont_supported): New global variable.
3262 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3263 matches. Append ";vContSupported+" to own_buf.
3264 (handle_v_requests): Append ";s;S" to own_buf if target supports
3265 hardware single step or vCont_supported is false.
3266 (capture_main): Set vCont_supported to zero.
3267
70b90b91
YQ
32682015-09-15 Yao Qi <yao.qi@linaro.org>
3269
3270 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3271 it to ...
3272 (linux_supports_hardware_single_step): ... New function.
3273 (linux_target_ops): Update.
3274 * lynx-low.c (lynx_target_ops): Set field
3275 supports_hardware_single_step to target_can_do_hardware_single_step.
3276 * nto-low.c (nto_target_ops): Likewise.
3277 * spu-low.c (spu_target_ops): Likewise.
3278 * win32-low.c (win32_target_ops): Likewise.
3279 * target.c (target_can_do_hardware_single_step): New function.
3280 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3281 Remove. <supports_hardware_single_step>: New field.
3282 (target_supports_conditional_breakpoints): Remove.
3283 (target_supports_hardware_single_step): New macro.
3284 (target_can_do_hardware_single_step): Declare.
3285 * server.c (handle_query): Use target_supports_hardware_single_step
3286 instead of target_supports_conditional_breakpoints.
3287
ade90bde
YQ
32882015-09-15 Yao Qi <yao.qi@linaro.org>
3289
3290 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3291 function.
3292 (struct linux_target_ops the_low_target): Install
3293 aarch64_linux_siginfo_fixup.
3294
94585166
DB
32952015-09-11 Don Breazeal <donb@codesourcery.com>
3296 Luis Machado <lgustavo@codesourcery.com>
3297
3298 * linux-low.c (linux_mourn): Static declaration.
3299 (linux_arch_setup): Move in front of
3300 handle_extended_wait.
3301 (linux_arch_setup_thread): New function.
3302 (handle_extended_wait): Handle exec events. Call
3303 linux_arch_setup_thread. Make event_lwp argument a
3304 pointer-to-a-pointer.
3305 (check_zombie_leaders): Do not check stopped threads.
3306 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3307 (linux_low_filter_event): Add lwp and thread for exec'ing
3308 non-leader thread if leader thread has been deleted.
3309 Refactor code into linux_arch_setup_thread and call it.
3310 Pass child lwp pointer by reference to handle_extended_wait.
3311 (linux_wait_for_event_filtered): Update comment.
3312 (linux_wait_1): Prevent clobbering exec event status.
3313 (linux_supports_exec_events): New function.
3314 (linux_target_ops) <supports_exec_events>: Initialize new member.
3315 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3316 new member.
3317 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3318 * server.c (report_exec_events): New global variable.
3319 (handle_query): Handle qSupported query for exec-events feature.
3320 (captured_main): Initialize report_exec_events.
3321 * server.h (report_exec_events): Declare new global variable.
3322 * target.h (struct target_ops) <supports_exec_events>: New
3323 member.
3324 (target_supports_exec_events): New macro.
3325 * win32-low.c (win32_target_ops) <supports_exec_events>:
3326 Initialize new member.
3327
0568462b
MM
33282015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3329
3330 * linux-low.c (linux_low_enable_btrace): Remove.
3331 (linux_target_ops): Replace linux_low_enable_btrace with
3332 linux_enable_btrace.
3333
39edd165
YQ
33342015-09-03 Yao Qi <yao.qi@linaro.org>
3335
3336 * linux-aarch64-low.c (aarch64_insert_point): Call
3337 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3338 returns true.
3339
1db33b5a
UW
33402015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3341
3342 * linux-low.c (check_stopped_by_breakpoint): Use
3343 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3344
ab290430
PA
33452015-08-27 Pedro Alves <palves@redhat.com>
3346
3347 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3348
8d749320
SM
33492015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3350
6711b7f8
SM
3351 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3352 the XNEW-family equivalent.
8d749320
SM
3353 (compile_bytecodes): Likewise.
3354 * dll.c (loaded_dll): Likewise.
3355 * event-loop.c (append_callback_event): Likewise.
3356 (create_file_handler): Likewise.
3357 (create_file_event): Likewise.
3358 * hostio.c (handle_open): Likewise.
3359 * inferiors.c (add_thread): Likewise.
3360 (add_process): Likewise.
3361 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3362 * linux-arm-low.c (arm_new_process): Likewise.
3363 (arm_new_thread): Likewise.
3364 * linux-low.c (add_to_pid_list): Likewise.
3365 (linux_add_process): Likewise.
3366 (handle_extended_wait): Likewise.
3367 (add_lwp): Likewise.
3368 (enqueue_one_deferred_signal): Likewise.
3369 (enqueue_pending_signal): Likewise.
3370 (linux_resume_one_lwp_throw): Likewise.
3371 (linux_resume_one_thread): Likewise.
3372 (linux_read_memory): Likewise.
3373 (linux_write_memory): Likewise.
3374 * linux-mips-low.c (mips_linux_new_process): Likewise.
3375 (mips_linux_new_thread): Likewise.
3376 (mips_add_watchpoint): Likewise.
3377 * linux-x86-low.c (initialize_low_arch): Likewise.
3378 * lynx-low.c (lynx_add_process): Likewise.
3379 * mem-break.c (set_raw_breakpoint_at): Likewise.
3380 (set_breakpoint): Likewise.
3381 (add_condition_to_breakpoint): Likewise.
3382 (add_commands_to_breakpoint): Likewise.
3383 (clone_agent_expr): Likewise.
3384 (clone_one_breakpoint): Likewise.
3385 * regcache.c (new_register_cache): Likewise.
3386 * remote-utils.c (look_up_one_symbol): Likewise.
3387 * server.c (queue_stop_reply): Likewise.
3388 (start_inferior): Likewise.
3389 (queue_stop_reply_callback): Likewise.
3390 (handle_target_event): Likewise.
3391 * spu-low.c (fetch_ppc_memory): Likewise.
3392 (store_ppc_memory): Likewise.
3393 * target.c (set_target_ops): Likewise.
3394 * thread-db.c (thread_db_load_search): Likewise.
3395 (try_thread_db_load_1): Likewise.
3396 * tracepoint.c (add_tracepoint): Likewise.
3397 (add_tracepoint_action): Likewise.
3398 (create_trace_state_variable): Likewise.
3399 (cmd_qtdpsrc): Likewise.
3400 (cmd_qtro): Likewise.
3401 (add_while_stepping_state): Likewise.
3402 * win32-low.c (child_add_thread): Likewise.
3403 (get_image_name): Likewise.
3404
ed8b7b42
YQ
34052015-08-25 Yao Qi <yao.qi@linaro.org>
3406
3407 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3408
db3cb7cb
YQ
34092015-08-25 Yao Qi <yao.qi@linaro.org>
3410
3411 * Makefile.in (aarch64-linux.o): New rule.
3412 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3413 srv_tgtobj.
3414 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3415 (aarch64_init_debug_reg_state): Make it extern.
3416 (aarch64_linux_prepare_to_resume): Remove.
3417
f6011a1c
YQ
34182015-08-25 Yao Qi <yao.qi@linaro.org>
3419
3420 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3421 lwp_arch_private_info and ptid_of_lwp.
3422
88e2cf7e
YQ
34232015-08-25 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3426 Find proc_info by find_process_pid. All callers updated.
3427
5e35436e
YQ
34282015-08-25 Yao Qi <yao.qi@linaro.org>
3429
3430 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3431 Remove.
3432 (debug_reg_change_callback): Remove.
3433 (aarch64_notify_debug_reg_change): Remove.
3434
4a8a7965
YQ
34352015-08-25 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3438 Call current_lwp_ptid.
3439
32a271ee
YQ
34402015-08-25 Yao Qi <yao.qi@linaro.org>
3441
3442 * linux-aarch64-low.c (debug_reg_change_callback): Use
3443 debug_printf.
3444
0d51c8d7
YQ
34452015-08-25 Yao Qi <yao.qi@linaro.org>
3446
3447 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3448
31a43dd5
YQ
34492015-08-25 Yao Qi <yao.qi@linaro.org>
3450
3451 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3452
8ee52567
YQ
34532015-08-25 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3456 the code.
3457
ff3f0f45
YQ
34582015-08-25 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3461 Remove.
3462 (debug_reg_change_callback): Remove argument entry and add argument
3463 lwp. Remove local variable thread. Don't print thread id in the
3464 debugging output. Don't check whether pid of thread equals to pid.
3465 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3466 iterate_over_lwps instead find_inferior.
3467
3d40fbb5
PA
34682015-08-24 Pedro Alves <palves@redhat.com>
3469
3470 * inferiors.c (get_first_process): New function.
3471 * inferiors.h (get_first_process): New declaration.
3472 * remote-utils.c (read_ptid): Default to the first process in the
3473 list, instead of to the current thread's process.
3474
438e1e42
PA
34752015-08-24 Pedro Alves <palves@redhat.com>
3476
3477 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3478 * event-loop.c: Likewise.
3479 * remote-utils.c: Likewise.
3480 * tracepoint.c: Likewise.
3481
a8c6d4fc
PA
34822015-08-24 Pedro Alves <palves@redhat.com>
3483
3484 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3485 ptid_get_lwp.
3486
99b0bb12
PA
34872015-08-21 Pedro Alves <palves@redhat.com>
3488
3489 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3490 instead of literal 1.
3491
f8904751
PA
34922015-08-21 Pedro Alves <palves@redhat.com>
3493
3494 * tdesc.c (default_description): Explicitly zero-initialize.
3495
465a859e
PA
34962015-08-21 Pedro Alves <palves@redhat.com>
3497
3498 PR gdb/18749
3499 * inferiors.c (remove_thread): Discard any pending stop reply for
3500 this thread.
3501 * server.c (remove_all_on_match_pid): Rename to ...
3502 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3503 instead of a pid.
3504 (discard_queued_stop_replies): Change parameter to a ptid. Now
3505 extern.
3506 (handle_v_kill, kill_inferior_callback, captured_main)
3507 (process_serial_event): Adjust.
3508 * server.h (discard_queued_stop_replies): Declare.
3509
f0db101d
PA
35102015-08-21 Pedro Alves <palves@redhat.com>
3511
3512 * linux-low.c (wait_for_sigstop): Always switch to no thread
3513 selected if the previously current thread dies.
3514 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3515 process instead of the current thread's.
3516 * remote-utils.c (input_interrupt): Don't check if there's no
3517 current thread.
3518 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3519 current thread to the general thread fails, error out.
3520 (handle_qxfer_auxv, handle_qxfer_libraries)
3521 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3522 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3523 (handle_query): Check if there's a thread selected instead of
3524 checking whether there's any thread in the thread list.
3525 (handle_qxfer_threads, handle_qxfer_btrace)
3526 (handle_qxfer_btrace_conf): Don't error out early if there's no
3527 thread in the thread list.
3528 (handle_v_cont, myresume): Don't set the current thread to the
3529 continue thread.
3530 (process_serial_event) <Hg handling>: Also set thread_id if the
3531 previous general thread is still alive.
3532 (process_serial_event) <g/G handling>: If setting the current
3533 thread to the general thread fails, error out.
3534 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3535 thread's lwp instead of the current thread's.
3536 * target.c (set_desired_thread): If the desired thread was not
3537 found, leave the current thread pointing to NULL. Return an int
3538 (boolean) indicating success.
3539 * target.h (set_desired_thread): Change return type to int.
3540
40045d91
MF
35412015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3542
3543 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3544 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3545 #includes.
3546 (ps_get_thread_area): New function.
3547
45face3b
GB
35482015-08-19 Gary Benson <gbenson@redhat.com>
3549
3550 * hostio.c (handle_pread): Do not attempt to read more data
3551 than hostio_reply_with_data can fit in a packet.
3552
16d5f642
JB
35532015-08-18 Joel Brobecker <brobecker@adacore.com>
3554
3555 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3556
a738da3a
MF
35572015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3558
3559 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3560
33ebda9d
PA
35612015-08-06 Pedro Alves <palves@redhat.com>
3562
3563 * tracepoint.c (expr_eval_result): Now an int.
3564
a44892be
PA
35652015-08-06 Pedro Alves <palves@redhat.com>
3566
3567 * gdbthread.h (struct regcache): Forward declare.
3568 (struct thread_info) <regcache_data>: Now a struct regcache
3569 pointer.
3570 * inferiors.c (inferior_regcache_data)
3571 (set_inferior_regcache_data): Now work with struct regcache
3572 pointers.
3573 * inferiors.h (struct regcache): Forward declare.
3574 (inferior_regcache_data, set_inferior_regcache_data): Now work
3575 with struct regcache pointers.
3576 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3577 (free_register_cache_thread): Remove struct regcache pointer
3578 casts.
3579
608a1e46
PA
35802015-08-06 Pedro Alves <palves@redhat.com>
3581
3582 * server.c (captured_main): On error, print the exception message
3583 to stderr, and if run_once is set, throw a quit.
3584
f0ce0d3a
PA
35852015-08-06 Pedro Alves <palves@redhat.com>
3586
3587 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3588 the current thread.
3589
bf47e248
PA
35902015-08-06 Pedro Alves <palves@redhat.com>
3591
3592 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3593 reading beyond the passed in buffer length.
3594
b6b9ffcc
PL
35952015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3596
3597 * tracepoint.c (symbol_list) <required>: Remove.
3598
863d01bd
PA
35992015-08-06 Pedro Alves <palves@redhat.com>
3600
3601 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3602 count if stopping and suspending threads.
3603 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3604 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3605 (linux_detach): Complete an ongoing step-over.
3606 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3607 throughout.
3608 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3609 (linux_wait_1): If passing a signal to the inferior after
3610 finishing a step-over, unsuspend and re-resume all lwps. If we
3611 see a single-step event but the thread should be continuing, don't
3612 pass the trap to gdb.
3613 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3614 internal_error instead of gdb_assert.
3615 (enqueue_pending_signal): New function.
3616 (check_ptrace_stopped_lwp_gone): Add debug output.
3617 (start_step_over): Use internal_error instead of gdb_assert.
3618 (complete_ongoing_step_over): New function.
3619 (linux_resume_one_thread): Don't resume a suspended thread.
3620 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3621 it stepping.
3622
00db26fa
PA
36232015-08-06 Pedro Alves <palves@redhat.com>
3624
3625 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3626 (linux_thread_alive): Use lwp_is_marked_dead.
3627 (extended_event_reported): Delete.
3628 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3629 instead of extended_event_reported.
3630 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3631 as well.
3632 (lwp_is_marked_dead): New function.
3633 (lwp_running): Use lwp_is_marked_dead.
3634 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3635 comment.
3636
ad071a30
PA
36372015-08-06 Pedro Alves <palves@redhat.com>
3638
3639 * linux-low.c (linux_wait_1): Move fork event output out of the
3640 !report_to_gdb check. Pass event_child->waitstatus to
3641 target_waitstatus_to_string instead of ourstatus.
3642
524b57e6
YQ
36432015-08-04 Yao Qi <yao.qi@linaro.org>
3644
3645 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3646 if current_thread is 32 bit.
3647
6085d6f6
YQ
36482015-08-04 Yao Qi <yao.qi@linaro.org>
3649
3650 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3651 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3652 * server.c (extended_protocol): Remove "static".
3653 * server.h (extended_protocol): Declare it.
3654
8a7e4587
YQ
36552015-08-04 Yao Qi <yao.qi@linaro.org>
3656
3657 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3658 both aarch64 and aarch32.
3659 (aarch64_set_pc): Likewise.
3660
3b53ae99
YQ
36612015-08-04 Yao Qi <yao.qi@linaro.org>
3662
3663 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3664 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3665 arm-with-neon.xml to srv_xmlfiles.
3666 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3667 (is_64bit_tdesc): New function.
3668 (aarch64_linux_read_description): New function.
3669 (aarch64_arch_setup): Call aarch64_linux_read_description.
3670 (regs_info): Rename to regs_info_aarch64.
3671 (aarch64_regs_info): Return right regs_info.
3672 (initialize_low_arch): Call initialize_low_arch_aarch32.
3673
bd9e6534
YQ
36742015-08-04 Yao Qi <yao.qi@linaro.org>
3675
3676 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3677 * linux-aarch32-low.c: New file.
3678 * linux-aarch32-low.h: New file.
3679 * linux-arm-low.c (arm_fill_gregset): Move it to
3680 linux-aarch32-low.c.
3681 (arm_store_gregset): Likewise.
3682 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3683 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3684 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3685 (regs_info): Rename to regs_info_arm.
3686 (arm_regs_info): Return regs_info_aarch32 if
3687 have_ptrace_getregset is 1 and target description is
3688 arm_with_neon or arm_with_vfpv3.
3689 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3690 Call initialize_low_arch_aarch32 instead.
3691
ded48a5e
YQ
36922015-08-04 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3695 * linux-low.c: ... here.
3696 * linux-low.h (have_ptrace_getregset): Declare it.
3697
96e9210f
PA
36982015-08-04 Pedro Alves <palves@redhat.com>
3699
3700 * thread-db.c (struct thread_db): Use new typedefs.
3701 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3702 CHK calls.
3703 (disable_thread_event_reporting): Cast result of dlsym to
3704 destination function pointer type.
3705 (thread_db_mourn): Use td_ta_delete_ftype.
3706
af60a1ef
SL
37072015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3708
3709 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3710 arch variant.
3711 (CDX_BREAKPOINT): Define for R2.
3712 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3713 (the_low_target): Add comments.
3714
e8b41681
YQ
37152015-07-30 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-arm-low.c (arm_hwcap): Remove it.
3718 (arm_read_description): New local variable arm_hwcap. Don't
3719 set arm_hwcap to zero.
3720
89abb039
YQ
37212015-07-30 Yao Qi <yao.qi@linaro.org>
3722
3723 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3724 Use regcache->tdesc instead.
3725 (arm_store_wmmxregset): Likewise.
3726 (arm_fill_vfpregset): Likewise.
3727 (arm_store_vfpregset): Likewise.
3728
deca266c
YQ
37292015-07-30 Yao Qi <yao.qi@linaro.org>
3730
3731 * linux-arm-low.c: Include arch/arm.h.
3732 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3733 (arm_store_gregset): Likewise.
3734
aa58a496
SM
37352015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3736
3737 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3738 ptrace's 4th parameter.
3739
50904b25
YQ
37402015-07-27 Yao Qi <yao.qi@linaro.org>
3741
3742 * configure.srv (case aarch64*-*-linux*): Don't set
3743 srv_linux_usrregs.
3744
5826e159
PA
37452015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3746
3747 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3748 sys/ptrace.h.
3749 * linux-arm-low.c: Likewise.
3750 * linux-cris-low.c: Likewise.
3751 * linux-crisv32-low.c: Likewise.
3752 * linux-low.c: Likewise.
3753 * linux-m68k-low.c: Likewise.
3754 * linux-mips-low.c: Likewise.
3755 * linux-nios2-low.c: Likewise.
3756 * linux-s390-low.c: Likewise.
3757 * linux-sparc-low.c: Likewise.
3758 * linux-tic6x-low.c: Likewise.
3759 * linux-tile-low.c: Likewise.
3760 * linux-x86-low.c: Likewise.
3761
54019719
PA
37622015-07-24 Pedro Alves <palves@redhat.com>
3763
3764 * config.in: Regenerate.
3765 * configure: Regenerate.
3766
eb7aa561
PA
37672015-07-24 Pedro Alves <palves@redhat.com>
3768
3769 * acinclude.m4: Include ../ptrace.m4.
3770 * configure.ac: Call GDB_AC_PTRACE.
3771 * config.in, configure: Regenerate.
3772
55d7b841
YQ
37732015-07-24 Yao Qi <yao.qi@linaro.org>
3774
3775 * linux-low.c (linux_create_inferior): Remove setting to
3776 proc->priv->new_inferior.
3777 (linux_attach): Likewise.
3778 (linux_low_filter_event): Likewise.
3779 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3780
c06cbd92
YQ
37812015-07-24 Yao Qi <yao.qi@linaro.org>
3782
3783 * linux-low.c (linux_arch_setup): New function.
3784 (linux_low_filter_event): If proc->tdesc is NULL and
3785 proc->attached is true, call the_low_target.arch_setup.
3786 Otherwise, keep status pending, and return.
3787 (linux_resume_one_lwp_throw): Don't call get_pc if
3788 thread->while_stepping isn't NULL. Don't call
3789 get_thread_regcache if proc->tdesc is NULL.
3790 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3791 (linux_target_ops): Install arch_setup.
3792 * server.c (start_inferior): Call the_target->arch_setup.
3793 * target.h (struct target_ops) <arch_setup>: New field.
3794 (target_arch_setup): New marco.
3795 * lynx-low.c (lynx_target_ops): Update.
3796 * nto-low.c (nto_target_ops): Update.
3797 * spu-low.c (spu_target_ops): Update.
3798 * win32-low.c (win32_target_ops): Update.
3799
5ae3ebba
YQ
38002015-07-24 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-low.c (linux_add_process): Don't set
3803 proc->priv->new_inferior.
3804 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3805 (linux_attach): Likewise.
3806
eb97750b
YQ
38072015-07-24 Yao Qi <yao.qi@linaro.org>
3808
3809 * server.c (start_inferior): Code refactor.
3810
51aee833
YQ
38112015-07-24 Yao Qi <yao.qi@linaro.org>
3812
3813 * server.c (process_serial_event): Set general_thread.
3814
af1b22f3
YQ
38152015-07-21 Yao Qi <yao.qi@linaro.org>
3816
3817 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3818 aarch64_linux_get_debug_reg_capacity.
3819
554717a3
YQ
38202015-07-17 Yao Qi <yao.qi@linaro.org>
3821
3822 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3823 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3824 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3825 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3826 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3827 (AARCH64_HWP_ALIGNMENT): Likewise.
3828 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3829 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3830 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3831 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3832 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3833 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3834 (struct aarch64_debug_reg_state): Likewise.
3835 (struct arch_lwp_info): Likewise.
3836 (aarch64_align_watchpoint): Likewise.
3837 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3838 (aarch64_watchpoint_length): Likewise.
3839 (aarch64_point_encode_ctrl_reg): Likewise
3840 (aarch64_point_is_aligned): Likewise.
3841 (aarch64_align_watchpoint): Likewise.
3842 (aarch64_linux_set_debug_regs):
3843 (aarch64_dr_state_insert_one_point): Likewise.
3844 (aarch64_dr_state_remove_one_point): Likewise.
3845 (aarch64_handle_breakpoint): Likewise.
3846 (aarch64_handle_aligned_watchpoint): Likewise.
3847 (aarch64_handle_unaligned_watchpoint): Likewise.
3848 (aarch64_handle_watchpoint): Likewise.
3849
c67ca4de
YQ
38502015-07-17 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3853 and don't aarch64_get_debug_reg_state. All callers update.
3854 (aarch64_handle_aligned_watchpoint): Likewise.
3855 (aarch64_handle_unaligned_watchpoint): Likewise.
3856 (aarch64_handle_watchpoint): Likewise.
3857 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3858 (aarch64_remove_point): Likewise.
3859
25abf979
YQ
38602015-07-17 Yao Qi <yao.qi@linaro.org>
3861
3862 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3863 debug_printf.
3864 (aarch64_handle_unaligned_watchpoint): Likewise.
3865
db1ff28b
JK
38662015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3867
3868 Revert the previous 3 commits:
3869 Move gdb_regex* to common/
3870 Move linux_find_memory_regions_full & co.
3871 gdbserver build-id attribute generator
3872
700ca40f
JK
38732015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3874 Jan Kratochvil <jan.kratochvil@redhat.com>
3875
3876 gdbserver build-id attribute generator.
3877 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3878 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3879 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3880 (find_phdr): New.
3881 (get_dynamic): Use find_pdhr to traverse program headers.
3882 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3883 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3884 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3885 (get_hex_build_id): New.
3886 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3887 to reply XML document.
3888
9904185c
JK
38892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3890 Jan Kratochvil <jan.kratochvil@redhat.com>
3891
3892 * target.c: Include target/target-utils.h and fcntl.h.
3893 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3894 (target_fileio_read_stralloc): New functions.
3895
6e5b4429
JK
38962015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3897
3898 * Makefile.in (OBS): Add gdb_regex.o.
3899 (gdb_regex.o): New.
3900 * config.in: Rebuilt.
3901 * configure: Rebuilt.
3902
ddc98fbf
JK
39032015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3904 Jan Kratochvil <jan.kratochvil@redhat.com>
3905
3906 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3907 * Makefile.in (OBS): Add target-utils.o.
3908 (linux-maps.o, target-utils.o): New.
3909 * configure.srv (srv_linux_obj): Add linux-maps.o.
3910
e57bb7a0
PL
39112015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3912
3913 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3914 function, return 1.
3915 (the_low_target): Install it.
3916
586b02a9
PA
39172015-07-14 Pedro Alves <palves@redhat.com>
3918
3919 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3920 Instead, ignore ECHILD, and throw an error for other errnos.
3921
58c1b36c
PA
39222015-07-10 Pedro Alves <palves@redhat.com>
3923
3924 * event-loop.c (struct callback_event) <data>: Change type to
3925 gdb_client_data instance instead of gdb_client_data pointer.
3926 (append_callback_event): Adjust.
3927
421530db
PL
39282015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3929
3930 * linux-aarch64-low.c: Add comments for each linux_target_ops
3931 method. Remove comments already covered in target_ops and
3932 linux_target_ops definitions.
3933 (the_low_target): Add comments for each unimplemented method.
3934
c2d65f38
YQ
39352015-07-09 Yao Qi <yao.qi@linaro.org>
3936
3937 * linux-aarch64-low.c (aarch64_regmap): Remove.
3938 (aarch64_usrregs_info): Remove.
3939 (regs_info): Set field usrregs to NULL.
3940
b20a6524
MM
39412015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3942
3943 * linux-low.c: Include "rsp-low.h"
3944 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3945 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3946 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3947 (handle_btrace_enable_pt): New.
3948 (handle_btrace_general_set): Support "pt".
3949 (handle_btrace_conf_general_set): Support "pt:size".
3950
96c97461
PL
39512015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3952
3953 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3954 Z_PACKET_SW_BP.
3955
37d66942
PL
39562015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3957
3958 * linux-aarch64-low.c: Remove comment about endianness.
3959 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3960 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3961 memcmp.
3962
dc06243f
GB
39632015-06-24 Gary Benson <gbenson@redhat.com>
3964
3965 * linux-i386-ipa.c (stdint.h): Do not include.
3966 * lynx-i386-low.c (stdint.h): Likewise.
3967 * lynx-ppc-low.c (stdint.h): Likewise.
3968 * mem-break.c (stdint.h): Likewise.
3969 * thread-db.c (stdint.h): Likewise.
3970 * tracepoint.c (stdint.h): Likewise.
3971 * win32-low.c (stdint.h): Likewise.
3972
124e13d9
SM
39732015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3974
3975 * server.c (write_qxfer_response): Update call to
3976 remote_escape_output.
3977
909c2cda
JK
39782015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3979 Jan Kratochvil <jan.kratochvil@redhat.com>
3980
3981 Merge multiple hex conversions.
3982 * gdbreplay.c (tohex): Rename to 'fromhex'.
3983 (logchar): Use fromhex.
3984
24c05f46
JK
39852015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3986
3987 * server.c (handle_qxfer_libraries): Set `version' attribute for
3988 <library-list>.
3989
14d2069a
GB
39902015-06-10 Gary Benson <gbenson@redhat.com>
3991
3992 * target.h (struct target_ops) <multifs_open>: New field.
3993 <multifs_unlink>: Likewise.
3994 <multifs_readlink>: Likewise.
3995 * linux-low.c (nat/linux-namespaces.h): New include.
3996 (linux_target_ops): Initialize the_target->multifs_open,
3997 the_target->multifs_unlink and the_target->multifs_readlink.
3998 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3999 * hostio.c (hostio_fs_pid): New static variable.
4000 (hostio_handle_new_gdb_connection): New function.
4001 (handle_setfs): Likewise.
4002 (handle_open): Use the_target->multifs_open as appropriate.
4003 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4004 (handle_readlink): Use the_target->multifs_readlink as
4005 appropriate.
4006 (handle_vFile): Handle vFile:setfs packets.
4007 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4008 after target_handle_new_gdb_connection.
4009
4b8b5e72
GB
40102015-06-10 Gary Benson <gbenson@redhat.com>
4011
4012 * configure.ac (AC_CHECK_FUNCS): Add setns.
4013 * config.in: Regenerate.
4014 * configure: Likewise.
4015 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4016 (linux-namespaces.o): New rule.
4017 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4018
3ac2e371
GB
40192015-06-09 Gary Benson <gbenson@redhat.com>
4020
4021 * hostio.c (handle_open): Process mode argument with
4022 fileio_to_host_mode.
4023
ca9b78ce
YQ
40242015-06-01 Yao Qi <yao.qi@linaro.org>
4025
4026 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4027 * linux-x86-low.c: Likewise.
4028
bfacd19d
DB
40292015-05-28 Don Breazeal <donb@codesourcery.com>
4030
4031 * linux-low.c (handle_extended_wait): Initialize
4032 thread_info.last_resume_kind for new fork children.
4033
452003ef
PA
40342015-05-15 Pedro Alves <palves@redhat.com>
4035
4036 * target.h (target_handle_new_gdb_connection): Rewrite using if
4037 wrapped in do/while.
4038
1041a03c
JB
40392015-05-14 Joel Brobecker <brobecker@adacore.com>
4040
4041 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4042 * configure, config.in: Regenerate.
4043 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4044 Declare typedef.
4045
c269dbdb
DB
40462015-05-12 Don Breazeal <donb@codesourcery.com>
4047
4048 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4049 PTRACE_EVENT_VFORK_DONE.
4050 (linux_low_ptrace_options, extended_event_reported): Add vfork
4051 events.
4052 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4053 and "vforkdone" for RSP 'T' Stop Reply Packet.
4054 * server.h (report_vfork_events): Declare
4055 global variable.
4056
3a8a0396
DB
40572015-05-12 Don Breazeal <donb@codesourcery.com>
4058
4059 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4060 (the_low_target) <new_fork>: Initialize new member.
4061 * linux-arm-low.c (arm_new_fork): New function.
4062 (the_low_target) <new_fork>: Initialize new member.
4063 * linux-low.c (handle_extended_wait): Call new target function
4064 new_fork.
4065 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4066 * linux-mips-low.c (mips_add_watchpoint): New function
4067 extracted from mips_insert_point.
4068 (the_low_target) <new_fork>: Initialize new member.
4069 (mips_linux_new_fork): New function.
4070 (mips_insert_point): Call mips_add_watchpoint.
4071 * linux-x86-low.c (x86_linux_new_fork): New function.
4072 (the_low_target) <new_fork>: Initialize new member.
4073
de0d863e
DB
40742015-05-12 Don Breazeal <donb@codesourcery.com>
4075
4076 * linux-low.c (handle_extended_wait): Implement return value,
4077 rename argument 'event_child' to 'event_lwp', handle
4078 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4079 (linux_low_ptrace_options): New function.
4080 (linux_low_filter_event): Call linux_low_ptrace_options,
4081 use different argument fo linux_enable_event_reporting,
4082 use return value from handle_extended_wait.
4083 (extended_event_reported): New function.
4084 (linux_wait_1): Call extended_event_reported and set
4085 status to report fork events.
4086 (linux_write_memory): Add pid to debug message.
4087 (reset_lwp_ptrace_options_callback): New function.
4088 (linux_handle_new_gdb_connection): New function.
4089 (linux_target_ops): Initialize new structure member.
4090 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4091 * lynx-low.c: Initialize new structure member.
4092 * remote-utils.c (prepare_resume_reply): Implement stop reason
4093 "fork" for "T" stop message.
4094 * server.c (handle_query): Call handle_new_gdb_connection.
4095 * server.h (report_fork_events): Declare global flag.
4096 * target.h (struct target_ops) <handle_new_gdb_connection>:
4097 New member.
4098 (target_handle_new_gdb_connection): New macro.
4099 * win32-low.c: Initialize new structure member.
4100
ddcbc397
DB
41012015-05-12 Don Breazeal <donb@codesourcery.com>
4102
4103 * mem-break.c (APPEND_TO_LIST): Define macro.
4104 (clone_agent_expr): New function.
4105 (clone_one_breakpoint): New function.
4106 (clone_all_breakpoints): New function.
4107 * mem-break.h: Declare new functions.
4108
89245bc0
DB
41092015-05-12 Don Breazeal <donb@codesourcery.com>
4110
4111 * linux-low.c (linux_supports_fork_events): New function.
4112 (linux_supports_vfork_events): New function.
4113 (linux_target_ops): Initialize new structure members.
4114 (initialize_low): Call linux_check_ptrace_features.
4115 * lynx-low.c (lynx_target_ops): Initialize new structure
4116 members.
4117 * server.c (report_fork_events, report_vfork_events):
4118 New global flags.
4119 (handle_query): Add new features to qSupported packet and
4120 response.
4121 (captured_main): Initialize new global variables.
4122 * target.h (struct target_ops) <supports_fork_events>:
4123 New member.
4124 <supports_vfork_events>: New member.
4125 (target_supports_fork_events): New macro.
4126 (target_supports_vfork_events): New macro.
4127 * win32-low.c (win32_target_ops): Initialize new structure
4128 members.
4129
835205d0
GB
41302015-05-12 Gary Benson <gbenson@redhat.com>
4131
4132 * server.c (handle_qxfer_exec_file): Use current process
4133 if annex is empty.
4134
21e94bd9
SL
41352015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4136
4137 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4138 Remove HAVE_PTRACE_GETREGS conditionals.
4139 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4140 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4141
45614f15
YQ
41422015-05-08 Yao Qi <yao.qi@linaro.org>
4143
4144 * linux-low.c (linux_supports_conditional_breakpoints): New
4145 function.
4146 (linux_target_ops): Install new target method.
4147 * lynx-low.c (lynx_target_ops): Install NULL hook for
4148 supports_conditional_breakpoints.
4149 * nto-low.c (nto_target_ops): Likewise.
4150 * spu-low.c (spu_target_ops): Likewise.
4151 * win32-low.c (win32_target_ops): Likewise.
4152 * server.c (handle_query): Check
4153 target_supports_conditional_breakpoints.
4154 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4155 New field.
4156 (target_supports_conditional_breakpoints): New macro.
4157
80ad801e
PA
41582015-05-06 Pedro Alves <palves@redhat.com>
4159
4160 PR server/18081
4161 * server.c (start_inferior): If the process exits, mourn it.
4162
819843c7
GB
41632015-04-21 Gary Benson <gbenson@redhat.com>
4164
4165 * hostio.c (fileio_open_flags_to_host): Factored out to
4166 fileio_to_host_openflags in common/fileio.c. Single use
4167 updated.
4168
a2d5a9d7
MF
41692015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4170
4171 * linux-xtensa-low.c (xtensa_fill_gregset)
4172 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4173 XCHAL_HAVE_LOOP.
4174
deb44829
MF
41752015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4176
4177 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4178 (regs_info): Replace usrregs pointer with NULL.
4179
e57f1de3
GB
41802015-04-17 Gary Benson <gbenson@redhat.com>
4181
4182 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4183 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4184 * server.c (handle_qxfer_exec_file): New function.
4185 (qxfer_packets): Add exec-file entry.
4186 (handle_query): Report qXfer:exec-file:read as supported packet.
4187
62828379
RN
41882015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4189
4190 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4191
b88bb450
GB
41922015-04-09 Gary Benson <gbenson@redhat.com>
4193
4194 * hostio-errno.c (errno_to_fileio_error): Remove function.
4195 Update caller to use remote_fileio_to_fio_error.
4196
c8f4bfdd
YQ
41972015-04-09 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-low.c (linux_insert_point): Call
4200 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4201 (linux_remove_point): Call remove_memory_breakpoint if type is
4202 raw_bkpt_type_sw.
4203 * linux-x86-low.c (x86_insert_point): Don't call
4204 insert_memory_breakpoint.
4205 (x86_remove_point): Don't call remove_memory_breakpoint.
4206
41f98f02
PA
42072015-04-01 Pedro Alves <palves@redhat.com>
4208 Cleber Rosa <crosa@redhat.com>
4209
4210 * server.c (gdbserver_usage): Reorganize and extend the usage
4211 message.
4212
2bf6fb9d
PA
42132015-03-24 Pedro Alves <palves@redhat.com>
4214
4215 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4216 output. Also dump TRAP_TRACE.
4217 (linux_low_filter_event): In debug output, distinguish a
4218 resume_stop SIGSTOP from a delayed SIGSTOP.
4219
369f6daa
GB
42202015-03-24 Gary Benson <gbenson@redhat.com>
4221
4222 * linux-x86-low.c (x86_linux_new_thread): Moved to
4223 nat/x86-linux.c.
4224 (x86_linux_prepare_to_resume): Likewise.
4225
8e5d4070
GB
42262015-03-24 Gary Benson <gbenson@redhat.com>
4227
4228 * Makefile.in (x86-linux-dregs.o): New rule.
4229 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4230 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4231 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4232 (x86_linux_dr_get): Likewise.
4233 (x86_linux_dr_set): Likewise.
4234 (update_debug_registers_callback): Likewise.
4235 (x86_linux_dr_set_addr): Likewise.
4236 (x86_linux_dr_get_addr): Likewise.
4237 (x86_linux_dr_set_control): Likewise.
4238 (x86_linux_dr_get_control): Likewise.
4239 (x86_linux_dr_get_status): Likewise.
4240 (x86_linux_update_debug_registers): Likewise.
4241
2b95d440
GB
42422015-03-24 Gary Benson <gbenson@redhat.com>
4243
4244 * linux-x86-low.c (x86_linux_update_debug_registers):
4245 New function, factored out from...
4246 (x86_linux_prepare_to_resume): ...this.
4247
14b0bc68
GB
42482015-03-24 Gary Benson <gbenson@redhat.com>
4249
4250 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4251 (x86_linux_dr_set): Likewise.
4252 (update_debug_registers_callback): Likewise.
4253 (x86_linux_dr_set_addr): Likewise.
4254 (x86_linux_dr_get_addr): Likewise.
4255 (x86_linux_dr_set_control): Likewise.
4256 (x86_linux_dr_get_control): Likewise.
4257 (x86_linux_dr_get_status): Likewise.
4258 (x86_linux_prepare_to_resume): Likewise.
4259
5dfe6ca8
GB
42602015-03-24 Gary Benson <gbenson@redhat.com>
4261
4262 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4263 Use perror_with_name. Pass string through gettext.
4264 (x86_linux_dr_set): Likewise.
4265
d33472ad
GB
42662015-03-24 Gary Benson <gbenson@redhat.com>
4267
4268 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4269 (x86_linux_dr_set_addr): ...this.
4270 (x86_dr_low_get_addr): Rename to...
4271 (x86_linux_dr_get_addr): ...this.
4272 (x86_dr_low_set_control): Rename to...
4273 (x86_linux_dr_set_control): ...this.
4274 (x86_dr_low_get_control): Rename to...
4275 (x86_linux_dr_get_control): ...this.
4276 (x86_dr_low_get_status): Rename to...
4277 (x86_linux_dr_get_status): ...this.
4278 (x86_dr_low): Update with new function names.
4279
4b134ca1
GB
42802015-03-24 Gary Benson <gbenson@redhat.com>
4281
4282 * Makefile.in (x86-linux.o): New rule.
4283 * configure.srv: Add x86-linux.o to relevant targets.
4284 * linux-low.c (lwp_set_arch_private_info): New function.
4285 (lwp_arch_private_info): Likewise.
4286 * linux-x86-low.c: Include nat/x86-linux.h.
4287 (arch_lwp_info): Removed structure.
4288 (update_debug_registers_callback):
4289 Use lwp_set_debug_registers_changed.
4290 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4291 and lwp_set_debug_registers_changed.
4292 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4293
34c703da
GB
42942015-03-24 Gary Benson <gbenson@redhat.com>
4295
4296 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4297 * linux-arm-low.c (arm_new_thread): Likewise.
4298 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4299 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4300 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4301 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4302
cff068da
GB
43032015-03-24 Gary Benson <gbenson@redhat.com>
4304
4305 * linux-low.c (ptid_of_lwp): New function.
4306 (lwp_is_stopped): Likewise.
4307 (lwp_stop_reason): Likewise.
4308 * linux-x86-low.c (update_debug_registers_callback):
4309 Use lwp_is_stopped.
4310 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4311 lwp_stop_reason.
4312
b2f7c7e8
GB
43132015-03-24 Gary Benson <gbenson@redhat.com>
4314
4315 * linux-low.h (linux_stop_lwp): Remove declaration.
4316
6d4ee8c6
GB
43172015-03-24 Gary Benson <gbenson@redhat.com>
4318
4319 * linux-low.h: Include nat/linux-nat.h.
4320 * linux-low.c (iterate_over_lwps_args): New structure.
4321 (iterate_over_lwps_filter): New function.
4322 (iterate_over_lwps): Likewise.
4323 * linux-x86-low.c (update_debug_registers_callback):
4324 Update signature to what iterate_over_lwps expects.
4325 Remove PID check that iterate_over_lwps now performs.
4326 (x86_dr_low_set_addr): Use iterate_over_lwps.
4327 (x86_dr_low_set_control): Likewise.
4328
70a0bb6b
GB
43292015-03-24 Gary Benson <gbenson@redhat.com>
4330
4331 * linux-x86-low.c (x86_debug_reg_state): New function.
4332 (x86_linux_prepare_to_resume): Use the above.
4333
7b669087
GB
43342015-03-24 Gary Benson <gbenson@redhat.com>
4335
4336 * linux-low.c (current_lwp_ptid): New function.
4337 * linux-x86-low.c: Include nat/linux-nat.h.
4338 (x86_dr_low_get_addr): Use current_lwp_ptid.
4339 (x86_dr_low_get_control): Likewise.
4340 (x86_dr_low_get_status): Likewise.
4341
eef49a3d
PA
43422015-03-20 Pedro Alves <palves@redhat.com>
4343
4344 * tracepoint.c (cmd_qtstatus): Make "str" const.
4345
b2333d22
PA
43462015-03-20 Pedro Alves <palves@redhat.com>
4347
4348 * server.c (handle_general_set): Make "req_str" const.
4349
23f238d3
PA
43502015-03-19 Pedro Alves <palves@redhat.com>
4351
4352 * linux-low.c (linux_resume_one_lwp): Rename to ...
4353 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4354 instead call perror_with_name.
4355 (check_ptrace_stopped_lwp_gone): New function.
4356 (linux_resume_one_lwp): Reimplement as wrapper around
4357 linux_resume_one_lwp_throw that swallows errors if the LWP is
4358 gone.
4359
91baf43f
PA
43602015-03-19 Pedro Alves <palves@redhat.com>
4361
4362 * linux-low.c (count_events_callback, select_event_lwp_callback):
4363 No longer check whether the thread has resume_stop as last resume
4364 kind.
4365
8bf3b159
PA
43662015-03-19 Pedro Alves <palves@redhat.com>
4367
4368 * linux-low.c (count_events_callback, select_event_lwp_callback):
4369 Use the lwp's status_pending_p field, not the thread's.
4370
b90fc188
PA
43712015-03-19 Pedro Alves <palves@redhat.com>
4372
4373 * linux-low.c (select_event_lwp_callback): Update comments to
4374 no longer mention SIGTRAP.
4375
464b0089
GB
43762015-03-18 Gary Benson <gbenson@redhat.com>
4377
4378 * server.c (handle_query): Do not report vFile:fstat as supported.
4379
aa9e327f
GB
43802015-03-11 Gary Benson <gbenson@redhat.com>
4381
4382 * hostio.c (sys/types.h): New include.
4383 (sys/stat.h): Likewise.
4384 (common-remote-fileio.h): Likewise.
4385 (handle_fstat): New function.
4386 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4387
791c0056
GB
43882015-03-11 Gary Benson <gbenson@redhat.com>
4389
4390 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4391 struct stat.st_blocks and struct stat.st_blksize.
4392 * configure: Regenerate.
4393 * config.in: Likewise.
4394 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4395 (OBS): Add common-remote-fileio.o.
4396 (common-remote-fileio.o): New rule.
4397
9a9df970
PA
43982015-03-09 Pedro Alves <palves@redhat.com>
4399
4400 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4401 'struct sockaddr' pointer in 'accept' call.
4402
9eb1356e
PA
44032015-03-09 Pedro Alves <palves@redhat.com>
4404
4405 Revert:
4406 2015-03-07 Pedro Alves <palves@redhat.com>
4407 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4408 or <winsock2.h> here. Instead include "gdb_socket.h".
4409 (remote_open): Use union gdb_sockaddr_u.
4410 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4411 or <winsock2.h> here. Instead include "gdb_socket.h".
4412 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4413 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4414 or <sys/un.h>.
4415 (init_named_socket, gdb_agent_helper_thread): Use union
4416 gdb_sockaddr_u.
4417
aac331e4
PA
44182015-03-07 Pedro Alves <palves@redhat.com>
4419
4420 * configure.ac (build_warnings): Move
4421 -Wdeclaration-after-statement to the C-specific set.
4422 * configure: Regenerate.
4423
366c75fc
PA
44242015-03-07 Pedro Alves <palves@redhat.com>
4425
4426 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4427 or <winsock2.h> here. Instead include "gdb_socket.h".
4428 (remote_open): Use union gdb_sockaddr_u.
4429 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4430 or <winsock2.h> here. Instead include "gdb_socket.h".
4431 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4432 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4433 or <sys/un.h>.
4434 (init_named_socket, gdb_agent_helper_thread): Use union
4435 gdb_sockaddr_u.
4436
492d29ea
PA
44372015-03-07 Pedro Alves <palves@redhat.com>
4438
4439 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4440 instead.
4441
60a191ed
YQ
44422015-03-06 Yao Qi <yao.qi@linaro.org>
4443
4444 * linux-aarch64-low.c (aarch64_insert_point): Use
4445 show_debug_regs as a boolean.
4446 (aarch64_remove_point): Likewise.
4447
f5771b1d
PA
44482015-03-05 Pedro Alves <palves@redhat.com>
4449
4450 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4451 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4452 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4453 * nto-low.c (nto_target_ops): Likewise.
4454 * spu-low.c (spu_target_ops): Likewise.
4455 * win32-low.c (win32_target_ops): Likewise.
4456
3e572f71
PA
44572015-03-04 Pedro Alves <palves@redhat.com>
4458
72f4393d 4459 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4460 Decide whether a breakpoint triggered based on the SIGTRAP's
4461 siginfo.si_code.
72f4393d
L
4462 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4463 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4464 (linux_low_filter_event): Check for breakpoints before checking
4465 watchpoints.
4466 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4467 siginfo.si_code.
72f4393d
L
4468 (linux_stopped_by_sw_breakpoint)
4469 (linux_supports_stopped_by_sw_breakpoint)
4470 (linux_stopped_by_hw_breakpoint)
4471 (linux_supports_stopped_by_hw_breakpoint): New functions.
4472 (linux_target_ops): Install new target methods.
3e572f71 4473
1ec68e26
PA
44742015-03-04 Pedro Alves <palves@redhat.com>
4475
4476 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4477 * server.c (swbreak_feature, hwbreak_feature): New globals.
4478 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4479 (captured_main): Clear swbreak_feature and hwbreak_feature.
4480 * server.h (swbreak_feature, hwbreak_feature): Declare.
4481 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4482 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4483 supports_stopped_by_hw_breakpoint>: New fields.
4484 (target_supports_stopped_by_sw_breakpoint)
4485 (target_stopped_by_sw_breakpoint)
4486 (target_supports_stopped_by_hw_breakpoint)
4487 (target_stopped_by_hw_breakpoint): Declare.
4488
15c66dd6
PA
44892015-03-04 Pedro Alves <palves@redhat.com>
4490
4491 enum lwp_stop_reason -> enum target_stop_reason
4492 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4493 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4494 (linux_wait_1, stuck_in_jump_pad_callback)
4495 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4496 (linux_stopped_by_watchpoint):
4497 * linux-low.h (enum lwp_stop_reason): Delete.
4498 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4499 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4500
98fc70d6
YQ
45012015-03-04 Yao Qi <yao.qi@linaro.org>
4502
4503 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4504
dd2ac174
GB
45052015-03-03 Gary Benson <gbenson@redhat.com>
4506
4507 * hostio.c (handle_vFile): Fix prefix lengths.
4508
d68e53f4
MM
45092015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4510
4511 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4512 ptr_bits.
4513
bf2d68ab
AA
45142015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4515
4516 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4517 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4518 (clean): Add "rm -f" for above C files.
4519 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4520 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4521 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4522 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4523 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4524 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4525 (init_registers_s390x_vx_linux64)
4526 (init_registers_s390x_tevx_linux64)
4527 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4528 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4529 declarations.
4530 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4531 (s390_store_vxrs_high): New functions.
4532 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4533 NT_S390_VXRS_HIGH.
4534 (s390_arch_setup): Add logic for selecting one of the new target
4535 descriptions. Activate the new vector regsets if applicable.
4536 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4537 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4538 and init_registers_s390x_tevx_linux64.
4539
c966a859
PA
45402015-03-01 Pedro Alves <palves@redhat.com>
4541
4542 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4543 parameter.
4544
4180215b
PA
45452015-02-27 Pedro Alves <palves@redhat.com>
4546
4547 * linux-x86-low.c (u_debugreg_offset): New function.
4548 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4549
749bab01
PA
45502015-02-27 Pedro Alves <palves@redhat.com>
4551
4552 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4553 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4554 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4555 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4556 (ps_lsetfpregs, ps_getpid)
4557 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4558 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4559 (ps_lsetxregs, ps_plog): Declare.
4560
3c14e5a3
PA
45612015-02-27 Pedro Alves <palves@redhat.com>
4562
4563 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4564 IP_AGENT_EXPORT_FUNC.
4565 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4566 IP_AGENT_EXPORT_FUNC.
4567 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4568 (IP_AGENT_EXPORT): Delete.
4569 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4570 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4571 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4572 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4573 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4574 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4575 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4576 (traceframe_read_count, traceframe_write_count)
4577 (traceframes_created, trace_state_variables, get_raw_reg)
4578 (get_trace_state_variable_value, set_trace_state_variable_value)
4579 (ust_loaded, helper_thread_id, cmd_buf): Use
4580 IPA_SYM_EXPORTED_NAME.
4581 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4582 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4583 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4584 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4585 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4586 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4587 EXTERN_C_PUSH/EXTERN_C_POP.
4588 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4589 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4590 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4591 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4592 (traceframe_write_count, traceframe_read_count)
4593 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4594 (about_to_request_buffer_space, get_trace_state_variable_value)
4595 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4596 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4597 EXTERN_C_PUSH/EXTERN_C_POP.
4598 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4599 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4600 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4601 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4602 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4603 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4604 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4605 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4606 Define.
4607 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4608 (IP_AGENT_EXPORT_VAR_DECL): Define.
4609 (tracing): Declare.
4610 (gdb_agent_get_raw_reg): Declare.
4611
fe978cb0
PA
46122015-02-27 Tom Tromey <tromey@redhat.com>
4613 Pedro Alves <palves@redhat.com>
4614
4615 Rename symbols whose names are reserved C++ keywords throughout.
4616
3bc3d82a
PA
46172015-02-27 Pedro Alves <palves@redhat.com>
4618
4619 * Makefile.in (COMPILER): New, get it from autoconf.
4620 (CXX): Get from autoconf instead.
4621 (COMPILE.pre): Use COMPILER.
4622 (CC-LD): Rename to ...
4623 (CC_LD): ... this. Use COMPILER.
4624 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4625 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4626 * acinclude.m4: Include build-with-cxx.m4.
4627 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4628 Disable -Werror by default if building in C++ mode.
4629 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4630 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4631 the C++ compiler. Save/restore CXXFLAGS too.
4632 * configure: Regenerate.
4633
07697489
PA
46342015-02-27 Pedro Alves <palves@redhat.com>
4635
4636 * acinclude.m4: Include libiberty.m4.
4637 * configure.ac: Call libiberty_INIT.
4638 * config.in, configure: Regenerate.
4639
9beb7c4e
PA
46402015-02-26 Pedro Alves <palves@redhat.com>
4641
4642 * linux-low.c (linux_wait_1): When incrementing the PC past a
4643 program breakpoint always use the_low_target.breakpoint_len as
4644 increment, rather than the maximum between that and
4645 the_low_target.decr_pc_after_break.
4646
8090aef2
PA
46472015-02-23 Pedro Alves <palves@redhat.com>
4648
4649 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4650 thread was doing a step-over; always adjust the PC if
4651 we stepped over a permanent breakpoint.
4652 (linux_wait_1): If we stepped over breakpoint that was on top of a
4653 permanent breakpoint, manually advance the PC past it.
4654
bc9540e8
PA
46552015-02-23 Pedro Alves <palves@redhat.com>
4656
4657 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4658 modes.
4659 (x86_fill_gregset, x86_store_gregset): Use it when handling
4660 $orig_eax.
4661
2db9a427
PA
46622015-02-20 Pedro Alves <palves@redhat.com>
4663
4664 * thread-db.c: Include "nat/linux-procfs.h".
4665 (thread_db_init): Skip listing new threads if the kernel supports
4666 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4667
afa8d396
PA
46682015-02-20 Pedro Alves <palves@redhat.com>
4669
4670 * linux-low.c (status_pending_p_callback): Use ptid_match.
4671
c9587f88
AT
46722015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4673
4674 PR breakpoints/16812
4675 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4676 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4677 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4678
b05ec7a5
AT
46792015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4680
4681 PR breakpoints/15956
4682 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4683
d33501a5
MM
46842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4685
4686 * linux-low.c (linux_low_btrace_conf): Print size.
4687 * server.c (handle_btrace_conf_general_set): New.
4688 (hanle_general_set): Call handle_btrace_conf_general_set.
4689 (handle_query): Report Qbtrace-conf:bts:size as supported.
4690
f4abbc16
MM
46912015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4692
4693 * linux-low.c (linux_low_enable_btrace): Update parameters.
4694 (linux_low_btrace_conf): New.
4695 (linux_target_ops)<to_btrace_conf>: Initialize.
4696 * server.c (current_btrace_conf): New.
4697 (handle_btrace_enable): Rename to ...
4698 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4699 to target_enable_btrace. Update comment. Update users.
4700 (handle_qxfer_btrace_conf): New.
4701 (qxfer_packets): Add btrace-conf entry.
4702 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4703 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4704 (target_ops)<read_btrace_conf>: New.
4705 (target_enable_btrace): Update parameters.
4706 (target_read_btrace_conf): New.
4707
043c3577
MM
47082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4709
4710 * server.c (handle_btrace_general_set): Remove call to
4711 target_supports_btrace.
4712 (supported_btrace_packets): New.
4713 (handle_query): Call supported_btrace_packets.
4714 * target.h: include btrace-common.h.
4715 (btrace_target_info): Removed.
4716 (supports_btrace, target_supports_btrace): Update parameters.
4717
734b0e4b
MM
47182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4719
4720 * Makefile.in (SFILES): Add common/btrace-common.c.
4721 (OBS): Add common/btrace-common.o.
4722 (btrace-common.o): Add build rules.
4723 * linux-low: Include btrace-common.h.
4724 (linux_low_read_btrace): Use struct btrace_data. Call
4725 btrace_data_init and btrace_data_fini.
4726
d6c146e9
PA
47272015-02-06 Pedro Alves <palves@redhat.com>
4728
4729 * thread-db.c (find_new_threads_callback): Add debug output.
4730
20ba1ce6
PA
47312015-02-04 Pedro Alves <palves@redhat.com>
4732
4733 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4734 (resume_stopped_resumed_lwps): New function.
4735 (linux_wait_for_event_filtered): Use it.
4736
8cc73a39
SDJ
47372015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4738
4739 * Makefile.in (SFILES): Add linux-personality.c.
4740 (linux-personality.o): New rule.
4741 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4742 list of objects to be built.
4743 * linux-low.c: Include nat/linux-personality.h.
4744 (linux_create_inferior): Remove code to disable address space
4745 randomization (moved to ../nat/linux-personality.c). Create
4746 cleanup to disable address space randomization.
4747
fb23d554
SDJ
47482015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4749
4750 * Makefile.in (posix-strerror.o): New rule.
4751 (mingw-strerror.o): Likewise.
4752 * configure: Regenerated.
4753 * configure.ac: Source file ../common/common.host. Initialize new
4754 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4755
cdf43629
YQ
47562015-01-14 Yao Qi <yao@codesourcery.com>
4757
4758 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4759 (ppc-linux.o): New rule.
4760 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4761 * configure.ac: AC_CHECK_FUNCS(getauxval).
4762 * config.in: Re-generated.
4763 * configure: Re-generated.
4764 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4765 ppc64_64bit_inferior_p
4766
514c5338
YQ
47672015-01-14 Yao Qi <yao@codesourcery.com>
4768
4769 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4770 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4771 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4772 (PT_ORIG_R3, PT_TRAP): Likewise.
4773 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4774 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4775 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4776
3368c1e5
JB
47772015-01-10 Joel Brobecker <brobecker@adacore.com>
4778
4779 * i387-fp.c (i387_cache_to_xsave): In look over
4780 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4781 zmmh_low_space field by use of zmmh_high_space.
4782
582511be
PA
47832015-01-09 Pedro Alves <palves@redhat.com>
4784
4785 * linux-low.c (step_over_bkpt): Move higher up in the file.
4786 (handle_extended_wait): Don't store the stop_pc here.
4787 (get_stop_pc): Adjust comments and rename to ...
4788 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4789 stopped for a software breakpoint or hardware breakpoint.
4790 (thread_still_has_status_pending_p): New function.
4791 (status_pending_p_callback): Use
4792 thread_still_has_status_pending_p. If the event is no longer
4793 interesting, resume the LWP.
4794 (handle_tracepoints): Add assert.
4795 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4796 (wstatus_maybe_breakpoint): New function.
4797 (cancel_breakpoint): Delete function.
4798 (check_stopped_by_watchpoint): New function, factored out from
4799 linux_low_filter_event.
4800 (lp_status_maybe_breakpoint): Delete function.
4801 (linux_low_filter_event): Remove filter_ptid argument.
4802 Leave thread group exits pending here. Store the LWP's stop PC.
4803 Always leave events pending.
4804 (linux_wait_for_event_filtered): Pull all events out of the
4805 kernel, and leave them all pending.
4806 (count_events_callback, select_event_lwp_callback): Consider all
4807 events.
4808 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4809 (select_event_lwp): Only give preference to the stepping LWP in
4810 all-stop mode. Adjust comments.
4811 (ignore_event): New function.
4812 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4813 references to cancel_breakpoints. Adjust to renames. Also give
4814 equal priority to all LWPs that have had events in non-stop mode.
4815 If reporting a software breakpoint event, unadjust the LWP's PC.
4816 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4817 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4818 Adjust.
4819 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4820 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4821 (linux_stopped_by_watchpoint): Adjust.
4822 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4823 * linux-low.h (enum lwp_stop_reason): New.
4824 (struct lwp_info) <stop_pc>: Adjust comment.
4825 <stopped_by_watchpoint>: Delete field.
4826 <stop_reason>: New field.
4827 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4828 * mem-break.c (software_breakpoint_inserted_here)
4829 (hardware_breakpoint_inserted_here): New function.
4830 * mem-break.h (software_breakpoint_inserted_here)
4831 (hardware_breakpoint_inserted_here): Declare.
4832 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4833 (cancel_breakpoints): Delete.
4834 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4835 (upload_fast_traceframes): Remove references to
4836 cancel_breakpoints.
4837
a33e3959
PA
48382015-01-09 Pedro Alves <palves@redhat.com>
4839
4840 * thread-db.c (find_new_threads_callback): Ignore thread if the
4841 kernel thread ID is -1.
4842
8784d563
PA
48432015-01-09 Pedro Alves <palves@redhat.com>
4844
4845 * linux-low.c (linux_attach_fail_reason_string): Move to
4846 nat/linux-ptrace.c, and rename.
4847 (linux_attach_lwp): Update comment.
4848 (attach_proc_task_lwp_callback): New function.
4849 (linux_attach): Adjust to rename and use
4850 linux_proc_attach_tgid_threads.
4851 (linux_attach_fail_reason_string): Delete declaration.
4852
76f2b779
JB
48532015-01-01 Joel Brobecker <brobecker@adacore.com>
4854
4855 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4856 * server.c (gdbserver_version): Likewise.
4857
fafcc06a
SDJ
48582014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4859
4860 * remote-utils.c: Include ctype.h.
4861 (input_interrupt): Explicitly handle the case when the char
4862 received is the NUL byte. Improve the printing of non-ASCII
4863 characters.
4864
beed38b8
JB
48652014-12-16 Joel Brobecker <brobecker@adacore.com>
4866
4867 * linux-low.c (linux_low_filter_event): Update call to
4868 linux_enable_event_reporting following the addition of
4869 a new parameter to that function.
4870
bf330350
CU
48712014-12-16 Catalin Udma <catalin.udma@freescale.com>
4872
4873 PR server/17457
4874 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4875 (AARCH64_FPCR_REGNO): Likewise.
4876 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4877 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4878 (aarch64_store_fpregset): Likewise.
4879
5227d625
JB
48802014-12-15 Joel Brobecker <brobecker@adacore.com>
4881
4882 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4883 Remove FIXME comment about assumption about N.
4884
f93b65a0
JB
48852014-12-13 Joel Brobecker <brobecker@adacore.com>
4886
4887 * configure.ac: If large-file support is disabled in GDBserver,
4888 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4889 * configure: Regenerate.
4890
e5a9158d
AA
48912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4892
4893 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4894 warning upon ENODATA from ptrace.
4895 * linux-s390-low.c (s390_store_tdb): New.
4896 (s390_regsets): Add regset for NT_S390_TDB.
4897
feea5f36
AA
48982014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4899
4900 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4901 without a fill_function.
4902 * linux-s390-low.c (s390_fill_last_break): Remove.
4903 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4904 (s390_arch_setup): Use regset's size instead of fill_function for
4905 loop end condition.
4906
098dbe61
AA
49072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4908
4909 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4910 the regset's store function when ptrace returned an error.
4911 * regcache.c (get_thread_regcache): Invalidate register cache
4912 before fetching inferior's registers.
4913
28eef672
AA
49142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4915
4916 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4917 while-loop as for-loop.
4918 (regsets_store_inferior_registers): Likewise.
4919
bdca27a2
YQ
49202014-11-28 Yao Qi <yao@codesourcery.com>
4921
4922 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4923 * config.in, configure: Re-generate.
4924 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4925 is defined.
4926
9c232dda
YQ
49272014-11-21 Yao Qi <yao@codesourcery.com>
4928
4929 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4930 (AC_CHECK_HEADERS): Remove malloc.h.
4931 * configure: Re-generated.
4932 * config.in: Re-generated.
4933 * server.h: Don't include alloca.h and malloc.h.
4934 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4935 Don't include malloc.h.
4936
43968415
JB
49372014-11-17 Joel Brobecker <brobecker@adacore.com>
4938
4939 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4940 corresponding ERRNO check in same block.
4941
40e91bc7
PA
49422014-11-12 Pedro Alves <palves@redhat.com>
4943
4944 * server.c (cont_thread): Update comment.
4945 (start_inferior, attach_inferior): No longer clear cont_thread.
4946 (handle_v_cont): No longer set cont_thread.
4947 (captured_main): Clear cont_thread each time a GDB connects.
4948
c2c118cf
PA
49492014-11-12 Pedro Alves <palves@redhat.com>
4950
4951 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4952 thread, and don't resume all threads if the Hc thread has exited.
4953
78708b7c
PA
49542014-11-12 Pedro Alves <palves@redhat.com>
4955
4956 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4957 the process group instead of to a specific LWP.
4958
a2abc7de
PA
49592014-10-15 Pedro Alves <palves@redhat.com>
4960
4961 PR server/17487
4962 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4963 parameter.
4964 (arm_set_thread_context): Delete.
4965 (the_low_target): Adjust.
4966 * win32-i386-low.c (debug_registers_changed)
4967 (debug_registers_used): Delete.
4968 (update_debug_registers_callback): New function.
4969 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4970 needing to update their debug registers.
4971 (win32_get_current_dr): New function.
4972 (x86_dr_low_get_addr, x86_dr_low_get_control)
4973 (x86_dr_low_get_status): Fetch the debug register from the thread
4974 record's context.
4975 (i386_initial_stuff): Adjust.
4976 (i386_get_thread_context): Remove current_event parameter. Don't
4977 clear debug_registers_changed nor copy DR values to
4978 debug_reg_state.
4979 (i386_set_thread_context): Delete.
4980 (i386_prepare_to_resume): New function.
4981 (i386_thread_added): Mark the thread as needing to update irs
4982 debug registers.
4983 (the_low_target): Remove i386_set_thread_context and install
4984 i386_prepare_to_resume.
4985 * win32-low.c (win32_get_thread_context): Adjust.
4986 (win32_set_thread_context): Use SetThreadContext
4987 directly.
4988 (win32_prepare_to_resume): New function.
4989 (win32_require_context): New function, factored out from ...
4990 (thread_rec): ... this.
4991 (continue_one_thread): Call win32_prepare_to_resume on each thread
4992 we're about to continue.
4993 (win32_resume): Call win32_prepare_to_resume on the event thread.
4994 * win32-low.h (struct win32_thread_info)
4995 <debug_registers_changed>: New field.
4996 (struct win32_target_ops): Change prototype of set_thread_context,
4997 delete set_thread_context and add prepare_to_resume.
4998 (win32_require_context): New declaration.
4999
a442d071
GB
50002014-10-08 Gary Benson <gbenson@redhat.com>
5001
5002 * server.h: Do not include common-exceptions.h.
5003
6f1947e8
GB
50042014-10-08 Gary Benson <gbenson@redhat.com>
5005
5006 * server.h: Do not include cleanups.h.
5007
63b434a4
JH
50082014-09-30 James Hogan <james.hogan@imgtec.com>
5009
5010 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5011 mips64-dsp-linux.c.
5012
c4d9ceb6
YQ
50132014-09-23 Yao Qi <yao@codesourcery.com>
5014
5015 * linux-low.c (lp_status_maybe_breakpoint): New function.
5016 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5017 (count_events_callback): Likewise.
5018 (select_event_lwp_callback): Likewise.
5019 (cancel_breakpoints_callback): Likewise.
5020
89a5711c
DB
50212014-09-19 Don Breazeal <donb@codesourcery.com>
5022
5023 * linux-low.c (handle_extended_wait): Call
5024 linux_ptrace_get_extended_event.
5025 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5026 linux_is_extended_waitstatus.
5027
bffc0964
JB
50282014-09-16 Joel Brobecker <brobecker@adacore.com>
5029
5030 * Makefile.in (CPPFLAGS): Define.
5031 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5032 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5033
0bfdf32f
GB
50342014-09-16 Gary Benson <gbenson@redhat.com>
5035
5036 * inferiors.h (current_inferior): Renamed as...
5037 (current_thread): New variable. All uses updated.
5038 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5039 (maybe_move_out_of_jump_pad): Likewise.
5040 (cancel_breakpoint): Likewise.
5041 (linux_low_filter_event): Likewise.
5042 (wait_for_sigstop): Likewise.
5043 (linux_resume_one_lwp): Likewise.
5044 (need_step_over_p): Likewise.
5045 (start_step_over): Likewise.
5046 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5047 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5048 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5049 and save_inferior as saved_thread.
5050 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5051 saved_thread.
5052 (regcache_invalidate_thread): Likewise.
5053 * remote-utils.c (prepare_resume_reply): Likewise.
5054 * thread-db.c (thread_db_get_tls_address): Likewise.
5055 (disable_thread_event_reporting): Likewise.
5056 (remove_thread_event_breakpoints): Likewise.
5057 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5058 as saved_thread.
5059 * target.h (set_desired_inferior): Renamed as...
5060 (set_desired_thread): New declaration. All uses updated.
5061 * server.c (myresume): Updated comment to reference thread instead
5062 of inferior.
5063 (handle_serial_event): Likewise.
5064 (handle_target_event): Likewise.
5065
361c8ade
GB
50662014-09-12 Tom Tromey <tromey@redhat.com>
5067 Gary Benson <gbenson@redhat.com>
5068
5069 * regcache.h: Include common-regcache.h.
5070 (regcache_read_pc): Don't declare.
5071 * regcache.c (get_thread_regcache_for_ptid): New function.
5072
bd9269f7
GB
50732014-09-11 Tom Tromey <tromey@redhat.com>
5074 Gary Benson <gbenson@redhat.com>
5075
5076 * symbol.c: New file.
5077 * Makefile.in (SFILES): Add symbol.c.
5078 (OBS): Add symbol.o.
5079
f8c1d06b
GB
50802014-09-11 Gary Benson <gbenson@redhat.com>
5081
5082 * target.c (target_stop_ptid, target_continue_ptid): New
5083 functions.
5084
721ec300
GB
50852014-09-11 Tom Tromey <tromey@redhat.com>
5086 Gary Benson <gbenson@redhat.com>
5087
5088 * target.h: Include target/target.h.
5089 * target.c (target_read_memory, target_read_uint32)
5090 (target_write_memory): New functions.
5091
c5e92cca
GB
50922014-09-11 Gary Benson <gbenson@redhat.com>
5093
5094 * server.h (debug_hw_points): Don't declare.
5095 * server.c (debug_hw_points): Don't define. Replace all uses
5096 with show_debug_regs.
5097 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5098 all uses with show_debug_regs.
5099
2e4bb98a
EBM
51002014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5101
5102 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5103 endianness into account.
5104 (ppc_supply_ptrace_register): Likewise.
5105
ac740bc7
JH
51062014-09-03 James Hogan <james.hogan@imgtec.com>
5107
5108 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5109 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5110
97ea6506
GB
51112014-09-03 Gary Benson <gbenson@redhat.com>
5112
5113 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5114 ALL_DEBUG_ADDRESS_REGISTERS.
5115
df7e5265
GB
51162014-09-02 Gary Benson <gbenson@redhat.com>
5117
5118 * i386-low.h: Renamed as...
5119 * x86-low.h: New file. All type, function and variable name
5120 prefixes changed from "i386_" to "x86_". All references updated.
5121 * i386-low.c: Renamed as...
5122 * x86-low.c: New file. All type, function and variable name
5123 prefixes changed from "i386_" to "x86_". All references updated.
5124
ed859da7
GB
51252014-09-02 Gary Benson <gbenson@redhat.com>
5126
5127 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5128 (x86_linux_new_thread): Likewise.
5129
860789c7
GB
51302014-08-29 Gary Benson <gbenson@redhat.com>
5131
5132 * server.h (setjmp.h): Do not include.
5133 (toplevel): Do not declare.
5134 (common-exceptions.h): Include.
5135 (cleanups.h): Likewise.
5136 * server.c (toplevel): Do not define.
5137 (exit_code): New static global.
5138 (detach_or_kill_for_exit_cleanup): New function.
5139 (main): New function. Original main renamed to...
5140 (captured_main): New function.
5141 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5142
ff55e1b5
GB
51432014-08-29 Gary Benson <gbenson@redhat.com>
5144
5145 * Makefile.in (SFILES): Add common/common-exceptions.c.
5146 (OBS): Add common-exceptions.o.
5147 (common-exceptions.o): New rule.
5148 * utils.c (prepare_to_throw_exception): New function.
5149
e9bcb658
GB
51502014-08-29 Gary Benson <gbenson@redhat.com>
5151
5152 * config.in: Regenerate.
5153 * configure: Likewise.
5154
e3180625
GB
51552014-08-29 Gary Benson <gbenson@redhat.com>
5156
5157 * Makefile.in (SFILES): Add common/cleanups.c.
5158 (OBS): cleanups.o.
5159 (cleanups.o): New rule.
5160
e3d6ba5d
GB
51612014-08-29 Gary Benson <gbenson@redhat.com>
5162
5163 * utils.c (internal_vwarning): New function.
5164
7096e886
GB
51652014-08-28 Gary Benson <gbenson@redhat.com>
5166
5167 * utils.h (fatal): Remove declaration.
5168 * utils.c (fatal): Remove function.
5169
14ce3192
GB
51702014-08-28 Gary Benson <gbenson@redhat.com>
5171
5172 * tracepoint.c (gdb_agent_init): Replace fatal with
5173 perror_with_name.
5174 (initialize_tracepoint): Likewise.
5175
50278d59
GB
51762014-08-28 Gary Benson <gbenson@redhat.com>
5177
5178 * remote-utils.c (remote_prepare): Replace fatal with error.
5179
aa96c426
GB
51802014-08-28 Gary Benson <gbenson@redhat.com>
5181
5182 * linux-low.c (linux_async): Replace fatal with warning.
5183 Tidy up and return.
5184 (linux_start_non_stop): Return -1 if linux_async failed.
5185
f7160e97
GB
51862014-08-28 Gary Benson <gbenson@redhat.com>
5187
5188 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5189 gdb_assert.
5190 (i386_dr_low_get_addr): Remove vague comment.
5191 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5192 gdb_assert.
5193
38e08fca
GB
51942014-08-28 Gary Benson <gbenson@redhat.com>
5195
5196 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5197 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5198 internal_error.
5199 (linux_resume_one_lwp): Likewise.
5200 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5201 gdb_assert.
5202 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5203 with internal_error.
5204 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5205 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5206 (find_register_by_name): Replace fatal with internal_error.
5207 (find_regno): Likewise.
5208 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5209 * thread-db.c (thread_db_create_event): Likewise.
5210 (thread_db_load_search): Likewise.
5211 (try_thread_db_load_1): Likewise.
5212 * tracepoint.c (get_jump_space_head): Replace fatal with
5213 internal_error.
5214 (claim_trampoline_space): Likewise.
5215 (have_fast_tracepoint_trampoline_buffer): Likewise.
5216 (cmd_qtstart): Likewise.
5217 (stop_tracing): Likewise.
5218 (fast_tracepoint_collecting): Likewise.
5219 (target_malloc): Likewise.
5220 (download_tracepoint): Likewise.
5221 (download_trace_state_variables): Replace check with gdb_assert.
5222 (upload_fast_traceframes): Replace fatal with internal_error.
5223
34abf635
GB
52242014-08-19 Tom Tromey <tromey@redhat.com>
5225 Gary Benson <gbenson@redhat.com>
5226
5227 * Makefile.in (SFILES): Add common/common-debug.c.
5228 (OBS): Add common-debug.o.
5229 (common-debug.o): New rule.
5230 * debug.h (debug_printf): Don't declare.
5231 * debug.c (debug_printf): Renamed and rewritten as...
5232 (debug_vprintf): New function.
5233
f6e94d78
GB
52342014-08-19 Gary Benson <gbenson@redhat.com>
5235
5236 * utils.h: Do not include print-utils.h.
5237
9239eeab
GB
52382014-08-19 Tom Tromey <tromey@redhat.com>
5239 Gary Benson <gbenson@redhat.com>
5240
5241 * server.h: Add static assertion.
5242 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5243
ef87c8bb
GB
52442014-08-19 Tom Tromey <tromey@redhat.com>
5245 Gary Benson <gbenson@redhat.com>
5246
5247 * Makefile.in (SFILES): Add common/errors.c.
5248 (OBS): Add errors.o.
5249 (IPA_OBS): Add errors-ipa.o.
5250 (errors.o): New rule.
5251 (errors-ipa.o): Likewise.
5252 * utils.h (perror_with_name, error, warning): Don't declare.
5253 * utils.c (warning): Renamed and rewritten as...
5254 (vwarning): New function.
5255 (error): Renamed and rewritten as...
5256 (verror): New function.
5257 (internal_error): Renamed and rewritten as...
5258 (internal_verror): New function.
5259
bb974a24
GB
52602014-08-07 Gary Benson <gbenson@redhat.com>
5261
5262 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5263 * configure: Regenerate.
5264 * config.in: Likewise.
5265 * server.h: Do not include errno.h.
5266 * event-loop.c: Likewise.
5267 * hostio-errno.c: Likewise.
5268 * linux-low.c: Likewise.
5269 * remote-utils.c: Likewise.
5270 * spu-low.c: Likewise.
5271 * utils.c: Likewise.
5272 * gdbreplay.c: Unconditionally include errno.h.
5273
6d3d12eb
GB
52742014-08-07 Gary Benson <gbenson@redhat.com>
5275
5276 * server.h: Do not include string.h.
5277 * event-loop.c: Likewise.
5278 * linux-low.c: Likewise.
5279 * regcache.c: Likewise.
5280 * remote-utils.c: Likewise.
5281 * spu-low.c: Likewise.
5282 * utils.c: Likewise.
5283
dccbb609
GB
52842014-08-07 Gary Benson <gbenson@redhat.com>
5285
5286 * server.h: Do not include gdb_assert.h.
5287
e76df0d0
GB
52882014-08-07 Gary Benson <gbenson@redhat.com>
5289
5290 * server.h: Do not include common-utils.h.
5291
4cb9c816
GB
52922014-08-07 Gary Benson <gbenson@redhat.com>
5293
5294 * server.h: Do not include ptid.h.
5295 * notif.h: Likewise.
5296
3995eeee
GB
52972014-08-07 Gary Benson <gbenson@redhat.com>
5298
5299 * server.h: Do not include gdb_locale.h.
5300
cb9f1a9b
GB
53012014-08-07 Gary Benson <gbenson@redhat.com>
5302
5303 * server.h: Do not include gdb/signals.h.
5304 * win32-low.c: Likewise.
5305
a5fceff8
GB
53062014-08-07 Gary Benson <gbenson@redhat.com>
5307
5308 * server.h: Do not include pathmax.h.
5309
b9391142
GB
53102014-08-07 Gary Benson <gbenson@redhat.com>
5311
5312 * server.h: Do not include libiberty.h.
5313 * linux-bfin-low.c: Likewise.
5314
0e443c87
GB
53152014-08-07 Gary Benson <gbenson@redhat.com>
5316
5317 * server.h: Do not include ansidecl.h.
5318
8ebb3f56
GB
53192014-08-07 Gary Benson <gbenson@redhat.com>
5320
5321 * linux-x86-low.c: Do not include stddef.h.
5322 * lynx-ppc-low.c: Likewise.
5323 * tracepoint.c: Likewise.
5324
8980bdf6
GB
53252014-08-07 Gary Benson <gbenson@redhat.com>
5326
5327 * server.h: Do not include stdarg.h.
5328 * nto-low.c: Likewise.
5329
d7096f71
GB
53302014-08-07 Gary Benson <gbenson@redhat.com>
5331
5332 * server.h: Do not include stdlib.h.
5333 * inferiors.c: Likewise.
5334 * linux-low.c: Likewise.
5335 * regcache.c: Likewise.
5336 * spu-low.c: Likewise.
5337 * tracepoint.c: Likewise.
5338 * utils.c: Likewise.
5339
d02f550d
GB
53402014-08-07 Gary Benson <gbenson@redhat.com>
5341
5342 * server.h: Do not include stdio.h.
5343 * linux-low.c: Likewise.
5344 * remote-utils.c: Likewise.
5345 * spu-low.c: Likewise.
5346 * utils.c: Likewise.
5347 * wincecompat.c: Likewise.
5348
87f6c4e3
GB
53492014-08-06 Gary Benson <gbenson@redhat.com>
5350
5351 * regcache.c (init_register_cache): Move conditionals inside if.
5352
7089dca4
GB
53532014-08-06 Gary Benson <gbenson@redhat.com>
5354
5355 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5356
462f517e
GB
53572014-07-31 Gary Benson <gbenson@redhat.com>
5358
5359 * ax.h: Do not include server.h.
5360 * gdbthread.h: Likewise.
5361 * lynx-low.h: Likewise.
5362 * notif.h: Likewise.
5363
976411d6
GB
53642014-07-30 Gary Benson <gbenson@redhat.com>
5365
5366 * server.h: Include common-defs.h.
5367 Do not include config.h or build-gnulib-gdbserver/config.h.
5368
d41f6d8e
GB
53692014-07-30 Gary Benson <gbenson@redhat.com>
5370
5371 * hostio-errno.c: Move server.h to top of includes list.
5372 * inferiors.c: Likewise.
5373 * linux-x86-low.c: Likewise.
5374 * notif.c: Include server.h.
5375
314c6a35
TT
53762014-07-24 Tom Tromey <tromey@redhat.com>
5377 Gary Benson <gbenson@redhat.com>
5378
5379 * server.h (CORE_ADDR): Now unsigned.
5380
69ff6be5
PA
53812014-07-16 Pedro Alves <palves@redhat.com>
5382
5383 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5384
ce9e3fe7
PA
53852014-07-15 Pedro Alves <palves@redhat.com>
5386
5387 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5388 copy.
5389
e76126e8
PA
53902014-07-11 Pedro Alves <palves@redhat.com>
5391
5392 * linux-low.c (kill_wait_lwp): New function, based on
5393 kill_one_lwp_callback, but use my_waitpid directly.
5394 (kill_one_lwp_callback, linux_kill): Use it.
5395
8e9db26e
PA
53962014-06-23 Pedro Alves <palves@redhat.com>
5397
5398 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5399 before setting DR0..DR3.
5400
698b3e08
GB
54012014-06-20 Gary Benson <gbenson@redhat.com>
5402
5403 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5404 * configure: Regenerated.
5405 * config.in: Likewise.
5406
125f8a3d
GB
54072014-06-20 Gary Benson <gbenson@redhat.com>
5408
5409 * Makefile.in (SFILES): Update locations for files moved
5410 from common to nat.
5411 (object file files): Reordered.
5412
42995dbd
GB
54132014-06-20 Gary Benson <gbenson@redhat.com>
5414
5415 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5416 (i386_dr_low_set_addr): Likewise.
5417 (i386_dr_low_get_addr): Likewise.
5418 (i386_dr_low_can_set_control): Likewise.
5419 (i386_dr_low_set_control): Likewise.
5420 (i386_dr_low_get_control): Likewise.
5421 (i386_dr_low_get_status): Likewise.
5422 (i386_get_debug_register_length): Likewise.
5423 * linux-x86-low.c (i386_dr_low_set_addr):
5424 Changed signature. Made static.
5425 (i386_dr_low_get_addr): Likewise.
5426 (i386_dr_low_set_control): Likewise.
5427 (i386_dr_low_get_control): Likewise.
5428 (i386_dr_low_get_status): Likewise.
5429 (i386_dr_low): New global variable.
5430 * win32-i386-low.c (i386_dr_low_set_addr):
5431 Changed signature. Made static.
5432 (i386_dr_low_get_addr): Likewise.
5433 (i386_dr_low_set_control): Likewise.
5434 (i386_dr_low_get_control): Likewise.
5435 (i386_dr_low_get_status): Likewise.
5436 (i386_dr_low): New global variable.
5437
e1d2394b
MS
54382014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5439
5440 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5441 * Makefile.in (AR, AR_FLAGS): Define.
5442 * configure: Regenerate.
5443
3a8ee006
GB
54442014-06-19 Gary Benson <gbenson@redhat.com>
5445
5446 * Makefile.in (i386-dregs.o): New rule.
5447 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5448 * i386-low.c (target.h): Remove include.
5449 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5450 (DR_CONTROL_SHIFT): Likewise.
5451 (DR_CONTROL_SIZE): Likewise.
5452 (DR_RW_EXECUTE): Likewise.
5453 (DR_RW_WRITE): Likewise.
5454 (DR_RW_READ): Likewise.
5455 (DR_RW_IORW): Likewise.
5456 (DR_LEN_1): Likewise.
5457 (DR_LEN_2): Likewise.
5458 (DR_LEN_4): Likewise.
5459 (DR_LEN_8): Likewise.
5460 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5461 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5462 (DR_ENABLE_SIZE): Likewise.
5463 (DR_LOCAL_SLOWDOWN): Likewise.
5464 (DR_GLOBAL_SLOWDOWN): Likewise.
5465 (DR_CONTROL_RESERVED): Likewise.
5466 (I386_DR_CONTROL_MASK): Likewise.
5467 (I386_DR_VACANT): Likewise.
5468 (I386_DR_LOCAL_ENABLE): Likewise.
5469 (I386_DR_GLOBAL_ENABLE): Likewise.
5470 (I386_DR_DISABLE): Likewise.
5471 (I386_DR_SET_RW_LEN): Likewise.
5472 (I386_DR_GET_RW_LEN): Likewise.
5473 (I386_DR_WATCH_HIT): Likewise.
5474 (i386_wp_op_t): Likewise.
5475 (i386_show_dr): Likewise.
5476 (i386_length_and_rw_bits): Likewise.
5477 (i386_insert_aligned_watchpoint): Likewise.
5478 (i386_remove_aligned_watchpoint): Likewise.
5479 (i386_handle_nonaligned_watchpoint): Likewise.
5480 i386_update_inferior_debug_regs(): Likewise.
5481 (i386_dr_insert_watchpoint): Likewise.
5482 (i386_dr_remove_watchpoint): Likewise.
5483 (i386_dr_region_ok_for_watchpoint): Likewise.
5484 (i386_dr_stopped_data_address): Likewise.
5485 (i386_dr_stopped_by_watchpoint): Likewise.
5486
8f26655c
GB
54872014-06-19 Gary Benson <gbenson@redhat.com>
5488
5489 * i386-low.c (i386_dr_show): Renamed to
5490 i386_show_dr and made static. All uses updated.
5491 (i386_dr_length_and_rw_bits): Renamed to
5492 i386_length_and_rw_bits and made static.
5493 All uses updated.
5494 (i386_dr_insert_aligned_watchpoint): Renamed to
5495 i386_insert_aligned_watchpoint and made static.
5496 All uses updated.
5497 (i386_dr_remove_aligned_watchpoint): Renamed to
5498 i386_remove_aligned_watchpoint and made static.
5499 All uses updated.
5500 (i386_dr_update_inferior_debug_regs): Renamed to
5501 i386_update_inferior_debug_regs and made static.
5502 All uses updated.
5503
b9228891
GB
55042014-06-18 Gary Benson <gbenson@redhat.com>
5505
5171def3
GB
5506 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5507 (i386_dr_low_can_set_control): Likewise.
5508 (i386_get_debug_register_length): Likewise.
5509 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5510 (i386_dr_low_can_set_control): Likewise.
5511 (i386_get_debug_register_length): Likewise.
5512
55132014-06-17 Gary Benson <gbenson@redhat.com>
5514
b9228891
GB
5515 * i386-low.h (i386-dregs.h): New include.
5516 (DR_FIRSTADDR): Now in i386-dregs.h.
5517 (DR_LASTADDR): Likewise.
5518 (DR_NADDR): Likewise.
5519 (DR_STATUS): Likewise.
5520 (DR_CONTROL): Likewise.
5521 (i386_debug_reg_state): Likewise.
5522 (i386_dr_insert_watchpoint): Likewise.
5523 (i386_dr_remove_watchpoint): Likewise.
5524 (i386_dr_region_ok_for_watchpoint): Likewise.
5525 (i386_dr_stopped_data_address): Likewise.
5526 (i386_dr_stopped_by_watchpoint): Likewise.
5527 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5528
4be83cc2
GB
55292014-06-18 Gary Benson <gbenson@redhat.com>
5530
5531 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5532 i386_dr_insert_watchpoint.
5533 (i386_low_remove_watchpoint): Renamed to
5534 i386_dr_remove_watchpoint.
5535 (i386_low_region_ok_for_watchpoint): Renamed to
5536 i386_dr_region_ok_for_watchpoint.
5537 (i386_low_stopped_data_address): Renamed to
5538 i386_dr_stopped_data_address.
5539 (i386_low_stopped_by_watchpoint): Renamed to
5540 i386_dr_stopped_by_watchpoint.
5541 * i386-low.c (i386_show_dr): Renamed to
5542 i386_dr_show and made nonstatic. All uses updated.
5543 (i386_length_and_rw_bits): Renamed to
5544 i386_dr_length_and_rw_bits and made nonstatic.
5545 All uses updated.
5546 (i386_insert_aligned_watchpoint): Renamed to
5547 i386_dr_insert_aligned_watchpoint and made nonstatic.
5548 All uses updated.
5549 (i386_remove_aligned_watchpoint): Renamed to
5550 i386_dr_remove_aligned_watchpoint and made nonstatic.
5551 All uses updated.
5552 (i386_update_inferior_debug_regs): Renamed to
5553 i386_dr_update_inferior_debug_regs and made nonstatic.
5554 All uses updated.
5555 (i386_low_insert_watchpoint): Renamed to
5556 i386_dr_insert_watchpoint. All uses updated.
5557 (i386_low_remove_watchpoint): Renamed to
5558 i386_dr_remove_watchpoint. All uses updated.
5559 (i386_low_region_ok_for_watchpoint): Renamed to
5560 i386_dr_region_ok_for_watchpoint. All uses updated.
5561 (i386_low_stopped_data_address): Renamed to
5562 i386_dr_stopped_data_address. All uses updated.
5563 (i386_low_stopped_by_watchpoint): Renamed to
5564 i386_dr_stopped_by_watchpoint. All uses updated.
5565
131aa0d4
GB
55662014-06-18 Gary Benson <gbenson@redhat.com>
5567
5568 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5569 (i386_dr_low_can_set_control): Likewise.
5570 (i386_insert_aligned_watchpoint): New check.
5571
d9305f7f
GB
55722014-06-18 Gary Benson <gbenson@redhat.com>
5573
5574 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5575 Renamed to state.
5576
e927c9fc
GB
55772014-06-18 Gary Benson <gbenson@redhat.com>
5578
5579 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5580 instead of fatal and error.
5581 (i386_handle_nonaligned_watchpoint): Likewise.
5582
1b6d4134
GB
55832014-06-18 Gary Benson <gbenson@redhat.com>
5584
5585 * i386-low.c (i386_get_debug_register_length): New macro.
5586 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5587 (i386_show_dr): Use debug_printf instead of fprintf. Use
5588 phex to format values.
5589
6e62758f
GB
55902014-06-18 Gary Benson <gbenson@redhat.com>
5591
5592 * i386-low.h: Comment changes.
5593 * i386-low.c: Likewise.
5594
fc6e2f03
GB
55952014-06-18 Gary Benson <gbenson@redhat.com>
5596
5597 * i386-low.c: Whitespace changes.
5598
f9d1eeed
TT
55992014-06-12 Tom Tromey <tromey@redhat.com>
5600
5601 * utils.c (freeargv): Remove.
5602
0b04e523
TT
56032014-06-12 Tom Tromey <tromey@redhat.com>
5604
5605 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5606 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5607 (parse_debug_format_options): Likewise.
5608 (gdbserver_usage): Likewise.
5609 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5610 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5611 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5612 against libiberty.
5613 ($(LIBGNU)): Depend on libiberty.
5614 (all-lib): Recurse into all subdirs.
5615 (install-only): Invoke "install" target in subdirs.
5616 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5617 targets.
5618 * configure: Rebuild.
5619 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5620 for vasprintf, vsnprintf, or gettimeofday.
5621 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5622 srv_tgtobj.
5623
270c9937
JB
56242014-06-05 Joel Brobecker <brobecker@adacore.com>
5625
5626 * development.sh: Delete.
5627 * Makefile.in (config.status): Adjust dependency on development.sh.
5628 * configure.ac: Adjust development.sh source call.
5629 * configure: Regenerate.
5630
0a261ed8
PA
56312014-06-02 Pedro Alves <palves@redhat.com>
5632
5633 * ax.c (gdb_free_agent_expr): New function.
5634 * ax.h (gdb_free_agent_expr): New declaration.
5635 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5636 list.
5637 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5638 static.
5639 (clear_breakpoint_conditions_and_commands): New function.
5640 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5641 (clear_breakpoint_conditions_and_commands): New declaration.
5642
e9dae05e
RR
56432014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5644
5645 * linux-aarch64-low.c (asm/ptrace.h): Include.
5646
5876f503
JK
56472014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5648
5649 Fix TLS access for -static -pthread.
5650 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5651 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5652 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5653
802e8e6d
PA
56542014-05-20 Pedro Alves <palves@redhat.com>
5655
5656 * linux-aarch64-low.c (aarch64_insert_point)
5657 (aarch64_remove_point): No longer check whether the type is
5658 supported here. Adjust to new interface.
5659 (the_low_target): Install aarch64_supports_z_point_type as
5660 supports_z_point_type method.
5661 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5662 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5663 instead of a Z packet char. Adjust.
5664 (arm_supports_z_point_type): New function.
5665 (arm_insert_point, arm_remove_point): Adjust to new interface.
5666 (the_low_target): Install arm_supports_z_point_type.
5667 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5668 (cris_insert_point, cris_remove_point): Adjust to new interface.
5669 Don't check whether the type is supported here.
5670 (the_low_target): Install cris_supports_z_point_type.
5671 * linux-low.c (linux_supports_z_point_type): New function.
5672 (linux_insert_point, linux_remove_point): Adjust to new interface.
5673 * linux-low.h (struct linux_target_ops) <insert_point,
5674 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5675 raw_breakpoint pointer parameter.
5676 <supports_z_point_type>: New method.
5677 * linux-mips-low.c (mips_supports_z_point_type): New function.
5678 (mips_insert_point, mips_remove_point): Adjust to new interface.
5679 Use mips_supports_z_point_type.
5680 (the_low_target): Install mips_supports_z_point_type.
5681 * linux-ppc-low.c (the_low_target): Install NULL as
5682 supports_z_point_type method.
5683 * linux-s390-low.c (the_low_target): Install NULL as
5684 supports_z_point_type method.
5685 * linux-sparc-low.c (the_low_target): Install NULL as
5686 supports_z_point_type method.
5687 * linux-x86-low.c (x86_supports_z_point_type): New function.
5688 (x86_insert_point): Adjust to new insert_point interface. Use
5689 insert_memory_breakpoint. Adjust to new
5690 i386_low_insert_watchpoint interface.
5691 (x86_remove_point): Adjust to remove_point interface. Use
5692 remove_memory_breakpoint. Adjust to new
5693 i386_low_remove_watchpoint interface.
5694 (the_low_target): Install x86_supports_z_point_type.
5695 * lynx-low.c (lynx_target_ops): Install NULL as
5696 supports_z_point_type callback.
5697 * nto-low.c (nto_supports_z_point_type): New.
5698 (nto_insert_point, nto_remove_point): Adjust to new interface.
5699 (nto_target_ops): Install nto_supports_z_point_type.
5700 * mem-break.c: Adjust intro comment.
5701 (struct raw_breakpoint) <raw_type, size>: New fields.
5702 <inserted>: Update comment.
5703 <shlib_disabled>: Delete field.
5704 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5705 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5706 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5707 (raw_bkpt_type_to_target_hw_bp_type): New function.
5708 (find_enabled_raw_code_breakpoint_at): New function.
5709 (find_raw_breakpoint_at): New type and size parameters. Use them.
5710 (insert_memory_breakpoint): New function, based off
5711 set_raw_breakpoint_at.
5712 (remove_memory_breakpoint): New function.
5713 (set_raw_breakpoint_at): Reimplement.
5714 (set_breakpoint): New, based on set_breakpoint_at.
5715 (set_breakpoint_at): Reimplement.
5716 (delete_raw_breakpoint): Go through the_target->remove_point
5717 instead of assuming memory breakpoints.
5718 (find_gdb_breakpoint_at): Delete.
5719 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5720 (find_gdb_breakpoint): New function.
5721 (set_gdb_breakpoint_at): Delete.
5722 (z_type_supported): New function.
5723 (set_gdb_breakpoint_1): New function, loosely based off
5724 set_gdb_breakpoint_at.
5725 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5726 (delete_gdb_breakpoint_at): Delete.
5727 (delete_gdb_breakpoint_1): New function, loosely based off
5728 delete_gdb_breakpoint_at.
5729 (delete_gdb_breakpoint): New function.
5730 (clear_gdb_breakpoint_conditions): Rename to ...
5731 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5732 breakpoint.
5733 (add_condition_to_breakpoint): Make static.
5734 (add_breakpoint_condition): Take a struct breakpoint pointer
5735 instead of an address. Adjust.
5736 (gdb_condition_true_at_breakpoint): Rename to ...
5737 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5738 z_type parameter.
5739 (gdb_condition_true_at_breakpoint): Reimplement.
5740 (add_breakpoint_commands): Take a struct breakpoint pointer
5741 instead of an address. Adjust.
5742 (gdb_no_commands_at_breakpoint): Rename to ...
5743 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5744 parameter. Return true if no breakpoint was found. Change debug
5745 output.
5746 (gdb_no_commands_at_breakpoint): Reimplement.
5747 (run_breakpoint_commands): Rename to ...
5748 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5749 and change return type to boolean.
5750 (run_breakpoint_commands): New function.
5751 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5752 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5753 breakpoint. Go through the_target->remove_point instead of
5754 assuming memory breakpoint.
5755 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5756 software and hardware breakpoints.
5757 (reinsert_raw_breakpoint): Go through the_target->insert_point
5758 instead of assuming memory breakpoint.
5759 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5760 software and hardware breakpoints.
5761 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5762 Check both software and hardware breakpoints.
5763 (validate_inserted_breakpoint): Assert the breakpoint is a
5764 software breakpoint. Set the inserted flag to -1 instead of
5765 setting shlib_disabled.
5766 (delete_disabled_breakpoints): Adjust.
5767 (validate_breakpoints): Only validate software breakpoints.
5768 Adjust to inserted flag change.
5769 (check_mem_read, check_mem_write): Skip breakpoint types other
5770 than software breakpoints. Adjust to inserted flag change.
5771 * mem-break.h (enum raw_bkpt_type): New enum.
5772 (raw_breakpoint, struct process_info): Forward declare.
5773 (Z_packet_to_target_hw_bp_type): Delete declaration.
5774 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5775 (set_gdb_breakpoint, delete_gdb_breakpoint)
5776 (clear_breakpoint_conditions): New declarations.
5777 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5778 (breakpoint_inserted_here): Update comment.
5779 (add_breakpoint_condition, add_breakpoint_commands): Replace
5780 address parameter with a breakpoint pointer parameter.
5781 (gdb_breakpoint_here): Update comment.
5782 (delete_gdb_breakpoint_at): Delete.
5783 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5784 * server.c (process_point_options): Take a struct breakpoint
5785 pointer instead of an address. Adjust.
5786 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5787 delete_gdb_breakpoint.
5788 * spu-low.c (spu_target_ops): Install NULL as
5789 supports_z_point_type method.
5790 * target.h: Include mem-break.h.
5791 (struct target_ops) <prepare_to_access_memory>: Update comment.
5792 <supports_z_point_type>: New field.
5793 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5794 instead of a char. Also take a raw breakpoint pointer.
5795 * win32-arm-low.c (the_low_target): Install NULL as
5796 supports_z_point_type.
5797 * win32-i386-low.c (i386_supports_z_point_type): New function.
5798 (i386_insert_point, i386_remove_point): Adjust to new interface.
5799 (the_low_target): Install i386_supports_z_point_type.
5800 * win32-low.c (win32_supports_z_point_type): New function.
5801 (win32_insert_point, win32_remove_point): Adjust to new interface.
5802 (win32_target_ops): Install win32_supports_z_point_type.
5803 * win32-low.h (struct win32_target_ops):
5804 <supports_z_point_type>: New method.
5805 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5806 instead of a char. Also take a raw breakpoint pointer.
5807
932539e3
PA
58082014-05-20 Pedro Alves <palves@redhat.com>
5809
5810 * mem-break.h: Include break-common.h.
5811 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5812 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5813 (Z_packet_to_target_hw_bp_type): New declaration.
5814 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5815 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5816 (Z_PACKET_ACCESS_WP): Delete macros.
5817 (Z_packet_to_hw_type): Delete function.
5818 * i386-low.h: Don't include break-common.h here.
5819 (Z_packet_to_hw_type): Delete declaration.
5820 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5821 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5822 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5823 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5824 * linux-aarch64-low.c: Don't include break-common.h here.
5825 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5826 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5827 (Z_packet_to_target_hw_bp_type): Delete function.
5828 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5829 function.
5830 (mips_insert_point, mips_remove_point): Use
5831 Z_packet_to_target_hw_bp_type.
5832
4ff0d3d8
PA
58332014-05-20 Pedro Alves <palves@redhat.com>
5834
5835 * linux-aarch64-low.c: Include break-common.h.
5836 (enum target_point_type): Delete.
5837 (Z_packet_to_point_type): Rename to ...
5838 (Z_packet_to_target_hw_bp_type): ... this, and return a
5839 target_hw_bp_type instead.
5840 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5841 instead of an enum target_point_type.
5842 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5843 breakpoint type.
5844 (aarch64_dr_state_insert_one_point)
5845 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5846 (aarch64_handle_aligned_watchpoint)
5847 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5848 Take an enum target_hw_bp_type instead of an enum
5849 target_point_type.
5850 (aarch64_supports_z_point_type): New function.
5851 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5852 use Z_packet_to_target_hw_bp_type.
5853
786dc519
JB
58542014-05-20 Joel Brobecker <brobecker@adacore.com>
5855
5856 * configure.ac: Only use -Werror by default when DEVELOPMENT
5857 is true.
5858 * configure: Regenerate.
5859
9e0aa64f
JK
58602014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5861
5862 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5863 * linux-x86-low.c (X86_64_USER_REGS): New.
5864 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5865
2b577b92
YQ
58662014-04-28 Yao Qi <yao@codesourcery.com>
5867
5868 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5869 name.
5870
94611da2
PA
58712014-04-25 Pedro Alves <palves@redhat.com>
5872
5873 PR server/16255
5874 * linux-low.c (linux_attach_fail_reason_string): New function.
5875 (linux_attach_lwp): Delete.
5876 (linux_attach_lwp_1): Rename to ...
5877 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5878 argument. Remove "initial" parameter. Return int instead of
5879 void. Don't error or warn here.
5880 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5881 failure to attach to the tgid. Call warning when failing to
5882 attach to an lwp.
5883 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5884 argument. Remove "initial" parameter. Return int instead of
5885 void. Don't error or warn here.
5886 (linux_attach_fail_reason_string): New declaration.
5887 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5888 interface change. Use linux_attach_fail_reason_string.
5889
01f9f808
MS
58902014-04-24 Michael Sturm <michael.sturm@mintel.com>
5891 Walfred Tedeschi <walfred.tedeschi@intel.com>
5892
5893 * Makefile.in: Added rules to handle new files
5894 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5895 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5896 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5897 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5898 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5899 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5900 x32-avx512-linux.o.
5901 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5902 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5903 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5904 i386/x32-avx512.xml.
5905 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5906 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5907 i386/x32-avx512-linux.xml.
5908 * i387-fp.c (num_avx512_k_registers): New constant for number
5909 of K registers.
5910 (num_avx512_zmmh_low_registers): New constant for number of
5911 lower ZMM registers (0-15).
5912 (num_avx512_zmmh_high_registers): New constant for number of
5913 higher ZMM registers (16-31).
5914 (num_avx512_ymmh_registers): New contant for number of higher
5915 YMM registers (ymm16-31 added by avx521 on x86_64).
5916 (num_avx512_xmm_registers): New constant for number of higher
5917 XMM registers (xmm16-31 added by AVX512 on x86_64).
5918 (struct i387_xsave): Add space for AVX512 registers.
5919 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5920 Add code to handle AVX512 registers.
5921 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5922 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5923 prototypei from generated file.
5924 (tdesc_amd64_avx512_linux): Likewise.
5925 (init_registers_x32_avx512_linux): Likewise.
5926 (tdesc_x32_avx512_linux): Likewise.
5927 (init_registers_i386_avx512_linux): Likewise.
5928 (tdesc_i386_avx512_linux): Likewise.
5929 (x86_64_regmap): Add AVX512 registers.
5930 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5931 mask.
5932 (initialize_low_arch): Add code to initialize AVX512 registers.
5933
51aa91f9
PA
59342014-04-23 Pedro Alves <palves@redhat.com>
5935
5936 * mem-break.c (find_gdb_breakpoint_at): Make static.
5937 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5938
a4165e94
PA
59392014-04-23 Pedro Alves <palves@redhat.com>
5940
5941 * i386-low.c: Don't include break-common.h here.
5942 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5943 prototype to take target_hw_bp_type as argument instead of a Z
5944 packet char.
5945 * i386-low.h: Include break-common.h here.
5946 (Z_packet_to_hw_type): Declare.
5947 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5948 prototypes.
5949 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5950 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5951 (x86_remove_point): Convert the packet number to a
5952 target_hw_bp_type before calling i386_low_remove_watchpoint.
5953 * win32-i386-low.c (i386_insert_point): Convert the packet number
5954 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5955 (i386_remove_point): Convert the packet number to a
5956 target_hw_bp_type before calling i386_low_remove_watchpoint.
5957
b8acf843
PA
59582014-04-23 Pedro Alves <palves@redhat.com>
5959
5960 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5961
d708bcd1
PA
59622014-04-10 Pedro Alves <palves@redhat.com>
5963
5964 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5965 Check if the condition or command is NULL before checking if the
5966 breakpoint is known. On success, return true.
5967 * mem-break.h (add_breakpoint_condition): Document return.
5968 (add_breakpoint_commands): Add describing comment.
5969 * server.c (skip_to_semicolon): New function.
5970 (process_point_options): Use it.
5971
2eec7d5b
PA
59722014-04-09 Pedro Alves <palves@redhat.com>
5973
5974 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5975 to lwpid_of.
5976
fa96cb38
PA
59772014-02-27 Pedro Alves <palves@redhat.com>
5978
5979 PR 12702
5980 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5981 macros.
5982 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5983 output.
5984 (last_thread_of_process_p): Take a PID argument instead of a
5985 thread pointer.
5986 (linux_wait_for_lwp): Delete.
5987 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5988 functions.
5989 (linux_low_filter_event): New function, party factored out from
5990 linux_wait_for_event.
5991 (linux_wait_for_event): Rename to ...
5992 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5993 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5994 sigsuspend. Check for zombie leaders.
5995 (linux_wait_for_event): Reimplement as wrapper around
5996 linux_wait_for_event_filtered.
5997 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5998 a normal or signal exit is seen, it's the whole process exiting.
5999 (wait_for_sigstop): No longer a for_each_inferior callback.
6000 Rewrite on top of linux_wait_for_event_filtered.
6001 (stop_all_lwps): Call wait_for_sigstop directly.
6002 * server.c (resume, handle_target_event): Handle
6003 TARGET_WAITKIND_NO_RESUMED.
6004
d763de10
JB
60052014-02-26 Joel Brobecker <brobecker@adacore.com>
6006
6007 * win32-low.c (psapi_get_dll_name,
6008 * win32_CreateToolhelp32Snapshot): Delete.
6009 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6010 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6011 Delete.
6012 (handle_load_dll): Add function description.
6013 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6014
850a0f76
JB
60152014-02-26 Joel Brobecker <brobecker@adacore.com>
6016
6017 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6018 Add comment.
6019 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6020 base address when calling win32_add_one_solib.
6021 (handle_load_dll): Delete local variable load_addr.
6022 Remove 0x1000 offset applied to DLL base address when calling
6023 win32_add_one_solib.
6024 (handle_unload_dll): Add comment.
6025
f25b3fc3
JB
60262014-02-26 Joel Brobecker <brobecker@adacore.com>
6027
6028 * win32-low.c (win32_add_all_dlls): Renames
6029 win32_ensure_ntdll_loaded. Rewrite function documentation.
6030 Adjust implementation to always load all DLLs.
6031 Add 0x1000 offset to DLL base address when calling
6032 win32_add_one_solib.
6033 (child_initialization_done): New static global.
6034 (do_initial_child_stuff): Set child_initialization_done to
6035 zero during child initialization, and 1 after. Replace call
6036 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6037 Add comment.
6038 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6039 (handle_unload_dll): Add function documentation.
6040 (get_child_debug_event): Ignore load and unload DLL events
6041 during child initialization.
6042
d86d4aaf
DE
60432014-02-20 Doug Evans <dje@google.com>
6044
3bc32da3 6045 Remove global all_lwps.
d86d4aaf
DE
6046 * inferiors.h (ptid_of): Move here from linux-low.h.
6047 (pid_of, lwpid_of): Ditto.
6048 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6049 parameter is a struct thread_info * now.
6050 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6051 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6052 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6053 directly.
6054 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6055 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6056 * linux-arm-low.c (update_registers_callback): Update, "entry"
6057 parameter is a struct thread_info * now.
6058 Fetch lwpid from current_inferior directly.
6059 (arm_insert_point): Pass &all_threads to find_inferior instead of
6060 &all_lwps.
6061 (arm_remove_point): Ditto.
6062 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6063 (arm_prepare_to_resume): Fetch pid from thread.
6064 (arm_read_description): Fetch lwpid from current_inferior directly.
6065 * linux-low.c (all_lwps): Delete.
6066 (delete_lwp): Delete call to remove_inferior.
6067 (handle_extended_wait): Fetch lwpid from thread.
6068 (add_lwp): Don't set lwp->entry.id. Remove call to
6069 add_inferior_to_list.
6070 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6071 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6072 (kill_one_lwp_callback): Ditto.
6073 (linux_kill): Don't dereference NULL pointer.
6074 Fetch ptid,lwpid from thread.
6075 (get_detach_signal): Fetch ptid from thread.
6076 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6077 Simplify call to regcache_invalidate_thread.
6078 (delete_lwp_callback): Update, "entry" parameter is a
6079 struct thread_info * now. Fetch pid from thread.
6080 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6081 (status_pending_p_callback): Update, "entry" parameter is a
6082 struct thread_info * now. Fetch ptid from thread.
6083 (find_lwp_pid): Update, "entry" parameter is a
6084 struct thread_info * now.
6085 (linux_wait_for_lwp): Fetch pid from thread.
6086 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6087 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6088 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6089 (dequeue_one_deferred_signal): Ditto.
6090 (cancel_breakpoint): Fetch ptid from current_inferior.
6091 (linux_wait_for_event): Pass &all_threads to find_inferior,
6092 not &all_lwps. Fetch ptid, lwpid from thread.
6093 (count_events_callback): Update, "entry" parameter is a
6094 struct thread_info * now.
6095 (select_singlestep_lwp_callback): Ditto.
6096 (select_event_lwp_callback): Ditto.
6097 (cancel_breakpoints_callback): Ditto.
6098 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6099 not &all_lwps.
6100 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6101 (unsuspend_one_lwp): Update, "entry" parameter is a
6102 struct thread_info * now.
6103 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6104 not &all_lwps.
6105 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6106 Fetch lwpid from thread, not lwp.
6107 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6108 Pass &all_threads to find_inferior, not &all_lwps.
6109 (send_sigstop): Fetch lwpid from thread, not lwp.
6110 (send_sigstop_callback): Update, "entry" parameter is a
6111 struct thread_info * now.
6112 (suspend_and_send_sigstop_callback): Ditto.
6113 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6114 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6115 struct thread_info * now.
6116 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6117 from thread, lwp.
6118 (lwp_running): Update, "entry" parameter is a
6119 struct thread_info * now.
6120 (stop_all_lwps): Fetch ptid from thread.
6121 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6122 (linux_resume_one_lwp): Fetch lwpid from thread.
6123 (linux_set_resume_request): Update, "entry" parameter is a
6124 struct thread_info * now. Fetch pid, lwpid from thread.
6125 (resume_status_pending_p): Update, "entry" parameter is a
6126 struct thread_info * now.
6127 (need_step_over_p): Ditto. Fetch lwpid from thread.
6128 (start_step_over): Fetch lwpid from thread.
6129 (linux_resume_one_thread): Update, "entry" parameter is a
6130 struct thread_info * now. Fetch lwpid from thread.
6131 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6132 (proceed_one_lwp): Update, "entry" parameter is a
6133 struct thread_info * now. Fetch lwpid from thread.
6134 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6135 struct thread_info * now.
6136 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6137 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6138 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6139 directly.
6140 (regsets_store_inferior_registers): Ditto.
6141 (fetch_register, store_register): Ditto.
6142 (linux_read_memory, linux_write_memory): Ditto.
6143 (linux_request_interrupt): Ditto.
6144 (linux_read_auxv): Ditto.
6145 (linux_xfer_siginfo): Ditto.
6146 (linux_qxfer_spu): Ditto.
6147 (linux_qxfer_libraries_svr4): Ditto.
6148 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6149 moved to inferiors.h.
6150 (get_lwp): Delete.
6151 (get_thread_lwp): Update.
6152 (struct lwp_info): Delete member "entry". Simplify comment for
6153 member "thread".
6154 (all_lwps): Delete.
6155 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6156 current_inferior directly.
6157 (update_watch_registers_callback): Update, "entry" parameter is a
6158 struct thread_info * now. Fetch pid from thread.
6159 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6160 (mips_insert_point): Fetch lwpid from current_inferior.
6161 Pass &all_threads to find_inferior, not &all_lwps.
6162 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6163 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6164 directly.
6165 (mips_stopped_data_address): Ditto.
6166 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6167 directly.
6168 * linux-tile-low.c (tile_arch_setup): Ditto.
6169 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6170 (update_debug_registers_callback): Update, "entry" parameter is a
6171 struct thread_info * now. Fetch pid from thread.
6172 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6173 Pass &all_threads to find_inferior, not &all_lwps.
6174 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6175 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6176 Pass &all_threads to find_inferior, not &all_lwps.
6177 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6178 (i386_dr_low_get_status): Ditto.
6179 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6180 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6181 (x86_linux_read_description): Ditto.
6182 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6183
3b8361aa
DE
61842014-02-20 Doug Evans <dje@google.com>
6185
6186 * inferiors.c (get_first_inferior): Fix buglet.
6187
f7667f0d
DE
61882014-02-19 Doug Evans <dje@google.com>
6189
6190 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6191 * inferiors.c (add_thread): Change result type to struct thread_info *.
6192 All callers updated.
6193 (add_lwp): Call add_thread here instead of in callers.
6194 All callers updated.
6195 * linux-low.h (get_lwp_thread): Rewrite.
6196 (struct lwp_info): New member "thread".
6197
b3312d80
DE
61982014-02-19 Doug Evans <dje@google.com>
6199
6200 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6201 All callers updated.
6202
ecc6f45c
DE
62032014-02-19 Doug Evans <dje@google.com>
6204
6205 * inferiors.c (add_thread): Fix whitespace.
6206
649ebbca
DE
62072014-02-19 Doug Evans <dje@google.com>
6208
6209 * dll.c (clear_dlls): Replace accessing list implemention details
6210 with API function.
6211 * gdbthread.h (get_first_thread): Declare.
6212 * inferiors.c (for_each_inferior_with_data): New function.
6213 (get_first_thread): New function.
6214 (find_thread_ptid): Simplify.
6215 (get_first_inferior): New function.
6216 (clear_list): Delete.
6217 (one_inferior_p): New function.
6218 (clear_inferior_list): New function.
6219 (clear_inferiors): Update.
6220 * inferiors.h (for_each_inferior_with_data): Declare.
6221 (clear_inferior_list): Declare.
6222 (one_inferior_p): Declare.
6223 (get_first_inferior): Declare.
6224 * linux-low.c (linux_wait_for_event): Replace accessing list
6225 implemention details with API function.
6226 * server.c (target_running): Ditto.
6227 (accumulate_file_name_length): New function.
6228 (emit_dll_description): New function.
6229 (handle_qxfer_libraries): Replace accessing list implemention
6230 details with API function.
6231 (handle_qxfer_threads_worker): New function.
6232 (handle_qxfer_threads_proper): Replace accessing list implemention
6233 details with API function.
6234 (handle_query): Ditto.
6235 (visit_actioned_threads_callback_ftype): New typedef.
6236 (visit_actioned_threads_data): New struct.
6237 (visit_actioned_threads): Rewrite to be find_inferior callback.
6238 (resume): Call find_inferior.
6239 (handle_status): Replace accessing list implemention
6240 details with API function.
6241 (process_serial_event): Replace accessing list implemention details
6242 with API function.
6243 * target.c (set_desired_inferior): Replace accessing list implemention
6244 details with API function.
6245 * tracepoint.c (same_process_p): New function.
6246 (gdb_agent_about_to_close): Replace accessing list implemention
6247 details with API function.
6248 * win32-low.c (child_delete_thread): Replace accessing list
6249 implemention details with API function.
6250 (match_dll_by_basename): New function.
6251 (dll_is_loaded_by_basename): New function.
6252 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6253 details call to dll_is_loaded_by_basename.
6254
80894984
DE
62552014-02-19 Doug Evans <dje@google.com>
6256
6257 * dll.h (struct dll_info): Add comment.
6258 * gdbthread.h (struct thread_info): Add comment.
6259 (current_ptid): Simplify.
6260 * inferiors.c (add_process): Update.
6261 (remove_process): Update.
6262 * inferiors.h (struct process_info): Rename member "head" to "entry".
6263 * linux-low.c (delete_lwp): Update.
6264 (add_lwp): Update.
6265 (last_thread_of_process_p): Update.
6266 (kill_one_lwp_callback, linux_kill): Update.
6267 (status_pending_p_callback): Update.
6268 (wait_for_sigstop): Update. Simplify read of ptid.
6269 (start_step_over): Update.
6270 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6271 (get_lwp_thread): Update.
6272 (struct lwp_info): Rename member "head" to "entry".
6273 * regcache.h (inferior_list_entry): Delete.
6274 * server.c (kill_inferior_callback): Update.
6275 (detach_or_kill_inferior_callback): Update.
6276 (print_started_pid): Update.
6277 (print_attached_pid): Update.
6278 (process_serial_event): Simplify read of ptid.
6279 * thread-db.c (thread_db_create_event): Update.
6280 (thread_db_get_tls_address): Update.
6281 * win32-low.c (current_inferior_ptid): Simplify.
6282
46917d26
TT
62832014-02-19 Tom Tromey <tromey@redhat.com>
6284
6285 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6286 argument.
6287 (target_supports_btrace): Update.
6288
0759a81e
YQ
62892014-02-14 Yao Qi <yao@codesourcery.com>
6290
6291 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6292 (rsp-low-ipa.o): New target.
6293
a7191e8b
TT
62942014-02-12 Tom Tromey <tromey@redhat.com>
6295
6296 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6297 convert_ascii_to_int.
6298 * regcache.c (registers_to_string): Likewise.
6299 * remote-utils.c (decode_M_packet): Likewise.
6300 * server.c (process_serial_event): Likewise.
6301
ff0e980e
TT
63022014-02-12 Tom Tromey <tromey@redhat.com>
6303
6304 * server.c (handle_query, handle_v_run): Use hex2bin, not
6305 unhexify.
6306 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6307
e9371aff
TT
63082014-02-12 Tom Tromey <tromey@redhat.com>
6309
6310 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6311 convert_int_to_ascii.
6312 * regcache.c (registers_to_string, collect_register_as_string):
6313 Likewise.
6314 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6315 Likewise.
6316 * server.c (process_serial_event): Likewise.
6317 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6318 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6319
971dc0b8
TT
63202014-02-12 Tom Tromey <tromey@redhat.com>
6321
6322 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6323 bin2hex, not hexify.
6324 * tracepoint.c (cmd_qtstatus): Likewise.
6325
0a822afb
TT
63262014-02-12 Tom Tromey <tromey@redhat.com>
6327
6328 * remote-utils.c (monitor_output): Pass explicit length to
6329 hexify.
6330
9c3d6531
TT
63312014-02-12 Tom Tromey <tromey@redhat.com>
6332
6333 * tracepoint.c: Include rsp-low.h.
6334 * server.c: Include rsp-low.h.
6335 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6336 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6337 declare.
6338 * remote-utils.c: Include rsp-low.h.
6339 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6340 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6341 (convert_int_to_ascii, convert_ascii_to_int): Move to
6342 common/rsp-low.c.
6343 * regcache.c: Include rsp-low.h.
6344 * ax.c: Include rsp-low.h.
6345 * Makefile.in (SFILES): Add common/rsp-low.c.
6346 (OBS): Add rsp-low.o.
6347 (rsp-low.o): New target.
6348
01fd3ea5
TT
63492014-02-12 Tom Tromey <tromey@redhat.com>
6350
6351 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6352 Include print-utils.h.
6353 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6354 (plongest, thirty_two, phex_nz): Remove.
6355 * Makefile.in (SFILES): Add common/print-utils.c.
6356 (OBS): Add print-utils.o.
6357 (print-utils-ipa.o): New target.
6358 (print-utils.o): New target.
6359 (IPA_OBJS): Add print-utils-ipa.o.
6360
e99dc820
TT
63612014-02-06 Tom Tromey <tromey@redhat.com>
6362
6363 * Makefile.in (SFILES): Fix indentation.
6364
ee1e2d4f
DE
63652014-02-05 Doug Evans <dje@google.com>
6366
6367 * linux-low.c (linux_wait_for_event): Improve comment.
6368 (linux_wait_1): Keep current_inferior in sync with event_child.
6369
f5a02773
DE
63702014-01-22 Doug Evans <dje@google.com>
6371
6372 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6373
87ce2a04
DE
63742014-01-22 Doug Evans <dje@google.com>
6375
6376 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6377 * configure: Regenerate.
6378 * config.in: Regenerate.
6379 * Makefile.in (SFILES): Add debug.c.
6380 (OBS): Add debug.o.
6381 * debug.c: New file.
6382 * debug.h: New file.
6383 * linux-aarch64-low.c (*): Update all debugging printfs to use
6384 debug_printf instead of fprintf.
6385 * linux-arm-low.c (*): Ditto.
6386 * linux-cris-low.c (*): Ditto.
6387 * linux-crisv32-low.c (*): Ditto.
6388 * linux-m32r-low.c (*): Ditto.
6389 * linux-sparc-low.c (*): Ditto.
6390 * linux-x86.c (*): Ditto.
6391 * linux-low.c (*): Ditto.
6392 (linux_wait_1): Add calls to debug_enter, debug_exit.
6393 (linux_wait): Remove redundant debugging printf.
6394 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6395 (linux_resume, unstop_all_lwps): Ditto.
6396 * mem-break.c (*): Update all debugging printfs to use
6397 debug_printf instead of fprintf.
6398 * remote-utils.c (*): Ditto.
6399 * thread-db.c (*): Ditto.
6400 * server.c #include <ctype.h>, "gdb_vecs.h".
6401 (debug_threads): Moved to debug.c.
6402 (*): Update all debugging printfs to use debug_printf instead of
6403 fprintf.
6404 (start_inferior): Replace call to fflush with call to debug_flush.
6405 (monitor_show_help): Mention set debug-format.
6406 (parse_debug_format_options): New function.
6407 (handle_monitor_command): Handle "monitor set debug-format".
6408 (gdbserver_usage): Mention --debug-format.
6409 (main): Parse --debug-format.
6410 * server.h (debug_threads): Declaration moved to debug.h.
6411 #include "debug.h".
6412 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6413 trace_debug_1 that uses debug_printf.
6414 (tracepoint_look_up_symbols): Update all debugging printfs to use
6415 debug_printf instead of fprintf.
6416
e671835b
BS
64172014-01-20 Baruch Siach <baruch@tkos.co.il>
6418
6419 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6420 sys/ptrace.h.
6421
b5737fa9
PA
64222014-01-17 Pedro Alves <palves@redhat.com>
6423
ea38d2a9 6424 PR build/16445
c7faa97a
PA
6425 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6426 defined after including gdb_proc_service.h.
b5737fa9 6427
40ed484e
DE
64282014-01-16 Doug Evans <dje@google.com>
6429
6430 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6431 (match_dll): Use it.
6432
969c39fb
MM
64332014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6434
6435 * target.h (target_ops) <read_btrace>: Change parameters and
6436 return type to allow error reporting.
6437 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6438 trace reading errors on.
6439 * linux-low.c (linux_low_read_btrace): Pass trace reading
6440 errors on.
6441 (linux_low_disable_btrace): New.
6442
ab7f45ba
DE
64432014-01-15 Doug Evans <dje@google.com>
6444
6445 * inferiors.c (thread_id_to_gdb_id): Delete.
6446 * inferiors.h (thread_id_to_gdb_id): Delete.
6447
66af0f44
EZ
64482014-01-13 Eli Zaretskii <eliz@gnu.org>
6449
6450 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6451 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6452 versions.
6453
9939e131
PA
64542014-01-08 Pedro Alves <palves@redhat.com>
6455
6456 * server.c (handle_status): Don't discard previous queued stop
6457 replies or thread's pending status here.
6458 (main) <disconnection>: Do it here instead.
6459
b7ea362b
PA
64602014-01-08 Pedro Alves <palves@redhat.com>
6461
6462 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6463 * server.c (visit_actioned_threads, handle_pending_status): New
6464 function.
6465 (handle_v_cont): Factor out parts to ...
6466 (resume): ... this new function. If in all-stop, and a thread
6467 being resumed has a pending status, report it without actually
6468 resuming.
6469 (myresume): Adjust to use the new 'resume' function.
6470 (clear_pending_status_callback, set_pending_status_callback)
6471 (find_status_pending_thread_callback): New functions.
6472 (handle_status): Handle the case of multiple threads having
6473 interesting statuses to report. Report threads' real last signal
6474 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6475 with an interesting thread to report the status for, instead of
6476 always reporting the status of the first thread.
6477
28498c42
JB
64782014-01-01 Joel Brobecker <brobecker@adacore.com>
6479
6480 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6481 * gdbreplay.c (gdbreplay_version): Likewise.
6482
f45c82da
YZ
64832013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6484
6485 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6486 iov.iov_len with the real length in use.
6487
379a5e2d
JB
64882013-12-13 Joel Brobecker <brobecker@adacore.com>
6489
6490 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6491 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6492 for all targets that use win32-low.c.
6493 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6494 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6495
4210d83e
PA
64962013-12-13 Pedro Alves <palves@redhat.com>
6497
6498 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6499 if equal to TARGET_WAITKIND_LOADED.
6500 * win32-low.c (cached_status): New static global.
6501 (win32_wait): Add declaration.
6502 (do_initial_child_stuff): Flush all initial pending debug events
6503 up to the initial breakpoint.
6504 (win32_wait): If CACHED_STATUS was set, return that instead
6505 of doing a real wait. Remove the code resuming the execution
6506 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6507 during the initial phase. Also remove the code changing
6508 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6509 TARGET_WAITKIND_STOPPED.
6510
e7f0d979
YQ
65112013-12-11 Yao Qi <yao@codesourcery.com>
6512
6513 * notif.c (handle_notif_ack): Return 0 if no notification
6514 matches.
6515
ebcf782c
DE
65162013-11-20 Doug Evans <dje@google.com>
6517
6518 * linux-low.c (linux_set_resume_request): Fix comment.
6519
20ad9378
DE
65202013-11-20 Doug Evans <dje@google.com>
6521
6522 * linux-low.c (resume_status_pending_p): Tweak comment.
6523
a196ebeb
WT
65242013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6525
6526 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6527 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6528 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6529 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6530 (srv_amd64_regobj): Add amd64-mpx.o.
6531 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6532 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6533 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6534 * i387-fp.c (num_pl_bnd_register) Added constant.
6535 (num_pl_bnd_cfg_registers) Added constant.
6536 (struct i387_xsave) Added reserved area and MPX fields.
6537 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6538 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6539 function.
6540 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6541 (init_registers_amd64_mpx_linux): Declare new function.
6542 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6543 (x86_64_regmap): Add MPX registers.
6544 (x86_linux_read_description): Add MPX case.
6545 (initialize_low_arch): Initialize MPX targets.
6546
0080a2f6
TT
65472013-11-18 Tom Tromey <tromey@redhat.com>
6548
6549 * configure: Rebuild.
6550 * configure.ac: Don't check for stdlib.h.
6551 * gdbreplay.c: Unconditionally include stdlib.h.
6552
2978b111
TT
65532013-11-18 Tom Tromey <tromey@redhat.com>
6554
6555 * config.in: Rebuild.
6556 * configure: Rebuild.
6557 * configure.ac: Don't use AC_HEADER_DIRENT.
6558
a3d08894
TT
65592013-11-18 Tom Tromey <tromey@redhat.com>
6560
6561 * server.h: Don't check HAVE_STRING_H.
6562 * gdbreplay.c: Don't check HAVE_STRING_H.
6563 * configure: Rebuild.
6564
0a5dd17d
TT
65652013-11-18 Tom Tromey <tromey@redhat.com>
6566
6567 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6568 LIBGNU.
6569
1bd2f0ba
TT
65702013-11-08 Tom Tromey <tromey@redhat.com>
6571
6572 * configure, config.in: Rebuild.
6573 * configure.ac: Remove unused configury.
6574
3266f10b
TT
65752013-11-08 Tom Tromey <tromey@redhat.com>
6576
6577 * acinclude.m4: Include common.m4, codeset.m4.
6578 * configure, config.in: Rebuild.
6579 * configure.ac: Use GDB_AC_COMMON.
6580
6682d959
AA
65812013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6582
6583 * linux-s390-low.c (HWCAP_S390_TE): New define.
6584 (s390_arch_setup): Consider the TE field in the HWCAP for
6585 determining 'have_regset_tdb'.
6586
fd0a4d76
SDJ
65872013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6588
6589 PR gdb/16014
6590 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6591 call to sizeof.
6592
1a3d890b
PA
65932013-10-02 Pedro Alves <palves@redhat.com>
6594
6595 * server.c (process_serial_event): Don't output "GDBserver
6596 exiting" if GDB is connected through stdio.
6597 * target.c (mywait): Likewise, be silent if GDB is connected
6598 through stdio.
6599
97ad4581
JB
66002013-10-01 Joel Brobecker <brobecker@adacore.com>
6601
6602 * lynx-low.c (lynx_add_threads_after_attach): New function.
6603 (lynx_attach): Remove call to add_thread. Add call to
6604 lynx_add_threads_after_attach instead.
6605
5b4e221c
MF
66062013-09-28 Mike Frysinger <vapier@gentoo.org>
6607
6608 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6609 * config.in, configure: Regenerated.
6610
ee47b2f8
YQ
66112013-09-18 Yao Qi <yao@codesourcery.com>
6612
6613 PR server/15959
6614 * server.c (start_inferior): Clear 'resume_info'.
6615
d6707650 66162013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6617
d6707650
JW
6618 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6619 for each register.
6620
9243dd0e 66212013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6622
9243dd0e
JW
6623 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6624 linux-tile-low.o to srv_tgtobj.
6625
c623a6ef
WN
66262013-09-16 Will Newton <will.newton@linaro.org>
6627
6628 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6629 out regs.
6630
fb71d39e
PA
66312013-09-06 Pedro Alves <palves@redhat.com>
6632
6633 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6634 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6635 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6636 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6637 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6638 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6639
8e7e9910
PA
66402013-09-06 Pedro Alves <palves@redhat.com>
6641
6642 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6643 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6644
7c3a12ca
PA
66452013-09-06 Pedro Alves <palves@redhat.com>
6646
6647 * linux-amd64-ipa.c: Include tracepoint.h.
6648 * linux-i386-ipa.c: Include tracepoint.h.
6649
8eb3d7b6
RW
66502013-09-06 Ricard Wanderlof <ricardw@axis.com>
6651
6652 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6653 (ps_get_thread_area): New function.
6654
eddddb9d
RW
66552013-09-06 Ricard Wanderlof <ricardw@axis.com>
6656
6657 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6658 (initialize_low_arch): Call init_registers_crisv32 rather than
6659 init_register_crisv32.
6660
533b0600
PA
66612013-09-05 Pedro Alves <palves@redhat.com>
6662
6663 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6664 to ...
6665 * hostio.h: ... this new file.
6666 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6667 win32-low.c: Include hostio.h.
6668
0ce3d3b5
PA
66692013-09-05 Pedro Alves <palves@redhat.com>
6670
6671 * server.h (gdb_client_data, handler_func, callback_handler_func)
6672 (delete_file_handler, add_file_handler, append_callback_event)
6673 (delete_callback_event, start_event_loop, initialize_event_loop):
6674 Move to event-loop.h and include it.
6675 * event-loop.h: New file.
6676
799cdc37
PA
66772013-09-05 Pedro Alves <palves@redhat.com>
6678
6679 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6680 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6681 (loaded_dll, unloaded_dll): Move to ...
6682 * dll.h: ... this new file.
6683 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6684
6a6bbd9d
PA
66852013-09-05 Pedro Alves <palves@redhat.com>
6686
6687 * server.h (current_process, get_thread_process, all_processes)
6688 (add_inferior_to_list, for_each_inferior, current_inferior)
6689 (remove_inferior, add_process, remove_process, find_process_pid)
6690 (have_started_inferiors_p, have_attached_inferiors_p)
6691 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6692 (clear_inferiors, find_inferior, find_inferior_id)
6693 (inferior_target_data, set_inferior_target_data)
6694 (inferior_regcache_data, set_inferior_regcache_data): Move to
6695 inferiors.h, and include it.
6696 * inferiors.h: New file.
6697
f699aaba
PA
66982013-09-05 Pedro Alves <palves@redhat.com>
6699
6700 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6701 Move ...
72f4393d 6702 * ax.h: ... here.
f699aaba 6703
c144c7a0
PA
67042013-09-05 Pedro Alves <palves@redhat.com>
6705
6706 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6707 tracepoint.h.
6708 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6709 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6710 (handle_tracepoint_general_set, handle_tracepoint_query)
6711 (tracepoint_finished_step, tracepoint_was_hit)
6712 (release_while_stepping_state_list, current_traceframe)
6713 (in_readonly_region, traceframe_read_mem)
6714 (fetch_traceframe_registers, traceframe_read_sdata)
6715 (traceframe_read_info, struct fast_tpoint_collect_status)
6716 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6717 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6718 (supply_fast_tracepoint_registers)
6719 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6720 (ipa_tdesc, claim_trampoline_space)
6721 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6722 (agent_mem_read, agent_get_trace_state_variable_value)
6723 (agent_set_trace_state_variable_value, agent_tsv_read)
6724 (agent_mem_read_string, get_raw_reg_func_addr)
6725 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6726 * tracepoint.h: ... this new file.
6727
ff42e6ab
PA
67282013-09-05 Pedro Alves <palves@redhat.com>
6729
6730 * server.h (perror_with_name, error, fatal, warning, paddress)
6731 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6732 include it.
6733 * utils.h: New file.
6734
541af0f4
PA
67352013-09-05 Pedro Alves <palves@redhat.com>
6736
6737 * server.h (remote_debug, noack_mode, transport_is_reliable)
6738 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6739 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6740 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6741 (write_enn, initialize_async_io, enable_async_io)
6742 (disable_async_io, check_remote_input_interrupt_request)
6743 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6744 (dead_thread_notify, prepare_resume_reply)
6745 (decode_address_to_semicolon, decode_address, decode_m_packet)
6746 (decode_M_packet, decode_X_packet, decode_xfer_write)
6747 (decode_search_memory_packet, unhexify, hexify)
6748 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6749 (look_up_one_symbol, relocate_instruction)
6750 (monitor_output): Move to remote-utils.h, and include it.
6751 * remote-utils.h: New file.
6752
eebdf26b
PA
67532013-09-05 Pedro Alves <palves@redhat.com>
6754
6755 * server.h (_): Delete.
6756
3aafd2ff
PA
67572013-09-02 Pedro Alves <palves@redhat.com>
6758
6759 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6760 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6761 allocated.
6762 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6763
cee83bcb
PM
67642013-09-02 Pierre Muller <muller@sourceware.org>
6765
6766 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6767 or WriteProcessMemory complete successfully and handle
6768 ERROR_PARTIAL_COPY error.
6769
9a13b2fa
PA
67702013-09-02 Pedro Alves <palves@redhat.com>
6771
6772 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6773 error instead of EIO.
6774
602e3198
JK
67752013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6776
6777 PR server/15604
6778 * linux-low.c: Include filestuff.h.
6779 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6780 * lynx-low.c: Include filestuff.h.
6781 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6782 * server.c: Include filestuff.h.
6783 (main): Call notice_open_fds.
6784 * spu-low.c: Include filestuff.h.
6785 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6786
96d7229d
LM
67872013-08-22 Luis Machado <lgustavo@codesourcery.com>
6788
6789 * Makefile.in: Explain why ../target and ../nat are not
6790 listed as include file search paths.
6791 (linux-waitpid.o): New object file rule.
6792 * configure.srv (srv_native_linux_obj): New variable.
6793 Replace all occurrences of linux native object files with
6794 $srv_native_linux_obj.
6795 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6796 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6797 (linux_enable_event_reporting): Remove declaration.
6798 (my_waitpid): Moved to common/linux-waitpid.c.
6799 (linux_wait_for_event): Pass ptid when calling
6800 linux_enable_event_reporting.
6801 (linux_supports_tracefork_flag): Remove.
6802 (linux_enable_event_reporting): Likewise.
6803 (linux_tracefork_grandchild): Remove.
6804 (STACK_SIZE): Moved to common/linux-ptrace.c.
6805 (linux_tracefork_child): Remove.
6806 (linux_test_for_tracefork): Remove.
6807 (linux_look_up_symbols): Call linux_supports_traceclone.
6808 (initialize_low): Remove call to linux_test_for_tracefork.
6809 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6810 common/linux-ptrace.h.
6811 (PTRACE_TYPE_ARG4): Likewise.
6812 Include linux-ptrace.h.
6813
32940073
PA
68142013-08-21 Pedro Alves <palves@redhat.com>
6815
6816 * config.in: Renegerate.
6817
33b60d58 68182013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6819
33b60d58
LM
6820 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6821 (SFILES): Remove $(srcdir)/common/target-common.c and
6822 add $(srcdir)/target/waitstatus.c.
6823 (OBS): Remove target-common.o and add waitstatus.o.
6824 (server_h): Remove $(srcdir)/../common/target-common.h and
6825 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6826 and $(srcdir)/../target/waitstatus.h.
6827 (target-common.o): Remove.
6828 (waitstatus.o): New target object file.
6829 * target.h: Do not include target-common.h and
6830 include target/resume.h, target/wait.h and
6831 target/waitstatus.h.
6832
b8e1b30e
LM
68332013-08-13 Luis Machado <lgustavo@codesourcery.com>
6834
6835 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6836 to PTRACE_TYPE_ARG3.
6837 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6838 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6839 PTRACE_TYPE_ARG4.
6840 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6841 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6842
7a60ad40
YQ
68432013-07-27 Jie Zhang <jie@codesourcery.com>
6844 Daniel Jacobowitz <dan@codesourcery.com>
6845 Yao Qi <yao@codesourcery.com>
6846
6847 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6848 (mips-linux-watch.o): New rule.
6849 (mips_linux_watch_h): New variable.
6850 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6851 srv_tgtobj.
6852 * linux-mips-low.c: Include mips-linux-watch.h.
6853 (struct arch_process_info, struct arch_lwp_info): New.
6854 (update_watch_registers_callback): New function.
6855 (mips_linux_new_process, mips_linux_new_thread) New functions.
6856 (mips_linux_prepare_to_resume, mips_insert_point): New
6857 functions.
6858 (mips_remove_point, mips_stopped_by_watchpoint): New
6859 functions.
6860 (rsp_bp_type_to_target_hw_bp_type): New function.
6861 (mips_stopped_data_address): New function.
6862 (the_low_target): Add watchpoint support functions.
6863
de6f69ad
YQ
68642013-07-27 Yao Qi <yao@codesourcery.com>
6865
6866 * i386-low.c: Include break-common.h.
6867 (enum target_hw_bp_type): Remove.
6868
3360c0bf
LM
68692013-07-24 Luis Machado <lgustavo@codesourcery.com>
6870
6871 * Makefile.in (SFILES): /common/target-common.c.
6872 (OBS): Add target-common.o.
6873 (server_h): Add $(srcdir)/../common/target-common.h.
6874 (target-common.o): New target.
6875 * server.c (queue_stop_reply_callback): Free
6876 status string after use.
6877 * target.c (target_waitstatus_to_string): Remove.
6878 * target.h: Include target-common.h.
6879 (resume_kind): Likewise.
6880 (target_waitkind): Likewise.
6881 (target_waitstatus): Likewise.
6882 (TARGET_WNOHANG): Likewise.
6883
bd885420
YQ
68842013-07-04 Yao Qi <yao@codesourcery.com>
6885
6886 * Makefile.in (host_alias): Use @host_noncanonical@.
6887 (target_alias): Use @target_noncanonical@.
6888 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6889 ACX_NONCANONICAL_HOST.
6890 * configure: Regenerated.
6891
6892 Revert:
6893 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6894
6895 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6896 * configure: Rebuild.
6897 * Makefile.in (version_host, version_target): Get from configure.
6898 (version.c): Use $(version_host) and $(version_target).
6899
17ef446e
PA
69002013-07-03 Pedro Alves <palves@redhat.com>
6901
6902 * Makefile.in (config.status): Depend on development.sh.
6903 * acinclude.m4: Include libmcheck.m4.
6904 * configure: Regenerate.
6905
7a9a7487
MG
69062013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6907
6908 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6909 attribute inside the parentheses.
6910 (winapi_DebugSetProcessKillOnExit): Ditto.
6911 (winapi_DebugBreakProcess): Ditto.
6912 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6913
49b64de6
MG
69142013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6915
6916 * notif.h (notif_event): Add a dummy member to avoid compiler
6917 errors.
6918
d5749ee7
PA
69192013-07-01 Pedro Alves <palves@redhat.com>
6920
6921 * hostio.c (HOSTIO_PATH_MAX): Define.
6922 (require_filename, handle_open, handle_unlink, handle_readlink):
6923 Use it.
6924
d8d2a3ee
PA
69252013-07-01 Pedro Alves <palves@redhat.com>
6926
6927 * server.h: Include "pathmax.h".
6928 * linux-low.c: Don't include sys/param.h.
6929 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6930 MAXPATHLEN.
6931 * win32-low.c: Don't include sys/param.h.
6932 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6933
bc7dea8d
PA
69342013-07-01 Pedro Alves <palves@redhat.com>
6935
6936 * event-loop.c: Don't check HAVE_UNISTD_H before including
6937 <unistd.h>.
6938 * gdbreplay.c: Likewise.
6939 * remote-utils.c: Likewise.
6940 * server.c: Likewise.
6941 * configure.ac: Don't check for unistd.h.
6942 * configure: Regenerate.
6943
d6c2da54
TT
69442013-06-28 Tom Tromey <tromey@redhat.com>
6945
6946 * Makefile.in (version.c): Use version.in, not
6947 common/version.in.
6948
257b6bec
MG
69492013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6950
6951 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6952 * configure: Rebuild.
6953 * Makefile.in (version_host, version_target): Get from configure.
6954 (version.c): Use $(version_host) and $(version_target).
6955
86ebe149
DK
69562013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6957
6958 Fix trace-status to output user name without trailing colon.
6959 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6960
f30aa5af
DK
69612013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6962
6963 Fix trace-status to output proper start-time and stop-time.
6964 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6965 output start time and stop time in hex as gdb expects.
6966
28a93511
YQ
69672013-06-26 Pedro Alves <pedro@codesourcery.com>
6968
6969 * tracepoint.c (build_traceframe_info_xml): Output trace state
6970 variables present in the trace buffer.
6971
01208463
TT
69722013-06-24 Tom Tromey <tromey@redhat.com>
6973
6974 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6975 create-version.sh.
6976 (version.o): Remove.
6977 * gdbreplay.c: Include version.h.
6978 (version, host_name): Don't declare.
6979 * server.h: Include version.h.
6980 (version, host_name): Don't declare.
6981
760256f9
PA
69822013-06-12 Pedro Alves <palves@redhat.com>
6983
6984 * linux-x86-low.c (linux_is_elf64): Delete global.
6985 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6986 with local linux_pid_exe_is_elf_64_file use.
6987
030031ee
PA
69882013-06-11 Pedro Alves <palves@redhat.com>
6989
6990 * linux-low.c (regset_disabled, disable_regset): New functions.
6991 (regsets_fetch_inferior_registers)
6992 (regsets_store_inferior_registers): Use them.
6993 (initialize_regsets_info); Don't allocate the disabled_regsets
6994 array here.
6995 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6996 comment.
6997
5da6eb0a
PA
69982013-06-11 Pedro Alves <palves@redhat.com>
6999
7000 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7001 xmalloc.
7002
7e5aaa09
PA
70032013-06-11 Pedro Alves <palves@redhat.com>
7004
7005 * linux-x86-low.c (initialize_low_arch): Call
7006 init_registers_x32_avx_linux.
7007
d878444c
JK
70082013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7009
7010 Fix compatibility with Android Bionic.
7011 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7012 it is not empty.
7013
3aee8918
PA
70142013-06-07 Pedro Alves <palves@redhat.com>
7015
5f2b57b5 7016 PR server/14823
3aee8918
PA
7017 * Makefile.in (OBS): Add tdesc.o.
7018 (IPA_OBJS): Add tdesc-ipa.o.
7019 (tdesc-ipa.o): New rule.
7020 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7021 interface.
7022 * linux-low.c (new_inferior): Delete.
7023 (disabled_regsets, num_regsets): Delete.
7024 (linux_add_process): Adjust to set the new per-process
7025 new_inferior flag.
7026 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7027 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7028 was a stop. When calling arch_setup, switch the current inferior
7029 to the thread that got an event.
7030 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7031 (regsets_fetch_inferior_registers)
7032 (regsets_store_inferior_registers): New regsets_info parameter.
7033 Adjust to use it.
7034 (linux_register_in_regsets): New regs_info parameter. Adjust to
7035 use it.
7036 (register_addr, fetch_register, store_register): New usrregs_info
7037 parameter. Adjust to use it.
7038 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7039 parameter regs_info. Adjust to use it.
7040 (linux_fetch_registers): Get the current inferior's regs_info, and
7041 adjust to use it.
7042 (linux_store_registers): Ditto.
7043 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7044 (initialize_low): Don't initialize the target_regsets here. Call
7045 initialize_low_arch.
7046 * linux-low.h (target_regsets): Delete declaration.
7047 (struct regsets_info): New.
7048 (struct usrregs_info): New.
7049 (struct regs_info): New.
7050 (struct process_info_private) <new_inferior>: New field.
7051 (struct linux_target_ops): Delete the num_regs, regmap, and
7052 regset_bitmap fields. New field regs_info.
7053 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7054 * i387-fp.c (num_xmm_registers): Delete.
7055 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7056 calls to new interface.
7057 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7058 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7059 Infer the number of xmm registers from the regcache's target
7060 description.
7061 * i387-fp.h (num_xmm_registers): Delete.
7062 * inferiors.c (add_thread): Don't install the thread's regcache
7063 here.
7064 * proc-service.c (gregset_info): Fetch the current inferior's
7065 regs_info. Adjust to use it.
7066 * regcache.c: Include tdesc.h.
7067 (register_bytes, reg_defs, num_registers)
7068 (gdbserver_expedite_regs): Delete.
7069 (get_thread_regcache): If the thread doesn't have a regcache yet,
7070 create one, instead of aborting gdbserver.
7071 (regcache_invalidate_one): Rename to ...
7072 (regcache_invalidate_thread): ... this.
7073 (regcache_invalidate_one): New.
7074 (regcache_invalidate): Only invalidate registers of the current
7075 process.
7076 (init_register_cache): Add target_desc parameter, and use it.
7077 (new_register_cache): Ditto. Assert the target description has a
7078 non zero registers_size.
7079 (regcache_cpy): Add assertions. Adjust.
7080 (realloc_register_cache, set_register_cache): Delete.
7081 (registers_to_string, registers_from_string): Adjust.
7082 (find_register_by_name, find_regno, find_register_by_number)
7083 (register_cache_size): Add target_desc parameter, and use it.
7084 (free_register_cache_thread, free_register_cache_thread_one)
7085 (regcache_release, register_cache_size): New.
7086 (register_size): Add target_desc parameter, and use it.
7087 (register_data, supply_register, supply_register_zeroed)
7088 (supply_regblock, supply_register_by_name, collect_register)
7089 (collect_register_as_string, collect_register_by_name): Adjust.
7090 * regcache.h (struct target_desc): Forward declare.
7091 (struct regcache) <tdesc>: New field.
7092 (init_register_cache, new_register_cache): Add target_desc
7093 parameter.
7094 (regcache_invalidate_thread): Declare.
7095 (regcache_invalidate_one): Delete declaration.
7096 (regcache_release): Declare.
7097 (find_register_by_number, register_cache_size, register_size)
7098 (find_regno): Add target_desc parameter.
7099 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7100 declarations.
7101 * remote-utils.c: Include tdesc.h.
7102 (outreg, prepare_resume_reply): Adjust.
7103 * server.c: Include tdesc.h.
7104 (gdbserver_xmltarget): Delete declaration.
7105 (get_features_xml, process_serial_event): Adjust.
7106 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7107 declare.
7108 (struct process_info) <tdesc>: New field.
7109 (ipa_tdesc): Declare.
7110 * tdesc.c: New file.
7111 * tdesc.h: New file.
7112 * tracepoint.c: Include tdesc.h.
7113 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7114 (get_context_regcache): Adjust to pass ipa_tdesc down.
7115 (do_action_at_tracepoint): Adjust to get the register cache size
7116 from the context regcache's description.
7117 (traceframe_walk_blocks): Adjust to get the register cache size
7118 from the current trace frame's description.
7119 (traceframe_get_pc): Adjust to get current trace frame's
7120 description and pass it down.
7121 (gdb_collect): Adjust to get the register cache size from the
7122 IPA's description.
7123 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7124 (gdbserver_xmltarget): Delete.
7125 (initialize_low_tracepoint): Set the ipa's target description.
7126 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7127 (initialize_low_tracepoint): Set the ipa's target description.
7128 * linux-x86-low.c: Include tdesc.h.
7129 [__x86_64__] (is_64bit_tdesc): New.
7130 (ps_get_thread_area, x86_get_thread_area): Use it.
7131 (i386_cannot_store_register): Rename to ...
7132 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7133 (i386_cannot_fetch_register): Rename to ...
7134 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7135 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7136 to new interface.
7137 (target_regsets): Rename to ...
7138 (x86_regsets): ... this.
7139 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7140 interface.
7141 (x86_siginfo_fixup): Use is_64bit_tdesc.
7142 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7143 (tdesc_x32_avx_linux, tdesc_x32_linux)
7144 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7145 Declare.
7146 (x86_linux_update_xmltarget): Delete.
7147 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7148 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7149 (AMD64_LINUX_USER64_CS): New.
7150 (x86_linux_read_description): New, based on
7151 x86_linux_update_xmltarget.
7152 (same_process_callback): New.
7153 (x86_arch_setup_process_callback): New.
7154 (x86_linux_update_xmltarget): New.
7155 (x86_regsets_info): New.
7156 (amd64_linux_regs_info): New.
7157 (i386_linux_usrregs_info): New.
7158 (i386_linux_regs_info): New.
7159 (x86_linux_regs_info): New.
7160 (x86_arch_setup): Reimplement.
7161 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7162 (x86_emit_ops): Ditto.
7163 (the_low_target): Adjust. Install x86_linux_regs_info,
7164 x86_cannot_fetch_register, and x86_cannot_store_register.
7165 (initialize_low_arch): New.
7166 * linux-ia64-low.c (tdesc_ia64): Declare.
7167 (ia64_fetch_register): Adjust.
7168 (ia64_usrregs_info, regs_info): New globals.
7169 (ia64_regs_info): New function.
7170 (the_low_target): Adjust.
7171 (initialize_low_arch): New function.
7172 * linux-sparc-low.c (tdesc_sparc64): Declare.
7173 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7174 Adjust.
7175 (sparc_arch_setup): New function.
7176 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7177 (the_low_target): Adjust.
7178 (initialize_low_arch): New function.
7179 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7180 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7181 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7182 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7183 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7184 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7185 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7186 (tdesc_powerpc_isa205_vsx64l): Declare.
7187 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7188 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7189 (ppc_set_pc, ppc_get_hwcap): Adjust.
7190 (ppc_usrregs_info): Forward declare.
7191 (!__powerpc64__) ppc_regmap_adjusted: New global.
7192 (ppc_arch_setup): Adjust to the current process'es target
7193 description.
7194 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7195 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7196 (ppc_store_evrregset): Adjust.
7197 (target_regsets): Rename to ...
7198 (ppc_regsets): ... this, and make static.
7199 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7200 (ppc_regs_info): New function.
7201 (the_low_target): Adjust.
7202 (initialize_low_arch): New function.
7203 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7204 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7205 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7206 (tdesc_s390x_linux64v2): Declare.
7207 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7208 (s390_fill_gregset, s390_store_last_break): Adjust.
7209 (target_regsets): Rename to ...
7210 (s390_regsets): ... this, and make static.
7211 (s390_get_pc, s390_set_pc): Adjust.
7212 (s390_get_hwcap): New target_desc parameter, and use it.
7213 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7214 (s390_arch_setup): Adjust to set the current process'es target
7215 description. Don't adjust the regmap.
7216 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7217 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7218 (regs_info_3264): New globals.
7219 (s390_regs_info): New function.
7220 (the_low_target): Adjust.
7221 (initialize_low_arch): New function.
7222 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7223 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7224 [__mips64] (init_registers_mips_linux)
7225 (init_registers_mips_dsp_linux): Delete defines.
7226 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7227 (have_dsp): New global.
7228 (mips_read_description): New, based on mips_arch_setup.
7229 (mips_arch_setup): Reimplement.
7230 (get_usrregs_info): New function.
7231 (mips_cannot_fetch_register, mips_cannot_store_register)
7232 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7233 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7234 (target_regsets): Rename to ...
7235 (mips_regsets): ... this, and make static.
7236 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7237 (dsp_regs_info, regs_info): New globals.
7238 (mips_regs_info): New function.
7239 (the_low_target): Adjust.
7240 (initialize_low_arch): New function.
7241 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7242 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7243 Declare.
7244 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7245 (arm_read_description): New, with bits factored from
7246 arm_arch_setup.
7247 (arm_arch_setup): Reimplement.
7248 (target_regsets): Rename to ...
7249 (arm_regsets): ... this, and make static.
7250 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7251 (arm_regs_info): New function.
7252 (the_low_target): Adjust.
7253 (initialize_low_arch): New function.
7254 * linux-m68k-low.c (tdesc_m68k): Declare.
7255 (target_regsets): Rename to ...
7256 (m68k_regsets): ... this, and make static.
7257 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7258 (m68k_regs_info): New function.
7259 (m68k_arch_setup): New function.
7260 (the_low_target): Adjust.
7261 (initialize_low_arch): New function.
7262 * linux-sh-low.c (tdesc_sharch): Declare.
7263 (target_regsets): Rename to ...
7264 (sh_regsets): ... this, and make static.
7265 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7266 (sh_regs_info, sh_arch_setup): New functions.
7267 (the_low_target): Adjust.
7268 (initialize_low_arch): New function.
7269 * linux-bfin-low.c (tdesc_bfin): Declare.
7270 (bfin_arch_setup): New function.
7271 (bfin_usrregs_info, regs_info): New globals.
7272 (bfin_regs_info): New function.
7273 (the_low_target): Adjust.
7274 (initialize_low_arch): New function.
7275 * linux-cris-low.c (tdesc_cris): Declare.
7276 (cris_arch_setup): New function.
7277 (cris_usrregs_info, regs_info): New globals.
7278 (cris_regs_info): New function.
7279 (the_low_target): Adjust.
7280 (initialize_low_arch): New function.
7281 * linux-cris-low.c (tdesc_crisv32): Declare.
7282 (cris_arch_setup): New function.
7283 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7284 (cris_regs_info): New function.
7285 (the_low_target): Adjust.
7286 (initialize_low_arch): New function.
7287 * linux-m32r-low.c (tdesc_m32r): Declare.
7288 (m32r_arch_setup): New function.
7289 (m32r_usrregs_info, regs_info): New globals.
7290 (m32r_regs_info): Adjust.
7291 (initialize_low_arch): New function.
7292 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7293 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7294 (tic6x_usrregs_info): Forward declare.
7295 (tic6x_read_description): New function, based on ...
7296 (tic6x_arch_setup): ... this. Reimplement.
7297 (target_regsets): Rename to ...
7298 (tic6x_regsets): ... this, and make static.
7299 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7300 (tic6x_regs_info): New function.
7301 (the_low_target): Adjust.
7302 (initialize_low_arch): New function.
7303 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7304 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7305 (target_regsets): Rename to ...
7306 (xtensa_regsets): ... this, and make static.
7307 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7308 globals.
7309 (xtensa_arch_setup, xtensa_regs_info): New functions.
7310 (the_low_target): Adjust.
7311 (initialize_low_arch): New function.
7312 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7313 (nios2_arch_setup): Set the current process'es tdesc.
7314 (target_regsets): Rename to ...
7315 (nios2_regsets): ... this.
7316 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7317 (nios2_regs_info): New function.
7318 (the_low_target): Adjust.
7319 (initialize_low_arch): New function.
a261b8f5
PA
7320 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7321 (aarch64_arch_setup): Set the current process'es tdesc.
7322 (target_regsets): Rename to ...
7323 (aarch64_regsets): ... this.
7324 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7325 (aarch64_regs_info): New function.
7326 (the_low_target): Adjust.
7327 (initialize_low_arch): New function.
3aee8918
PA
7328 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7329 globals.
7330 (target_regsets): Rename to ...
7331 (tile_regsets): ... this.
7332 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7333 (tile_regs_info): New function.
7334 (tile_arch_setup): Set the current process'es tdesc.
7335 (the_low_target): Adjust.
7336 (initialize_low_arch): New function.
7337 * spu-low.c (tdesc_spu): Declare.
7338 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7339 * win32-arm-low.c (tdesc_arm): Declare.
7340 (arm_arch_setup): New function.
7341 (the_low_target): Install arm_arch_setup instead of
7342 init_registers_arm.
7343 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7344 (init_windows_x86): Rename to ...
7345 (i386_arch_setup): ... this. Set `win32_tdesc'.
7346 (the_low_target): Adjust.
7347 * win32-low.c (win32_tdesc): New global.
7348 (child_add_thread): Don't create the thread cache here.
7349 (do_initial_child_stuff): Set the new process'es tdesc.
7350 * win32-low.h (struct target_desc): Forward declare.
7351 (win32_tdesc): Declare.
7352 * lynx-i386-low.c (tdesc_i386): Declare global.
7353 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7354 * lynx-low.c (lynx_tdesc): New global.
7355 (lynx_add_process): Set the new process'es tdesc.
7356 * lynx-low.h (struct target_desc): Forward declare.
7357 (lynx_tdesc): Declare global.
7358 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7359 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7360 * nto-low.c (nto_tdesc): New global.
7361 (do_attach): Set the new process'es tdesc.
7362 * nto-low.h (struct target_desc): Forward declare.
7363 (nto_tdesc): Declare.
7364 * nto-x86-low.c (tdesc_i386): Declare.
7365 (nto_x86_arch_setup): Set `nto_tdesc'.
7366
b1fbec62
GB
73672013-06-04 Gary Benson <gbenson@redhat.com>
7368
7369 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7370 to qSupported response when appropriate.
7371 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7372 with nonzero-length annex.
7373 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7374 arguments supplied in annex.
7375
d1ec4ce7
DE
73762013-05-31 Doug Evans <dje@google.com>
7377
ac44adcb 7378 PR server/15594
d1ec4ce7
DE
7379 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7380 64 bits in 64-cross-32 environment.
7381
9b25f2d3
PA
73822013-05-28 Pedro Alves <palves@redhat.com>
7383
7384 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7385 (aarch64-without-fpu.c): Delete rule.
7386 * configure.srv (aarch64*-*-linux*): Remove references to
7387 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7388 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7389 declaration.
7390
6740dc9c
PA
73912013-05-24 Pedro Alves <palves@redhat.com>
7392
7393 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7394 instead of strchr/decode_address. Error if the range isn't split
7395 with a ','. Don't assume there's be a ':' in the action.
7396
c2d6af84
PA
73972013-05-23 Yao Qi <yao@codesourcery.com>
7398 Pedro Alves <palves@redhat.com>
7399
7400 * linux-low.c (lwp_in_step_range): New function.
7401 (linux_wait_1): If the thread was range stepping and stopped
7402 outside the stepping range, report the stop to GDB. Otherwise,
7403 continue stepping. Add range stepping debug output.
7404 (linux_set_resume_request): Copy the step range from the resume
7405 request to the lwp.
7406 (linux_supports_range_stepping): New.
7407 (linux_target_ops) <supports_range_stepping>: Set to
7408 linux_supports_range_stepping.
7409 * linux-low.h (struct linux_target_ops)
7410 <supports_range_stepping>: New field.
7411 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7412 * linux-x86-low.c (x86_supports_range_stepping): New.
7413 (the_low_target) <supports_range_stepping>: Set to
7414 x86_supports_range_stepping.
7415 * server.c (handle_v_cont): Handle 'r' action.
7416 (handle_v_requests): Append ";r" if the target supports range
7417 stepping.
7418 * target.h (struct thread_resume) <step_range_start,
7419 step_range_end>: New fields.
7420 (struct target_ops) <supports_range_stepping>:
7421 New field.
7422 (target_supports_range_stepping): New macro.
7423
58794e1a
JB
74242013-05-17 Joel Brobecker <brobecker@adacore.com>
7425
7426 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7427 confusion in comment.
7428
d631c5a7
JB
74292013-05-17 Joel Brobecker <brobecker@adacore.com>
7430
7431 * lynx-low.c (struct process_info_private): New type.
7432 (lynx_add_process): New function.
7433 (lynx_create_inferior, lynx_attach): Replace calls to
7434 add_process by calls to lynx_add_process.
7435 (lynx_resume): If PTID is null, then try using
7436 current_process()->private->last_wait_event_ptid.
7437 Add comments.
7438 (lynx_clear_inferiors): Delete. The contents of that function
7439 has been inlined in lynx_mourn;
7440 (lynx_wait_1): Save the ptid in the process's private data.
7441 (lynx_mourn): Free the process' private data. Replace call
7442 to lynx_clear_inferiors by call to clear_inferiors.
7443
96f7a20f
YQ
74442013-05-17 Yao Qi <yao@codesourcery.com>
7445
7446 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7447 the right place.
7448
db0dfaa0
LM
74492013-05-16 Luis Machado <lgustavo@codesourcery.com>
7450
7451 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7452 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7453 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7454 PT_TEXT_END_ADDR guards. Update comments.
7455 (linux_target_op) <read_offsets>: Conditionally define to
7456 linux_read_offsets if the target is UCLIBC and if it defines
7457 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7458
68f5f838
SL
74592013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7460 Andrew Jenner <andrew@codesourcery.com>
7461
7462 * Makefile.in (SFILES): Add linux-nios2-low.c.
7463 (clean): Add action to delete nios2-linux.c.
7464 (nios2-linux.c): New rule.
7465 * configure.srv: Add nios2*-*-linux*.
7466 * linux-nios2-low.c: New.
7467
1ebff1fd
HAQ
74682013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7469
7470 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7471
f6150862
HZ
74722013-04-25 Hui Zhu <hui@codesourcery.com>
7473
7474 PR gdb/15186
f6150862
HZ
7475 * ax.c (ax_printf): Add fflush.
7476
614c279d
TT
74772013-04-22 Tom Tromey <tromey@redhat.com>
7478
7479 * Makefile.in (SFILES): Add filestuff.c.
7480 (OBS): Add filestuff.o.
7481 (filestuff.o): New target.
7482 * config.in, configure: Rebuild.
7483 * configure.ac: Check for fdwalk, pipe2.
7484
7d4e5717
PA
74852013-04-17 Pedro Alves <palves@redhat.com>
7486
7487 * configure.ac (USE_THREAD_DB): Delete variable.
7488 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7489 Don't AC_SUBST USE_THREAD_DB.
7490 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7491 * config.in, configure: Regenerate.
7492
d5c93e41
PA
74932013-04-16 Pedro Alves <palves@redhat.com>
7494
7495 * linux-low.h (struct lwp_info) <thread_known>: Move under
7496 the USE_THREAD_DB #ifdef.
7497
04f5fe89
PA
74982013-04-16 Pedro Alves <palves@redhat.com>
7499
7500 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7501 (linux-low.o): Delete rule.
7502 * linux-low.h: Always include "gdb_thread_db.h" instead of
7503 conditionally including thread_db.h.
7504 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7505 HAVE_THREAD_DB_H.
7506
480b27bf
JK
75072013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7508
7509 * Makefile.in (install-only): Fix make install regression.
7510
43662968
JK
75112013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7512
7513 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7514 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7515 installation.
7516 * gdbserver.1: Remove.
7517
3e74e146
PA
75182013-03-22 Pedro Alves <palves@redhat.com>
7519
7520 * linux-low.c (handle_extended_wait): Don't call
7521 linux_enable_event_reporting.
7522
a8347a2a
TT
75232013-03-15 Tony Theodore <tonyt@logyst.com>
7524
7525 PR build/9098:
7526 * Makefile.in (SHELL): Use @SHELL@.
7527
eeb56fa7
SDJ
75282013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7529
7530 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7531 compiler warning.
7532
4fa7e2ff
JB
75332013-03-13 Joel Brobecker <brobecker@adacore.com>
7534
7535 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7536 Remove extraneous NULL element.
7537
8ddb1965
YQ
75382013-03-13 Yao Qi <yao@codesourcery.com>
7539
7540 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7541 'V' block in trace frame.
7542
9accd112
MM
75432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7544
7545 * target.h (struct target_ops): Add btrace ops.
7546 (target_supports_btrace): New macro.
7547 (target_enable_btrace): New macro.
7548 (target_disable_btrace): New macro.
7549 (target_read_btrace): New macro.
7550 * gdbthread.h (struct thread_info): Add btrace field.
7551 * server.c: Include btrace-common.h.
7552 (handle_btrace_general_set): New function.
7553 (handle_btrace_enable): New function.
7554 (handle_btrace_disable): New function.
7555 (handle_general_set): Call handle_btrace_general_set.
7556 (handle_qxfer_btrace): New function.
7557 (struct qxfer qxfer_packets[]): Add btrace entry.
7558 * inferiors.c (remove_thread): Disable btrace.
7559 * linux-low: Include linux-btrace.h.
7560 (linux_low_enable_btrace): New function.
7561 (linux_low_read_btrace): New function.
7562 (linux_target_ops): Add btrace ops.
7563 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7564 Add srv_linux_btrace=yes.
7565 (x86_64-*-linux*): Add linux-btrace.o.
7566 Add srv_linux_btrace=yes.
7567 * configure.ac: Define HAVE_LINUX_BTRACE.
7568 * config.in: Regenerated.
7569 * configure: Regenerated.
7570
5cc22e4c
MM
75712013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7572
7573 * server.c (handle_qxfer): Preserve error message if -3 is
7574 returned.
7575 (qxfer): Document the -3 return value.
7576
7c97f91e
MM
75772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7578
7579 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7580 (linux_btrace_h): New variable.
7581 (linux-btrace.o): New rule.
7582
be9a119c 75832013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7584 Hafiz Abid Qadeer <abidh@codesourcery.com>
7585
7586 * tracepoint.c (trace_buffer_size): New global.
7587 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7588 (init_trace_buffer): Change to one-argument function. Allocate
7589 trace buffer memory.
7590 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7591 handle QTBuffer:size packet.
7592 (cmd_bigqtbuffer_size): New function.
7593 (initialize_tracepoint): Call init_trace_buffer with
7594 DEFAULT_TRACE_BUFFER_SIZE.
7595 * server.c (handle_query): Add QTBuffer:size in the
7596 supported packets.
7597
e64f7499
YQ
75982013-03-07 Yao Qi <yao@codesourcery.com>
7599
7600 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7601 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7602 of -1.
7603 (cmd_qtsp): Adjust condition. Do post increment.
7604 Set cur_action and cur_step_action back to 0.
7605
f0ae6fc3
PA
76062013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7607
7608 PR server/15236
7609 * linux-low.c (linux_write_memory): Return early success if LEN is
7610 zero.
7611
b5b0b0af
CV
76122013-03-05 Corinna Vinschen <vinschen@redhat.de>
7613
334ad4a8 7614 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7615
589bc927
TT
76162013-02-28 Tom Tromey <tromey@redhat.com>
7617
7618 * configure.ac: Invoke AC_SYS_LARGEFILE.
7619 * configure, config.in: Rebuild.
7620
dfe07582
CV
76212013-02-28 Corinna Vinschen <vinschen@redhat.com>
7622
7623 * win32-low.c: Throughout, fix format strings and casts of
7624 printf-like functions to avoid type related warnings on all
7625 platforms.
7626 (get_child_debug_event): Print dwDebugEventCode as hex since
7627 that's how it's usually documented.
7628
736cd585
YQ
76292013-02-28 Yao Qi <yao@codesourcery.com>
7630
7631 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7632 pulongest.
7633
e1f58301
JW
76342013-02-27 Jiong Wang <jiwang@tilera.com>
7635
7636 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7637 (reg-tilegx32.c): New rule.
7638 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7639 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7640 different register info initializer according to elf class.
7641 (init_registers_tilgx32): New function. The tilegx32 register info
7642 initializer.
7643 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7644 (tile_store_gregset): Likewise.
7645
d171ca78
YQ
76462013-02-27 Yao Qi <yao@codesourcery.com>
7647
7648 * server.c (process_point_options): Print debug message when
7649 debug_threads is true.
7650
282bbdf3
YQ
76512013-02-26 Yao Qi <yao@codesourcery.com>
7652
7653 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7654
aca22551
PA
76552013-02-19 Pedro Alves <palves@redhat.com>
7656 Kai Tietz <ktietz@redhat.com>
7657
7658 PR gdb/15161
7659
7660 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7661 instead of strtoul to extract address from packet.
7662 (process_serial_event) <'z'>: Likewise.
7663
4f3cee1c
YQ
76642013-02-18 Yao Qi <yao@codesourcery.com>
7665
7666 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7667
8e1d55a3
PA
76682013-02-14 Pedro Alves <palves@redhat.com>
7669
7670 Plug memory leak.
7671
7672 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7673 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7674
458820da
PA
76752013-02-14 Pedro Alves <palves@redhat.com>
7676
7677 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7678
baea0dae
PA
76792013-02-14 Pedro Alves <palves@redhat.com>
7680
7681 * tracepoint.c (save_string): Delete.
7682 (add_tracepoint_action): Use savestring instead of save_string.
7683
0b1afbb3
PA
76842013-02-12 Pedro Alves <palves@redhat.com>
7685
7686 * linux-xtensa-low.c: Ditto.
7687 * xtensa-xtregs.c: Ditto.
7688
8a4ac37e
PA
76892013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7690
7691 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7692 thread_db.
7693
148de6bb
MS
76942013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7695
7696 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7697 aarch64_num_wp_regs and aarch64_num_bp_regs to
7698 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7699
55fac6e0
MS
77002013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7701
7702 * linux-aarch64-low.c (ps_get_thread_area): Replace
7703 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7704
176eb98c
MS
77052013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7706 Marcus Shawcroft <marcus.shawcroft@arm.com>
7707 Nigel Stephens <nigel.stephens@arm.com>
7708 Yufeng Zhang <yufeng.zhang@arm.com>
7709
7710 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7711 (aarch64.c, aarch64-without-fpu.c): New targets.
7712 * configure.srv (aarch64*-*-linux*): New.
7713 * linux-aarch64-low.c: New file.
7714
56f7af9c
MS
77152013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7716
43aaf8b6 7717 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7718 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7719 (dequeue_one_deferred_signal, linux_resume_one_thread)
7720 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7721 (linux_tracefork_grandchild, linux_test_for_tracefork)
7722 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7723 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7724 where the argument is 0.
7725
60f662b0
YQ
77262013-01-25 Yao Qi <yao@codesourcery.com>
7727
7728 * event-loop.c: Include "queue.h".
7729 (gdb_event_p): New typedef.
7730 (struct gdb_event) <next_event>: Remove.
7731 (event_queue): Change to QUEUE(gdb_event_p).
7732 (async_queue_event): Remove.
7733 (gdb_event_xfree): New.
7734 (initialize_event_loop): New.
7735 (process_event): Use API from QUEUE.
7736 (wait_for_event): Likewise.
7737 * server.c (main): Call initialize_event_loop.
7738 * server.h (initialize_event_loop): Declare.
7739
5ae4861a
YQ
77402013-01-18 Yao Qi <yao@codesourcery.com>
7741
7742 * ax.h (struct eval_agent_expr_context): New.
7743 (gdb_eval_agent_expr): Update declaration.
7744 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7745 TFRAME. Add new argument CTX.
7746 * server.h (struct eval_agent_expr_context): Declare.
7747 (agent_mem_read, agent_tsv_read): Update declaration.
7748 (agent_mem_read_string): Likewise.
7749 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7750 (add_traceframe_block): Add new argument TPOINT.
7751 Increase TPOINT->traceframe_usage.
7752 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7753 eval_tracepoint_agent_expr.
7754 (condition_true_at_tracepoint): Likewise.
7755 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7756 (agent_mem_read_string, agent_tsv_read): Likewise.
7757
85e00e85
YQ
77582013-01-16 Yao Qi <yao@codesourcery.com>
7759
7760 * linux-low.c (linux_resume_one_lwp): Don't check
7761 'lwp->bp_reinsert != 0'.
7762
4039cf45
JB
77632013-01-07 Joel Brobecker <brobecker@adacore.com>
7764 Pedro Alves <palves@redhat.com>
7765
7766 * lynx-low.c (ptrace_request_to_str): Define a temporary
7767 macro and use it to simplify this function's implementation.
7768
9044dee2
JB
77692013-01-07 Joel Brobecker <brobecker@adacore.com>
7770
7771 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7772 sets errno.
7773
e6352c8f
JB
77742013-01-07 Joel Brobecker <brobecker@adacore.com>
7775
7776 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7777
50681a27
JB
77782013-01-07 Joel Brobecker <brobecker@adacore.com>
7779
7780 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7781
3f6e77ef
JB
77822013-01-07 Joel Brobecker <brobecker@adacore.com>
7783
7784 * lynx-low.c (lynx_resume): Use the resume_info parameter
7785 to determine the ptid for the lynx_ptrace call, unless
7786 it is equal to minus_one_ptid, in which case we use the
7787 ptid of the current_inferior.
7788 (lynx_wait_1): After having received a thread create/exit
7789 event, resume the inferior's execution using the signaling
7790 thread's ptid, rather than the old ptid.
7791
7fda33ae
JB
77922013-01-07 Joel Brobecker <brobecker@adacore.com>
7793
7794 * lynx-low.c (lynx_resume): Delete variable ret.
7795
b9786c74
JB
77962013-01-01 Joel Brobecker <brobecker@adacore.com>
7797
7798 * gdbreplay.c (gdbreplay_version): Update copyright year.
7799 * server.c (gdbserver_version): Likewise.
7800
8b93d60f
JB
78012012-12-17 Joel Brobecker <brobecker@adacore.com>
7802
7803 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7804 new thread.
7805
037335a7
JB
78062012-12-17 Joel Brobecker <brobecker@adacore.com>
7807
7808 * lynx-low.c (ptrace_request_to_str): Add handling for
7809 PTRACE_GETTRACESIG.
7810
52d4cbd8
JB
78112012-12-17 Joel Brobecker <brobecker@adacore.com>
7812
7813 * lynx-low.c (lynx_attach): Delete variable new_process.
7814
ab8f6ca9
JB
78152012-12-17 Joel Brobecker <brobecker@adacore.com>
7816
7817 * lynx-low.c (lynx_create_inferior): Delete variable
7818 new_process.
7819
78cbc024
JB
78202012-12-17 Joel Brobecker <brobecker@adacore.com>
7821
7822 * lynx-low.c (ptrace_request_to_str): Do not handle
7823 PTRACE_GETTHREADLIST if this macro does not exist.
7824
14a00470
YQ
78252012-12-15 Yao Qi <yao@codesourcery.com>
7826
7827 * Makefile.in (OBS): Add notif.o.
7828 * notif.c, notif.h: New.
7829 * server.c: Include "notif.h".
7830 (struct vstop_notif) <next>: Remove.
7831 <base>: New field.
7832 (queue_stop_reply): Update.
7833 (push_event, send_next_stop_reply): Remove.
7834 (discard_queued_stop_replies): Update.
7835 (notif_stop): New variable.
7836 (handle_v_stopped): Remove.
7837 (handle_v_requests): Don't call handle_v_stopped. Call
7838 handle_ack_notif instead.
7839 (queue_stop_reply_callback): Call notif_event_enque instead
7840 of queue_stop_reply.
7841 (handle_status): Don't call send_next_stop_reply, call
7842 notif_write_event instead.
7843 (kill_inferior_callback): Likewise.
7844 (detach_or_kill_inferior_callback): Likewise.
7845 (main): Call initialize_notif.
7846 (process_serial_event): Call QUEUE_is_empty.
7847 (handle_target_event): Call notif_push instead of push event.
7848 * server.h (push_event): Remove declaration.
7849
61c125b9
TT
78502012-12-10 Tom Tromey <tromey@redhat.com>
7851
7852 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7853 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7854 macros.
7855 (.c.o): Rewrite.
7856 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7857 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7858 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7859 (amd64-linux-ipa.o, ax.o): Rewrite.
7860 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7861 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7862 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7863 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7864 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7865 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7866 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7867 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7868 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7869 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7870 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7871 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7872 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7873 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7874 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7875 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7876 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7877 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7878 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7879 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7880 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7881 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7882 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7883 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7884 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7885 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7886 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7887 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7888 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7889 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7890 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7891 (reg-tilegx.o): Remove.
7892 (all_object_files): New macro.
7893 Include .deps files.
7894 * aclocal.m4, configure: Rebuild.
7895 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7896 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7897 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7898
e90e9ad9
TT
78992012-12-05 Tom Tromey <tromey@redhat.com>
7900
7901 PR gdb/14917:
7902 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7903
02d403bf 79042012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7905
7906 * configure.ac: Check for linux/perf_event.h.
7907 * config.in: Regenerated.
7908 * configure: Regenerated.
7909
0270a750
PA
79102012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7911
7912 * hostio.c (handle_readlink): Decrease buffer size
7913 parameter passed to readlink by one byte.
7914
8c29b58e
YQ
79152012-11-26 Yao Qi <yao@codesourcery.com>
7916
7917 * configure.ac (build_warnings): Append '-Wempty-body'.
7918 * configure: Regenerated.
7919 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7920 body.
7921
8bdce1ff
PM
79222012-11-15 Pierre Muller <muller@sourceware.org>
7923
7924 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7925 * config.in: Regenerate.
7926 * configure: Regenerate.
7927 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7928 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7929 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7930 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7931 header.
7932 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7933 instead of <sys/wait.h> header.
7934 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7935
02d403bf 79362012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7937
7938 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7939 (various make rules): Remove -DGDBSERVER
7940
fbd5db48
YQ
79412012-11-09 Yao Qi <yao@codesourcery.com>
7942
7943 * spu-low.c (current_ptid): Move it to ..
7944 * gdbthread.h: ... here. New.
7945 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7946 * server.c (myresume, process_serial_event): Likewise.
7947 * thread-db.c (thread_db_find_new_threads): Likewise.
7948 * tracepoint.c (run_inferior_command): Likewise.
7949
b3dc46ff
AB
79502012-10-01 Andrew Burgess <aburgess@broadcom.com>
7951
7952 * server.c (handle_search_memory_1): Include access length in
7953 warning message.
7954
07c04788
HPN
79552012-09-05 Michael Brandt <michael.brandt@axis.com>
7956
7957 * linux-crisv32-low.c: Fix compile errors.
7958
918d227b
YQ
79592012-09-04 Yao Qi <yao@codesourcery.com>
7960
7961 * tracepoint.c (cmd_qtsv): Adjust debug message.
7962 Don't check CUR_TPOINT.
7963
18c1b81a
YQ
79642012-08-28 Yao Qi <yao@codesourcery.com>
7965
7966 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7967 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7968 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7969 Remove declarations of xmalloc, xreallloc, xstrdup and
7970 freeargv.
7971 * Makefile.in (libiberty_h): New.
7972 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7973 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7974
dc82f37b
YQ
79752012-08-23 Yao Qi <yao@codesourcery.com>
7976
7977 * server.h: Remove declaration of 'xsnprintf'.
7978
406b1477
KS
79792012-08-22 Keith Seitz <keiths@redhat.com>
7980
7981 * server.h: Include build-gnulib-gbserver/config.h.
7982 * gdbreplay.c: Likewise.
7983
e6712ff1
DE
79842012-08-08 Doug Evans <dje@google.com>
7985
7986 * Makefile.in (SFILES): Add gdb_vecs.c.
7987 (OBS): Add gdb_vecs.o.
7988 (gdb_vecs_h, host_defs_h): New variables.
7989 (thread-db.o): Add $(gdb_vecs_h) dependency.
7990 (gdb_vecs.o): New rule.
7991 * thread-db.c: #include "gdb_vecs.h".
7992 (thread_db_load_search): Use a vector to iterate over path elements.
7993 Handle text appearing after "$pdir".
7994
7995 * configure.ac: Add check for strstr.
7996 * config.in: Regenerate.
7997 * configure: Regenerate.
7998
7c3270ae
UW
79992012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8000
8001 * hostio.c (handle_pread): If pread fails, fall back to attempting
8002 lseek/read.
8003 (handle_pwrite): Likewise for pwrite.
8004
b62e2b27
UW
80052012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8006
8007 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8008 between unsupported TYPE and unimplementable ADDR/LEN combination.
8009 (arm_insert_point): Act on new return value.
8010
78a99e91
PA
80112012-07-31 Pedro Alves <palves@redhat.com>
8012
8013 * server.c (process_point_options): Only skip tokens if we find
8014 one that is unrecognized. Don't treat 'X' specially while
8015 skipping unrecognized tokens.
8016
fcf303ab
UW
80172012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8018
8019 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8020 to 4-byte-align HW breakpoint addresses for Thumb.
8021
7255706c
YQ
80222012-07-27 Yao Qi <yao@codesourcery.com>
8023
8024 PR remote/14161.
8025
8026 * server.h: Declare gdb_agent_about_to_close.
8027 * target.c (kill_inferior): Include "agent.h".
8028 New. Send command 'kill'.
8029 * target.h (kill_inferior): Removed macro.
8030 * tracepoint.c (gdb_agent_about_to_close): New.
8031 (gdb_agent_helper_thread): Handle command 'close'.
8032 Wait endlessly until the inferior stops.
8033 Install gdb_agent_remove_socket to atexit hook.
8034 (agent_socket_name): New static variable.
8035 (gdb_agent_socket_init): Replace local variable 'name' with
8036 'agent_socket_name'.
8037 (gdb_agent_remove_socket): New.
8038
5a3f286f
YQ
80392012-07-27 Yao Qi <yao@codesourcery.com>
8040
8041 * server.c (process_point_options): Stop at 'X' when parsing.
8042
961bd387
ME
80432012-07-19 Michael Eager <eager@eagercon.com>
8044
a261b8f5 8045 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8046 to hw_execute.
8047 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8048 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8049 hardware breakpoint.
8050
aa7c7447
JK
80512012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8052
8053 * gdbserver/linux-low.c (initialize_low): Call
8054 linux_ptrace_init_warnings.
8055
7f216e7c
DE
80562012-07-02 Doug Evans <dje@google.com>
8057
8058 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8059 pointer to int.
8060
d3ce09f5
SS
80612012-07-02 Stan Shebs <stan@codesourcery.com>
8062
8063 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8064 (ax.o): Add it to build rule.
8065 (ax-ipa.o): Ditto.
8066 (OBS): Add format.o.
8067 (IPA_OBS): Add format.o.
8068 * server.c (handle_query): Claim support for breakpoint commands.
8069 (process_point_options): Add command case.
8070 (process_serial_event): Leave running if there are printfs in
8071 effect.
8072 * mem-break.h (any_persistent_commands): Declare.
8073 (add_breakpoint_commands): Declare.
8074 (gdb_no_commands_at_breakpoint): Declare.
8075 (run_breakpoint_commands): Declare.
8076 * mem-break.c (struct point_command_list): New struct.
8077 (struct breakpoint): New field command_list.
8078 (any_persistent_commands): New function.
8079 (add_commands_to_breakpoint): New function.
8080 (add_breakpoint_commands): New function.
8081 (gdb_no_commands_at_breakpoint): New function.
8082 (run_breakpoint_commands): New function.
8083 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8084 locally.
8085 * ax.c: Include format.h.
8086 (ax_printf): New function.
8087 (gdb_eval_agent_expr): Add printf opcode.
8088
2f8f6aed
YQ
80892012-06-13 Yao Qi <yao@codesourcery.com>
8090
8091 * server.c (start_inferior): Remove duplicated writes to fields
8092 'last_resume_kind' and 'last_status' of 'current_inferior'.
8093
0c9070b3
YQ
80942012-06-12 Yao Qi <yao@codesourcery.com>
8095 Pedro Alves <palves@redhat.com>
8096
8097 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8098 comment.
8099 * server.c (handle_v_cont): Extend comment.
8100
c52daf70
YQ
81012012-06-11 Yao Qi <yao@codesourcery.com>
8102
8103 * linux-low.c (linux_attach): Add 'static'.
8104
d38bbb0a
YQ
81052012-06-06 Yao Qi <yao@codesourcery.com>
8106
8107 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8108
89dc0afd
JK
81092012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8110
8111 Fix gcc -flto compilation warning.
8112 * server.c (main): Make variable multi_mode and attach volatile.
8113
75f62ce7
TJB
81142012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8115
8116 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8117 if the platform doesn't know about it.
8118
65f479b6
PA
81192012-05-30 Jeff Kenton <jkenton@tilera.com>
8120
8121 * Makefile.in (SFILES): Add linux-tile-low.c.
8122 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8123 * configure.srv: Handle tilegx-*-linux*.
8124 * linux-tile-low.c: New file.
8125
0c5bf5a9
JK
81262012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8127
8128 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8129
a493e3e2
PA
81302012-05-24 Pedro Alves <palves@redhat.com>
8131
8132 PR gdb/7205
8133
43aaf8b6 8134 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8135
2ea28649
PA
81362012-05-24 Pedro Alves <palves@redhat.com>
8137
8138 PR gdb/7205
8139
8140 Replace target_signal with gdb_signal throughout.
8141
8d409d16
MR
81422012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8143
8144 * linux-low.c (linux_store_registers): Avoid the copying sequence
8145 when no data has been retrieved by ptrace.
8146
23512c01
MGD
81472012-05-22 Will Deacon <will.deacon@arm.com>
8148
8149 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8150 Include asm/ptrace.h.
8151 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8152 already defined.
8153
4934b29e
MR
81542012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8155
8156 * linux-low.c (linux_store_registers): Don't re-retrieve data
8157 with ptrace that has already been obtained from /proc. Always
8158 copy any data retrieved with ptrace to the buffer supplied.
8159
bde24c0a
PA
81602012-05-11 Yao Qi <yao@codesourcery.com>
8161 Pedro Alves <palves@redhat.com>
8162
8163 * linux-low.c (enum stopping_threads_kind): New.
8164 (stopping_threads): Change type to `enum stopping_threads_kind'.
8165 (handle_extended_wait): If stopping and suspending threads, leave
8166 the new_lwp suspended too.
8167 (linux_wait_for_event): Adjust.
8168 (stop_all_lwps): Set `stopping_threads' to
8169 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8170 whether we're suspending threads or just stopping them. Assert no
8171 recursion happens.
8172
623b6bdf
YQ
81732012-04-29 Yao Qi <yao@codesourcery.com>
8174
8175 * server.h: Move some code to ...
8176 * gdbthread.h: ... here. New.
8177 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8178 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8179 (nto-low.o, win32-low.o): Likewise.
8180 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8181 * regcache.c, remote-utils.c, server.c: Likewise.
8182 * target.c, tracepoint.c, win32-low.c: Likewise.
8183
f15f9948
TJB
81842012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8185
8186 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8187 (PTRACE_ARG4_TYPE): Likewise.
8188 (PTRACE_XFER_TYPE): Likewise.
8189 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8190 ptrace to PTRACE_ARG3_TYPE.
8191 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8192 (PTRACE_ARG4_TYPE): Likewise.
8193 (PTRACE_XFER_TYPE): Likewise.
8194 (linux_detach_one_lwp): Cast fourth argument of
8195 ptrace to long then PTRACE_ARG4_TYPE.
8196 (regsets_fetch_inferior_registers): Cast third argument of
8197 ptrace to long then PTRACE_ARG3_TYPE.
8198 (regsets_store_inferior_registers): Likewise.
8199
38ea300a
PA
82002012-04-20 Pedro Alves <palves@redhat.com>
8201
8202 * configure: Regenerate.
8203
c971b7fa
PA
82042012-04-19 Pedro Alves <palves@redhat.com>
8205
43aaf8b6 8206 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8207 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8208 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8209 (all, install-only, uninstall, clean-info, all-lib, clean): No
8210 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8211 (maintainer-clean realclean distclean): Use subdir_do.
8212 (subdir_do): New.
8213 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8214 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8215 * acinclude.m4: Include acx_configure_dir.m4.
8216 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8217 calls. Call AC_PROG_RANLIB. Configure gnulib using
8218 ACX_CONFIGURE_DIR.
8219 (GNULIB): New.
8220 (GNULIB_STDINT_H): Adjust.
8221 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8222 * gdbreplay.c: Include build-gnulib/config.h.
8223 * server.h: Likewise.
8224 * aclocal.m4: Regenerate.
8225 * config.in: Regenerate.
8226 * configure: Regenerate.
c971b7fa 8227
809277f8
PA
82282012-04-19 Pedro Alves <palves@redhat.com>
8229
8230 * Makefile.in (LIBGNU, INCGNU): Adjust.
8231 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8232 (all, install-only, uninstall, clean-info, all-lib, clean)
8233 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8234 * configure.ac: Adjust AC_OUTPUT output.
8235 * aclocal.m4: Regenerate.
8236 * configure: Regenerate.
8237
fd9bb8b8
PA
82382012-04-19 Pedro Alves <palves@redhat.com>
8239
8240 * Makefile.in (generated_files): New.
8241 (server_h): Remove the explicit dependency on config.h, and depend
8242 on $generated_files.
8243
1c298c66
PA
82442012-04-19 Pedro Alves <palves@redhat.com>
8245
8246 * Makefile.in (INCGNU): Add -Ignulib.
8247
57c4b50b
PA
82482012-04-19 Pedro Alves <palves@redhat.com>
8249
8250 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8251 (INCGNU): ... this, and spell out -I here.
8252 (GNULIB_LIB): Rename to ...
8253 (LIBGNU): ... this.
8254 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8255
1030e047
PA
82562012-04-19 Pedro Alves <palves@redhat.com>
8257
8258 * config.in: Regenerate.
8259
447d4319
PA
82602012-04-19 Pedro Alves <palves@redhat.com>
8261
8262 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8263 * server.h (memmem): Remove declaration.
8264 * config.in: Regenerate.
8265 * configure: Regenerate.
8266
aad9eab9
YQ
82672012-04-19 Yao Qi <yao@codesourcery.com>
8268
8269 * Makefile.in (SFILES): Add common/vec.c.
8270 (OBS): Add vec.o.
8271 (vec.o): New rule.
8272
3e10640f
YQ
82732012-04-19 Yao Qi <yao@codesourcery.com>
8274
8275 * remote-utils.c (prepare_resume_reply): Replace with macro
8276 target_core_of_thread.
8277 * server.c (handle_qxfer_threads_proper): Likewise.
8278 * target.h (traget_core_of_thread): New macro.
8279
71622373
PA
82802012-04-18 Pedro Alves <palves@redhat.com>
8281
8282 * aclocal.m4: Regenerate.
8283 * configure: Regenerate.
8284
80d26939
YQ
82852012-04-16 Yao Qi <yao@codesourcery.com>
8286
8287 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8288 duplicated on address.
8289
42476b70
YQ
82902012-04-16 Yao Qi <yao@codesourcery.com>
8291
8292 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8293 (struct tracepoint_action_ops) <send>: New field.
8294 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8295 (agent_expr_send, x_tracepoint_action_send): New.
8296 (l_tracepoint_action_send): New.
8297 (cmd_qtdp): Download and install tracepoint
8298 according to `use_agent'.
8299 (run_inferior_command): Add one more parameter `len'.
8300 Update callers.
8301 (tracepoint_send_agent): New.
8302 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8303
7bc83639
YQ
83042012-04-16 Yao Qi <yao@codesourcery.com>
8305
8306 * tracepoint.c (download_tracepoints): Moved to ...
8307 (cmd_qtstart): ... here.
8308
5f18041e
YQ
83092012-04-14 Yao Qi <yao@codesourcery.com>
8310
8311 * tracepoint.c: Include inttypes.h.
8312 (struct collect_memory_action): Use sized types.
8313 (struct tracepoint): Likewise.
8314 (cmd_qtdp, stop_tracing): Update print specifiers.
8315 (cmd_qtp, response_tracepoint): Likewise.
8316 (collect_data_at_tracepoint): Likewise.
8317 (collect_data_at_step): Likewise.
8318
55a8c076
YQ
83192012-04-14 Yao Qi <yao@codesourcery.com>
8320
8321 Import gnulib module inttypes.
8322 * aclocal.m4, config.in, configure: Regenerated.
8323
dc750257
YQ
83242012-04-14 Yao Qi <yao@codesourcery.com>
8325
8326 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8327 Makefile and config.status at last.
8328
0ab5faf9
YQ
83292012-04-13 Yao Qi <yao@codesourcery.com>
8330
8331 * tracepoint.c: Include stdint.h unconditionally.
8332
18f5fd81
TJB
83332012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8334
8335 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8336 on BFD_HAVE_SYS_PROCFS_TYPE.
8337 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8338 * configure: Regenerate.
8339 * config.in: Likewise.
8340
4d47af5c
L
83412012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8342
8343 * Makefile.in (clean): Also remove x32.c x32-linux.c
8344 x32-avx.c x32-avx-linux.c.
8345 (x32.o): New target.
8346 (x32.c): Likewise.
8347 (x32-linux.o): Likewise.
8348 (x32-linux.c): Likewise.
8349 (x32-avx.o): Likewise.
8350 (x32-avx.c): Likewise.
8351 (x32-avx-linux.o): Likewise.
8352 (x32-avx-linux.c): Likewise.
8353
8354 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8355 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8356 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8357 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8358 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8359 i386/x32-avx-linux.xml.
8360
8361 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8362 (init_registers_x32_avx_linux): Likwise.
8363 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8364 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8365
ecedbe58
PA
83662012-04-13 Pedro Alves <palves@redhat.com>
8367
8368 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8369 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8370 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8371 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8372 the sub-make.
8373
c92b5177
L
83742012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8375
8376 * linux-x86-low.c (compat_x32_clock_t): New.
8377 (compat_x32_siginfo_t): Likewise.
8378 (compat_x32_siginfo_from_siginfo): Likewise.
8379 (siginfo_from_compat_x32_siginfo): Likewise.
8380 (linux_is_elf64): Likewise.
8381 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8382 and siginfo_from_compat_x32_siginfo for x32.
8383 (x86_arch_setup): Set linux_is_elf64.
8384
214d508e
L
83852012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8386
8387 PR gdb/13969
8388 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8389 e_machine field.
8390 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8391 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8392 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8393 compatible with process.
8394
c9a1864a
YQ
83952012-04-12 Yao Qi <yao@codesourcery.com>
8396
8397 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8398 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8399 (install-only, install-info, clean): Handle sub dir gnulib.
8400 (all-lib, am--refresh): New targets.
8401 (memmem.o): Remove target.
8402 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8403 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8404 (AC_REPLACE_FUNCS): Remove memmem.
8405 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8406 (AC_OUTPUT): Generate Makefile in gnulib/.
8407 * aclocal.m4, config.in, configure: Regenerated.
8408
367ba2c2
MR
84092012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8410
8411 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8412
9d236627
PA
84132012-04-05 Pedro Alves <palves@redhat.com>
8414
8415 -Werror=strict-aliasing
8416
8417 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8418 pointer.
8419
111217b3
PA
84202012-04-04 Pedro Alves <palves@redhat.com>
8421
8422 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8423 (sparc_store_gregset_from_stack, sparc_store_gregset)
8424 (sparc_breakpoint_at): Fix formatting.
8425
8365dcf5
TJB
84262012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8427
8428 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8429 are available.
8430 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8431 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8432 * config.in: Regenerate.
8433 * configure: Likewise.
8434
689cc2ae
PA
84352012-03-29 Pedro Alves <palves@redhat.com>
8436
8437 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8438 Correct ptrace arguments.
8439
c14dfd32
PA
84402012-03-28 Pedro Alves <palves@redhat.com>
8441
8442 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8443 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8444 (IA64_FR1_REGNUM): New defines.
8445 (ia64_fetch_register): New.
8446 (the_low_target): Install it.
8447 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8448 field.
8449 * linux-low.c (linux_fetch_registers): Try the
8450 the_low_target.fetch_register hook first.
8451
8452 * linux-arm-low.c (the_low_target): Adjust.
8453 * linux-bfin-low.c (the_low_target): Adjust.
8454 * linux-cris-low.c (the_low_target): Adjust.
8455 * linux-crisv32-low.c (the_low_target): Adjust.
8456 * linux-m32r-low.c (the_low_target): Adjust.
8457 * linux-m68k-low.c (the_low_target): Adjust.
8458 * linux-mips-low.c (the_low_target): Adjust.
8459 * linux-ppc-low.c (the_low_target): Adjust.
8460 * linux-s390-low.c (the_low_target): Adjust.
8461 * linux-sh-low.c (the_low_target): Adjust.
8462 * linux-sparc-low.c (the_low_target): Adjust.
8463 * linux-tic6x-low.c (the_low_target): Adjust.
8464 * linux-x86-low.c (the_low_target): Adjust.
8465 * linux-xtensa-low.c (the_low_target): Adjust.
8466
63c88e13
PA
84672012-03-26 Pedro Alves <palves@redhat.com>
8468
8469 * server.c (handle_qxfer_libraries): Don't bail early if
8470 the_target->qxfer_libraries_svr4 is not NULL.
8471
fb723180
PA
84722012-03-26 Pedro Alves <palves@redhat.com>
8473
8474 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8475
0afae3cf
PA
84762012-03-23 Pedro Alves <palves@redhat.com>
8477
8478 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8479 "library-list-svr4" element's start tag when the the DSO list is
8480 empty.
8481
485f1ee4
PA
84822012-03-23 Pedro Alves <palves@redhat.com>
8483
8484 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8485 a variable whose type size is the same as the inferior's pointer
8486 size.
8487
a5362b9a
TS
84882012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8489
8490 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8491 struct siginfo.
8492 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8493 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8494 * linux-low.h: Include <signal.h>.
8495 (struct siginfo): Remove forward declaration.
8496 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8497 struct siginfo.
8498
d226c142
MF
84992012-03-21 Mike Frysinger <vapier@gentoo.org>
8500
8501 * .gitignore: Ignore more files.
8502
122f36ef
PA
85032012-03-19 Pedro Alves <palves@redhat.com>
8504 Jan Kratochvil <jan.kratochvil@redhat.com>
8505
8506 * server.c (cont_thread, general_thread): Add describing comments.
8507 (start_inferior): Clear `cont_thread'.
8508 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8509 of a process.
8510
fc3e5175
YQ
85112012-03-15 Yao Qi <yao@codesourcery.com>
8512
8513 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8514 handling to ...
8515 (cmd_qtdp): ... here.
8516
8d0d92cd
YQ
85172012-03-15 Yao Qi <yao@codesourcery.com>
8518
8519 * tracepoint.c (struct tracepoint_action_ops): New.
8520 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8521 (m_tracepoint_action_download): New.
8522 (r_tracepoint_action_download): New.
8523 (x_tracepoint_action_download): New.
8524 (l_tracepoint_action_download): New.
8525 (add_tracepoint_action): Install `action->ops' according type.
8526 (download_tracepoint_1): Move code `download' function pointer
8527 of various tracepoint_action_ops.
8528
87b0bb13
JK
85292012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8530
8531 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8532 linux_ptrace_attach_warnings.
8533
5f572dec
JK
85342012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8535
8536 * Makefile.in (linux-ptrace.o): New.
8537 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8538 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8539 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8540 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8541 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8542 of these targets.
8543 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8544
f4647387
YQ
85452012-03-08 Yao Qi <yao@codesourcery.com>
8546 Pedro Alves <palves@redhat.com>
8547
8548 Fix PR server/13392.
8549 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8550 offset of JMP insn.
8551 * tracepoint.c (remove_tracepoint): New.
8552 (cmd_qtdp): Call remove_tracepoint when failed to install.
8553
9b224c5e
PA
85542012-03-07 Pedro Alves <palves@redhat.com>
8555
8556 * linux-low.c (get_detach_signal): New.
8557 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8558 Pass on pending signals to PTRACE_DETACH. Check the result of the
8559 ptrace call.
8560 * server.c (program_signals, program_signals_p): New.
8561 (handle_general_set): Handle QProgramSignals.
8562 * server.h (program_signals, program_signals_p): Declare.
8563
e237a7e2
JK
85642012-03-05 Pedro Alves <palves@redhat.com>
8565 Jan Kratochvil <jan.kratochvil@redhat.com>
8566
8567 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8568 New comment why.
8569
5808517f
YQ
85702012-03-03 Yao Qi <yao@codesourcery.com>
8571
8572 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8573 agent_look_up_symbols.
8574
58b4daa5
YQ
85752012-03-03 Yao Qi <yao@codesourcery.com>
8576
8577 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8578 (linux-x86-low.o): Likewise.
8579 * server.h: Remove in_process_agent_loaded.
8580 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8581 common/agent.c.
8582 Update callers.
8583
8ffcbaaf
YQ
85842012-03-03 Yao Qi <yao@codesourcery.com>
8585
8586 * tracepoint.c (gdb_agent_capability): New global.
8587 (in_process_agent_loaded_ust): Renamed to
8588 `in_process_agent_supports_ust'.
8589 Update callers.
8590 (in_process_agent_supports_ust): Call agent_capability_check.
8591 (clear_installed_tracepoints): Assert that agent supports
8592 agent.
8593
d1feda86
YQ
85942012-03-03 Yao Qi <yao@codesourcery.com>
8595
8596 * linux-low.c (linux_supports_agent): New.
8597 (linux_target_ops): Initialize field `supports_agent' with
8598 linux_supports_agent.
8599 * target.h (struct target_ops) <supports_agent>: New.
8600 (target_supports_agent): New macro.
8601 * server.c (handle_general_set): Handle packet 'QAgent'.
8602 (handle_query): Send `QAgent+'.
8603 * Makefile.in (server.o): Depends on agent.h.
8604
2fa291ac
YQ
86052012-03-03 Yao Qi <yao@codesourcery.com>
8606
8607 * Makefile.in (OBS): Add agent.o.
8608 Add new rule for agent.o.
8609 Track dependence of tracepoint.c on agent.h.
8610 * tracepoint.c (run_inferior_command_1):
8611 (run_inferior_command): Call agent_run_command.
8612 (gdb_ust_connect_sync_socket): Deleted. Move it to
8613 common/agent.c.
8614 (resume_thread, stop_thread): Likewise.
8615 (gdb_ust_socket_init): Renamed to ...
8616 (gdb_agent_socket_init): ... New.
8617 (gdb_ust_thread): Renamed to ...
8618 (gdb_agent_helper_thread): ... New.
8619 (gdb_ust_init): Move some code to ...
8620 (gdb_agent_init): ... here. New.
8621 [HAVE_UST]: Call gdb_ust_init.
8622 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8623 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8624 * config.in, configure: Regenerated.
8625
05044653
PA
86262012-03-02 Pedro Alves <palves@redhat.com>
8627
8628 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8629 * linux-low.c (struct simple_pid_list): New.
8630 (stopped_pids): New a struct simple_pid_list pointer.
8631 (add_to_pid_list, pull_pid_from_list): New.
8632 (handle_extended_wait): Don't assume the first signal new children
8633 report is SIGSTOP. Adjust call to pull_pid_from_list.
8634 (linux_wait_for_lwp): Adjust.
8635
8d00225b
YQ
86362012-03-02 Yao Qi <yao@codesourcery.com>
8637
8638 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8639 debug log.
8640
19560ba5
YQ
86412012-03-02 Yao Qi <yao@codesourcery.com>
8642
8643 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8644 `stop_pc' and `tpoint'. Update caller.
8645
1faeff08
MR
86462012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8647
8648 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8649 * linux-low.c (use_linux_regsets): New macro.
8650 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8651 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8652 (linux_register_in_regsets): New function.
8653 (usr_fetch_inferior_registers): Skip registers covered by
8654 regsets.
8655 (usr_store_inferior_registers): Likewise.
8656 (usr_fetch_inferior_registers): New macro.
8657 (usr_store_inferior_registers): Likewise.
8658 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8659 (linux_store_registers): Likewise.
8660 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8661 prototype.
8662 (init_registers_mips64_dsp_linux): Likewise.
8663 (init_registers_mips_linux): New macro.
8664 (init_registers_mips_dsp_linux): Likewise.
8665 (mips_dsp_num_regs): Likewise.
8666 (DSP_BASE, DSP_CONTROL): New fallback macros.
8667 (mips_base_regs): New macro.
8668 (mips_regmap): Use it. Fix the size.
8669 (mips_dsp_regmap): New variable.
8670 (mips_dsp_regset_bitmap): Likewise.
8671 (mips_arch_setup): New function.
8672 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8673 than mips_regmap.
8674 (mips_cannot_store_register): Likewise.
8675 (the_low_target): Update .arch_setup, .num_regs and .regmap
8676 initializers. Add .regset_bitmap initializer.
8677 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8678 initializer.
8679 * linux-bfin-low.c (the_low_target): Likewise.
8680 * linux-cris-low.c (the_low_target): Likewise.
8681 * linux-crisv32-low.c (the_low_target): Likewise.
8682 * linux-ia64-low.c (the_low_target): Likewise.
8683 * linux-m32r-low.c (the_low_target): Likewise.
8684 * linux-m68k-low.c (the_low_target): Likewise.
8685 * linux-ppc-low.c (the_low_target): Likewise.
8686 * linux-s390-low.c (the_low_target): Likewise.
8687 * linux-sh-low.c (the_low_target): Likewise.
8688 * linux-sparc-low.c (the_low_target): Likewise.
8689 * linux-tic6x-low.c (the_low_target): Likewise.
8690 * linux-x86-low.c (the_low_target): Likewise.
8691 * linux-xtensa-low.c (the_low_target): Likewise.
8692 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8693 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8694 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8695 srv_xmlfiles.
8696 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8697 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8698
c03e6ccc
YQ
86992012-02-29 Yao Qi <yao@codesourcery.com>
8700 Pedro Alves <palves@redhat.com>
8701
8702 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8703 `step_over_finished' is true.
8704
644cebc9
PA
87052012-02-27 Pedro Alves <palves@redhat.com>
8706
8707 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8708 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8709
c14d7ab2
PA
87102012-02-27 Pedro Alves <palves@redhat.com>
8711
8712 PR server/9684
8713 * linux-low.c (pid_is_stopped): New.
8714 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8715
412c89dd
LM
87162012-02-25 Luis Machado <lgustavo@codesourcery.com>
8717
8718 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8719 of conditions.
8720
b745defe
MR
87212012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8722
8723 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8724
9f3a5c85
LM
87252012-02-24 Luis Machado <lgustavo@codesourcery>
8726
8727 * server.c (handle_query): Advertise support for target-side
8728 breakpoint condition evaluation.
8729 (process_point_options): New function.
8730 (process_serial_event): When inserting a breakpoint, check for
8731 a target-side condition that should be evaluated.
8732
8733 * mem-break.c: Include regcache.h and ax.h.
8734 (point_cond_list_t): New data structure.
8735 (breakpoint) <cond_list>: New field.
8736 (find_gdb_breakpoint_at): Make non-static.
8737 (delete_gdb_breakpoint_at): Clear any target-side
8738 conditions.
8739 (clear_gdb_breakpoint_conditions): New function.
8740 (add_condition_to_breakpoint): Likewise.
8741 (add_breakpoint_condition): Likewise.
8742 (gdb_condition_true_at_breakpoint): Likewise.
8743 (gdb_breakpoint_here): Return result directly instead
8744 of going through a local variable.
8745
8746 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8747 (clear_gdb_breakpoint_conditions): Likewise.
8748 (add_breakpoint_condition): Likewise.
8749 (gdb_condition_true_at_breakpoint): Likewise.
8750
8751 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8752 (need_step_over_p): Take target-side breakpoint condition into
8753 consideration.
8754
5e1dc496
LM
87552012-02-24 Luis Machado <lgustavo@codesourcery>
8756
8757 * server.h: Include tracepoint.h.
8758 (agent_mem_read, agent_get_trace_state_variable_value,
8759 agent_set_trace_state_variable_value,
8760 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8761 get_set_tsv_func_addr): New prototypes.
8762
8763 * ax.h: New include file.
8764 * ax.c: New source file.
8765
8766 * tracepoint.c: Include ax.h.
8767 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8768 agent_expr, eval_result_type): Move to ax.h.
8769 (parse_agent_expr): Rename to ...
8770 (gdb_parse_agent_expr): ... this, make it non-static and move
8771 to ax.h.
8772 (unparse_agent_expr) Rename to ...
8773 (gdb_unparse_agent_expr): ... this, make it non-static and move
8774 to ax.h.
8775 (eval_agent_expr): Rename to ...
8776 (eval_tracepoint_agent_expr): ... this.
8777 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8778 forward declarations.
8779 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8780 (agent_get_trace_state_variable_value): New function.
8781 (agent_set_trace_state_variable_value): New function.
8782 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8783 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8784 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8785 (condition_true_at_tracepoint): Likewise.
8786 (parse_agent_expr): Rename to ...
8787 (gdb_parse_agent_expr): ... this and move to ax.c.
8788 (unparse_agent_expr): Rename to ...
8789 (gdb_unparse_agent_expr): ... this and move to ax.c.
8790 (gdb_agent_op_name): Move to ax.c.
8791 (eval_agent_expr): Rename to ...
8792 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8793 and move to ax.c.
8794 (eval_tracepoint_agent_expr): New function.
8795 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8796 non-static.
5e1dc496
LM
8797 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8798 ax.c.
8799 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8800 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8801 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8802 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8803 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8804 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8805 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8806 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8807 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8808 (compile_bytecodes): Remove forward declaration.
8809 (is_goto_target): Move to ax.c.
8810 (compile_bytecodes): Move to ax.c and call
8811 agent_get_trace_state_variable_value (...) and
8812 agent_set_trace_state_variable_value (...).
8813
8814 * Makefile.in: Update ax.c and IPA dependencies.
8815
277e4e52
PA
88162012-02-24 Pedro Alves <palves@redhat.com>
8817
8818 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8819 (cmd_bigqtbuffer_circular): ... this. Only handle
8820 'QTBuffer:circular:'.
8821 (handle_tracepoint_general_set): Adjust.
8822
bf4c19f7
YQ
88232012-02-16 Yao Qi <yao@codesourcery.com>
8824
8825 * inferiors.c: Move code to ...
8826 * dll.c: .... here. New.
8827 * server.h: Declare clear_dlls.
8828 * Makefile.in (SFILES): Add dll.c.
8829 (OBS): Add dll.o
8830 (dll.o): New rule.
8831
d73f2619
YQ
88322012-02-11 Yao Qi <yao@codesourcery.com>
8833
8834 * server.c: (handle_monitor_command): Add a new parameter
8835 `own_buf'.
8836 (handle_query): Update caller.
8837
f8255c2a
JB
88382012-02-09 Joel Brobecker <brobecker@adacore.com>
8839
8840 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8841 * configure, config.in: Regenerate.
8842 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8843 is not defined.
8844
da84f473
PA
88452012-02-02 Pedro Alves <palves@redhat.com>
8846
8847 Try SIGKILL first, then PTRACE_KILL.
8848 * linux-low.c (linux_kill_one_lwp): New.
8849 (linux_kill_one_lwp): Rename to ...
8850 (kill_one_lwp_callback): ... this. Use the new
8851 linux_kill_one_lwp.
8852
e886a173
PA
88532012-02-02 Pedro Alves <palves@redhat.com>
8854
8855 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8856 inferior.
8857
be07f1a2
PA
88582012-01-27 Pedro Alves <palves@redhat.com>
8859
8860 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8861 (elf_64_file_p): Make static.
8862 (linux_pid_exe_is_elf_64_file): New.
8863 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8864 Delete declarations.
8865 (linux_pid_exe_is_elf_64_file): Declare.
8866 * linux-x86-low.c (x86_arch_setup): Use
8867 linux_pid_exe_is_elf_64_file.
8868
d8301ad1
JK
88692012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8870
8871 * linux-low.c (linux_wait_for_event_1): Rename to ...
8872 (linux_wait_for_event): ... here and merge it with former
8873 linux_wait_for_event - new variable wait_ptid, use it.
8874 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8875
01b17894
PA
88762012-01-23 Pedro Alves <palves@redhat.com>
8877
8878 * server.c (main): Avoid yet another case of infinite loop while
8879 detaching/killing after a longjmp.
8880
e825046f
JK
88812012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8882
8883 Code cleanup.
8884 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8885
b9e7b9c3
UW
88862012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8887
8888 * hostio.c (handle_readlink): New function.
8889 (handle_vFile): Call it to handle "vFile:readlink" packets.
8890
901f9912
UW
88912012-01-20 Pedro Alves <palves@redhat.com>
8892 Ulrich Weigand <ulrich.weigand@linaro.org>
8893
8894 * server.c (handle_v_requests): Only support vAttach and vRun to
8895 start multiple processes when in extended protocol mode.
8896
fc1ab1a0
PA
88972012-01-17 Pedro Alves <palves@redhat.com>
8898
8899 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8900 memalign plus mprotect to allocate the scratch buffer.
8901
7d5d4e98
PA
89022012-01-13 Pedro Alves <palves@redhat.com>
8903
8904 * server.c (attach_inferior): Clear `cont_thread'.
8905
f128d5e9
PA
89062012-01-13 Pedro Alves <palves@redhat.com>
8907
8908 * server.c (main): Avoid infinite loop while detaching/killing
8909 after a longjmp.
8910
06db92f0
DE
89112012-01-09 Doug Evans <dje@google.com>
8912
8913 * server.c (start_inferior): Set last_ptid in --wrapper case.
8914
32d92999
YQ
89152012-01-06 Yao Qi <yao@codesourcery.com>
8916
8917 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8918 defined.
8919 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8920
5e0a92a9
YQ
89212012-01-04 Yao Qi <yao@codesourcery.com>
8922
8923 * tracepoint.c (cmd_qtdp): Print debug message
8924 for static tracepoint.
8925
ae639e8c
YQ
89262012-01-04 Yao Qi <yao@codesourcery.com>
8927
8928 * tracepoint.c (trace_vdebug): Differentiate debug message
8929 between gdbserver and IPA.
8930
f72429c5
YQ
89312012-01-03 Yao Qi <yao@codesourcery.com>
8932
8933 * tracepoint.c (tracepoint_was_hit): Don't collect for
8934 static tracepoint.
8935
12c3e59c
JB
89362012-01-02 Joel Brobecker <brobecker@adacore.com>
8937
8938 * terminal.h: Reformat copyright header.
8939
67827812
JB
89402012-01-02 Joel Brobecker <brobecker@adacore.com>
8941
8942 * server.c (gdbserver_version): Update copyright year.
8943 * gdbreplay.c (gdbreplay_version): Likewise.
8944
3e52c33d
JK
89452011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8946
8947 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8948
8949 Revert:
8950 2011-12-18 Hui Zhu <teawater@gmail.com>
8951 * linux-low.c (linux_create_inferior): Save return value to ret.
8952
66f1260e
HZ
89532011-12-18 Hui Zhu <teawater@gmail.com>
8954
8955 * linux-low.c (linux_create_inferior): Save return value to ret.
8956
e77616d7
DE
89572011-12-16 Doug Evans <dje@google.com>
8958
e7b06c57
DE
8959 * linux-low.c (linux_create_inferior): If stdio connection,
8960 redirect stdin from /dev/null, stdout to stderr.
8961 * remote-utils.c (remote_is_stdio): New static global.
8962 (remote_connection_is_stdio): New function.
8963 (remote_prepare): Handle stdio connection.
8964 (remote_open): Ditto.
8965 (remote_close): Don't close stdin for stdio connections.
8966 (read_prim,write_prim): New functions. Replace all calls to
8967 read/write to these.
8968 * server.c (main): Watch for "-" argument. Move call to
8969 remote_prepare before start_inferior.
8970 * server.h (STDIO_CONNECTION_NAME): New macro.
8971 (remote_connection_is_stdio): Declare.
8972
e77616d7
DE
8973 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8974 in debugging output.
8975
82067193
YQ
89762011-12-15 Yao Qi <yao@codesourcery.com>
8977
8978 * tracepoint.c: Include sys/syscall.h.
8979 (gdb_ust_thread): Remove preprocessor conditional.
8980
82bfbe7e
PA
89812011-12-14 Pedro Alves <pedro@codesourcery.com>
8982
8983 * linux-low.c (linux_detach_one_lwp): Call
8984 the_low_target.prepare_to_resume before detaching.
8985
712c6575
YQ
89862011-12-14 Yao Qi <yao@codesourcery.com>
8987
8988 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8989 of write.
8990
d54d1edf
YQ
89912011-12-14 Yao Qi <yao@codesourcery.com>
8992
8993 * i386-low.c (i386_low_stopped_data_address): Initialize local
8994 variable `control'.
8995
6210a125
PA
89962011-12-13 Pedro Alves <pedro@codesourcery.com>
8997
8998 PR remote/13492
8999
9000 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9001 DR_CONTROL unless necessary. Extend comments.
9002 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9003 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9004
2ece8244
YQ
90052011-12-13 Yao Qi <yao@codesourcery.com>
9006
9007 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9008 macros.
9009 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9010
784867a5
JK
90112011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9012
9013 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9014 Print new debug message for such case.
9015
6bf36717
JK
90162011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9017
9018 Fix overlapping memcpy.
9019 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9020 the read_inferior_memory transfer.
9021 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9022 write_inferior_memory transfer.
9023 (set_fast_tracepoint_jump): New variable buf. Use it for the
9024 read_inferior_memory and write_inferior_memory transfers.
9025 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9026 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9027 Use it for the write_inferior_memory transfer.
9028 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9029 buffers.
9030
50275556
MR
90312011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9032
9033 * linux-low.c (fetch_register, store_register): Make code
9034 consistent, fix formatting.
9035
7325beb4
MR
90362011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9037
9038 * linux-low.c (usr_store_inferior_registers): Factor out code
9039 to handle individual registers into...
9040 (store_register): ... this new function.
9041
c642a434
UW
90422011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9043
9044 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9045 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9046 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9047 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9048 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9049 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9050 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9051 (srv_xmlfiles): Add new XML files.
9052
9053 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9054 and <sys/uio.h>.
9055 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9056 (init_registers_s390_linux32v1): Add prototype.
9057 (init_registers_s390_linux32v2): Likewise.
9058 (init_registers_s390_linux64v1): Likewise.
9059 (init_registers_s390_linux64v2): Likewise.
9060 (init_registers_s390x_linux64v1): Likewise.
9061 (init_registers_s390x_linux64v2): Likewise.
9062 (s390_num_regs): Increment to 52.
9063 (s390_regmap): Add orig_r2 register.
9064 (s390_num_regs_3264): Increment to 68.
9065 (s390_regmap_3264): Add orig_r2 register.
9066 (s390_collect_ptrace_register): Handle orig_r2 register.
9067 (s390_supply_ptrace_register): Likewise.
9068 (s390_fill_last_break): New function.
9069 (s390_store_last_break): Likewise.
9070 (s390_fill_system_call): New function.
9071 (s390_store_system_call): Likewise.
9072 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9073 register sets.
9074 (s390_check_regset): New function.
9075 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9076 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9077 Update target_regsets for available register sets.
9078
2268b414
JK
90792011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9080 Jan Kratochvil <jan.kratochvil@redhat.com>
9081
9082 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9083 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9084 New.
9085 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9086 * linux-low.h (struct process_info_private): New member r_debug.
9087 * server.c (handle_qxfer_libraries): Call
9088 the_target->qxfer_libraries_svr4.
9089 (handle_qxfer_libraries_svr4): New function.
9090 (qxfer_packets): New entry "libraries-svr4".
9091 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9092 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9093 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9094 PACKET_qXfer_libraries_svr4.
9095
d6db1fab
UW
90962011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9097
9098 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9099 PSW address/mask between 8-byte and 16-byte formats.
9100 (s390_supply_ptrace_register): Likewise.
9101 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9102 basic addressing mode bit.
9103
242f5f1c
SS
91042011-11-24 Stan Shebs <stan@codesourcery.com>
9105
9106 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9107
f196051f
SS
91082011-11-17 Stan Shebs <stan@codesourcery.com>
9109
9110 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9111 (tracing_start_time): New global.
9112 (tracing_stop_time): New global.
9113 (tracing_user_name): New global.
9114 (tracing_notes): New global.
9115 (tracing_stop_note): New global.
9116 (cmd_qtstart): Set traceframe_usage, start_time.
9117 (stop_tracing): Set stop_time.
9118 (cmd_qtstatus): Report additional status.
9119 (cmd_qtp): New function.
9120 (handle_tracepoint_query): Call it.
9121 (cmd_qtnotes): New function.
9122 (handle_tracepoint_general_set): Call it.
9123 (get_timestamp): Rename from tsv_get_timestamp.
9124
405f8e94
SS
91252011-11-14 Stan Shebs <stan@codesourcery.com>
9126 Kwok Cheung Yeung <kcy@codesourcery.com>
9127
9128 * linux-x86-low.c (small_jump_insn): New.
9129 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9130 trampoline and error message, build a trampoline and issue a small
9131 jump instruction to it.
9132 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9133 trampoline and error message.
9134 (x86_get_min_fast_tracepoint_insn_len): New.
9135 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9136 * linux-low.h (struct linux_target_ops): Add arguments to
9137 install_fast_tracepoint_jump_pad operation, add new operation.
9138 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9139 arguments.
9140 (linux_get_min_fast_tracepoint_insn_len): New function.
9141 (linux_target_op): Add new operation.
9142 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9143 (gdb_trampoline_buffer_end): Ditto.
9144 (gdb_trampoline_buffer_error): Ditto.
9145 (struct ipa_sym_addresses): Add fields for new IPA variables.
9146 (symbol_list): Add entries for new IPA variables.
9147 (struct tracepoint): Add fields to hold the address range of the
9148 trampoline used by the tracepoint.
9149 (trampoline_buffer_head): New static variable.
9150 (trampoline_buffer_tail): Ditto.
9151 (claim_trampoline_space): New function.
9152 (have_fast_tracepoint_trampoline_buffer): New function.
9153 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9154 structure.
9155 (install_fast_tracepoint): Ditto, also add error buffer argument.
9156 (cmd_qtminftpilen): New function.
9157 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9158 (fast_tracepoint_from_trampoline_address): New function.
9159 (fast_tracepoint_collecting): Handle trampoline as part of jump
9160 pad space.
9161 (set_trampoline_buffer_space): New function.
9162 (initialize_tracepoint): Initialize new IPA variables.
9163 * target.h (struct target_ops): Add arguments to
9164 install_fast_tracepoint_jump_pad operation, add new
9165 get_min_fast_tracepoint_insn_len operation.
9166 (target_get_min_fast_tracepoint_insn_len): New.
9167 (install_fast_tracepoint_jump_pad): Add arguments.
9168 * server.h (IPA_BUFSIZ): Define.
9169 * linux-i386-ipa.c: Include extra header files.
9170 (initialize_fast_tracepoint_trampoline_buffer): New function.
9171 (initialize_low_tracepoint): Call it.
9172 * server.h (set_trampoline_buffer_space): Declare.
9173 (claim_trampoline_space): Ditto.
9174 (have_fast_tracepoint_trampoline_buffer): Ditto.
9175
1e4d1764
YQ
91762011-11-14 Yao Qi <yao@codesourcery.com>
9177
9178 * server.c (handle_query): Handle InstallInTrace for qSupported.
9179 * tracepoint.c (add_tracepoint): Sort list.
9180 (install_tracepoint, download_tracepoint): New.
9181 (cmd_qtdp): Call them to install and download tracepoints.
9182 (sort_tracepoints): Removed.
9183 (cmd_qtstart): Update.
9184
5c73ff4e
YQ
91852011-11-14 Yao Qi <yao@codesourcery.com>
9186
9187 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9188 * mem-break.h: Declare.
9189 * tracepoint.c (cmd_qtstart): Move some code to ...
9190 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9191 New.
9192 (download_tracepoints): Move some code to ...
9193 (download_tracepoint_1): ... here. New.
9194
86a30030
YQ
91952011-11-08 Yao Qi <yao@codesourcery.com>
9196
9197 * remote-utils.c (relocate_instruction): A comment fix.
9198
8d26e50c
JB
91992011-11-07 Joel Brobecker <brobecker@adacore.com>
9200
9201 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9202 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9203 dr_status_mirror and dr_control_mirror from debug_reg_state.
9204 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9205 (i386_initial_stuff): Remove use of deleted globals.
9206 (i386_get_thread_context, i386_set_thread_context,
9207 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9208 from debug_reg_state.
9209
a59306a3
YQ
92102011-11-05 Yao Qi <yao@codesourcery.com>
9211
9212 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9213 address as TPOINT's.
9214
3065dfb6
SS
92152011-11-02 Stan Shebs <stan@codesourcery.com>
9216
9217 * tracepoint.c (agent_mem_read_string): New function.
9218 (eval_agent_expr): Call it for tracenz.
9219 * server.c (handle_query): Report support for tracenz.
9220
fd0d8c7c
YQ
92212011-11-02 Yao Qi <yao@codesourcery.com>
9222
9223 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9224
609086b1
YQ
92252011-11-02 Yao Qi <yao@codesourcery.com>
9226
9227 * target.h: Fix a typo in comment.
9228
b9fd1791
PA
92292011-10-31 Pedro Alves <pedro@codesourcery.com>
9230
9231 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9232 clobber the breakpoints' shadows with fast tracepoint jumps.
9233 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9234 * target.c (write_inferior_memory): Also pass MYADDR down to
9235 check_mem_write.
9236
03583c20
UW
92372011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9238
9239 * configure.ac: Check support for personality routine.
9240 * configure: Regenerate.
9241 * config.in: Likewise.
9242 * linux-low.c: Include <sys/personality.h>.
9243 Define ADDR_NO_RANDOMIZE if necessary.
9244 (linux_create_inferior): Disable address space randomization when
9245 forking inferior, if requested.
9246 (linux_supports_disable_randomization): New function.
9247 (linux_target_ops): Install it.
9248 * server.h (disable_randomization): Declare.
9249 * server.c (disable_randomization): New global variable.
9250 (handle_general_set): Handle QDisableRandomization.
9251 (handle_query): Likewise for qSupported.
9252 (main): Support --disable-randomization and --no-disable-randomization
9253 command line arguments.
9254 * target.h (struct target_ops): Add supports_disable_randomization.
9255 (target_supports_disable_randomization): New macro.
9256
723b724b
MF
92572011-09-29 Mike Frysinger <vapier@gentoo.org>
9258
9259 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9260 ifdef check.
9261 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9262 [!PT_GETDSBT] (target_loadmap): New definition.
9263 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9264 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9265 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9266 and PT_GETDSBT to LINUX_LOADMAP.
9267 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9268 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9269
55329a5c 92702011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9271
9272 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9273 (arm_linux_hwbp_cap): New static variable.
9274 (arm_linux_get_hwbp_cap): Replace by ...
9275 (arm_linux_init_hwbp_cap): ... this new function.
9276 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9277 (arm_linux_get_hw_watchpoint_count): Likewise.
9278 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9279 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9280 (arm_prepare_to_resume): Use perror_with_name instead of error.
9281
55329a5c 92822011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9283
9284 * linux-arm-low.c: Include <signal.h>.
9285 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9286 (struct arm_linux_hwbp_cap): New data type.
9287 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9288 (struct arm_linux_hw_breakpoint): New data type.
9289 (MAX_BPTS, MAX_WPTS): Define.
9290 (struct arch_process_info, struct arch_lwp_info): New data types.
9291 (arm_linux_get_hwbp_cap): New function.
9292 (arm_linux_get_hw_breakpoint_count): Likewise.
9293 (arm_linux_get_hw_watchpoint_count): Likewise.
9294 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9295 (arm_hwbp_control_initialize): Likewise.
9296 (arm_hwbp_control_is_enabled): Likewise.
9297 (arm_hwbp_control_is_initialized): Likewise.
9298 (arm_hwbp_control_disable): Likewise.
9299 (arm_linux_hw_breakpoint_equal): Likewise.
9300 (arm_linux_hw_point_initialize): Likewise.
9301 (struct update_registers_data): New data structure.
9302 (update_registers_callback: New function.
9303 (arm_insert_point): Likewise.
9304 (arm_remove_point): Likewise.
9305 (arm_stopped_by_watchpoint): Likewise.
9306 (arm_stopped_data_address): Likewise.
9307 (arm_new_process): Likewise.
9308 (arm_new_thread): Likewise.
9309 (arm_prepare_to_resume): Likewise.
9310 (the_low_target): Register arm_insert_point, arm_remove_point,
9311 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9312 arm_new_thread, and arm_prepare_to_resume.
9313
6b9801d4
SS
93142011-09-15 Stan Shebs <stan@codesourcery.com>
9315
9316 * server.h (struct emit_ops): Add compare-goto fields.
9317 * tracepoint.c (gdb_agent_op_sizes): New table.
9318 (emit_eq_goto): New function.
9319 (emit_ne_goto): New function.
9320 (emit_lt_goto): New function.
9321 (emit_le_goto): New function.
9322 (emit_gt_goto): New function.
9323 (emit_ge_goto): New function.
9324 (is_goto_target): New function.
9325 (compile_bytecodes): Recognize special cases of compare-goto
9326 combinations and call specialized emitters for them.
9327 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9328 (amd64_emit_ne_goto): New function.
9329 (amd64_emit_lt_goto): New function.
9330 (amd64_emit_le_goto): New function.
9331 (amd64_emit_gt_goto): New function.
9332 (amd64_emit_ge_goto): New function.
9333 (amd64_emit_ops): Add the new functions.
9334 (i386_emit_eq_goto): New function.
9335 (i386_emit_ne_goto): New function.
9336 (i386_emit_lt_goto): New function.
9337 (i386_emit_le_goto): New function.
9338 (i386_emit_gt_goto): New function.
9339 (i386_emit_ge_goto): New function.
9340 (i386_emit_ops): Add the new functions.
9341
bf15cbda
SS
93422011-09-08 Stan Shebs <stan@codesourcery.com>
9343
9344 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9345 (i386_emit_epilogue): Restore %ebx.
9346
943ca1dd
JZ
93472011-08-31 Jie Zhang <jzhang918@gmail.com>
9348
9349 * server.c (step_thread): Remove definition.
9350 (process_serial_event): Don't handle Hs.
9351 * server.h (step_thread): Remove declaration.
9352 * target.c (set_desired_inferior): Remove use of step_thread.
9353
e3deef73
LM
93542011-08-24 Luis Machado <lgustavo@codesourcery.com>
9355
9356 * linux-low.c: Include linux-procfs.h.
9357 (linux_attach_lwp_1): Update comments.
9358 (linux_attach): Scan for existing threads when attaching to a
9359 process that is the tgid.
9360 * Makefile.in: Update dependencies.
9361
13da1c97
LM
93622011-08-24 Luis Machado <lgustavo@codesourcery.com>
9363
9364 * configure.srv: Add linux-procfs.o dependencies.
9365
881127c9
YQ
93662011-08-14 Yao Qi <yao@codesourcery.com>
9367
9368 * target.h (struct target_ops): Fix indent.
9369 * win32-low.c (win32_target_ops): Fix comment.
9370
58dbd541
YQ
93712011-08-14 Andrew Jenner <andrew@codesourcery.com>
9372 Yao Qi <yao@codesourcery.com>
9373
9374 * Makefile.in (clean): Remove tic6x-*.c files.
9375 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9376 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9377 (tic6x-c64xp-linux.c): Likewise.
9378 * configure.srv: Add support for tic6x-*-uclinux.
9379 * linux-tic6x-low.c: New.
9380 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9381
78d85199
YQ
93822011-08-14 Andrew Stubbs <ams@codesourcery.com>
9383 Yao Qi <yao@codesourcery.com>
9384
9385 * target.h (struct target_ops): Add read_loadmap.
9386 * linux-low.c (struct target_loadseg): New type.
9387 (struct target_loadmap): New type.
9388 (linux_read_loadmap): New function.
9389 (linux_target_ops): Add linux_read_loadmap.
9390 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9391 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9392 to NULL.
78d85199 9393
a959a88d
EZ
93942011-08-05 Eli Zaretskii <eliz@gnu.org>
9395
9396 * win32-low.c: Include <stdint.h>.
9397
1ced966e
PA
93982011-07-22 Pedro Alves <pedro@codesourcery.com>
9399
9400 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9401 to the inferior here.
9402 (i386_remove_aligned_watchpoint): Ditto.
9403 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9404 fit part of the watchpoint in the debug registers.
9405 (i386_update_inferior_debug_regs): New.
9406 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9407 registers, and only update the inferior on success.
9408 (i386_low_remove_watchpoint): Ditto.
9409
d26e3629
KY
94102011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9411
9412 * linux-low.c (compare_ints, unique, list_threads, show_process,
9413 linux_core_of_thread): Delete.
9414 (linux_target_ops): Change linux_core_of_thread to
9415 linux_common_core_of_thread.
9416 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9417 * utils.c (malloc_failure): Change type of argument.
9418 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9419 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9420 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9421 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9422 (IPA_OBJS): Add common-utils-ipa.o.
9423 (ptid_h, linux_osdata_h): New macros.
9424 (server_h): Add common/common-utils.h, common/xml-utils.h,
9425 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9426 common/ptid.h.
9427 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9428 ptid.o, buffer.o): New rules.
9429 (linux-low.o): Add common/linux-osdata.h as a dependency.
9430 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9431 * configure.ac: Add AC_HEADER_DIRENT check.
9432 * config.in: Regenerate.
9433 * configure: Regenerate.
9434 * remote-utils.c (xml_escape_text): Delete.
9435 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9436 buffer_xml_printf): Move to common/buffer.c.
9437 * server.c (main): Remove call to initialize_inferiors.
9438 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9439 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9440 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9441 internal_error, gdb_assert, gdb_assert_fail): Delete.
9442 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9443 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9444 common/buffer.h.
9445 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9446 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9447 initialize_inferiors): Delete.
9448
2275a1a7
PA
94492011-07-20 Pedro Alves <pedro@codesourcery.com>
9450
9451 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9452 symbol error.
9453
0a5b1e09
PA
94542011-05-31 Pedro Alves <pedro@codesourcery.com>
9455
9456 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9457 assertion.
9458 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9459
6938fd34
YQ
94602011-05-26 Yao Qi <yao@codesourcery.com>
9461
9462 * Makefile.in (thread-db.o): Track dependence to
9463 common/gdb_thread_db.h.
9464 * thread-db.c: include gdb_thread_db.h from right place.
9465
b481f9e0
TT
94662011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9467
9468 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9469 __FILE__ and __LINE__ to internal_error.
9470
98a5dd13
DE
94712011-05-13 Doug Evans <dje@google.com>
9472
9473 * thread-db.c (try_thread_db_load_from_sdir): New function.
9474 (try_thread_db_load_from_dir): New function.
9475 (thread_db_load_search): Handle $sdir, ignore $pdir.
9476 Remove trying of system directories if search of
9477 libthread-db-search-path fails, that is now done via $sdir.
9478
d248b706
KY
94792011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9480
9481 * server.c (handle_query): Add EnableDisableTracepoints to the list
9482 of supported features.
43aaf8b6 9483 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9484 tracepoints.
43aaf8b6
PA
9485 (cmd_qtenable_disable): New.
9486 (cmd_qtstart): Install tracepoints even if disabled.
9487 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9488 receiving a QTEnable or QTDisable packet.
9489 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9490 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9491 tracepoints.
9492 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9493
84e578fb
DE
94942011-05-10 Doug Evans <dje@google.com>
9495
9496 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9497
71f55dd8
DE
94982011-05-04 Doug Evans <dje@google.com>
9499
9500 * linux-low.c (linux_join): Skip process lookup.
9501 * spu-low.c (spu_join): Ditto.
9502 * server.c (join_inferiors_callback): Delete.
9503 (process_serial_event): For 'D' packet (detach) call join_inferior
9504 directly.
9505
4d393d60
JM
95062011-05-04 Joseph Myers <joseph@codesourcery.com>
9507
9508 * README: Don't mention xscale*-*-linux*.
9509 * configure.srv (xscale*-*-linux*): Don't handle target.
9510
b00ad6ff
NF
95112011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9512
9513 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9514 casting pointers.
9515 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9516 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9517 (i386_emit_void_call_2): Likewise.
9518
af96c192
YQ
95192011-04-26 Yao Qi <yao@codesourcery.com>
9520
43aaf8b6
PA
9521 * linux-low.c: Move common macros to linux-ptrace.h.
9522 Include linux-ptrace.h.
af96c192
YQ
9523 * Makefile.in (linux_ptrace_h): New.
9524 (linux-low.o): Depends on linux-ptrace.h.
9525
03f2bd59
JK
95262011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9527
9528 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9529 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9530 (remote_prepare): New function with most of the TCP code from ...
9531 (remote_open): ... here. Detect PORT here unconditionally. Move also
9532 setting transport_is_reliable.
9533 * server.c (run_once): New variable.
9534 (gdbserver_usage): Document it.
9535 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9536 the first run if RUN_ONCE.
9537 * server.h (run_once, remote_prepare): New declarations.
9538
7a9dd1b2
TT
95392011-04-19 Tom Tromey <tromey@redhat.com>
9540
9541 * win32-low.c (handle_load_dll): Remove duplicate "the".
9542
81239425
PM
95432011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9544
9545 Remove support for old Cygwin 1.5 versions.
9546 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9547 function to avoid warning.
9548 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9549 warning.
9550
9e0627f1
PM
95512011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9552
9553 * gdbserver/server.h (Macro _): Define it if not available.
9554
588eebee
MS
95552011-03-14 Michael Snyder <msnyder@vmware.com>
9556
348af9f7 9557 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9558
43f70d4c
JB
95592011-03-10 Joel Brobecker <brobecker@adacore.com>
9560
9561 * Makefile.in (maintainer-clean realclean distclean): Remove
9562 "make ... subdir_do" command.
9563
348af9f7
MS
95642011-03-10 Michael Snyder <msnyder@vmware.com>
9565
9566 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9567
9568 * server.c (handle_v_run): Free alloced buffer on early return.
9569
e637a4f5
YQ
95702011-03-09 Yao Qi <yao@codesourcery.com>
9571
9572 Revert:
9573 2011-03-04 Yao Qi <yao@codesourcery.com>
9574
9575 * Makefile.in: Remove GNU make feature --directory.
9576
9577 2011-03-05 Yao Qi <yao@codesourcery.com>
9578
9579 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9580 (subdir_do): New make target. Copied from gdb/Makefile.
9581 (maintainer-clean, realclean, distclean, clean): Call corresponding
9582 make targets in common/Makefile.
9583
9584 2011-02-11 Yao Qi <yao@codesourcery.com>
9585
9586 * configure.ac: Call AC_PROG_RANLIB.
9587 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9588 * configure: Regenerate.
9589
e6edda56
JK
95902011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9591
9592 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9593
e5141119
JB
95942011-03-06 Yao Qi <yao@codesourcery.com>
9595
9596 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9597
64794aa4
JB
95982011-03-05 Yao Qi <yao@codesourcery.com>
9599
9600 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9601 (subdir_do): New make target. Copied from gdb/Makefile.
9602 (maintainer-clean, realclean, distclean, clean): Call corresponding
9603 make targets in common/Makefile.
9604
7a762829
YQ
96052011-03-04 Yao Qi <yao@codesourcery.com>
9606
9607 * Makefile.in: Remove GNU make feature --directory.
9608
348af9f7
MS
96092011-03-04 Michael Snyder <msnyder@vmware.com>
9610
9611 * server.c (queue_stop_reply): Call xmalloc not malloc.
9612
96132011-03-02 Michael Snyder <msnyder@vmware.com>
9614
9615 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9616
9f72fee2
MS
96172011-02-28 Michael Snyder <msnyder@vmware.com>
9618
588eebee
MS
9619 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9620 (cmd_qtframe): Ditto.
9621 (cmd_qtbuffer): Ditto.
9622 (cmd_bigqtbuffer): Ditto.
9623
9f72fee2
MS
9624 * utils.c (decimal2str): Initialize 'width' to nine, then
9625 don't mess with it.
9626
8040bd49
UW
96272011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9628
9629 * hostio.c (require_data): Free *data, not data.
9630
7e52cbd0
JK
96312011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9632
9633 * hostio.c (require_data): Use free, not xfree.
9634
9130f83e
MS
96352011-02-27 Michael Snyder <msnyder@vmware.com>
9636
4b812f4e
MS
9637 * server.c (handle_query): Discard unused value.
9638
9130f83e
MS
9639 * hostio.c (require_data): Free malloc memory before returning
9640 error.
9641
69d37113
MS
96422011-02-26 Michael Snyder <msnyder@vmware.com>
9643
9644 * linux-low.c (list_threads): Call closedir for dirent.
9645
35f5825a
MS
96462011-02-27 Michael Snyder <msnyder@vmware.com>
9647
2a589cef
MS
9648 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9649 a case statement falls through.
9650
0adea5f7
MS
9651 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9652
35f5825a
MS
9653 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9654 in comparison.
9655
238f1c74
MS
96562011-02-26 Michael Snyder <msnyder@vmware.com>
9657
9658 * utils.c (decimal2str): Eliminate dead code and dead param.
9659 (pulongest): Drop dead param from call to decimal2str.
9660 (plongest): Ditto.
9661
633ff500
JB
96622011-02-24 Joel Brobecker <brobecker@adacore.com>
9663
9664 Revert the following patch (not approved yet):
9665 2011-02-21 Hui Zhu <teawater@gmail.com>
9666 * tracepoint.c (tp_printf): New function.
9667 (eval_agent_expr): Handle gdb_agent_op_printf.
9668
f9c6ff72
HZ
96692011-02-21 Hui Zhu <teawater@gmail.com>
9670
9671 * tracepoint.c (tp_printf): New function.
9672 (eval_agent_expr): Handle gdb_agent_op_printf.
9673
94d5e490
TT
96742011-02-18 Tom Tromey <tromey@redhat.com>
9675
9676 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9677 (tracepoint.o): Likewise.
9678 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9679 (gdb_agent_op_names): Likewise.
9680
c7f96d2b
TT
96812011-02-18 Tom Tromey <tromey@redhat.com>
9682
9683 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9684 gdb_agent_op_rot>: New constants.
9685 (gdb_agent_op_names): Add pick and roll.
9686 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9687 cases.
9688
0feedb2c
JK
96892011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9690
9691 * aclocal.m4: Regenerated with aclocal-1.11.1.
9692
b3b9301e
PA
96932011-02-14 Pedro Alves <pedro@codesourcery.com>
9694
9695 * server.c (handle_qxfer_traceframe_info): New.
9696 (qxfer_packets): Register "traceframe-info".
9697 (handle_query): Report support for qXfer:traceframe-info:read+.
9698 * tracepoint.c (match_blocktype): New.
9699 (traceframe_find_block_type): Rename to ...
9700 (traceframe_walk_blocks): ... this. Add callback filter argument,
9701 and use it.
9702 (traceframe_find_block_type): New, reimplemented on top of
9703 traceframe_walk_blocks.
9704 (build_traceframe_info_xml): New.
9705 (traceframe_read_info): New.
9706 * server.h (traceframe_read_info): Declare.
9707
4f3e6fb7
YQ
97082011-02-11 Yao Qi <yao@codesourcery.com>
9709
9710 * configure.ac: Call AC_PROG_RANLIB.
9711 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9712 * configure: Regenerate.
9713
764880b7
PA
97142011-02-07 Pedro Alves <pedro@codesourcery.com>
9715
9716 * server.c (gdb_read_memory): Change return semantics to allow
9717 partial transfers.
9718 (handle_search_memory_1): Adjust.
9719 (process_serial_event) <'m' packet>: Handle partial transfers.
9720 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9721
1c79eb8a
PA
97222011-01-28 Pedro Alves <pedro@codesourcery.com>
9723
9724 * regcache.c (init_register_cache): Initialize
9725 regcache->register_status.
9726 (free_register_cache): Release regcache->register_status.
9727 (regcache_cpy): Copy register_status.
9728 (registers_to_string): Print 'x's for unavailable registers.
9729 (supply_register): Mark the register's status valid or
9730 unavailable, depending on whether a buffer was passed in or not.
9731 (supply_register_zeroed): New.
9732 (supply_regblock): Mark the registers' status valid or
9733 unavailable, depending on whether a buffer was passed in or not.
9734 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9735 (struct regcache): New `register_status' field.
9736 (supply_register_zeroed): Declare.
9737 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9738 supply_register_zeroed, rather than passing a NULL buffer to
9739 supply_register.
9740 * tracepoint.c (fetch_traceframe_registers): Update comment.
9741
85724a0e
PA
97422011-01-28 Pedro Alves <pedro@codesourcery.com>
9743
9744 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9745 buffer explicit.
9746
d08aafef
PA
97472011-01-25 Pedro Alves <pedro@codesourcery.com>
9748
9749 * server.h (decode_xfer_write): Change prototype.
9750 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9751 and don't extract the annex here.
9752 * server.c (decode_xfer_read): Remove `annex' parameter,
9753 and don't extract the annex here.
9754 (decode_xfer): New.
9755 (struct qxfer): New.
9756 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9757 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9758 (handle_qxfer_statictrace): New functions, abstracted out from
9759 handle_query, and made to use the struct qxfer interface.
9760 (handle_threads_qxfer_proper): Rename to ...
9761 (handle_qxfer_threads_proper): ... this.
9762 (handle_threads_qxfer): Rename to ...
9763 (handle_qxfer_threads): ... this. Adjust.
9764 (qxfer_packets): New array.
9765 (handle_qxfer): New function.
9766 (handle_query): Use handle_qxfer.
9767
493e2a69
MS
97682011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9769
9770 * gdbreplay.c: Shorten lines of >= 80 columns.
9771 * linux-low.c: Ditto.
9772 * linux-ppc-low.c: Ditto.
9773 * linux-s390-low.c: Ditto.
9774 * linux-sparc-low.c: Ditto.
9775 * linux-x86-low.c: Ditto.
9776 * linux-xtensa-low.c: Ditto.
9777 * mem-break.c: Ditto.
9778 * nto-low.c: Ditto.
9779 * regcache.h: Ditto.
9780 * remote-utils.c: Ditto.
9781 * server.c: Ditto.
9782 * server.h: Ditto.
9783 * thread-db.c: Ditto.
9784 * tracepoint.c: Ditto.
9785 * utils.c: Ditto.
9786 * win32-low.h: Ditto.
9787
44944448
JB
97882011-01-05 Joel Brobecker <brobecker@adacore.com>
9789
9790 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9791 update.
9792
71ce852c
JB
97932011-01-01 Joel Brobecker <brobecker@adacore.com>
9794
9795 * server.c (gdbserver_version): Update copyright year in version
9796 output.
9797 * gdbreplay.c (gdbreplay_version): Ditto.
9798
eb826dc6
MF
97992010-12-29 Jie Zhang <jie.zhang@analog.com>
9800
9801 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9802 * linux-bfin-low.c: New file.
9803 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9804 PT_DATA_ADDR for BFIN targets.
9805 * Makefile.in (SFILES): Add linux-bfin-low.c.
9806 (clean): Remove reg-bfin.c.
9807 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9808 * README: Mention supported Blackfin targets.
9809
39ab222a
MF
98102010-12-23 Mike Frysinger <vapier@gentoo.org>
9811
9812 * .gitignore: New file.
9813
a1f2ce7d
MF
98142010-11-16 Mike Frysinger <vapier@gentoo.org>
9815
9816 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9817
f474844c
JZ
98182010-10-22 Jie Zhang <jie@codesourcery.com>
9819
9820 * Makefile.in: Add FLAGS_TO_PASS variable.
9821 (install): Remove dependency of install-only and recursively
9822 invoke make for install-only.
9823
f1048712
DE
98242010-10-04 Doug Evans <dje@google.com>
9825
9826 * Makefile.in (uninstall): Use $(DESTDIR).
9827
b53a1623
PA
98282010-09-24 Pedro Alves <pedro@codesourcery.com>
9829
e6ee044d
PA
9830 PR gdb/11842
9831
b53a1623
PA
9832 * linux-x86-low.c (compat_siginfo_from_siginfo)
9833 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9834 si_code is < 0. Check for si_code == SI_TIMER before checking for
9835 si_code < 0.
9836
fa1bd1e4
JB
98372010-09-13 Joel Brobecker <brobecker@adacore.com>
9838
9839 * lynx-i386-low.c: New file.
9840 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9841
47fac8f8
JB
98422010-09-13 Joel Brobecker <brobecker@adacore.com>
9843
9844 * lynx-low.c (ptrace_request_to_str): Remove handling for
9845 request values that have been removed in LynxOS 5.x.
9846
1adfc54d
JB
98472010-09-13 Joel Brobecker <brobecker@adacore.com>
9848
9849 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9850 <ptrace.h>
9851
c2a66c29
NS
98522010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9853
9854 * configure.ac: Add --enable-inprocess-agent option.
9855 * configure: Rebuilt.
9856
32fcada3
YQ
98572010-09-06 Yao Qi <yao@codesourcery.com>
9858
9859 * linux-low.c (linux_kill): Remove unused variable.
9860 (linux_stabilize_threads): Likewise.
9861 * server.c (start_inferior): Likewise.
9862 (queue_stop_reply_callback): Likewise.
9863 * tracepoint.c (do_action_at_tracepoint): Likewise.
9864
0cccb683
YQ
98652010-09-06 Yao Qi <yao@codesourcery.com>
9866
9867 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9868 on return.
9869
423ec54c
JK
98702010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9871
9872 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9873
12ac6819
PA
98742010-09-06 Pedro Alves <pedro@codesourcery.com>
9875
9876 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9877 "$(IPA_DEPFILES)".
9878
8ed54b31
JB
98792010-09-01 Joel Brobecker <brobecker@adacore.com>
9880
9881 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9882 gdbserver/lynx-ppc-low.c: New files.
9883 * Makefile.in (lynx_low_h): New variable.
9884 (lynx-low.o, lynx-ppc-low.o): New rules.
9885 * configure.ac: On LynxOS, link with -lnetinet.
9886 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9887 * configure: regenerate.
9888
bb0116a4
JB
98892010-09-01 Joel Brobecker <brobecker@adacore.com>
9890
9891 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9892 * configure.ac: Add check for vasprintf and vsnprintf.
9893 * configure, config.in: Regenerate.
9894 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9895
a778ab81 98962010-09-01 Joel Brobecker <brobecker@adacore.com>
9897
9898 * gdbreplay.c: Move include of alloca.h up, next to include of
9899 malloc.h.
9900 * server.h: Add include of malloc.h.
9901 * mem-break.c: Remove include of malloc.h.
9902 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9903
8b034a19 99042010-09-01 Joel Brobecker <brobecker@adacore.com>
9905
9906 * Makefile.in (memmem.o): Build with -Wno-error.
9907
99082010-09-01 Joel Brobecker <brobecker@adacore.com>
9909
9910 * utils.c (xsnprintf): Make non-static.
9911 * server.h: Add xsnprintf declaration.
9912 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9913 replace calls to snprintf by calls to xsnprintf throughout.
9914
99152010-09-01 Joel Brobecker <brobecker@adacore.com>
9916
9917 * configure.ac: Add configure check for alloca.
9918 * configure, config.in: Regenerate.
9919 * server.h: Include alloca.h if it exists.
9920 * gdbreplay.c: Include alloca.h if it exists.
9921
1a981360
PA
99222010-08-28 Pedro Alves <pedro@codesourcery.com>
9923
9924 * linux-low.c (__SIGRTMIN): Define if not already defined.
9925 (linux_create_inferior): Check for __ANDROID__ rather than
9926 __SIGRTMIN.
9927 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9928 are already deferred.
9929 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9930 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9931 stopped and already has a pending signal to report.
9932 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9933 a pending signal to report or is moving out of a jump pad.
9934 (linux_init_signals): Check for __ANDROID__ rather than
9935 __SIGRTMIN.
9936
b4d51a55
PA
99372010-08-28 Pedro Alves <pedro@codesourcery.com>
9938
9939 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9940 debug_threads check. Avoid a linear search when not doing debug
9941 output.
9942
ec48365d
PA
99432010-08-27 Pedro Alves <pedro@codesourcery.com>
9944
9945 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9946 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9947 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9948 (process_event): Change local fd's type to gdb_fildes_t.
9949 (create_file_handler): Adjust prototype.
9950 (delete_file_handler): Adjust prototype.
9951 (handle_file_event): Adjust prototype. Use pfildes.
9952 (create_file_event): Adjsut prototype.
9953 * remote-utils.c (remote_desc, listen_desc): Change type to
9954 gdb_fildes_t.
9955 * server.h: New gdb_fildes_t typedef.
9956 [USE_WIN32API]: Include winsock2.h.
9957 (delete_file_handler, add_file_handler): Adjust prototypes.
9958 (pfildes): Declare.
9959 * utils.c (pfildes): New.
9960
854d88f0
PA
99612010-08-27 Pedro Alves <pedro@codesourcery.com>
9962
9963 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9964 * configure: Regenerate.
9965
0146f85b
PA
99662010-08-27 Pedro Alves <pedro@codesourcery.com>
9967
9968 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9969 (linux_done_accessing_memory): ... this.
9970 (linux_target_ops): Adjust.
9971 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9972 * nto-low.c (nto_target_ops): Adjust comment.
9973 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9974 * spu-low.c (spu_target_ops): Adjust comment.
9975 * target.h (target_ops): Rename unprepare_to_access_memory field
9976 to done_accessing_memory.
9977 (unprepare_to_access_memory): Rename to ...
9978 (done_accessing_memory): ... this.
9979
90d74c30
PA
99802010-08-26 Pedro Alves <pedro@codesourcery.com>
9981
9982 * linux-low.c (linux_prepare_to_access_memory): New.
9983 (linux_unprepare_to_access_memory): New.
9984 (linux_target_ops): Install them.
9985 * server.c (read_memory): Rename to ...
9986 (gdb_read_memory): ... this. Use
9987 prepare_to_access_memory/prepare_to_access_memory.
9988 (write_memory): Rename to ...
9989 (gdb_write_memory): ... this. Use
9990 prepare_to_access_memory/prepare_to_access_memory.
9991 (handle_search_memory_1): Adjust.
9992 (process_serial_event): Adjust.
9993 * target.h (struct target_ops): New fields
9994 prepare_to_access_memory and unprepare_to_access_memory.
9995 (prepare_to_access_memory, unprepare_to_access_memory): New.
9996 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9997 prepare_to_access_memory/prepare_to_access_memory.
9998 * nto-low.c (nto_target_ops): Adjust.
9999 * spu-low.c (spu_target_ops): Adjust.
10000 * win32-low.c (win32_target_ops): Adjust.
10001
fd467969
PA
100022010-08-26 Pedro Alves <pedro@codesourcery.com>
10003
10004 * Makefile.in (WARN_CFLAGS): Get it from configure.
10005 (WERROR_CFLAGS): New.
10006 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10007 * configure.ac: Introduce --enable-werror, which adds -Werror to
10008 the compiler command line. Enabled by default. Disable with
10009 --disable-werror. Add -Wdeclaration-after-statement
10010 Wpointer-arith and -Wformat-nonliteral to warning flags.
10011 * configure: Regenerate.
10012
331e2f5f
PA
100132010-08-26 Pedro Alves <pedro@codesourcery.com>
10014
10015 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10016
e581f2b4
PA
100172010-08-26 Pedro Alves <pedro@codesourcery.com>
10018
10019 * gdbreplay.c (remote_error): New.
10020 (gdbchar): New.
10021 (expect): Use gdbchar. Check for error reading from GDB.
10022 Clarify sync error output.
10023 (play): Check for errors writing to GDB.
10024 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10025 * remote-utils.c (getpkt): Check for errors writing to the remote
10026 descriptor.
10027
3c11dd79
PA
100282010-08-25 Pedro Alves <pedro@codesourcery.com>
10029
10030 * linux-low.c (linux_wait_1): Move non-debugging code out of
10031 `debug_threads' control.
10032
d20a8ad9
PA
100332010-08-25 Pedro Alves <pedro@codesourcery.com>
10034
10035 * linux-low.c (linux_wait_1): Don't set last_status here.
10036 * server.c (push_event, queue_stop_reply_callback): Assert we're
10037 not pushing a TARGET_WAITKIND_IGNORE event.
10038 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10039 (myresume, handle_target_event): Set the thread's last_resume_kind
10040 and last_status from the target returned status.
10041
964e4306
PA
100422010-08-25 Pedro Alves <pedro@codesourcery.com>
10043
10044 PR threads/10729
10045
10046 * linux-x86-low.c (update_debug_registers_callback): New.
10047 (i386_dr_low_set_addr): Use it.
10048 (i386_dr_low_get_addr): New.
10049 (i386_dr_low_set_control): Use update_debug_registers_callback.
10050 (i386_dr_low_get_control): New.
10051 (i386_dr_low_get_status): Adjust.
10052 * linux-low.c (linux_stop_lwp): New.
10053 * linux-low.h (linux_stop_lwp): Declare.
10054
10055 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10056 argument instead of a i386_debug_reg_state.
10057 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10058 a i386_debug_reg_state.
10059 (i386_insert_aligned_watchpoint): Adjust.
10060 (i386_remove_aligned_watchpoint): Adjust.
10061 (i386_low_stopped_data_address): Read the debug registers from the
10062 inferior instead of from the mirrors.
10063 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10064 (i386_dr_low_get_addr): Declare.
10065 (i386_dr_low_get_control): Declare.
10066 (i386_dr_low_get_status): Change prototype.
10067
10068 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10069 (i386_dr_low_get_addr): New.
10070 (i386_dr_low_get_control): New.
10071 (i386_dr_low_get_status): Adjust prototype. Return
10072 dr_status_mirror.
10073 (i386_initial_stuff): Clear dr_status_mirror and
10074 dr_control_mirror.
10075 (i386_get_thread_context): Adjust.
10076 (i386_set_thread_context): Adjust.
10077 (i386_thread_added): Adjust.
10078
5f21a75b
PA
100792010-08-24 Pedro Alves <pedro@codesourcery.com>
10080
10081 * linux-low.h (linux_thread_area): Delete declaration.
10082
3e4c1235
TS
100832010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10084
10085 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10086 after its termination.
10087
1971b033
PA
100882010-08-09 Pedro Alves <pedro@codesourcery.com>
10089
10090 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10091 (gdb_wants_all_stopped): Delete.
10092 (linux_wait_1): Don't call them.
10093 * server.c (handle_v_cont): Tag all threads as want-stopped.
10094 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10095 stopped as "client-wants-stopped".
10096
310444ac
PA
100972010-07-31 Pedro Alves <pedro@codesourcery.com>
10098
10099 * Makefile.in (signals_h): New.
10100 (server_h): Depend on it.
10101 (server.o): Don't depend on $(signals_def).
10102 (signals.o): Depend on $(signals_def).
10103
a19cae16
JK
101042010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10105
10106 * Makefile.in (signals_def): New.
10107 (server_h): Append include/gdb/signals.h and signals_def.
10108 (server.o): Append signals_def.
10109
30d50328
JK
101102010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10111
10112 * server.c (handle_target_event): Use target_signal_to_host for
10113 resume_info.sig initialization.
10114 * target.h (struct thread_resume) <sig>: New comment.
10115
5c3216e2
OS
101162010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10117
c6f46ca0
OS
10118 * server.c (handle_query): strcpy() the returned string from paddress()
10119 instead of sprintf().
5c3216e2
OS
10120 * utils.c (paddress): Return phex_nz().
10121
6bd31874
JB
101222010-07-07 Joel Brobecker <brobecker@adacore.com>
10123
10124 * server.c (handle_v_cont): Call mourn_inferior if process
10125 just exited.
10126 (myresume): Likewise.
10127
0fb4aa4b
PA
101282010-07-01 Pedro Alves <pedro@codesourcery.com>
10129
10130 Static tracepoints, and integration with UST.
10131
10132 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10133 * mem-break.c (uninsert_all_breakpoints)
10134 (reinsert_all_breakpoints): New.
10135 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10136 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10137 (gdb_agent_ust_loaded, helper_thread_id)
10138 (gdb_agent_helper_thread_id): New macros.
10139 (struct ipa_sym_addresses): Add addr_ust_loaded,
10140 addr_helper_thread_id, addr_cmd_buf.
10141 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10142 (in_process_agent_loaded_ust): New.
10143 (write_e_ust_not_loaded): New.
10144 (maybe_write_ipa_ust_not_loaded): New.
10145 (struct collect_static_trace_data_action): New.
10146 (enum tracepoint_type) <static_tracepoint>: New.
10147 (struct tracepoint) <handle>: Mention static tracepoints.
10148 (struct static_tracepoint_ctx): New.
10149 (CMD_BUF_SIZE): New.
10150 (add_tracepoint_action): Handle static tracepoint actions.
10151 (unprobe_marker_at): New.
10152 (clear_installed_tracepoints): Handle static tracepoints.
10153 (cmd_qtdp): Handle static tracepoints.
10154 (probe_marker_at): New.
10155 (cmd_qtstart): Handle static tracepoints.
10156 (response_tracepoint): Handle static tracepoints.
10157 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10158 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10159 (get_context_regcache): Handle static tracepoints.
10160 (do_action_at_tracepoint): Handle static tracepoint actions.
10161 (traceframe_find_block_type): Handle static trace data blocks.
10162 (traceframe_read_sdata): New.
10163 (download_tracepoints): Download static tracepoint actions.
10164 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10165 (GDB_PROBE_NAME): New.
10166 (ust_ops): New.
10167 (GET_UST_SYM): New.
10168 (USTF): New.
10169 (dlsym_ust): New.
10170 (ust_marker_to_static_tracepoint): New.
10171 (gdb_probe): New.
10172 (collect_ust_data_at_tracepoint): New.
10173 (gdb_ust_probe): New.
10174 (UNIX_PATH_MAX, SOCK_DIR): New.
10175 (gdb_ust_connect_sync_socket): New.
10176 (resume_thread, stop_thread): New.
10177 (run_inferior_command): New.
10178 (init_named_socket): New.
10179 (gdb_ust_socket_init): New.
10180 (cstr_to_hexstr): New.
10181 (next_st): New.
10182 (first_marker, next_marker): New.
10183 (response_ust_marker): New.
10184 (cmd_qtfstm, cmd_qtsstm): New.
10185 (unprobe_marker_at, probe_marker_at): New.
10186 (cmd_qtstmat, gdb_ust_thread): New.
10187 (gdb_ust_init): New.
10188 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10189 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10190 (ST_REGENTRY): New.
10191 (x86_64_st_collect_regmap): New.
10192 (X86_64_NUM_ST_COLLECT_GREGS): New.
10193 (AMD64_RIP_REGNUM): New.
10194 (supply_static_tracepoint_registers): New.
10195 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10196 (ST_REGENTRY): New.
10197 (i386_st_collect_regmap): New.
10198 (i386_NUM_ST_COLLECT_GREGS): New.
10199 (supply_static_tracepoint_registers): New.
10200 * server.c (handle_query): Handle qXfer:statictrace:read.
10201 <qSupported>: Report support for StaticTracepoints, and
10202 qXfer:statictrace:read features.
10203 * server.h (traceframe_read_sdata)
10204 (supply_static_tracepoint_registers): Declare.
10205 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10206 (unpack_varlen_hex): Include in IPA build.
10207 * Makefile.in (ustlibs, ustinc): New.
10208 (IPA_OBJS): Add remote-utils-ipa.o.
10209 ($(IPA_LIB)): Link -ldl and -lpthread.
10210 (UST_CFLAGS): New.
10211 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10212 * config.in, configure: Regenerate.
10213
9e4344e5
PA
102142010-06-20 Ian Lance Taylor <iant@google.com>
10215 Pedro Alves <pedro@codesourcery.com>
10216
10217 * linux-x86-low.c (always_true): Delete.
10218 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10219 trying to fool the compiler with always_true.
10220
c6beb2cb
PA
102212010-06-20 Pedro Alves <pedro@codesourcery.com>
10222
10223 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10224 conditions in gdbserver.
10225
d2ed6730
UW
102262010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10227
10228 * spu-low.c (spu_read_memory): Wrap around local store limit.
10229 (spu_write_memory): Likewise.
10230
4e29fb54
PA
102312010-06-15 Pedro Alves <pedro@codesourcery.com>
10232
10233 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10234 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10235 LONGEST uses.
10236 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10237 uses.
10238 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10239 uses with LONGEST uses.
10240
6a271cae
PA
102412010-06-14 Stan Shebs <stan@codesourcery.com>
10242 Pedro Alves <pedro@codesourcery.com>
10243
10244 Bytecode compiler.
10245
10246 * linux-x86-low.c: Include limits.h.
10247 (add_insns): New.
10248 (always_true): New.
10249 (EMIT_ASM): New.
10250 (EMIT_ASM32): New.
10251 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10252 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10253 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10254 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10255 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10256 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10257 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10258 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10259 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10260 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10261 (amd64_emit_void_call_2): New.
10262 (amd64_emit_ops): New.
10263 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10264 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10265 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10266 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10267 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10268 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10269 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10270 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10271 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10272 (i386_emit_stack_adjust, i386_emit_int_call_1)
10273 (i386_emit_void_call_2): New.
10274 (i386_emit_ops): New.
10275 (x86_emit_ops): New.
10276 (the_low_target): Install x86_emit_ops.
10277 * server.h (struct emit_ops): New.
10278 (get_raw_reg_func_addr): Declare.
10279 (current_insn_ptr, emit_error): Declare.
10280 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10281 (set_trace_state_variable_value): New defines.
10282 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10283 addr_get_trace_state_variable_value and
10284 addr_set_trace_state_variable_value.
10285 (symbol_list): New fields for get_raw_reg,
10286 get_trace_state_variable_value and set_trace_state_variable_value.
10287 (condfn): New typedef.
10288 (struct tracepoint): New field `compiled_cond'.
10289 (do_action_at_tracepoint): Clear compiled_cond.
10290 (get_trace_state_variable_value, set_trace_state_variable_value):
10291 Export in the IPA.
10292 (condition_true_at_tracepoint): If there's a compiled condition,
10293 run that.
10294 (current_insn_ptr, emit_error): New globals.
10295 (struct bytecode_address): New.
10296 (get_raw_reg_func_addr): New.
10297 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10298 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10299 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10300 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10301 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10302 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10303 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10304 (compile_tracepoint_condition, compile_bytecodes): New.
10305 * target.h (emit_ops): Forward declare.
10306 (struct target_ops): New field emit_ops.
10307 (target_emit_ops): New.
10308 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10309 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10310 * linux-low.c (linux_emit_ops): New.
10311 (linux_target_ops): Install it.
10312 * linux-low.h (struct linux_target_ops): New field emit_ops.
10313
92b72907
UW
103142010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10315
10316 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10317 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10318
fa593d66
PA
103192010-06-01 Pedro Alves <pedro@codesourcery.com>
10320 Stan Shebs <stan@codesourcery.com>
10321
10322 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10323 (all): Depend on $(extra_libraries).
10324 (install-only): Install the IPA.
10325 (IPA_OBJS, IPA_LIB): New.
10326 (clean): Remove the IPA lib.
10327 (IPAGENT_CFLAGS): New.
10328 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10329 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10330 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10331 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10332 * configure.ac: Check for atomic builtins support in the compiler.
10333 (IPA_DEPFILES, extra_libraries): Define.
10334 * configure.srv (ipa_obj): Add description.
10335 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10336 (i[34567]86-*-linux*): Set ipa_obj.
10337 (x86_64-*-linux*): Set ipa_obj.
10338 * linux-low.c (stabilizing_threads): New.
10339 (supports_fast_tracepoints): New.
10340 (linux_detach): Stabilize threads before detaching.
10341 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10342 the lwp is either not stabilizing, or is moving out of a jump pad.
10343 (linux_fast_tracepoint_collecting): New.
10344 (maybe_move_out_of_jump_pad): New.
10345 (enqueue_one_deferred_signal): New.
10346 (dequeue_one_deferred_signal): New.
10347 (linux_wait_for_event_1): If moving out of a jump pad, defer
10348 pending signals to later.
10349 (linux_stabilize_threads): New.
10350 (linux_wait_1): Check if threads need moving out of jump pads, and
10351 do it if so.
10352 (stuck_in_jump_pad_callback): New.
10353 (move_out_of_jump_pad_callback): New.
10354 (lwp_running): New.
10355 (linux_resume_one_lwp): Handle moving out of jump pads.
10356 (linux_set_resume_request): Dequeue deferred signals.
10357 (need_step_over_p): Also step over fast tracepoint jumps.
10358 (start_step_over): Also uninsert fast tracepoint jumps.
10359 (finish_step_over): Also reinsert fast tracepoint jumps.
10360 (linux_install_fast_tracepoint_jump): New.
10361 (linux_target_ops): Install linux_stabilize_threads and
10362 linux_install_fast_tracepoint_jump_pad.
10363 * linux-low.h (linux_target_ops) <get_thread_area,
10364 install_fast_tracepoint_jump_pad>: New fields.
10365 (struct lwp_info) <collecting_fast_tracepoint,
10366 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10367 (linux_get_thread_area): Declare.
10368 * linux-x86-low.c (jump_insn): New.
10369 (x86_get_thread_area): New.
10370 (append_insns): New.
10371 (push_opcode): New.
10372 (amd64_install_fast_tracepoint_jump_pad): New.
10373 (i386_install_fast_tracepoint_jump_pad): New.
10374 (x86_install_fast_tracepoint_jump_pad): New.
10375 (the_low_target): Install x86_get_thread_area and
10376 x86_install_fast_tracepoint_jump_pad.
10377 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10378 (struct fast_tracepoint_jump): New.
10379 (fast_tracepoint_jump_insn): New.
10380 (fast_tracepoint_jump_shadow): New.
10381 (find_fast_tracepoint_jump_at): New.
10382 (fast_tracepoint_jump_here): New.
10383 (delete_fast_tracepoint_jump): New.
10384 (set_fast_tracepoint_jump): New.
10385 (uninsert_fast_tracepoint_jumps_at): New.
10386 (reinsert_fast_tracepoint_jumps_at): New.
10387 (set_breakpoint_at): Use write_inferior_memory.
10388 (uninsert_raw_breakpoint): Use write_inferior_memory.
10389 (check_mem_read): Mask out fast tracepoint jumps.
10390 (check_mem_write): Mask out fast tracepoint jumps.
10391 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10392 (set_fast_tracepoint_jump): Declare.
10393 (delete_fast_tracepoint_jump)
10394 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10395 (reinsert_fast_tracepoint_jumps_at): Declare.
10396 * regcache.c: Don't compile many functions when building the
10397 in-process agent library.
10398 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10399 the register buffer in the heap.
10400 (free_register_cache): If the register buffer isn't owned by the
10401 regcache, don't free it.
10402 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10403 pre-existing register caches.
10404 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10405 type.
10406 (convert_ascii_to_int): : Constify `from' parameter type.
10407 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10408 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10409 the needed buffer in-place.
10410 (relocate_instruction): New.
10411 * server.c (handle_query) <qSymbols>: If the target supports
10412 tracepoints, give it a chance of looking up symbols. Report
10413 support for fast tracepoints.
10414 (handle_status): Stabilize threads.
10415 (process_serial_event): Adjust.
10416 * server.h (struct fast_tracepoint_jump): Forward declare.
10417 (struct process_info) <fast_tracepoint_jumps>: New field.
10418 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10419 (decode_X_packet, decode_M_packet): Adjust.
10420 (relocate_instruction): Declare.
10421 (in_process_agent_loaded): Declare.
10422 (tracepoint_look_up_symbols): Declare.
10423 (struct fast_tpoint_collect_status): Declare.
10424 (fast_tracepoint_collecting): Declare.
10425 (force_unlock_trace_buffer): Declare.
10426 (handle_tracepoint_bkpts): Declare.
10427 (initialize_low_tracepoint)
10428 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10429 * target.h (struct target_ops) <stabilize_threads,
10430 install_fast_tracepoint_jump_pad>: New fields.
10431 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10432 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10433 [HAVE_STDINT_H]: Include stdint.h.
10434 (trace_debug_1): Rename to ...
10435 (trace_vdebug): ... this.
10436 (trace_debug): Rename to ...
10437 (trace_debug_1): ... this. Add `level' parameter.
10438 (trace_debug): New.
10439 (ATTR_USED, ATTR_NOINLINE): New.
10440 (IP_AGENT_EXPORT): New.
10441 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10442 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10443 (about_to_request_buffer_space, trace_buffer_is_full)
10444 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10445 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10446 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10447 (traceframe_write_count, traceframes_created)
10448 (trace_state_variables)
10449 New renaming defines.
10450 (struct ipa_sym_addresses): New.
10451 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10452 (symbol_list): New.
10453 (ipa_sym_addrs): New.
10454 (all_tracepoint_symbols_looked_up): New.
10455 (in_process_agent_loaded): New.
10456 (write_e_ipa_not_loaded): New.
10457 (maybe_write_ipa_not_loaded): New.
10458 (tracepoint_look_up_symbols): New.
10459 (debug_threads) [IN_PROCESS_AGENT]: New.
10460 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10461 (UNKNOWN_SIDE_EFFECTS): New.
10462 (stop_tracing): New.
10463 (flush_trace_buffer): New.
10464 (stop_tracing_bkpt): New.
10465 (flush_trace_buffer_bkpt): New.
10466 (read_inferior_integer): New.
10467 (read_inferior_uinteger): New.
10468 (read_inferior_data_pointer): New.
10469 (write_inferior_data_pointer): New.
10470 (write_inferior_integer): New.
10471 (write_inferior_uinteger): New.
10472 (struct collect_static_trace_data_action): Delete.
10473 (enum tracepoint_type): New.
10474 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10475 <actions_str, step_actions, step_actions_str>: Only include in
10476 GDBserver.
fa593d66
PA
10477 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10478 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10479 (tracepoints): Use IP_AGENT_EXPORT.
10480 (last_tracepoint): Don't include in the IPA.
10481 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10482 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10483 (alloced_trace_state_variables): New.
10484 (trace_state_variables): Use IP_AGENT_EXPORT.
10485 (traceframe_t): Delete unused variable.
10486 (circular_trace_buffer): Don't include in the IPA.
10487 (trace_buffer_start): Delete.
10488 (struct trace_buffer_control): New.
10489 (trace_buffer_free): Delete.
10490 (struct ipa_trace_buffer_control): New.
10491 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10492 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10493 New.
10494 (trace_buffer_ctrl): New.
10495 (TRACE_BUFFER_CTRL_CURR): New.
10496 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10497 Reimplement as macros.
10498 (trace_buffer_wrap): Delete.
10499 (traceframe_write_count, traceframe_read_count)
10500 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10501 (struct tracepoint_hit_ctx) <type>: New field.
10502 (struct fast_tracepoint_ctx): New.
10503 (memory_barrier): New.
10504 (cmpxchg): New.
10505 (record_tracepoint_error): Update atomically in the IPA.
10506 (clear_inferior_trace_buffer): New.
10507 (about_to_request_buffer_space): New.
10508 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10509 updating the same buffer.
10510 (add_tracepoint): Default the tracepoint's type to trap
10511 tracepoint, and orig_size to -1.
10512 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10513 internal variables.
10514 (create_trace_state_variable): New parameter `gdb'. Handle it.
10515 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10516 (cmd_qtdp): Handle fast tracepoints.
10517 (cmd_qtdv): Adjust.
10518 (max_jump_pad_size): New.
10519 (gdb_jump_pad_head): New.
10520 (get_jump_space_head): New.
10521 (claim_jump_space): New.
10522 (sort_tracepoints): New.
10523 (MAX_JUMP_SIZE): New.
10524 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10525 IPA.
10526 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10527 support. Upload fast traceframes, and delete internal IPA
10528 breakpoints.
10529 (stop_tracing_handler): New.
10530 (flush_trace_buffer_handler): New.
10531 (cmd_qtstop): Upload fast tracepoints.
10532 (response_tracepoint): Handle fast tracepoints.
10533 (tracepoint_finished_step): Upload fast traceframes. Set the
10534 tracepoint hit context's tracepoint type.
10535 (handle_tracepoint_bkpts): New.
10536 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10537 type. Add comment about fast tracepoints.
10538 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10539 non-existing action_str field.
10540 (get_context_regcache): Handle fast tracepoints.
10541 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10542 to the regcache.
10543 (fast_tracepoint_from_jump_pad_address): New.
10544 (fast_tracepoint_from_ipa_tpoint_address): New.
10545 (collecting_t): New.
10546 (force_unlock_trace_buffer): New.
10547 (fast_tracepoint_collecting): New.
10548 (collecting): New.
10549 (gdb_collect): New.
10550 (write_inferior_data_ptr): New.
10551 (target_tp_heap): New.
10552 (target_malloc): New.
10553 (download_agent_expr): New.
10554 (UALIGN): New.
10555 (download_tracepoints): New.
10556 (download_trace_state_variables): New.
10557 (upload_fast_traceframes): New.
10558 (IPA_FIRST_TRACEFRAME): New.
10559 (IPA_NEXT_TRACEFRAME_1): New.
10560 (IPA_NEXT_TRACEFRAME): New.
10561 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10562 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10563 (gdb_jump_pad_buffer_end): New.
10564 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10565 (initialize_tracepoint): Adjust.
10566 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10567 buffer. Initialize the low module.
10568 * utils.c (PREFIX, TOOLNAME): New.
10569 (malloc_failure): Use PREFIX.
10570 (error): In the IPA, an error causes an exit.
10571 (fatal, warning): Use PREFIX.
10572 (internal_error): Use TOOLNAME.
10573 (NUMCELLS): Increase to 10.
10574 * configure, config.in: Regenerate.
10575
d149dd1d
PA
105762010-06-01 Pedro Alves <pedro@codesourcery.com>
10577
10578 * server.c (handle_query) <qSupported>: Do two passes over the
10579 qSupported string to avoid nesting strtok.
10580
f6528abd
JK
105812010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10582
10583 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10584 (CDEPS): New.
10585 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10586 -Wl,--dynamic-list.
10587 * configure: Regenerate.
10588 * proc-service.list: New.
10589
ca2a87a0
JK
105902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10591
10592 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10593 New comment.
10594
363a6e9f
OS
105952010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10596
10597 * gdbreplay.c (remote_open): Check error return from socket() call by
10598 its equality to -1 not by it being negative.
10599 * remote-utils.c (remote_open): Likewise.
10600
d23b6cb1
PA
106012010-05-23 Pedro Alves <pedro@codesourcery.com>
10602
10603 * config.h: Regenerate.
10604
28d3cf85
MK
106052010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10606
10607 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10608 doesn't provide PTRACE_GET_THREAD_AREA.
10609
fea36a59
MK
106102010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10611
10612 * linux-m68k-low.c: Include <asm/ptrace.h>
10613 (ps_get_thread_area): Implement.
10614
24b066ba
DE
106152010-05-03 Doug Evans <dje@google.com>
10616
10617 * event-loop.c (struct callback_event): New struct.
10618 (callback_list): New global.
10619 (append_callback_event, delete_callback_event): New functions.
10620 (process_callback): New function.
10621 (start_event_loop): Call it.
10622 * remote-utils.c (NOT_SCHEDULED): Define.
10623 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10624 moved out of readchar.
10625 (readchar): Rewrite. Call reschedule before returning.
10626 (reset_readchar): New function.
10627 (remote_close): Call it.
10628 (process_remaining, reschedule): New functions.
10629 * server.h (callback_handler_func): New typedef.
10630 (append_callback_event, delete_callback_event): Declare.
10631
9836d6ea
PA
106322010-05-03 Pedro Alves <pedro@codesourcery.com>
10633
10634 * proc-service.c (ps_pglobal_lookup): Use
10635 thread_db_look_up_one_symbol.
10636 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10637 parameter. Use it instead of all_symbols_looked_up.
10638 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10639 field.
10640 (all_symbols_looked_up): Don't declare.
10641 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10642 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10643 field.
10644 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10645 Set all_symbols_looked_up here.
10646 (thread_db_look_up_one_symbol): New.
10647 (thread_db_get_tls_address): Adjust.
10648 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10649 thread_db object on the heap, and tentatively set it in the
10650 process structure.
10651 (thread_db_init): Don't set all_symbols_looked_up here.
10652 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10653
7984d532
PA
106542010-05-03 Pedro Alves <pedro@codesourcery.com>
10655
10656 * linux-low.c (linux_kill, linux_detach): Adjust.
10657 (status_pending_p_callback): Remove redundant statement. Check
10658 for !TARGET_WAITIKIND_IGNORE, instead of
10659 TARGET_WAITKIND_STOPPED.
10660 (handle_tracepoints): Make sure LWP is locked. Adjust.
10661 (linux_wait_for_event_1): Adjust.
10662 (linux_cancel_breakpoints): New.
10663 (unsuspend_one_lwp): New.
10664 (unsuspend_all_lwps): New.
10665 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10666 (send_sigstop_callback): Change return type to int, add new
10667 `except' parameter and handle it.
10668 (suspend_and_send_sigstop_callback): New.
10669 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10670 pass them down. If SUSPEND, also increment the lwp's suspend
10671 count.
10672 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10673 (need_step_over_p): Don't consider suspended LWPs.
10674 (start_step_over): Adjust.
10675 (proceed_one_lwp): Change return type to int, add new `except'
10676 parameter and handle it.
10677 (unsuspend_and_proceed_one_lwp): New.
10678 (proceed_all_lwps): Use find_inferior instead of
10679 for_each_inferior.
10680 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10681 also decrement the suspend count of LWPs. Pass `except' down,
10682 instead of hacking its suspend count.
10683 (linux_pause_all): Add `freeze' parameter. Adjust.
10684 (linux_unpause_all): New.
10685 (linux_target_ops): Install linux_unpause_all.
10686 * server.c (handle_status): Adjust.
10687 * target.h (struct target_ops): New fields `unpause_all' and
10688 `cancel_breakpoints'. Add new parameter to `pause_all'.
10689 (pause_all): Add new `freeze' parameter.
10690 (unpause_all): New.
10691 (cancel_breakpoints): New.
10692 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10693 cancel breakpoints.
10694 (cmd_qtstart): Pause threads.
10695 (stop_tracing): Pause threads, and cancel breakpoints.
10696 * win32-low.c (win32_target_ops): Adjust.
10697
e471f25b
PA
106982010-05-03 Pedro Alves <pedro@codesourcery.com>
10699
10700 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10701 the inferior right away from here...
10702 (linux_wait_1): ... to here, and adjust to check the thread's
10703 last_resume_kind instead of the lwp's step or stop_expected flags.
10704
1915ef4f
PA
107052010-05-02 Pedro Alves <pedro@codesourcery.com>
10706
10707 * README: Use consistent `GDB' and `GDBserver' spellings.
10708
f9e39928
PA
107092010-05-02 Pedro Alves <pedro@codesourcery.com>
10710
10711 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10712 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10713 (linux_detach_one_lwp): Assume the lwp is stopped.
10714 (any_thread_of): Delete.
10715 (linux_detach): Stop all lwps here. Don't blindly delete all
10716 breakpoints.
10717 (delete_lwp_callback): New.
10718 (linux_mourn): Delete all lwps of the process that is gone.
10719 (linux_wait_1): Don't delete the last lwp of the process here.
10720 * mem-break.h (mark_breakpoints_out): Declare.
10721 * mem-break.c (mark_breakpoints_out): New.
10722 (free_all_breakpoints): Use it.
10723 * server.c (handle_target_event): If the process is gone, mark
10724 breakpoints out.
10725 * thread-db.c (struct thread_db) <create_bp>: New field.
10726 (thread_db_enable_reporting): Fix prototype. Store a thread event
10727 breakpoint reference in the thread_db struct.
10728 (thread_db_load_search): Clear the thread_db object.
10729 (try_thread_db_load_1): Ditto.
10730 (switch_to_process): New.
10731 (disable_thread_event_reporting): Use it.
10732 (remove_thread_event_breakpoints): New.
10733 (thread_db_detach, thread_db_mourn): Use it.
10734
1e7fc18c
PA
107352010-05-01 Pedro Alves <pedro@codesourcery.com>
10736
10737 * linux-low.c (linux_enable_event_reporting): New.
10738 (linux_wait_for_event_1, handle_extended_wait): Use it.
10739
02fc4de7
PA
107402010-04-30 Pedro Alves <pedro@codesourcery.com>
10741
10742 * linux-low.c (linux_kill_one_lwp, linux_kill)
10743 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10744 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10745 SIGSTOP even if the LWP is stopped.
10746 (send_sigstop_callback): New.
10747 (stop_all_lwps): Use send_sigstop_callback instead.
10748 (linux_resume_one_thread): Adjust.
10749 (proceed_one_lwp): Still proceed an LWP that the client has
10750 requested to stop, if we haven't reported it as stopped yet. Make
10751 sure that LWPs the client want stopped, have a pending SIGSTOP.
10752
bc3b5632
DE
107532010-04-26 Doug Evans <dje@google.com>
10754
ae1ada35
DE
10755 * server.c (handle_general_set): Make static.
10756
bc3b5632
DE
10757 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10758 Print received char after testing for error/eof instead of before.
10759 (input_interrupt): Tweak comment.
10760
65730243
DE
107612010-04-23 Doug Evans <dje@google.com>
10762
10763 * server.c (start_inferior): Print inferior argv if --debug.
10764
a8ae7dc0
AR
107652010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10766
10767 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10768 * nto-x86-low.c: Include server.h
10769
1c07cc19
PM
107702010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10771
10772 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10773 be consistent with other sources of this directory.
10774 (init_registers_amd64): Correct name of source file of this function
10775 in the comment.
10776
e0a61e09
PM
107772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10778
10779 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10780 64-bit executables.
10781
54709339
PM
107822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10783
10784 * win32-i386-low.c: Add 64-bit support.
10785 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10786 (init_registers_amd64): Declare.
10787 (mappings): Add 64-bit version of array.
10788 (init_windows_x86): New function.
10789 (the_low_target): Change init_arch field to init_windows_x86.
10790
e8f0053d
PM
107912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10792
10793 * win32-low.c: Adapt to support also 64-bit architecture.
10794 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10795 (get_image_name): Use SIZE_T type for local variable `done'.
10796 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10797 (toolhelp_get_dll_name): Idem.
10798 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10799 Use uintptr_t typecast to avoid warning.
10800 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10801 (handle_exception): Use phex_nz to avoid warning.
10802 (win32_wait): Remove unused local variable `process'.
10803
c481e77e
PM
108042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10805
10806 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10807 `amd64-avx.o'.
10808
12ea4b69
PM
108092010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10810
10811 * configure.ac: Use `ws2_32' library for srv_mingw.
10812 * configure: Regenerate.
10813 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10814 * remote-utils.c: Likewise.
10815
f6d1620c
L
108162010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10817
10818 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10819 if __x86_64__ is defined.
10820
8e642873
PM
108212010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10822
10823 * configure: Regenerate.
10824
711e434b
PM
108252010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10826
10827 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10828 * target.h (target_ops): New get_tib_address field.
10829 * win32-low.h (win32_thread_info): Add thread_local_base field.
10830 * win32-low.c (child_add_thread): Add tlb argument.
10831 Set thread_local_base field to TLB.
10832 (get_child_debug_event): Adapt to child_add_thread change.
10833 (win32_get_tib_address): New function.
10834 (win32_target_ops): Set get_tib_address field to
10835 win32_get_tib_address.
10836 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10837
505106cd
PA
108382010-04-12 Pedro Alves <pedro@codesourcery.com>
10839
505106cd
PA
10840 * linux-low.c (linux_mourn): Also remove the process.
10841 * server.c (handle_target_event): Don't remove the process here.
10842 * nto-low.c (nto_mourn): New.
10843 (nto_target_ops): Install it.
10844 * spu-low.c (spu_mourn): New.
10845 (spu_target_ops): Install it.
10846 * win32-low.c (win32_mourn): New.
10847 (win32_target_ops): Install it.
10848
e8470a06
PA
108492010-04-12 Pedro Alves <pedro@codesourcery.com>
10850
10851 * server.h (buffer_xml_printf): Remove redundant `;'.
10852
45ba0d02
PA
108532010-04-12 Pedro Alves <pedro@codesourcery.com>
10854
10855 * regcache.c (set_register_cache): Invalidate regcaches before
10856 changing the register cache layout.
10857 (regcache_invalidate_one): Allow a NULL regcache.
10858 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10859 regcaches before changing the register cache layout or the target
10860 regsets.
10861
59e04013
L
108622010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10863
10864 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10865 variable warning on Linux/x86-64.
10866
8336d594
PA
108672010-04-11 Pedro Alves <pedro@codesourcery.com>
10868
10869 GDBserver disconnected tracing support.
10870
10871 * linux-low.c (linux_remove_process): Delete.
10872 (add_lwp): Don't set last_resume_kind here.
10873 (linux_kill): Use `mourn'.
10874 (linux_detach): Use `thread_db_detach', and `mourn'.
10875 (linux_mourn): New.
10876 (linux_attach_lwp_1): Adjust comment.
10877 (linux_attach): last_resume_kind moved the thread_info; adjust.
10878 (status_pending_p_callback): Adjust.
10879 (linux_wait_for_event_1): Adjust.
10880 (count_events_callback, select_singlestep_lwp_callback)
10881 (select_event_lwp_callback, cancel_breakpoints_callback)
10882 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10883 (proceed_one_lwp): Adjust.
10884 (linux_async): Add debug output.
10885 (linux_thread_stopped): New.
10886 (linux_pause_all): New.
10887 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10888 linux_pause_all.
10889 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10890 (thread_db_free): Delete declaration.
10891 (thread_db_detach, thread_db_mourn): Declare.
10892 * thread-db.c (thread_db_init): Use thread_db_mourn.
10893 (thread_db_free): Delete, split in two.
10894 (disable_thread_event_reporting): New.
10895 (thread_db_detach): New.
10896 (thread_db_mourn): New.
10897
10898 * server.h (struct thread_info) <last_resume_kind>: New field.
10899 <attached>: Add comment.
10900 <gdb_detached>: New field.
10901 (handler_func): Change return type to int.
10902 (handle_serial_event, handle_target_event): Ditto.
10903 (gdb_connected): Declare.
10904 (tracing): Delete.
10905 (disconnected_tracing): Declare.
10906 (stop_tracing): Declare.
10907
10908 * server.c (handle_query) <qSupported>: Report support for
10909 disconnected tracing.
10910 (queue_stop_reply_callback): Account for running threads.
10911 (gdb_wants_thread_stopped): New.
10912 (gdb_wants_all_threads_stopped): New.
10913 (gdb_reattached_process): New.
10914 (handle_status): Clear the `gdb_detached' flag of all processes.
10915 In all-stop, stop all threads.
10916 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10917 (process_serial_event): If the remote connection breaks, or if an
10918 exit was forced with "monitor exit", force an event loop exit.
10919 Handle disconnected tracing on detach.
10920 (handle_serial_event): Adjust.
10921 (handle_target_event): If GDB isn't connected, forward events back
10922 to the inferior, unless the last process exited, in which case,
10923 exit gdbserver. Adjust interface.
10924
10925 * remote-utils.c (remote_open): Don't block in accept. Instead
10926 register an event loop source on the listen socket file
10927 descriptor. Refactor bits into ...
10928 (listen_desc): ... this new global.
10929 (gdb_connected): ... this new function.
10930 (enable_async_notification): ... this new function.
10931 (handle_accept_event): ... this new function.
10932 (remote_close): Clear remote_desc.
10933
10934 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10935
10936 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10937 New fields.
10938 (mourn_inferior): Define.
10939 (target_process_qsupported): Avoid the dangling else problem.
10940 (thread_stopped): Define.
10941 (pause_all): Define.
10942 (target_waitstatus_to_string): Declare.
10943 * target.c (target_waitstatus_to_string): New.
10944
10945 * tracepoint.c (tracing): Make extern.
10946 (disconnected_tracing): New.
10947 (stop_tracing): Make extern. Handle tracing stops due to GDB
10948 disconnecting.
10949 (cmd_qtdisconnected): New.
10950 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10951 (handle_tracepoint_general_set): Handle QTDisconnected.
10952
10953 * event-loop.c (event_handler_func): Change return type to int.
10954 (process_event): Bail out if the event handler wants the event
10955 loop to stop.
10956 (handle_file_event): Ditto.
10957 (start_event_loop): Bail out if the event handler wants the event
10958 loop to stop.
10959
10960 * nto-low.c (nto_target_ops): Adjust.
10961 * spu-low.c (spu_wait): Don't remove the process here.
10962 (spu_target_ops): Adjust.
10963 * win32-low.c (win32_wait): Don't remove the process here.
10964 (win32_target_ops): Adjust.
10965
5d267c4c
PA
109662010-04-11 Pedro Alves <pedro@codesourcery.com>
10967
10968 * regcache.c (realloc_register_cache): Invalidate inferior's
10969 regcache before recreating it.
10970
623ccd72
PA
109712010-04-09 Pedro Alves <pedro@codesourcery.com>
10972
10973 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10974
219f2f23
PA
109752010-04-09 Stan Shebs <stan@codesourcery.com>
10976 Pedro Alves <pedro@codesourcery.com>
10977
10978 * server.h (LONGEST): New.
10979 (struct thread_info) <while_stepping>: New field.
10980 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10981 Declare.
10982 (initialize_tracepoint, handle_tracepoint_general_set)
10983 (handle_tracepoint_query, tracepoint_finished_step)
10984 (tracepoint_was_hit, release_while_stepping_state_list):
10985 (current_traceframe): Declare.
10986 * server.c (handle_general_set): Handle tracepoint packets.
10987 (read_memory): New.
10988 (write_memory): New.
10989 (handle_search_memory_1): Use read_memory.
10990 (handle_query): Report support for conditional tracepoints, trace
10991 state variables, and tracepoint sources. Handle tracepoint
10992 queries.
10993 (main): Initialize the tracepoints module.
10994 (process_serial_event): Handle traceframe reads/writes.
10995
10996 * linux-low.c (handle_tracepoints): New.
10997 (linux_wait_1): Call it.
10998 (linux_resume_one_lwp): Handle while-stepping.
10999 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11000 (linux_target_ops): Install them.
11001 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11002 New field.
11003 * linux-x86-low.c (x86_supports_tracepoints): New.
11004 (the_low_target). Install it.
11005
11006 * mem-break.h (delete_breakpoint): Declare.
11007 * mem-break.c (delete_breakpoint): Make external.
11008
11009 * target.h (struct target_ops): Add `supports_tracepoints',
11010 `read_pc', and `write_pc' fields.
11011 (target_supports_tracepoints): Define.
11012 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11013 (phex_nz): New.
11014
11015 * regcache.h (struct regcache) <registers_owned>: New field.
11016 (init_register_cache, regcache_cpy): Declare.
11017 (regcache_read_pc, regcache_write_pc): Declare.
11018 (register_cache_size): Declare.
11019 (supply_regblock): Declare.
11020 * regcache.c (init_register_cache): New.
11021 (new_register_cache): Use it.
11022 (regcache_cpy): New.
11023 (register_cache_size): New.
11024 (supply_regblock): New.
11025 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11026
219f2f23
PA
11027 * tracepoint.c: New.
11028
11029 * Makefile.in (OBS): Add tracepoint.o.
11030 (tracepoint.o): New rule.
11031
3a13a53b
L
110322010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11033
11034 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11035 (i386-mmx.o): New.
11036 (i386-mmx.c): Likewise.
11037 (i386-mmx-linux.o): Likewise.
11038 (i386-mmx-linux.c): Likewise.
11039
11040 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11041 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11042 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11043 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11044
11045 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11046 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11047 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11048
1570b33e
L
110492010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11050
11051 * Makefile.in (clean): Updated.
11052 (i386-avx.o): New.
11053 (i386-avx.c): Likewise.
11054 (i386-avx-linux.o): Likewise.
11055 (i386-avx-linux.c): Likewise.
11056 (amd64-avx.o): Likewise.
11057 (amd64-avx.c): Likewise.
11058 (amd64-avx-linux.o): Likewise.
11059 (amd64-avx-linux.c): Likewise.
11060
11061 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11062 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11063 (srv_amd64_regobj): Add amd64-avx.o.
11064 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11065 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11066 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11067 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11068 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11069 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11070 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11071
11072 * i387-fp.c: Include "i386-xstate.h".
11073 (i387_xsave): New.
11074 (i387_cache_to_xsave): Likewise.
11075 (i387_xsave_to_cache): Likewise.
11076 (x86_xcr0): Likewise.
11077
11078 * i387-fp.h (i387_cache_to_xsave): Likewise.
11079 (i387_xsave_to_cache): Likewise.
11080 (x86_xcr0): Likewise.
11081
11082 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11083 * linux-crisv32-low.c (target_regsets): Likewise.
11084 * linux-m68k-low.c (target_regsets): Likewise.
11085 * linux-mips-low.c (target_regsets): Likewise.
11086 * linux-ppc-low.c (target_regsets): Likewise.
11087 * linux-s390-low.c (target_regsets): Likewise.
11088 * linux-sh-low.c (target_regsets): Likewise.
11089 * linux-sparc-low.c (target_regsets): Likewise.
11090 * linux-xtensa-low.c (target_regsets): Likewise.
11091
11092 * linux-low.c: Include <sys/uio.h>.
11093 (regsets_fetch_inferior_registers): Support nt_type.
11094 (regsets_store_inferior_registers): Likewise.
11095 (linux_process_qsupported): New.
11096 (linux_target_ops): Add linux_process_qsupported.
11097
11098 * linux-low.h (regset_info): Add nt_type.
11099 (linux_target_ops): Add process_qsupported.
11100
11101 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11102 and <sys/uio.h>.
11103 (init_registers_i386_avx_linux): New.
11104 (init_registers_amd64_avx_linux): Likewise.
11105 (xmltarget_i386_linux_no_xml): Likewise.
11106 (xmltarget_amd64_linux_no_xml): Likewise.
11107 (PTRACE_GETREGSET): Likewise.
11108 (PTRACE_SETREGSET): Likewise.
11109 (x86_fill_xstateregset): Likewise.
11110 (x86_store_xstateregset): Likewise.
11111 (use_xml): Likewise.
11112 (x86_linux_update_xmltarget): Likewise.
11113 (x86_linux_process_qsupported): Likewise.
11114 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11115 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11116 init_registers_i386_linux here. Call
11117 x86_linux_update_xmltarget.
11118 (the_low_target): Add x86_linux_process_qsupported.
11119
11120 * server.c (handle_query): Call target_process_qsupported.
11121
11122 * target.h (target_ops): Add process_qsupported.
11123 (target_process_qsupported): New.
11124
fc7238bb
PA
111252010-04-03 Pedro Alves <pedro@codesourcery.com>
11126
11127 * inferiors.c (add_thread): Set last_status kind to
11128 TARGET_WAITKIND_IGNORE.
11129 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11130 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11131 (linux_wait_1): Move `thread' local definition to block that uses
11132 it. Don't NULL initialize `event_child'.
11133 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11134 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11135 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11136
bdabb078
PA
111372010-04-01 Pedro Alves <pedro@codesourcery.com>
11138
11139 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11140 an extended waitstatus, or by a watchpoint.
11141 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11142 thread was stepping or has been stopped by a watchpoint.
11143
d3bbe7a0
PA
111442010-04-01 Pedro Alves <pedro@codesourcery.com>
11145
11146 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11147 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11148 of another, then delete the previous, and validate all
11149 breakpoints.
11150 (validate_inserted_breakpoint): New.
11151 (delete_disabled_breakpoints): New.
11152 (validate_breakpoints): New.
11153 (check_mem_read): Validate breakpoints before trusting their
11154 shadow. Delete disabled breakpoints.
11155 (check_mem_write): Validate breakpoints before trusting they
11156 should be inserted. Delete disabled breakpoints.
11157 * mem-break.h (validate_breakpoints):
11158 * server.c (handle_query): Validate breakpoints when we see a
11159 qSymbol query.
11160
8b07ae33
PA
111612010-04-01 Pedro Alves <pedro@codesourcery.com>
11162
11163 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11164 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11165 if we could tell there's a GDB breakpoint at stop_pc.
11166 (need_step_over_p): Don't do a step over if we find a GDB
11167 breakpoint at the resume PC.
11168
11169 * mem-break.c (struct raw_breakpoint): New.
11170 (enum bkpt_type): New type `gdb_breakpoint'.
11171 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11172 fields. New field `raw'.
11173 (find_raw_breakpoint_at): New.
11174 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11175 breakpoint instead.
11176 (set_breakpoint_at): Adjust.
11177 (delete_raw_breakpoint): New.
11178 (release_breakpoint): New.
11179 (delete_breakpoint): Rename to...
11180 (delete_breakpoint_1): ... this. Add proc parameter. Use
11181 release_breakpoint. Return ENOENT.
11182 (delete_breakpoint): Reimplement.
11183 (find_breakpoint_at): Delete.
11184 (find_gdb_breakpoint_at): New.
11185 (delete_breakpoint_at): Delete.
11186 (set_gdb_breakpoint_at): New.
11187 (delete_gdb_breakpoint_at): New.
11188 (gdb_breakpoint_here): New.
11189 (set_reinsert_breakpoint): Use release_breakpoint.
11190 (uninsert_breakpoint): Rename to ...
11191 (uninsert_raw_breakpoint): ... this.
11192 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11193 (reinsert_raw_breakpoint): Change parameter type to
11194 raw_breakpoint.
11195 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11196 instead.
11197 (check_breakpoints): Adjust. Use release_breakpoint.
11198 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11199 (breakpoint_inserted_here): Ditto.
11200 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11201 Don't trust the breakpoint's shadow if it is not inserted.
11202 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11203 (delete_all_breakpoints): Adjust.
11204 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11205 use delete_breakpoint_1.
11206
11207 * mem-break.h (breakpoints_supported): Delete declaration.
11208 (set_gdb_breakpoint_at): Declare.
11209 (gdb_breakpoint_here): Declare.
11210 (delete_breakpoint_at): Delete.
11211 (delete_gdb_breakpoint_at): Declare.
11212
11213 * server.h (struct raw_breakpoint): Forward declare.
11214 (struct process_info): New field `raw_breakpoints'.
11215
11216 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11217 breakpoints.
11218
6bf5e0ba
PA
112192010-03-24 Pedro Alves <pedro@codesourcery.com>
11220
11221 * linux-low.c (status_pending_p_callback): Fix comment.
11222 (linux_wait_for_event_1): Move most of the internal breakpoint
11223 handling from here...
11224 (linux_wait_1): ... to here.
11225 (count_events_callback): New.
11226 (select_singlestep_lwp_callback): New.
11227 (select_event_lwp_callback): New.
11228 (cancel_breakpoints_callback): New.
11229 (select_event_lwp): New.
11230 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11231 priority to all LWPs that have had events that should be reported
11232 to the client. Cancel breakpoints when about to reporting the
11233 event to the client, not while stopping lwps. No longer cancel
11234 finished single-steps here.
11235 (cancel_finished_single_step): Delete.
11236 (cancel_finished_single_steps): Delete.
11237
414a389f
PA
112382010-03-24 Pedro Alves <pedro@codesourcery.com>
11239
11240 * mem-break.c (enum bkpt_type): New.
11241 (struct breakpoint): New field `type'.
11242 (set_breakpoint_at): Change return type to struct breakpoint
11243 pointer. Set type to `other_breakpoint' by default.
11244 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11245 in the breakpoint list.
11246 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11247 (reinsert_breakpoint): Rename to ...
11248 (reinsert_raw_breakpoint): ... this.
11249 (reinsert_breakpoints_at): Adjust.
11250 * mem-break.h (struct breakpoint): Declare.
11251 (set_breakpoint_at): Change return type to struct breakpoint
11252 pointer.
11253
2280c721
PA
112542010-03-24 Pedro Alves <pedro@codesourcery.com>
11255
11256 * server.c (handle_query): Assign, not compare.
11257
d50171e4
PA
112582010-03-24 Pedro Alves <pedro@codesourcery.com>
11259
11260 Teach linux gdbserver to step-over-breakpoints.
11261
11262 * linux-low.c (can_hardware_single_step): New.
11263 (supports_breakpoints): New.
11264 (handle_extended_wait): If stopping threads, read the stop pc of
11265 the new cloned LWP.
11266 (get_pc): New.
11267 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11268 low target doesn't support retrieving the PC.
11269 (add_lwp): Set last_resume_kind to resume_continue.
11270 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11271 (linux_attach): Don't clear stop_expected. Set the lwp's
11272 last_resume_kind to resume_stop.
11273 (linux_detach_one_lwp): Don't check for removed breakpoints.
11274 (check_removed_breakpoint): Delete.
11275 (status_pending_p): Rename to ...
11276 (status_pending_p_callback): ... this. Don't check for removed
11277 breakpoints. Don't consider threads that are stopped from GDB's
11278 perspective.
11279 (linux_wait_for_lwp): Always read the stop_pc here.
11280 (cancel_breakpoint): New.
11281 (step_over_bkpt): New global.
11282 (linux_wait_for_event_1): Implement stepping over breakpoints.
11283 (gdb_wants_lwp_stopped): New.
11284 (gdb_wants_all_stopped): New.
11285 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11286 single-step traps here. Store the thread's last reported target
11287 wait status.
11288 (send_sigstop): Don't clear stop_expected. Always set it,
11289 instead.
11290 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11291 (cancel_finished_single_step): New.
11292 (cancel_finished_single_steps): New.
11293 (wait_for_sigstop): Don't cancel finished single-step traps here.
11294 (linux_resume_one_lwp): Don't check for removed breakpoints.
11295 Don't set `step' on non-hardware step archs.
11296 (linux_set_resume_request): Ignore resume_stop requests if already
11297 stopping or stopped. Set the lwp's last_resume_kind.
11298 (resume_status_pending_p): Don't check for removed breakpoints.
11299 (need_step_over_p): New.
11300 (start_step_over): New.
11301 (finish_step_over): New.
11302 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11303 requests. Clear the thread's last reported target waitstatus.
11304 Don't use the `suspended' flag. Don't consider pending breakpoints.
11305 (linux_resume): Start a step-over if necessary.
11306 (proceed_one_lwp): New.
11307 (proceed_all_lwps): New.
11308 (unstop_all_lwps): New.
11309 * linux-low.h (struct lwp_info): Rewrite comment for the
11310 `suspended' flag. Add the `stop_pc' field. Delete the
11311 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11312 Add `'last_resume_kind' and `need_step_over' fields.
11313 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11314 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11315 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11316 (set_raw_breakpoint_at): New.
11317 (set_breakpoint_at): Rewrite to use it.
11318 (reinsert_breakpoint_handler): Delete.
11319 (set_reinsert_breakpoint): New.
11320 (reinsert_breakpoint_by_bp): Delete.
11321 (delete_reinsert_breakpoints): New.
11322 (uninsert_breakpoint): Rewrite.
11323 (uninsert_breakpoints_at): New.
11324 (reinsert_breakpoint): Rewrite.
11325 (reinsert_breakpoints_at): New.
11326 (check_breakpoints): Rewrite.
11327 (breakpoint_here): New.
11328 (breakpoint_inserted_here): New.
11329 (check_mem_read): Adjust.
11330 * mem-break.h (breakpoints_supported, breakpoint_here)
11331 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11332 (reinsert_breakpoint_by_bp): Delete declaration.
11333 (delete_reinsert_breakpoints): Declare.
11334 (reinsert_breakpoint): Delete declaration.
11335 (reinsert_breakpoints_at): Declare.
11336 (uninsert_breakpoint): Delete declaration.
11337 (uninsert_breakpoints_at): Declare.
11338 (check_breakpoints): Adjust prototype.
11339 * server.h: Adjust include order.
11340 (struct thread_info): Declare here. Add a `last_status' field.
11341
30ba68cb
MS
113422010-03-23 Michael Snyder <msnyder@vmware.com>
11343
11344 * server.c (crc32): New function.
11345 (handle_query): Add handling for 'qCRC:' request.
11346
b9a881c2
PA
113472010-03-23 Pedro Alves <pedro@codesourcery.com>
11348
11349 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11350 lwp had been stopped by a watchpoint.
11351
e92d13d5
PA
113522010-03-16 Pedro Alves <pedro@codesourcery.com>
11353
11354 * server.h (internal_error): Declare.
11355 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11356 * utils.c (internal_error): New function.
11357
64daa791
AS
113582010-03-15 Andreas Schwab <schwab@redhat.com>
11359
11360 * configure.srv: Fix typo setting srv_regobj.
11361
f52cd8cd
PA
113622010-03-15 Pedro Alves <pedro@codesourcery.com>
11363
11364 * linux-low.c (fetch_register): Avoid passing a non string literal
11365 format to `error'.
11366 (usr_store_inferior_registers): Ditto.
11367
93ae6fdc
PA
113682010-03-14 Pedro Alves <pedro@codesourcery.com>
11369
11370 * linux-low.c (linux_write_memory): Bail out early if peeking
11371 memory failed.
11372
c3adc08c
PA
113732010-03-14 Pedro Alves <pedro@codesourcery.com>
11374
11375 * linux-low.h (struct lwp_info): New fields
11376 `stopped_by_watchpoint' and `stopped_data_address'.
11377 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11378 here, and cache them in the lwp object.
11379 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11380 directly.
11381 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11382 field.
11383 (linux_stopped_by_watchpoint): Rewrite.
11384 (linux_stopped_data_address): Rewrite.
11385
bce522a2
PA
113862010-03-06 Simo Melenius <simo.melenius@iki.fi>
11387
11388 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11389 switching the current inferior, not before.
11390
90884b2b
L
113912010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11392
11393 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11394 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11395 i386-linux.c and amd64-linux.c.
11396 (reg-i386.o): Removed.
11397 (reg-i386.c): Likewise.
11398 (reg-i386-linux.o): Likewise.
11399 (reg-i386-linux.c): Likewise.
11400 (reg-x86-64.o): Likewise.
11401 (reg-x86-64.c): Likewise.
11402 (reg-x86-64-linux.o): Likewise.
11403 (reg-x86-64-linux.c): Likewise.
11404 (i386.o): New.
11405 (i386.c): Likewise.
11406 (i386-linux.o): Likewise.
11407 (i386-linux.c): Likewise.
11408 (amd64.o): Likewise.
11409 (amd64.c): Likewise.
11410 (amd64-linux.o): Likewise.
11411 (amd64-linux.c): Likewise.
11412
11413 * configure.srv (srv_i386_regobj): New.
11414 (srv_i386_linux_regobj): Likewise.
11415 (srv_amd64_regobj): Likewise.
11416 (srv_amd64_linux_regobj): Likewise.
11417 (srv_i386_32bit_xmlfiles): Likewise.
11418 (srv_i386_64bit_xmlfiles): Likewise.
11419 (srv_i386_xmlfiles): Likewise.
11420 (srv_amd64_xmlfiles): Likewise.
11421 (srv_i386_linux_xmlfiles): Likewise.
11422 (srv_amd64_linux_xmlfiles): Likewise.
11423 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11424 srv_xmlfiles to $srv_i386_xmlfiles.
11425 (i[34567]86-*-mingw32ce*): Likewise.
11426 (i[34567]86-*-mingw*): Likewise.
11427 (i[34567]86-*-nto*): Likewise.
11428 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11429 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11430 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11431 (x86_64-*-linux*): Likewise.
11432
11433 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11434 (init_registers_amd64_linux): New.
11435 (x86_arch_setup): Replace init_registers_x86_64_linux with
11436 init_registers_amd64_linux.
11437
193f13e6
MK
114382010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11439
11440 * configure.ac: Check for libdl. If it is not available link against
11441 static libthread_db.
11442 * configure: Regenerate.
11443
85d721b8
PA
114442010-02-22 Pedro Alves <pedro@codesourcery.com>
11445
11446 PR9605
11447
11448 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11449 handing a read watchpoint.
11450 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11451
6076632b
DE
114522010-02-12 Doug Evans <dje@google.com>
11453
11454 * linux-low.c (linux_supports_tracefork_flag): Document.
11455 (linux_look_up_symbols): Add comment.
11456
3327ccf7
L
114572010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11458
11459 * regcache.c (supply_register): Clear regcache if buf is NULL.
11460
0718675c 114612010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11462 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11463
11464 * inferiors.c (find_inferior): Add function documentation.
11465 (unloaded_dll): Handle the case where the unloaded dll has not
11466 been previously registered in the dll list.
11467
177321bd
DJ
114682010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11469
11470 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11471 (thumb2_breakpoint): New.
11472 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11473
2b009048
DJ
114742010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11475
11476 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11477 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11478 breakpoints.
11479
3be029c7
PA
114802010-01-21 Pedro Alves <pedro@codesourcery.com>
11481
11482 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11483
18f5de3b
JK
114842010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11485
11486 * linux-s390-low.c (s390_collect_ptrace_register)
11487 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11488
3743bb4f
DE
114892010-01-21 Doug Evans <dje@google.com>
11490
14ce3065
DE
11491 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11492 (PTRACE_ARG4_TYPE): New macro.
11493 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11494 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11495 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11496 (usr_store_inferior_registers): Ditto.
11497 (linux_read_memory, linux_write_memory): Ditto.
11498 (linux_test_for_tracefork): Ditto.
11499
3743bb4f
DE
11500 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11501 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11502
8b315be5
PA
115032010-01-21 Pedro Alves <pedro@codesourcery.com>
11504
11505 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11506 target.
11507
85492558
PA
115082010-01-21 Pedro Alves <pedro@codesourcery.com>
11509
11510 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11511 prototype to take a regcache. Adjust.
11512
442ea881
PA
115132010-01-20 Pedro Alves <pedro@codesourcery.com>
11514
11515 * regcache.h (struct thread_info): Forward declare.
11516 (struct regcache): New.
11517 (new_register_cache): Adjust prototype.
11518 (get_thread_regcache): Declare.
11519 (free_register_cache): Adjust prototype.
11520 (registers_to_string, registers_from_string): Ditto.
11521 (supply_register, supply_register_by_name, collect_register)
11522 (collect_register_as_string, collect_register_by_name): Ditto.
11523 * regcache.c (struct inferior_regcache_data): Delete.
11524 (get_regcache): Rename to ...
11525 (get_thread_regcache): ... this. Adjust. Switch inferior before
11526 fetching registers.
11527 (regcache_invalidate_one): Adjust.
11528 (regcache_invalidate): Fix prototype.
11529 (new_register_cache): Return the new register cache.
11530 (free_register_cache): Change prototype.
11531 (realloc_register_cache): Adjust.
11532 (registers_to_string): Change prototype to take a regcache. Adjust.
11533 (registers_from_string): Ditto.
11534 (register_data): Ditto.
11535 (supply_register): Ditto.
11536 (supply_register_by_name): Ditto.
11537 (collect_register): Ditto.
11538 (collect_register_as_string): Ditto.
11539 (collect_register_by_name): Ditto.
11540 * server.c (process_serial_event): Adjust.
11541 * linux-low.h (regset_fill_func, regset_store_func): Change
11542 prototype.
11543 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11544 Change prototype.
11545 * linux-low.c (get_stop_pc): Adjust.
11546 (check_removed_breakpoint): Adjust.
11547 (linux_wait_for_event): Adjust.
11548 (linux_resume_one_lwp): Adjust.
11549 (fetch_register): Add regcache parameter. Adjust.
11550 (usr_store_inferior_registers): Ditto.
11551 (regsets_fetch_inferior_registers): Ditto.
11552 (regsets_store_inferior_registers): Ditto.
11553 (linux_fetch_registers, linux_store_registers): Ditto.
11554 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11555 regcache. Adjust.
43aaf8b6
PA
11556 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11557 Ditto.
442ea881
PA
11558 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11559 prototype to take a regcache.
11560 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11561 * remote-utils.c (convert_ascii_to_int, outreg)
11562 (prepare_resume_reply): Change prototype to take a regcache.
11563 Adjust.
11564 * target.h (struct target_ops) <fetch_registers, store_registers>:
11565 Change prototype to take a regcache.
11566 (fetch_inferior_registers, store_inferior_registers): Change
11567 prototype to take a regcache. Adjust.
11568 * proc-service.c (ps_lgetregs): Adjust.
11569 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11570 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11571 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11572 take a regcache. Adjust.
11573 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11574 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11575 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11576 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11577 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11578 (cris_cannot_fetch_register):
11579 (cris_breakpoint_at): Change prototype to take a regcache.
11580 Adjust.
11581 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11582 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11583 to take a regcache. Adjust.
11584 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11585 Adjust.
11586 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11587 take a regcache. Adjust.
11588 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11589 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11590 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11591 * linux-mips-low.c (mips_get_pc):
11592 (mips_set_pc): Change prototype to take a regcache. Adjust.
11593 (mips_reinsert_addr): Adjust.
11594 (mips_collect_register): Change prototype to take a regcache.
11595 Adjust.
11596 (mips_supply_register):
11597 (mips_collect_register_32bit, mips_supply_register_32bit)
11598 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11599 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11600 * linux-ppc-low.c (ppc_supply_ptrace_register)
11601 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11602 (parse_spufs_run): Adjust.
11603 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11604 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11605 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11606 take a regcache. Adjust.
11607 * linux-s390-low.c (s390_collect_ptrace_register)
11608 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11609 (s390_set_pc): Change prototype to take a regcache. Adjust.
11610 (s390_arch_setup): Adjust.
11611 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11612 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11613 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11614 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11615 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11616 regcache. Adjust.
11617 (sparc_breakpoint_at): Adjust.
11618 * linux-xtensa-low.c (xtensa_fill_gregset):
11619 (xtensa_store_gregset):
11620 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11621 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11622 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11623 prototype to take a regcache. Adjust.
11624 * win32-arm-low.c (arm_fetch_inferior_register)
11625 (arm_store_inferior_register): Change prototype to take a
11626 regcache. Adjust.
11627 * win32-i386-low.c (i386_fetch_inferior_register)
11628 (i386_store_inferior_register): Change prototype to take a
11629 regcache. Adjust.
11630 * win32-low.c (child_fetch_inferior_registers)
11631 (child_store_inferior_registers): Change prototype to take a
11632 regcache. Adjust.
11633 (win32_wait): Adjust.
11634 (win32_fetch_inferior_registers): Change prototype to take a
11635 regcache. Adjust.
11636 (win32_store_inferior_registers): Adjust.
11637 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11638 store_inferior_register>: Change prototype to take a regcache.
11639
60c3d7b0
DE
116402010-01-20 Doug Evans <dje@google.com>
11641
11642 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11643 #ifdef.
11644 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11645 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11646
dc146f7c
VP
116472010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11648
11649 * linux-low.c (linux_core_of_thread): New.
11650 (compare_ints, show_process, list_threads): New.
11651 (linux_qxfer_osdata): Report threads and cores.
11652 (linux_target_op): Register linux_core_of_thread.
11653 * remote-utils.c (prepare_resume_reply): Report the core.
11654 (buffer_xml_printf): Support %d specifier.
11655 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11656 New.
11657 (handle_query): Handle qXfer:threads. Announce availability
11658 thereof.
11659 * target.h (struct target_ops): New field core_of_thread.
11660
7803799a
UW
116612010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11662
11663 * Makefile.in (clean): Remove new generated files.
11664 (reg-s390.o, reg-s390.c): Remove rules.
11665 (reg-s390x.o, reg-s390x.c): Likewise.
11666 (s390-linux32.o, s390-linux32.c): Add rules.
11667 (s390-linux64.o, s390-linux64.c): Likewise.
11668 (s390x-linux64.o, s390x-linux64.c): Likewise.
11669 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11670 * linux-s390-low.c: Include <elf.h>.
11671 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11672 (init_registers_s390): Remove prototype.
11673 (init_registers_s390x): Likewise.
11674 (init_registers_s390_linux32): Add prototype.
11675 (init_registers_s390_linux64): Likewise.
11676 (init_registers_s390x_linux64): Likewise.
11677 (s390_num_regs_3264): New define.
11678 (s390_regmap_3264): New global variable.
11679 (s390_cannot_fetch_register): Remove obsolete check.
11680 (s390_cannot_store_register): Likewise.
11681 (s390_collect_ptrace_register): Handle upper/lower register halves.
11682 (s390_supply_ptrace_register): Likewise.
11683 (s390_fill_gregset): Update to register number changes.
11684 (s390_get_hwcap): New routine.
11685 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11686 Install appropriate regmap and register set.
11687
6e7ffa39
JB
116882010-01-01 Joel Brobecker <brobecker@adacore.com>
11689
11690 * server.c (gdbserver_version): Update copyright year to 2010.
11691 * gdbreplay.c (gdbreplay_version): Likewise.
11692
957f3f49
DE
116932009-12-28 Doug Evans <dje@google.com>
11694
11695 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11696 elf/external.h. Include <elf.h> instead but only if necessary.
11697
ca5c370d
PA
116982009-12-28 Pedro Alves <pedro@codesourcery.com>
11699
11700 * linux-low.c (linux_remove_process): Remove `detaching'
11701 parameter. Don't release/detach from thread_db here.
11702 (linux_kill): Release/detach from thread_db here, ...
11703 (linux_detach): ... and here, before actually detaching.
11704 (linux_wait_1): ... and here, when a process exits.
11705 * thread-db.c (any_thread_of): New.
11706 (thread_db_free): Switch the current inferior to a thread of the
11707 passed in process.
11708
4ee62156
DE
117092009-12-21 Doug Evans <dje@google.com>
11710
d90e6a88
DE
11711 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11712
c5f62d5f
DE
11713 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11714 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11715 warning ifndef __NR_tkill. Move setting of errno there too.
11716 Delete unnecessary resetting of errno after syscall.
11717 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11718
10e86dd7
DE
11719 * configure.ac: Check for dladdr.
11720 * config.in: Regenerate.
11721 * configure: Regenerate.
11722 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11723 (try_thread_db_load): Update.
11724
4ee62156
DE
11725 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11726
00f515da
DE
117272009-12-18 Doug Evans <dje@google.com>
11728
e9464885
DE
11729 * event-loop.c: Include unistd.h if it exists.
11730
07d4f67e
DE
11731 * linux-low.c (my_waitpid): Move definition away from being in
11732 between linux_tracefork_child/linux_test_for_tracefork.
11733
00f515da
DE
11734 * gdb_proc_service.h (psaddr_t): Fix type.
11735 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11736 signature to match glibc.
11737
1de1badb
DE
117382009-12-16 Doug Evans <dje@google.com>
11739
11740 * linux-low.c (linux_read_memory): Fix argument to read.
11741
aeeb81d1
PA
117422009-11-26 Pedro Alves <pedro@codesourcery.com>
11743
11744 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11745 events, don't leave current_inferior pointing at null.
11746
10357975
PA
117472009-11-26 Pedro Alves <pedro@codesourcery.com>
11748
11749 * win32-low.c (LOG): Delete.
11750 (OUTMSG): Output to stderr.
11751 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11752 on compile time LOG macro.
11753 (win32_wait): Fix debug output.
11754
cf6e3471
PA
117552009-11-26 Pedro Alves <pedro@codesourcery.com>
11756
11757 * win32-low.c (win32_add_one_solib): If the dll name is
11758 "ntdll.dll", prepend the system directory to the dll path.
11759
0c85e18e
MK
117602009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11761
11762 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11763
9ac544ce 117642009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11765 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11766
11767 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11768 * configure.ac: Check for __mcoldfire__ and set
11769 gdb_cv_m68k_is_coldfire.
11770 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11771 reg-cf.o and reg-m68k.o.
11772 * configure: Regenerated.
11773
fd7dd3e6
PA
117742009-11-16 Pedro Alves <pedro@codesourcery.com>
11775
11776 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11777 Pass it to thread_db_free.
11778 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11779 proper `detaching' argument to linux_remove_process.
11780 * linux-low.h (thread_db_free): Add `detaching' parameter.
11781 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11782 to thread_db_free.
11783 (thread_db_free): Add `detaching' parameter. Only
11784 call td_ta_clear_event if detaching from process.
11785
75aa492e
MK
117862009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11787
11788 * thread-db.c (thread_db_free): Fix typo.
11789
21e1bee4
PP
117902009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11791
11792 PR gdb/10838
11793 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11794
8838b45e
NS
117952009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11796
11797 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11798 with an i686 compiler.
11799 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11800 needed.
11801 * configure: Rebuilt.
11802
8a35fb51
SL
118032009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11804
11805 PR gdb/10783
11806
11807 * server.c (handle_search_memory_1): Correct read_addr initialization
11808 in loop for searching subsequent chunks.
11809
96f15937
PP
118102009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11811
11812 * configure.ac: New --with-libthread-db option.
11813 * thread-db.c: Allow direct dependence on libthread_db.
11814 (thread_db_free): Adjust.
11815 * config.in: Regenerate.
11816 * configure: Likewise.
889bf7c5 11817
5f7d1694
PP
118182009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11819
11820 PR gdb/10757
11821 * thread-db.c (attach_thread): New function.
11822 (maybe_attach_thread): Return success/failure.
11823 (find_new_threads_callback): Adjust.
889bf7c5
PA
11824 (thread_db_find_new_threads): Loop until no new threads.
11825
88e3b899
PA
118262009-10-13 Pedro Alves <pedro@codesourcery.com>
11827
11828 * proc-service.c (ps_lgetregs): Formatting.
11829
cdbfd419
PP
118302009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11831
11832 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11833 * configure.ac: Adjust.
11834 * linux-low.h (struct process_info_private): Move members to struct
11835 thread_db.
11836 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11837 * linux-low.c (linux_remove_process): Adjust.
11838 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11839 * server.c (handle_query): Move code ...
11840 (handle_monitor_command): ... here. New function.
11841 * target.h (struct target_ops): New member.
11842 * thread-db.c (struct thread_db): New.
11843 (libthread_db_search_path): New variable.
11844 (thread_db_create_event, thread_db_enable_reporting)
11845 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11846 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11847 (try_thread_db_load_1, dladdr_to_soname): New functions.
11848 (try_thread_db_load, thread_db_load_search): New functions.
11849 (thread_db_init): Search for libthread_db.
11850 (thread_db_free): New function.
11851 (thread_db_handle_monitor_command): Likewise.
11852 * config.in: Regenerate.
11853 * configure: Regenerate.
889bf7c5 11854
4168d2d6
UW
118552009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11856
11857 * spu-low.c (spu_kill): Wait for inferior to terminate.
11858 Call clear_inferiors.
11859 (spu_detach): Call clear_inferiors.
11860
81ecdfbb
RW
118612009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11862
11863 * aclocal.m4: Regenerate.
11864 * config.in: Likewise.
11865 * configure: Likewise.
11866
0b9ff2c0
UW
118672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11868
11869 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11870 (parse_spufs_run): New function.
11871 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11872 (ppc_breakpoint_at): Handle SPU breakpoints.
11873
efcbbd14
UW
118742009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11875
11876 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11877 (SPUFS_MAGIC): Define.
11878 (spu_enumerate_spu_ids): New function.
11879 (linux_qxfer_spu): New function.
11880 (linux_target_ops): Install linux_qxfer_spu.
11881
f4d9bade
UW
118822009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11883
11884 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11885 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11886 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11887 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11888 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11889 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11890 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11891 (init_registers_powerpc_cell32l): Add prototype.
11892 (init_registers_powerpc_cell64l): Likewise.
11893 (ppc_arch_setup): Detect Cell/B.E. architecture.
11894
96e946ca
RW
118952009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11896
11897 * Makefile.in (datarootdir): New variable.
11898
58d6951d
DJ
118992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11900
11901 * linux-low.c (linux_write_memory): Update debugging output.
11902 * Makefile.in (clean): Add new descriptions.
11903 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11904 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11905 * configure.srv: Add new files for arm*-*-linux*.
11906 * linux-arm-low.c: Add new declarations.
11907 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11908 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11909 (HWCAP_VFPv3D16): New.
11910 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11911 instead of __IWMMXT__.
11912 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11913 (arm_arch_setup): New.
11914 (target_regsets): Remove #ifdef. Add VFP regset.
11915 (the_low_target): Use arm_arch_setup.
11916
12b42a12
DJ
119172009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11918
11919 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11920 the main thread again.
11921
ac8c974e
AR
119222009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11923
11924 Adding Neutrino gdbserver.
11925 * configure: Regenerated.
11926 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11927 * configure.srv (i[34567]86-*-nto*): New target.
11928 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11929 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11930 (nto_comctrl) [__QNX__]: New function.
11931 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11932
4424e0c3 119332009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11934
11935 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11936 srv_tgtobj.
11937
912cf4ba
PA
119382009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11939 Pedro Alves <pedro@codesourcery.com>
11940
11941 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11942 don't support CONTEXT_EXTENDED_REGISTERS.
11943 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11944 (the_low_target): Install them.
11945 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11946 failing with ERROR_PIPE_NOT_CONNECTED.
11947
aa5ca48f
DE
119482009-06-30 Doug Evans <dje@google.com>
11949 Pierre Muller <muller@ics.u-strasbg.fr>
11950
11951 Add h/w watchpoint support to x86-linux, win32-i386.
11952 * Makefile.in (SFILES): Add i386-low.c
11953 (i386_low_h): Define.
11954 (i386-low.o): Add dependencies.
11955 (linux-x86-low.o): Add i386-low.h dependency.
11956 (win32-i386-low.o): Ditto.
11957 * i386-low.c: New file.
11958 * i386-low.h: New file.
11959 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11960 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11961 * linux-low.c (linux_add_process): Initialize arch_private.
11962 (linux_remove_process): Free arch_private.
11963 (add_lwp): Initialize arch_private.
11964 (delete_lwp): Free arch_private.
11965 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11966 provided.
11967 * linux-low.h (process_info_private): New member arch_private.
11968 (lwp_info): New member arch_private.
11969 (linux_target_ops): New members new_process, new_thread,
11970 prepare_to_resume.
11971 (ptid_of): New macro.
11972 * linux-x86-low.c: Include stddef.h, i386-low.h.
11973 (arch_process_info): New struct.
11974 (arch_lwp_info): New struct.
11975 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11976 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11977 (i386_dr_low_get_status): New function.
11978 (x86_insert_point, x86_remove_point): New functions.
11979 (x86_stopped_by_watchpoint): New function.
11980 (x86_stopped_data_address): New function.
11981 (x86_linux_new_process, x86_linux_new_thread): New functions.
11982 (x86_linux_prepare_to_resume): New function.
11983 (the_low_target): Add entries for insert_point, remove_point,
11984 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11985 prepare_to_resume.
11986 * server.c (debug_hw_points): New global.
11987 (monitor_show_help): Document set debug-hw-points.
11988 (handle_query): Process "set debug-hw-points".
11989 * server.h (debug_hw_points): Declare.
11990 (paddress): Declare.
11991 * utils.c (NUMCELLS, CELLSIZE): New macros.
11992 (get_sell, xsnprintf, paddress): New functions.
11993 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11994 remove_point, stopped_by_watchpoint, stopped_data_address.
11995 * win32-i386-low.c: Include i386-low.h.
11996 (debug_reg_state): Replaces dr.
11997 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11998 (i386_dr_low_get_status): New function.
11999 (i386_insert_point, i386_remove_point): New functions.
12000 (i386_stopped_by_watchpoint): New function.
12001 (i386_stopped_data_address): New function.
12002 (i386_initial_stuff): Update.
12003 (get_thread_context,set_thread_context,i386_thread_added): Update.
12004 (the_low_target): Add entries for insert_point,
12005 remove_point, stopped_by_watchpoint, stopped_data_address.
12006 * win32-low.c (win32_insert_watchpoint): New function.
12007 (win32_remove_watchpoint): New function.
12008 (win32_stopped_by_watchpoint): New function.
12009 (win32_stopped_data_address): New function.
12010 (win32_target_ops): Add entries for insert_watchpoint,
12011 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12012 * win32-low.h (win32_target_ops): New members insert_point,
12013 remove_point, stopped_by_watchpoint, stopped_data_address.
12014
d993e290
PA
120152009-06-25 Pedro Alves <pedro@codesourcery.com>
12016
12017 * server.c (process_serial_event): Re-return unsupported, not
12018 error, if the type isn't recognized. Re-allow supporting only
12019 insert or remove packets. Also call require_running for
12020 breakpoints. Add missing break statement to default case. Tidy.
12021 * target.h (struct target_ops): Rename insert_watchpoint to
12022 insert_point, and remove_watchpoint to remove_point.
12023
12024 * linux-low.h (struct linux_target_ops): Likewise.
12025 * linux-low.c (linux_insert_watchpoint): Rename to ...
12026 (linux_insert_point): ... this. Adjust.
12027 (linux_remove_watchpoint): Rename to ...
12028 (linux_remove_point): ... this. Adjust.
12029 (linux_target_ops): Adjust.
12030 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12031 (cris_insert_point): ... this.
12032 (cris_remove_watchpoint): Rename to ...
12033 (cris_remove_point): ... this.
12034 (the_low_target): Adjust.
12035
0f54c268
PM
120362009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12037
12038 * server.c (handle_v_kill): Pass signal_pid to
12039 kill_inferior if multi_process is zero.
12040
c6314022
AR
120412009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12042
12043 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12044 * target.h (target_ops): Comment for *_watchpoint to make it clear
12045 the functions can get types '0' and '1'.
12046
4463ce24
AR
120472009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12048
12049 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12050 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12051 * regcache.c (get_regcache): Likewise.
12052 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12053 * win32-low.c (child_fetch_inferior_registers): Remove check for
12054 regno 0.
12055
cf8fd78b
PA
120562009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12057 Pedro Alves <pedro@codesourcery.com>
12058
12059 * target.h (struct target_ops) <supports_multi_process>: New
12060 callback.
12061 (target_supports_multi_process): New.
12062 * server.c (handle_query): Even if GDB reports support, only
12063 enable multi-process if the target also supports it. Report
12064 multi-process support only if the target backend supports it.
12065 * linux-low.c (linux_supports_multi_process): New function.
12066 (linux_target_ops): Install it as target_supports_multi_process
12067 callback.
12068
47c0c975
DE
120692009-05-24 Doug Evans <dje@google.com>
12070
e09875d4
DE
12071 Global renaming of find_thread_pid to find_thread_ptid.
12072 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12073 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12074 All callers updated.
12075
e27d73f6
DE
12076 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12077 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12078 directly.
12079
47c0c975
DE
12080 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12081 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12082 (linux_resume_one_lwp): Ditto.
12083
2acc282a
DE
120842009-05-23 Doug Evans <dje@google.com>
12085
12086 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12087 from struct inferior_list_entry * to struct lwp_info *.
12088 All callers updated.
12089
9f1036c1
DE
120902009-05-13 Doug Evans <dje@google.com>
12091
12092 * linux-x86-low.c: Don't include assert.h.
12093 (x86_siginfo_fixup): Use fatal, not assert.
12094 (x86_arch_setup): Fix comment.
12095
d0722149
DE
120962009-05-12 Doug Evans <dje@google.com>
12097
12098 Biarch support for i386/amd64 gdbserver.
12099 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12100 Add linux-x86-low.c.
12101 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12102 (linux-x86-low.o): Add.
12103 * linux-x86-64-low.c: Delete.
12104 * linux-i386-low.c: Delete.
12105 * linux-x86-low.c: New file.
12106 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12107 linux-x86-low.o.
12108 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12109 linux-x86-low.o.
12110 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12111 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12112 (linux_child_pid_to_exec_file): New function.
12113 (elf_64_header_p, elf_64_file_p): New functions.
12114 (siginfo_fixup): New function.
12115 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12116 give target a chance to convert layout.
12117 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12118 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12119
fdeb2a12
DE
121202009-05-07 Doug Evans <dje@google.com>
12121
12122 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12123 (regsets_store_inferior_registers): Ditto.
12124
a6dbe5df
PA
121252009-05-06 Pedro Alves <pedro@codesourcery.com>
12126
12127 PR server/10048
12128
12129 * linux-low.c (must_set_ptrace_flags): Delete.
12130 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12131 of the global.
12132 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12133 `lwp->must_set_ptrace_flags' instead.
ba42693b 12134 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12135 (linux_wait_1): ... not here.
12136
5091eb23
DE
121372009-04-30 Doug Evans <dje@google.com>
12138
9f767825
DE
12139 * inferiors.c (started_inferior_callback): New function.
12140 (attached_inferior_callback): New function.
12141 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12142 * server.c (print_started_pid, print_attached_pid): New functions.
12143 (detach_or_kill_for_exit): New function.
12144 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12145 * server.h (have_started_inferiors_p): Declare.
12146 (have_attached_inferiors_p): Declare.
12147
5091eb23
DE
12148 * inferiors.c (remove_process): Fix memory leak, free process.
12149 * linux-low.c (linux_remove_process): New function.
12150 (linux_kill): Call it instead of remove_process.
12151 (linux_detach, linux_wait_1): Ditto.
12152
155c8968
PA
121532009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12154
12155 * configure.srv: Add x86 Windows CE target.
12156
7fe519cb
UW
121572009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12158
12159 * inferiors.c (get_thread_process): Make global.
12160 * server.h (get_thread_process): Add prototype.
12161 * thread-db.c (find_one_thread): Use get_thread_process
12162 instead of current_process.
12163 (thread_db_get_tls_address): Do not crash if called when
12164 thread layer is not yet initialized.
12165
5472f405
UW
121662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12167
12168 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12169 * spu-low.c (current_tid): Rename to ...
12170 (current_ptid): ... this.
12171 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12172 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12173 ptid_get_lwp (current_ptid) instead of current_tid.
12174 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12175 instead of current_tid. Use find_process_pid to verify pid
12176 argument is valid. Pass proper argument to remove_process.
12177 (spu_thread_alive): Compare current_ptid instead of current_tid.
12178 (spu_resume): Likewise.
12179
55ac2b99
PA
121802009-04-02 Pedro Alves <pedro@codesourcery.com>
12181
12182 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12183 variable.
12184
95954743
PA
121852009-04-01 Pedro Alves <pedro@codesourcery.com>
12186
12187 Implement the multiprocess extensions, and add linux multiprocess
12188 support.
12189
12190 * server.h (ULONGEST): Declare.
12191 (struct ptid, ptid_t): New.
12192 (minus_one_ptid, null_ptid): Declare.
12193 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12194 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12195 (struct inferior_list_entry): Change `id' type from unsigned from
12196 to ptid_t.
12197 (struct sym_cache, struct breakpoint, struct
12198 process_info_private): Forward declare.
12199 (struct process_info): Declare.
12200 (current_process): Declare.
12201 (all_processes): Declare.
12202 (initialize_inferiors): Declare.
12203 (add_thread): Adjust to use ptid_t.
12204 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12205 (add_process, remove_process, find_thread_pid): Declare.
12206 (find_inferior_id): Adjust to use ptid_t.
12207 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12208 (multi_process): Declare.
12209 (push_event): Adjust to use ptid_t.
12210 (read_ptid, write_ptid): Declare.
12211 (prepare_resume_reply): Adjust to use ptid_t.
12212 (clear_symbol_cache): Declare.
12213 * inferiors.c (all_processes): New.
12214 (null_ptid, minus_one_ptid): New.
12215 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12216 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12217 (add_thread): Change unsigned long to ptid. Remove gdb_id
12218 parameter. Adjust.
12219 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12220 (gdb_id_to_thread): Rename to ...
12221 (find_thread_pid): ... this. Change unsigned long to ptid.
12222 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12223 (loaded_dll, pull_pid_from_list): Adjust.
12224 (add_process, remove_process, find_process_pid)
12225 (get_thread_process, current_process, initialize_inferiors): New.
12226 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12227 (struct target_waitstatus) <related_pid>: Ditto.
12228 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12229 return type to int.
12230 (struct target_ops) <join>: Add `pid' argument.
12231 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12232 (struct target_ops) <wait>: Add `ptid' field. Change return type
12233 to ptid.
12234 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12235 (mywait): Add `ptid' argument. Change return type to ptid_t.
12236 (target_pid_to_str): Declare.
12237 * target.c (set_desired_inferior): Adjust to use ptids.
12238 (mywait): Add new `ptid' argument. Adjust.
12239 (target_pid_to_str): New.
12240 * mem-break.h (free_all_breakpoints): Declare.
12241 * mem-break.c (breakpoints): Delelete.
12242 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12243 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12244 to use per-process breakpoint list.
12245 (free_all_breakpoints): New.
12246 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12247 (symbol_cache, all_symbols_looked_up): Delete.
12248 (hexchars): New.
12249 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12250 read_ptid): New.
12251 (prepare_resume_reply): Change ptid argument's type from unsigned
12252 long to ptid_t. Adjust. Implement W;process and X;process.
12253 (free_sym_cache, clear_symbol_cache): New.
12254 (look_up_one_symbol): Adjust to per-process symbol cache. *
12255 * server.c (cont_thread, general_thread, step_thread): Change type
12256 to ptid_t.
12257 (attached): Delete.
12258 (multi_process): New.
12259 (last_ptid): Change type to ptid_t.
12260 (struct vstop_notif) <ptid>: Change type to ptid_t.
12261 (queue_stop_reply, push_event): Change `ptid' argument's type to
12262 ptid_t.
12263 (discard_queued_stop_replies): Add `pid' argument.
12264 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12265 changes. Don't reference the `attached' global.
12266 (attach_inferior): Adjust to mywait interface changes.
12267 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12268 features. Handle and report "multiprocess+". Handle
12269 "qAttached:PID".
12270 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12271 changes.
12272 (handle_v_kill): New.
12273 (handle_v_stopped): Adjust to use target_pid_to_str.
12274 (handle_v_requests): Allow multiple attaches and runs when
12275 multiprocess extensions are in effect. Handle "vKill".
12276 (myresume): Adjust to use ptids.
12277 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12278 (handle_status): Adjust to discard_queued_stop_replies interface
12279 change.
12280 (first_thread_of, kill_inferior_callback)
12281 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12282 (main): Call initialize_inferiors. Adjust to use ptids, killing
12283 and detaching from all inferiors. Handle multiprocess packet
12284 variants.
12285 * linux-low.h: Include gdb_proc_service.h.
12286 (struct process_info_private): New.
12287 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12288 <lwpid_of>: Use ptid_get_lwp.
12289 (get_lwp_thread): Adjust.
12290 (struct lwp_info): Add `dead' member.
12291 (find_lwp_pid): Declare.
12292 * linux-low.c (thread_db_active): Delete.
12293 (new_inferior): Adjust comment.
12294 (inferior_pid): Delete.
12295 (linux_add_process): New.
12296 (handle_extended_wait): Adjust.
12297 (add_lwp): Change unsigned long to ptid.
12298 (linux_create_inferior): Add process to processes table. Adjust
12299 to use ptids. Don't set new_inferior here.
12300 (linux_attach_lwp): Rename to ...
12301 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12302 it. Adjust to use ptids.
12303 (linux_attach_lwp): New.
12304 (linux_attach): Add process to processes table. Don't set
12305 new_inferior here.
12306 (struct counter): New.
12307 (second_thread_of_pid_p, last_thread_of_process_p): New.
12308 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12309 multiple processes.
12310 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12311 processes. Remove process from process table.
12312 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12313 to multiple processes.
12314 (any_thread_of): New.
12315 (linux_detach): Add `pid' argument, and handle it. Remove process
12316 from processes table.
12317 (linux_join): Add `pid' argument. Handle it.
12318 (linux_thread_alive): Change unsighed long argument to ptid_t.
12319 Consider dead lwps as not being alive.
12320 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12321 threads we're not interested in.
12322 (same_lwp, find_lwp_pid): New.
12323 (linux_wait_for_lwp): Change `pid' argument's type from int to
12324 ptid_t. Adjust.
12325 (linux_wait_for_event): Rename to ...
12326 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12327 from int to ptid_t. Adjust.
12328 (linux_wait_for_event): New.
12329 (linux_wait_1): Add `ptid' argument. Change return type to
12330 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12331 that exit from the process table.
12332 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12333 Adjust.
12334 (mark_lwp_dead): New.
12335 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12336 stopping all threads, mark its main lwp as dead.
12337 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12338 ptids.
12339 (fetch_register, usr_store_inferior_registers)
12340 (regsets_fetch_inferior_registers)
12341 (regsets_store_inferior_registers, linux_read_memory)
12342 (linux_write_memory): Inline `inferior_pid'.
12343 (linux_look_up_symbols): Adjust to use per-process
12344 `thread_db_active'.
12345 (linux_request_interrupt): Adjust to use ptids.
12346 (linux_read_auxv): Inline `inferior_pid'.
12347 (initialize_low): Don't reference thread_db_active.
12348 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12349 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12350 (ps_getpid): Return the pid of the current inferior.
12351 * thread-db.c (proc_handle, thread_agent): Delete.
12352 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12353 per-process data.
12354 (find_one_thread): Change argument type to ptid_t. Adjust to
12355 per-process data.
12356 (maybe_attach_thread): Adjust to per-process data and ptids.
12357 (thread_db_find_new_threads): Ditto.
12358 (thread_db_init): Ditto.
12359 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12360 processes table. Adjust to use ptids.
12361 (spu_kill, spu_detach): Adjust interface. Remove process from
12362 processes table.
12363 (spu_join, spu_thread_alive): Adjust interface.
12364 (spu_wait): Adjust interface. Remove process from processes
12365 table. Adjust to use ptids.
12366 * win32-low.c (current_inferior_tid): Delete.
12367 (current_inferior_ptid): New.
12368 (debug_event_ptid): New.
12369 (thread_rec): Take a ptid. Adjust.
12370 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12371 (child_delete_thread): Ditto.
12372 (do_initial_child_stuff): Add `attached' argument. Add process to
12373 processes table.
12374 (child_fetch_inferior_registers, child_store_inferior_registers):
12375 Adjust.
12376 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12377 (win32_attach): Pass 1 to do_initial_child_stuff.
12378 (win32_kill): Adjust interface. Remove process from processes
12379 table.
12380 (win32_detach): Ditto.
12381 (win32_join): Adjust interface.
12382 (win32_thread_alive): Take a ptid.
12383 (win32_resume): Adjust to use ptids.
12384 (get_child_debug_event): Ditto.
12385 (win32_wait): Adjust interface. Remove exiting process from
12386 processes table.
12387
bd99dc85
PA
123882009-04-01 Pedro Alves <pedro@codesourcery.com>
12389
12390 Non-stop mode support.
12391
12392 * server.h (non_stop): Declare.
12393 (gdb_client_data, handler_func): Declare.
12394 (delete_file_handler, add_file_handler, start_event_loop):
12395 Declare.
12396 (handle_serial_event, handle_target_event, push_event)
12397 (putpkt_notif): Declare.
12398 * target.h (enum resume_kind): New.
12399 (struct thread_resume): Replace `step' field by `kind' field.
12400 (TARGET_WNOHANG): Define.
12401 (struct target_ops) <wait>: Add `options' argument.
12402 <supports_non_stop, async, start_non_stop>: New fields.
12403 (target_supports_non_stop, target_async): New.
12404 (start_non_stop): Declare.
12405 (mywait): Add `options' argument.
12406 * target.c (mywait): Add `options' argument. Print child exit
12407 notifications here.
12408 (start_non_stop): New.
12409 * server.c (non_stop, own_buf, mem_buf): New globals.
12410 (struct vstop_notif): New.
12411 (notif_queue): New global.
12412 (queue_stop_reply, push_event, discard_queued_stop_replies)
12413 (send_next_stop_reply): New.
12414 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12415 interface changes.
12416 (attach_inferior): In non-stop mode, don't wait for the target
12417 here.
12418 (handle_general_set): Handle QNonStop.
12419 (handle_query): When handling qC, return the current general
12420 thread, instead of the first thread of the list.
12421 (handle_query): If the backend supports non-stop mode, include
12422 QNonStop+ in the qSupported query response.
12423 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12424 and non-stop mode.
12425 (handle_v_attach, handle_v_run): Handle non-stop mode.
12426 (handle_v_stopped): New.
12427 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12428 (myresume): Adjust to use resume_kind. Handle non-stop.
12429 (queue_stop_reply_callback): New.
12430 (handle_status): Handle non-stop mode.
12431 (main): Clear non_stop flag on reconnection. Use the event-loop.
12432 Refactor serial protocol handling from here ...
12433 (process_serial_event): ... to this new function. When GDB
12434 selects any thread, select one here. In non-stop mode, wait until
12435 GDB acks all pending events before exiting.
12436 (handle_serial_event, handle_target_event): New.
12437 * remote-utils.c (remote_open): Install remote_desc in the event
12438 loop.
12439 (remote_close): Remove remote_desc from the event loop.
12440 (putpkt_binary): Rename to...
12441 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12442 (putpkt_binary): New as wrapper around putpkt_binary_1.
12443 (putpkt_notif): New.
12444 (prepare_resume_reply): In non-stop mode, don't change the
12445 general_thread.
12446 * event-loop.c: New.
12447 * Makefile.in (OBJ): Add event-loop.o.
12448 (event-loop.o): New rule.
12449
12450 * linux-low.h (pid_of): Moved here.
12451 (lwpid_of): New.
12452 (get_lwp_thread): Use lwpid_of.
12453 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12454 * linux-low.c (pid_of): Delete.
12455 (inferior_pid): Use lwpid_of.
12456 (linux_event_pipe): New.
12457 (target_is_async_p): New.
12458 (delete_lwp): New.
12459 (handle_extended_wait): Use lwpid_of.
12460 (add_lwp): Don't set lwpid field.
12461 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12462 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12463 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12464 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12465 first. Adjust to linux_wait_for_event interface changes. Use
12466 lwpid_of.
12467 (linux_detach): Don't delete the main lwp here.
12468 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12469 (status_pending_p): Don't consider explicitly suspended lwps.
12470 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12471 pointer. Add OPTIONS argument. Change return type to int. Use
12472 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12473 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12474 pointer. Add status pointer argument. Return a pid instead of a
12475 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12476 changes. In non-stop mode, don't switch to a random thread.
12477 (linux_wait): Rename to...
12478 (linux_wait_1): ... this. Add target_options argument, and handle
12479 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12480 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12481 clean exit and signal exit code. Don't stop all threads in
12482 non-stop mode. In all-stop mode, only stop all threads when
12483 reporting a stop to GDB. Handle explicit thread stop requests.
12484 (async_file_flush, async_file_mark): New.
12485 (linux_wait): New.
12486 (send_sigstop): Use lwpid_of.
12487 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12488 interface changes. In non-stop mode, don't switch to a random
12489 thread.
12490 (linux_resume_one_lwp): Use lwpid_of.
12491 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12492 (linux_resume_one_thread): ... this. Handle resume_stop. In
12493 non-stop mode, don't look for pending flag in all threads.
12494 (resume_status_pending_p): Don't consider explicitly suspended
12495 threads.
12496 (my_waitpid): Reimplement. Emulate __WALL.
12497 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12498 Use lwpid_of.
12499 (sigchld_handler, linux_supports_non_stop, linux_async)
12500 (linux_start_non_stop): New.
12501 (linux_target_ops): Register linux_supports_non_stop, linux_async
12502 and linux_start_non_stop.
12503 (initialize_low): Install SIGCHLD handler.
12504 * thread-db.c (thread_db_create_event, find_one_thread)
12505 (thread_db_get_tls_address): Use lwpid_of.
12506 * win32-low.c (win32_detach): Adjust to use resume_kind.
12507 (win32_wait): Add `options' argument.
12508 * spu-low.c (spu_resume): Adjust to use resume_kind.
12509 (spu_wait): Add `options' argument.
12510
5b1c542e
PA
125112009-04-01 Pedro Alves <pedro@codesourcery.com>
12512
12513 Decouple target code from remote protocol.
12514
12515 * target.h (enum target_waitkind): New.
12516 (struct target_waitstatus): New.
12517 (struct target_ops) <wait>: Return an unsigned long. Take a
12518 target_waitstatus pointer instead of a char pointer.
12519 (mywait): Likewise.
12520 * target.c (mywait): Change prototype to return an unsigned long.
12521 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12522 * server.h (thread_from_wait, old_thread_from_wait): Delete
12523 declarations.
12524 (prepare_resume_reply): Change prototype to take a
12525 target_waitstatus.
12526 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12527 (last_status, last_ptid): New.
12528 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12529 pid instead of a signal.
12530 (attach_inferior): Remove "status" and "signal" parameters.
12531 Adjust.
12532 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12533 not as an address.
12534 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12535 (handle_v_requests, myresume): Remove "status" and "signal"
12536 parameters. Adjust.
12537 (handle_status): New.
12538 (main): Delete local `status'. Adjust.
12539 * remote-utils.c: Include target.h.
12540 (prepare_resume_reply): Change prototype to take a
12541 target_waitstatus. Adjust.
12542
12543 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12544 interface.
12545 * spu-low.c (spu_wait): Adjust.
12546 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12547 Delete.
12548 (win32_wait): Adjust.
12549
2bd7c093
PA
125502009-04-01 Pedro Alves <pedro@codesourcery.com>
12551
12552 * target.h (struct thread_resume): Delete leave_stopped member.
12553 (struct target_ops): Add a `n' argument to the `resume' callback.
12554 * server.c (start_inferior): Adjust.
12555 (handle_v_cont, myresume): Adjust.
12556 * linux-low.c (check_removed_breakpoint): Adjust to resume
12557 interface change, and to removed leave_stopped field.
12558 (resume_ptr): Delete.
12559 (struct thread_resume_array): New.
12560 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12561 resume interface change.
12562 (linux_continue_one_thread, linux_queue_one_thread)
12563 (resume_status_pending_p): Check if the resume field is NULL
12564 instead of checking the leave_stopped member.
12565 (linux_resume): Adjust to the target resume interface change.
12566 * spu-low.c (spu_resume): Adjust to the target resume interface
12567 change.
12568 * win32-low.c (win32_detach, win32_resume): Ditto.
12569
c35fafde
PA
125702009-04-01 Pedro Alves <pedro@codesourcery.com>
12571
12572 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12573 flag.
12574 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12575 pending.
12576 (linux_continue_one_thread): Only preserve the stepping flag if
12577 there's a pending breakpoint.
12578
0a59d50b
PA
125792009-03-31 Pedro Alves <pedro@codesourcery.com>
12580
12581 * server.c (main): After the inferior having exited, call
12582 remote_close before exiting gdbserver.
12583
f04c6d38
TJB
125842009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12585
12586 Fix size of FPSCR in Power 7 processors.
12587 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12588 (PPC_FEATURE_HAS_DFP): New #define.
12589 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12590 size of the FPSCR.
12591
78e5cee6
PA
125922009-03-23 Pedro Alves <pedro@codesourcery.com>
12593
12594 * server.c (handle_query) Whitespace and formatting.
12595
1b3f6016
PA
125962009-03-22 Pedro Alves <pedro@codesourcery.com>
12597
12598 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12599 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12600 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12601 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12602 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12603 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12604 Makefile.in, configure.ac: Fix whitespace throughout.
12605 * configure: Regenerate.
12606
a07b2135
PA
126072009-03-22 Pedro Alves <pedro@codesourcery.com>
12608
12609 * inferiors.c (find_inferior): Make it safe for the callback
12610 function to delete the currently iterated inferior.
12611
67cc2626
PA
126122009-03-22 Pedro Alves <pedro@codesourcery.com>
12613
12614 * Makefile.in (linuw_low_h): Move higher.
12615 (thread-db.o): Depend on $(linux_low_h).
12616
54a0b537
PA
126172009-03-17 Pedro Alves <pedro@codesourcery.com>
12618
12619 Rename "process" to "lwp" throughout.
12620
12621 * linux-low.c (all_processes): Rename to...
12622 (all_lwps): ... this.
12623 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12624 (add_process): Rename to ...
12625 (add_lwp): ... this. Adjust.
12626 (linux_create_inferior): Adjust.
12627 (linux_attach_lwp): Adjust.
12628 (linux_attach): Adjust.
12629 (linux_kill_one_process): Rename to ...
12630 (linux_kill_one_lwp): ... this. Adjust.
12631 (linux_kill): Adjust.
12632 (linux_detach_one_process): Rename to ...
12633 (linux_detach_one_lwp): ... this. Adjust.
12634 (linux_detach): Adjust.
12635 (check_removed_breakpoint): Adjust.
12636 (status_pending_p): Adjust.
12637 (linux_wait_for_process): Rename to ...
12638 (linux_wait_for_lwp): ... this. Adjust.
12639 (linux_wait_for_event): Adjust.
12640 (send_sigstop): Adjust.
12641 (wait_for_sigstop): Adjust.
12642 (stop_all_processes): Rename to ...
12643 (stop_all_lwps): ... this.
12644 (linux_resume_one_process): Rename to ...
12645 (linux_resume_one_lwp): ... this. Adjust.
12646 (linux_set_resume_request, linux_continue_one_thread)
12647 (linux_queue_one_thread, resume_status_pending_p)
12648 (usr_store_inferior_registers, regsets_store_inferior_registers)
12649 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12650 Adjust.
12651 * linux-low.h (get_process): Rename to ...
12652 (get_lwp): ... this. Adjust.
12653 (get_thread_process): Rename to ...
12654 (get_thread_lwp): ... this. Adjust.
12655 (get_process_thread): Rename to ...
12656 (get_lwp_thread): ... this. Adjust.
12657 (struct process_info): Rename to ...
12658 (struct lwp_info): ... this.
12659 (all_processes): Rename to ...
12660 (all_lwps): ... this.
12661 * proc-service.c (ps_lgetregs): Adjust.
12662 * thread-db.c (thread_db_create_event, find_one_thread)
12663 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12664
0b16c5cf
PA
126652009-03-14 Pedro Alves <pedro@codesourcery.com>
12666
12667 * server.c (handle_query): Handle "qAttached".
12668
32de4b9d
NS
126692009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12670
12671 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12672 GPLv3, update license URL.
12673
2aecd87f
DE
126742009-03-01 Doug Evans <dje@google.com>
12675
93efd302 12676 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12677 (server_h): Add gdb_signals.h.
12678 (signals.o): Update.
12679 * server.h (target_signal_from_host,target_signal_to_host_p)
12680 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12681
86b1f9c5
PM
126822009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12683
12684 * remote-utils.c (getpkt): Also generate remote-debug
12685 information if noack_mode is set.
12686
4aa995e1
PA
126872009-02-06 Pedro Alves <pedro@codesourcery.com>
12688
12689 * server.c (handle_query): Report qXfer:siginfo:read and
12690 qXfer:siginfo:write as supported and handle them.
12691 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12692 * linux-low.c (linux_xfer_siginfo): New.
12693 (linux_target_ops): Set it.
12694
62709adf
PA
126952009-01-26 Pedro Alves <pedro@codesourcery.com>
12696
12697 * server.c (gdbserver_usage): Mention --remote-debug.
12698 (main): Accept '--remote-debug' switch.
12699
aef93bd7
DE
127002009-01-18 Doug Evans <dje@google.com>
12701
12702 * regcache.c (new_register_cache): No need to check result of xcalloc.
12703 * server.c (handle_search_memory): Back out calls to xmalloc,
12704 result is checked and error is returned to user upon failure.
12705 (handle_query): Ditto. Add more checks for result of malloc.
12706 (handle_v_cont): Check result of malloc, report error back to
12707 user upon failure.
12708 (handle_v_run): Ditto. Call freeargv.
12709 * server.h (freeargv): Declare.
12710 * utils.c (freeargv): New fn.
12711
54363045
DE
127122009-01-15 Doug Evans <dje@google.com>
12713
f626972c
DE
12714 * gdbreplay.c (perror_with_name): Make arg const char *.
12715 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12716 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12717 * utils.c (perror_with_name): Make arg const char *.
54363045 12718
18aae699
PA
127192009-01-14 Pedro Alves <pedro@codesourcery.com>
12720
12721 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12722 when handling a EXIT_PROCESS_DEBUG_EVENT.
12723
ff703abe
JB
127242009-01-06 Joel Brobecker <brobecker@adacore.com>
12725
12726 * gdbreplay.c (gdbreplay_version): Update copyright year.
12727 * server.c (gdbserver_version): Likewise.
12728
f21cc1a2 127292009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12730
12731 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12732 (handle_extended_wait): Improve comment.
0e21c1ec 12733
bca929d3
DE
127342008-12-13 Doug Evans <dje@google.com>
12735
12736 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12737 * server.h (ATTR_MALLOC): New macro.
12738 (xmalloc,xcalloc,xstrdup): Declare.
12739 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12740 * inferiors.c: Ditto.
12741 * linux-low.c: Ditto.
12742 * mem-break.c: Ditto.
12743 * regcache.c: Ditto.
12744 * remote-utils.c: Ditto.
12745 * server.c: Ditto.
12746 * target.c: Ditto.
12747 * win32-low.c: Ditto.
12748
97438e3f
DE
127492008-12-12 Doug Evans <dje@google.com>
12750
896c7fbb
DE
12751 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12752 in debugging printf.
12753
97438e3f
DE
12754 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12755
e3b886f8
DE
127562008-12-09 Doug Evans <dje@google.com>
12757
12758 * linux-low.h (struct process_info): Delete member tid, unused.
12759 * thread-db.c (find_one_thread): Update.
12760 (maybe_attach_thread): Update.
12761
07e059b5
VP
127622008-12-02 Pedro Alves <pedro@codesourcery.com>
12763
889bf7c5
PA
12764 * target.h (struct target_ops): Add qxfer_osdata member.
12765 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12766 and dirent.h.
12767 (linux_qxfer_osdata): New functions.
12768 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12769 callback.
12770 * server.c (handle_query): Handle "qXfer:osdata:read:".
12771 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12772 (buffer_xml_printf): New functions.
12773 * server.h (struct buffer): New.
12774 (buffer_grow_str, buffer_grow_str0): New macros.
12775 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12776 (buffer_xml_printf): Declare.
07e059b5 12777
4cab47ab
DE
127782008-11-24 Doug Evans <dje@google.com>
12779
12780 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12781
f142445f
DJ
127822008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12783
12784 * server.c (handle_v_run): Always use the supplied argument list.
12785
d0107bb6 127862008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12787
d0107bb6
BW
12788 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12789 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12790
2c4ad781
TJB
127912008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12792
12793 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12794 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12795 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12796 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12797 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12798 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12799 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12800 XML target descriptions.
12801 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12802 when inferior is running on an ISA 2.05 or later processor. Add
12803 special case to return offset for full 64-bit slot of FPSCR when
12804 in 32-bits.
12805
dfb64f85
DJ
128062008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12807
12808 * Makefile.in (SFILES, clean): Added sparc64 files.
12809 (reg-sparc64.o, reg-sparc64.c): New.
12810 * configure.srv (sparc*-*-linux*): New configuration.
12811 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12812 syscall arguments for SPARC.
12813 (regsets_store_inferior_registers): Likewise.
12814 * linux-sparc-low.c: New file.
12815
66b6e1dd
DE
128162008-10-21 Doug Evans <dje@google.com>
12817
12818 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12819 (READLINE_DIR,READLINE_DEP): Delete.
12820 (INTERNAL_CFLAGS): Update.
12821 (LINTFLAGS): Update.
12822
9b710a42
PA
128232008-10-10 Pedro Alves <pedro@codesourcery.com>
12824
12825 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12826 whole argv from the last run, not just argv[0].
12827
5822d809
PA
128282008-09-08 Pedro Alves <pedro@codesourcery.com>
12829
12830 * regcache.c (new_register_cache): Return NULL if the register
12831 cache size isn't known yet.
12832 (free_register_cache): Avoid dereferencing a NULL regcache.
12833
74aac56f
DJ
128342008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12835
12836 * configure.srv: Merge MIPS and MIPS64.
12837
400b20f5
MR
128382008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12839
12840 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12841
677c5bb1
LM
128422008-08-18 Luis Machado <luisgpm@br.ibm.com>
12843
12844 * Makefile.in: Add required vsx dependencies.
12845
12846 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12847 Declare init_registers_powerpc_vsx32l.
12848 Declare init_registers_powerpc_vsx64l.
12849 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12850 (ppc_arch_setup): Check for VSX in hwcap.
12851 (ppc_fill_vsxregset): New function.
12852 (ppc_store_vsxregset): New function.
12853 Add new VSX entry in regset_info target_regsets.
12854
12855 * configure.srv: Add new VSX dependencies.
12856
a6f3e723
SL
128572008-08-12 Pedro Alves <pedro@codesourcery.com>
12858
12859 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12860 (remote_open): Set or clear transport_is_reliable.
12861 (putpkt_binary): Don't expect acks in noack mode.
12862 (getpkt): Don't send ack/nac in noack mode.
12863 * server.c (handle_general_set): Handle QStartNoAckMode.
12864 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12865 qSupported.
12866 (main): Reset noack_mode on every connection.
12867 * server.h (noack_mode): Declare.
12868
a417dc56
RW
128692008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12870
12871 * Makefile.in (GDBREPLAY_OBS): New variable.
12872 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12873
3221518c
UW
128742008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12875 Daniel Jacobowitz <dan@codesourcery.com>
12876
12877 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12878 (usr_store_inferior_registers): Likewise.
12879 (regsets_store_inferior_registers): Likewise.
12880
ec56be1b
PA
128812008-07-31 Rolf Jansen <rj@surtec.com>
12882 Pedro Alves <pedro@codesourcery.com>
12883
12884 * configure.ac: Check for memmem declaration.
12885 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12886 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12887 (disable_packet_qfThreadInfo): Unconditionally compile.
12888 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12889 * configure, config.in: Regenerate.
12890
2fe5e3ff
DE
128912008-07-28 Doug Kwan <dougkwan@google.com>
12892
12893 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12894 (linux_write_memory): Remove declaration of errno.
12895
836acd6d
UW
128962008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12897
12898 * linux-low.c (handle_extended_wait): Do not use "status"
12899 variable uninitialized.
12900
aeba519e
PA
129012008-07-07 Pedro Alves <pedro@codesourcery.com>
12902
12903 * server.c (handle_v_attach): Inhibit reporting dll changes.
12904
db42f210
PA
129052008-06-27 Pedro Alves <pedro@codesourcery.com>
12906
12907 * remote-utils.c (prepare_resume_reply): If requested, don't
12908 output "thread:TID" in the T stop reply.
12909
12910 * server.c (disable_packet_vCont, disable_packet_Tthread)
12911 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12912 (handle_query): If requested, disable support for qC, qfThreadInfo
12913 and qsThreadInfo.
12914 (handle_v_requests): If requested, disable support for vCont.
12915 (gdbserver_show_disableable): New.
12916 (main): Handle --disable-packet and --disable-packet=LIST.
12917
12918 * server.h (disable_packet_vCont, disable_packet_Tthread)
12919 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12920
8e4c5421
CD
129212008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12922
12923 * server.c (gdbserver_usage): Mention --version.
12924
6e23a804
DJ
129252008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12926
12927 * Makefile.in (gdbreplay.o): New rule.
12928
90aa6a40
JM
129292008-06-06 Joseph Myers <joseph@codesourcery.com>
12930
12931 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12932 message, not gdbserver.
12933
c16158bc 129342008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12935 Nathan Sidwell <nathan@codesourcery.com>
12936 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12937
12938 * acinclude.m4: Include ../../config/acx.m4.
12939 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12940 * configure, config.in: Regenerate.
12941 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12942 * server.c (gdbserver_version): Print PKGVERSION.
12943 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12944 (main): Adjust gdbserver_usage calls.
12945 * gdbreplay.c (version, host_name): Add declarations.
12946 (gdbreplay_version, gdbreplay_usage): New.
12947 (main): Accept --version and --help options.
12948
aeb75bf5
DJ
129492008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12950
12951 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12952 (arm_breakpoint_at): Handle Thumb.
12953 (the_low_target): Add comment.
12954
76b233dd
UW
129552008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12956
12957 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12958
08388c79
DE
129592008-05-09 Doug Evans <dje@google.com>
12960
a3c83fae
DE
12961 * server.h (decode_search_memory_packet): Declare.
12962 * remote-utils.c (decode_search_memory_packet): New fn.
12963 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12964 (handle_search_memory): New fn.
12965 (handle_query): Process qSearch:memory packets.
12966
bb9c3d36
UW
129672008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12968
12969 * regcache.c (registers_length): Remove.
12970 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12971 full register packet.
12972 * regcache.h (registers_length): Remove prototype.
12973 * server.h (PBUFSIZ): Define to 16384.
12974
7284e1be
UW
129752008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12976
12977 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12978 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12979 powerpc-64l.o, and powerpc-altivec64l.o.
12980 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12981 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12982 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12983 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12984 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12985 to srv_xmlfiles.
12986
12987 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12988 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12989 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12990 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12991 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12992 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12993 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12994 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12995 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12996 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12997 (clean): Update.
12998
12999 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13000 (init_registers_powerpc_32l): ... this new prototype.
13001 (init_registers_powerpc_32): Remove, replace by ...
13002 (init_registers_powerpc_altivec32l): ... this new prototype.
13003 (init_registers_powerpc_e500): Remove, replace by ...
13004 (init_registers_powerpc_e500l): ... this new prototype.
13005 (init_registers_ppc64): Remove, replace by ...
13006 (init_registers_powerpc_64l): ... this new prototype.
13007 (init_registers_powerpc_64): Remove, replace by ...
13008 (init_registers_powerpc_altivec64l): ... this new prototype.
13009 (ppc_num_regs): Set to 73.
13010 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13011 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13012 (ppc_cannot_store_register): Handle orig_r3 and trap.
13013 (ppc_arch_setup): Update init_registers_... calls.
13014 (ppc_fill_gregset): Handle orig_r3 and trap.
13015
13016 * inferiors.c (clear_inferiors): Reset current_inferior.
13017
fdc59709
PB
130182008-04-23 Paolo Bonzini <bonzini@gnu.org>
13019
889bf7c5
PA
13020 * acinclude.m4: Add override.m4.
13021 * configure: Regenerate.
fdc59709 13022
c9b2f845
UW
130232008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13024
13025 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13026 initial call to init_register_ppc64.
13027
550512b8
UW
130282008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13029
43aaf8b6
PA
13030 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13031 single powerpc*-*-linux* case.
550512b8
UW
13032 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13033
b6430ec3
UW
130342008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13035
13036 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13037 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13038 from reg_xmlfiles.
13039 * linux-ppc-low.c: Include <elf.h>.
13040 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13041 (ppc_hwcap): New global variable.
13042 (ppc_regmap): Remove __SPE__ #ifdef sections.
13043 (ppc_regmap_e500): New global variable.
13044 (ppc_cannot_store_register): Update __SPE__ special case.
13045 (ppc_get_hwcap): New function.
13046 (ppc_arch_setup): Use it to determine whether inferior supports
13047 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13048 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13049 Do not access registers if target does not support AltiVec.
13050 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13051 Do not access registers if target does not support SPE.
13052 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13053
52fa2412
UW
130542008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13055
13056 * linux-low.c (disabled_regsets, num_regsets): New.
13057 (use_regsets_p): Delete.
13058 (linux_wait_for_process): Clear disabled_regsets.
13059 (regsets_fetch_inferior_registers): Check and set it.
13060 (regsets_store_inferior_registers): Likewise.
13061 (linux_fetch_registers, linux_store_registers): Do not use
13062 use_regsets_p.
13063 (initialize_low): Allocate disabled_regsets.
13064
e28b3332
DJ
130652008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13066
13067 * Makefile.in (LIBOBJS): New.
13068 (OBS): Use LIBOBJS.
13069 (memmem.o): New rule.
13070 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13071 * configure: Regenerated.
13072
4536995d
UW
130732008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13074
13075 * server.c (handle_query): Never return "unsupported" for
13076 qXfer:features:read queries.
13077
221c031f
UW
130782008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13079
13080 * server.c (get_features_xml): Fix inverted condition.
13081 (handle_query): Always support qXfer:feature:read.
13082
ccd213ac
DJ
130832008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13084
13085 * server.c (wrapper_argv): New.
13086 (start_inferior): Handle wrapper_argv. If set, expect an extra
13087 trap.
13088 (gdbserver_usage): Document --wrapper.
13089 (main): Parse --wrapper.
13090
6fe305f7
UW
130912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13092
13093 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13094 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13095 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13096 (ppc_set_pc): Likewise.
13097 (ppc_arch_setup): New function.
13098 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13099 of collect_register.
889bf7c5 13100 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13101
5b0a002e
UW
131022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13103
13104 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13105 instead of linux-ppc64-low.o.
13106 * linux-ppc64-low.c: Remove file.
13107 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13108 (linux-ppc64-low.o): Remove rule.
13109
13110 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13111 (init_registers_powerpc_64): Likewise.
13112 (ppc_regmap): Conditionally define depending on __powerpc64__.
13113 (ppc_cannot_store_register): Do not special-case "fpscr" when
13114 compiled on __powerpc64__.
13115 (ppc_collect_ptrace_register): New function.
13116 (ppc_supply_ptrace_register): New function.
13117 (ppc_breakpoint): Change type to "unsigned int".
13118 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13119 (the_low_target): Conditionally provide initializers for the
889bf7c5 13120 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13121 collect_ptrace_register and supply_ptrace_register members.
13122
9b4b61c8
UW
131232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13124
13125 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13126 * server.c (gdbserver_xmltarget): Define.
13127 (get_features_xml): Use it to replace "target.xml" and arch_string.
13128
13129 * configure.srv: Remove srv_xmltarget. Add XML files that were
13130 mentioned there to srv_xmlfiles instead. Remove conditional tests
13131 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13132 srv_xmlfiles and srv_regobj to include all possible choices.
13133 * configure.ac (srv_xmltarget): Remove.
13134 (srv_xmlfiles): Do not add "target.xml".
13135 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13136 checks for supplementary target information.
13137 * configure: Regenerate.
13138 * Makefile.in (XML_TARGET): Remove.
13139 (target.xml): Remove rule.
13140 (clean): Do not clean up target.xml.
13141 (.PRECIOUS): Do not mention target.xml.
13142
13143 * target.h (struct target_ops): Remove arch_string member.
13144 * linux-low.c (linux_arch_string): Remove.
13145 (linux_target_ops): Remove arch_string initializer.
13146 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13147 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13148 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13149 * spu-low.c (spu_arch_string): Remove.
13150 (spu_target_ops): Remove arch_string initializer.
13151 * win32-low.c (win32_arch_string): Remove.
13152 (win32_target_ops): Remove arch_string initializer.
13153 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13154 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13155 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13156
ee1a7ae4
UW
131572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13158
13159 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13160 by collect_ptrace_register and supply_ptrace_register hooks.
13161 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13162 instead of checking for the_low_target.left_pad_xfer.
13163 (usr_store_inferior_registers): Use collect_ptrace_register callback
13164 instead of checking for the_low_target.left_pad_xfer.
13165
13166 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13167 (s390_supply_ptrace_register): Likewise.
13168 (s390_fill_gregset): Call s390_collect_ptrace_register.
13169 (the_low_target): Update.
13170
13171 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13172 (ppc_supply_ptrace_register): Likewise.
13173 (the_low_target): Update.
13174
13175 * linux-i386-low.c (the_low_target): Update.
13176 * linux-x86-64-low.c (the_low_target): Update.
13177
d61ddec4
UW
131782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13179
13180 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13181 reg-s390.o and reg-s390x.o.
13182
13183 * linux-low.c (new_inferior): New global variable.
13184 (linux_create_inferior, linux_attach): Set it.
13185 (linux_wait_for_process): Call the_low_target.arch_setup after the
13186 target has stopped for the first time.
13187 (initialize_low): Do not call the_low_target.arch_setup.
13188
13189 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13190 (s390_set_pc): Likewise.
13191 (s390_arch_setup): New function.
13192 (the_low_target): Use s390_arch_setup as arch_setup routine.
13193
13194 * regcache.c (realloc_register_cache): New function.
13195 (set_register_cache): Call it for each existing regcache.
13196
d05b4ac3
UW
131972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13198
13199 * server.h (init_registers): Remove prototype.
13200
13201 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13202 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13203 instead of init_registers ().
13204 * linux-arm-low.c (init_registers_arm): Add prototype.
13205 (init_registers_arm_with_iwmmxt): Likewise.
13206 (the_low_target): Add initializer for arch_setup field.
13207 * linux-cris-low.c (init_registers_cris): Add prototype.
13208 (the_low_target): Add initializer for arch_setup field.
13209 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13210 (the_low_target): Add initializer for arch_setup field.
13211 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13212 (the_low_target): Add initializer for arch_setup field.
13213 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13214 (the_low_target): Add initializer for arch_setup field.
13215 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13216 (the_low_target): Add initializer for arch_setup field.
13217 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13218 (the_low_target): Add initializer for arch_setup field.
13219 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13220 (init_registers_mips64_linux): Likewise.
13221 (the_low_target): Add initializer for arch_setup field.
13222 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13223 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13224 (the_low_target): Add initializer for arch_setup field.
13225 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13226 (init_registers_powerpc_64): Likewise.
13227 (the_low_target): Add initializer for arch_setup field.
13228 * linux-s390-low.c (init_registers_s390): Add prototype.
13229 (init_registers_s390x): Likewise.
13230 (the_low_target): Add initializer for arch_setup field.
13231 * linux-sh-low.c (init_registers_sh): Add prototype.
13232 (the_low_target): Add initializer for arch_setup field.
13233 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13234 (the_low_target): Add initializer for arch_setup field.
13235 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13236 (the_low_target): Add initializer for arch_setup field.
13237
13238 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13239 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13240 instead of init_registers ().
13241 * win32-arm-low.c (init_registers_arm): Add prototype.
13242 (the_low_target): Add initializer for arch_setup field.
13243 * win32-i386-low.c (init_registers_i386): Add prototype.
13244 (the_low_target): Add initializer for arch_setup field.
13245
13246 * spu-low.c (init_registers_spu): Add prototype.
13247 (initialize_low): Call initialie_registers_spu () instead of
13248 initialize_registers ().
13249
fd96d250
PA
132502008-02-19 Pedro Alves <pedro@codesourcery.com>
13251
13252 * server.c (handle_v_requests): When handling the vRun and vAttach
13253 packets, if already debugging a process, don't kill it. Return an
13254 error instead.
13255
d41b6bb4
DJ
132562008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13257
13258 * server.c (handle_query): Correct length check.
13259
5ac588cf
PA
132602008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13261
13262 * win32-low.c (do_initial_child_stuff): Add process handle
13263 parameter. Set current_process_handle and current_process_id from the
13264 parameters. Clear globals.
13265 (win32_create_inferior): Don't set current_process_handle and
13266 current_process_id here. Instead pass them on the call to
13267 do_initial_child_stuff.
13268 (win32_attach): Likewise.
13269 (win32_clear_inferiors): New.
13270 (win32_kill): Don't close the current process handle or the
13271 current thread handle here. Instead call win32_clear_inferiors.
13272 (win32_detach): Don't open a new handle to the process. Call
13273 win32_clear_inferiors.
13274 (win32_join): Don't rely on current_process_handle; open a new
13275 handle using the process id.
13276 (win32_wait): Call win32_clear_inferiors when the inferior process
13277 has exited.
13278
ecd7ecbc
DJ
132792008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13280
13281 * server.c (monitor_show_help): Add "exit".
13282
1525d545
MG
132832008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13284
ecd7ecbc 13285 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13286 (clean): Add reg-xtensa.c.
13287 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13288 * configure.srv (xtensa*-*-linux*) New target.
13289 * linux-xtensa-low.c: New.
13290 * xtensa-xtregs.c: New.
1525d545 13291
59a016f0
PA
132922008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13293
13294 * hostio.c: Don't include errno.h.
13295 (errno_to_fileio_errno): Move to hostio-errno.
13296 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13297 error number outputting to the target->hostio_last_error callback.
13298 (hostio_packet_error): Use FILEIO_EINVAL directly.
13299 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13300 calls to hostio_error.
13301 * hostio-errno.c: New.
13302 * server.h (hostio_last_error_from_errno): Declare.
13303 * target.h (target_ops): Add hostio_last_error member.
13304 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13305 as hostio_last_error handler.
889bf7c5 13306 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13307 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13308 (wince_hostio_last_error): New functions.
13309 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13310 as hostio_last_error handler.
13311 (win32_target_ops) [!_WIN32_WCE]: Register
13312 hostio_last_error_from_errno as hostio_last_error handler.
13313 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13314 (hostio-errno.o): New rule.
13315 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13316 * configure.srv (srv_hostio_err_objs): New variable. Default to
13317 hostio-errno.o.
13318 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13319 * configure: Regenerate.
13320
2d717e4f
DJ
133212008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13322
13323 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13324 (linux_kill, linux_detach): Clean up the process list.
13325 * remote-utils.c (remote_open): Improve port number parsing.
13326 (putpkt_binary, input_interrupt): Only send interrupts if the target
13327 is running.
13328 * server.c (extended_protocol): Make static.
13329 (attached): Define earlier.
13330 (exit_requested, response_needed, program_argv): New variables.
13331 (target_running): New.
13332 (start_inferior): Clear attached here.
13333 (attach_inferior): Set attached here.
13334 (require_running): Define.
13335 (handle_query): Use require_running and target_running. Implement
13336 "monitor exit".
13337 (handle_v_attach, handle_v_run): New.
13338 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13339 (gdbserver_usage): Update.
13340 (main): Redo argument parsing. Handle --debug and --multi. Handle
13341 --attach along with other options or after the port. Save
13342 program_argv. Support no initial program. Resynchronize
13343 communication with GDB after an error. Handle "monitor exit".
13344 Use require_running and target_running. Always allow the extended
13345 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13346 restart in extended mode.
13347 * README: Refer to the GDB manual. Update --attach usage.
13348
7407e2de
AS
133492007-12-20 Andreas Schwab <schwab@suse.de>
13350
13351 * linux-low.c (STACK_SIZE): Define.
13352 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13353 (linux_test_for_tracefork): Likewise.
13354
b65d95c5
DJ
133552007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13356
13357 * linux-low.c (linux_wait_for_event): Update messages. Do not
13358 reinsert auto-delete breakpoints.
13359 * mem-break.c (struct breakpoint): Change return type of handler to
13360 int.
13361 (set_breakpoint_at): Update handler type.
13362 (reinsert_breakpoint_handler): Return 1 instead of calling
13363 delete_breakpoint.
13364 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13365 setting a new one.
13366 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13367 * mem-break.h (set_breakpoint_at): Update handler type.
13368 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13369 * win32-low.c (auto_delete_breakpoint): New.
13370 (get_child_debug_event): Use it.
13371
4e799345
DJ
133722007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13373
13374 * configure.ac: Check for pread and pwrite.
13375 * hostio.c (handle_pread): Fall back to lseek and read.
13376 (handle_pwrite): Fall back to lseek and write.
13377 * config.in, configure: Regenerated.
13378
27524b67
DJ
133792007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13380
13381 * server.c (myresume): Add own_buf argument.
13382 (main): Update calls.
13383
a20d5e98
DJ
133842007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13385
13386 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13387 * remote-utils.c (remote_open): Do not call disable_async_io.
13388 (block_async_io): Delete.
13389 (unblock_async_io): Make static.
13390 (initialize_async_io): New.
13391 * server.c (handle_v_cont): Handle async I/O here.
13392 (myresume): Likewise. Move other common resume tasks here...
13393 (main): ... from here. Call initialize_async_io. Disable async
13394 I/O before the main loop.
13395 * server.h (initialize_async_io): Declare.
13396 (block_async_io, unblock_async_io): Delete prototypes.
13397 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13398
b79d787e
DJ
133992007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13400
13401 * remote-utils.c (readchar): Allow binary data in received messages.
13402
d97903b2
PA
134032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13404
13405 * win32-low.c (attaching): New global.
13406 (win32_create_inferior): Clear the `attaching' global.
13407 (win32_attach): Set the `attaching' global.
13408 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13409 attaching. Only set a breakpoint at the entry point if not
13410 attaching.
13411
311de423
PA
134122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13413
13414 * server.c (main): Don't report dll events on the initial
13415 connection on attaches.
13416
6c2d16d2
PA
134172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13418
13419 * server.c (main): Relax numerical bases supported for the pid of
13420 the --attach command line argument.
13421
5ca906e6
PA
134222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13423
13424 * win32-low.c (win32_attach): Call OpenProcess before
13425 DebugActiveProcess, not after. Add last error output to error
13426 call.
13427
9c6c8194
PA
134282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13429
13430 * win32-low.c (win32_get_thread_context)
13431 (win32_set_thread_context): New functions.
13432 (thread_rec): Use win32_get_thread_context.
13433 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13434 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13435 field.
13436
4d5d1aaa
PA
134372007-12-03 Leo Zayas
13438 Pedro Alves <pedro_alves@portugalmail.pt>
13439
13440 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13441 global variables.
13442 (child_add_thread): Minor cleanup.
13443 (child_continue): Resume artificially suspended threads before
13444 calling ContinueDebugEvent.
13445 (suspend_one_thread): New.
13446 (fake_breakpoint_event): New.
13447 (get_child_debug_event): Change return type to int. Check here if
13448 gdb sent an interrupt request. If a soft interrupt was requested,
13449 fake a breakpoint event. Return 0 if there is no event to handle,
13450 and 1 otherwise.
13451 (win32_wait): Don't check here if gdb sent an interrupt request.
13452 Ensure there is a valid event to handle.
13453 (win32_request_interrupt): Add soft interruption method as last
13454 resort.
13455
c436e841
PA
134562007-12-03 Leo Zayas
13457 Pedro Alves <pedro_alves@portugalmail.pt>
13458
13459 * win32-low.h (win32_thread_info): Add descriptions to the
13460 structure members. Replace `suspend_count' counter by a
13461 `suspended' flag.
13462 * win32-low.c (thread_rec): Update condition of when to get the
13463 context from the inferior. Rely on ContextFlags being set if it
13464 has already been retrieved. Only suspend the inferior thread if
13465 we haven't already. Warn if that fails.
13466 (continue_one_thread): s/suspend_count/suspended/. Only call
13467 ResumeThread once. Warn if that fails.
13468
e7b5fa67
PA
134692007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13470
13471 * win32-low.c (win32_wait): Don't read from the inferior when it
13472 has already exited.
13473
a385171d
PA
134742007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13475
13476 * Makefile.in (win32_low_h): New variable.
13477 (win32-low.o): Add dependency on $(win32_low_h).
13478 (win32-arm-low.o, win32-i386-low.o): New rules.
13479
f80c84b3
DJ
134802007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13481
13482 * hostio.c: Correct copyright year.
13483
a6b151f1
DJ
134842007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13485
13486 * Makefile.in (OBS): Add hostio.o.
13487 (hostio.o): New rule.
13488 * server.h (handle_vFile): Declare.
13489 * hostio.c: New file.
13490 * server.c (handle_v_requests): Take packet_len and new_packet_len
13491 for binary packets. Call handle_vFile.
13492 (main): Update call to handle_v_requests.
13493
f9387fc3
DJ
134942007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13495
13496 * linux-low.c: Include <sched.h>.
13497
51c2684e
DJ
134982007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13499
13500 * linux-low.c (linux_tracefork_grandchild): New.
13501 (linux_tracefork_child): Use clone.
13502 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13503
75f83163
JB
135042007-10-31 Joel Brobecker <brobecker@adacore.com>
13505
13506 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13507
da5898ce
DJ
135082007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13509
13510 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13511
24a09b5f
DJ
135122007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13513
13514 * inferiors.c (change_inferior_id): Delete.
13515 (add_pid_to_list, pull_pid_from_list): New.
13516 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13517 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13518 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13519 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13520 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13521 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13522 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13523 (using_threads): Always set to 1.
13524 (handle_extended_wait): New.
13525 (add_process): Do not set TID.
13526 (linux_create_inferior): Set must_set_ptrace_flags.
13527 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13528 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13529 (linux_thread_alive): Rename TID argument to LWPID.
13530 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13531 (linux_wait_for_event): Do not use TID or check using_threads. Update
13532 call to dead_thread_notify. Call handle_extended_wait.
13533 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13534 (send_sigstop): Delete sigstop_sent.
13535 (wait_for_sigstop): Avoid TID.
13536 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13537 (linux_test_for_tracefork): New.
13538 (linux_lookup_signals): Use thread_db_active and
13539 linux_supports_tracefork_flag.
13540 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13541 * linux-low.h (get_process_thread): Avoid TID.
13542 (struct process_ifo): Move thread_known and tid to the end. Remove
13543 sigstop_sent.
13544 (linux_attach_lwp, thread_db_init): Update prototypes.
13545 * server.h (change_inferior_id): Delete prototype.
13546 (add_pid_to_list, pull_pid_from_list): New prototypes.
13547 * thread-db.c (thread_db_use_events): New.
13548 (find_first_thread): Rename to...
13549 (find_one_thread): ...this. Update callers and messages. Do not
13550 call fatal. Check thread_db_use_events. Do not call
13551 change_inferior_id or new_thread_notify.
13552 (maybe_attach_thread): Update. Do not call new_thread_notify.
13553 (thread_db_init): Set thread_db_use_events. Check use_events.
13554 * utils.c (fatal, warning): Correct message prefix.
13555
30ed0a8f
DJ
135562007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13557
13558 * Makefile.in (clean): Remove new files.
13559 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13560 (powerpc-64.o, powerpc-64.c): New rules.
13561 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13562 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13563 with SPE.
13564 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13565 SPE targets.
13566 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13567 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13568 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13569 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13570 (target_regsets): Add AltiVec and SPE register sets.
13571 * configure.ac: Check for AltiVec and SPE.
13572 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13573 (ppc_fill_vrregset, ppc_store_vrregset): New.
13574 (target_regsets): Add AltiVec register set.
13575 * configure: Regenerated.
13576
fd462a61
DJ
135772007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13578
13579 * linux-low.c (O_LARGEFILE): Define.
13580 (linux_read_memory): Use /proc/PID/mem.
13581 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13582 * configure, config.in: Regenerated.
13583
69f223ed
DJ
135842007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * linux-low.c (linux_wait_for_event): Do not pass signals while
13587 single-stepping.
13588
aec18585
PA
135892007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13590
13591 * win32-low.c (create_process): New.
13592 (win32_create_inferior): Use create_process instead of
13593 CreateProcess. If create_process failed retry appending an ".exe"
13594 suffix. Store the GetLastError result immediatelly after
13595 create_process calls and use it on the call to error.
13596
34d86ddd
PA
135972007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13598
13599 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13600
5a0e3bd0
JB
136012007-08-23 Joel Brobecker <brobecker@adacore.com>
13602
13603 * configure.ac: Switch license to GPLv3.
13604
f88c79e6
MS
136052007-08-01 Michael Snyder <msnyder@access-company.com>
13606
13607 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13608
6b3d9b83
PA
136092007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13610
13611 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13612 typedef.
13613 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13614 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13615 CloseToolhelp32Snapshot.
13616 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13617 CloseToolhelp32Snapshot.
13618
c588c53c
MS
136192007-07-27 Michael Snyder <michael.snyder@access-company.com>
13620
13621 * server.c (main): Check for inferior exit before main loop.
13622
aa0403d9
PA
136232007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13624
13625 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13626 instead of on tmp_desc.
13627
255e7678
DJ
136282007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13629 Daniel Jacobowitz <dan@codesourcery.com>
13630
13631 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13632 (add_thread): Minor cleanups.
13633 (clear_inferiors): Move lower in the file. Clear the DLL
13634 list.
13635 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13636 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13637 (xml_escape_text): New.
13638 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13639 for qSupported.
13640 (handle_v_cont): Report errors.
13641 (gdbserver_version): Update.
13642 (main): Correct size of own_buf. Do not report initial DLL events.
13643 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13644 (unloaded_dll, xml_escape_text): New.
13645 * win32-low.c (enum target_waitkind): Update comments.
13646 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13647 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13648 (win32_EnumProcessModules, win32_GetModuleInformation)
13649 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13650 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13651 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13652 (win32_Module32First, win32_Module32Next, load_toolhelp)
13653 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13654 (get_child_debug_event): Handle DLL events.
13655 (win32_wait): Likewise.
13656
0d37add9
DJ
136572007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13658
13659 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13660 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13661
45e2715e
PA
136622007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13663
13664 * win32-low.c (handle_output_debug_string): Ignore event if not
13665 waiting.
13666
c5674cf1
PA
136672007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13668
13669 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13670
2bbe3cc1
DJ
136712007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13672
13673 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13674
ae13219e
DJ
136752007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13676
13677 * inferiors.c (change_inferior_id): Add comment.
13678 * linux-low.c (check_removed_breakpoint): Add an early
13679 prototype. Improve debug output.
13680 (linux_attach): Doc update.
13681 (linux_detach_one_process, linux_detach): Clean up before releasing
13682 each process.
13683 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13684 * linux-low.h (struct process_info): Doc improvement.
13685 * mem-break.c (delete_all_breakpoints): New.
13686 * mem-break.h (delete_all_breakpoints): New prototype.
13687 * thread-db.c (find_first_thread): New.
13688 (thread_db_create_event): Call it instead of
13689 thread_db_find_new_threads. Clean up unused variables.
13690 (maybe_attach_thread): Remove first thread handling.
13691 (thread_db_find_new_threads): Use find_first_thread.
13692 (thread_db_get_tls_address): Likewise.
13693
4105de34
DJ
136942007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13695
13696 * thread-db.c (thread_db_find_new_threads): Add prototype.
13697 (thread_db_create_event): Check for the main thread before adding
13698 a new thread.
13699 (maybe_attach_thread): Only enable event reporting if TID == 0.
13700 (thread_db_get_tls_address): Check for new threads.
13701
2b876972
DJ
137022007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13703
13704 * linux-low.c (linux_create_inferior): Try execv before execvp.
13705 * spu-low.c (spu_create_inferior): Likewise.
13706
7a245884
DJ
137072007-06-13 Mike Frysinger <vapier@gentoo.org>
13708
13709 * linux-low.c (linux_create_inferior): Change execv to execvp.
13710 * spu-low.c (spu_create_inferior): Likewies.
13711
117ce543
DJ
137122007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * Makefile.in (clean): Clean new files instead of deleted ones.
13715 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13716 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13717 rules.
13718 * configure.srv: Specify XML files and new regformats for MIPS and
13719 MIPS64 GNU/Linux.
13720 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13721 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13722 an entry for the restart register.
13723 (mips_cannot_fetch_register, mips_cannot_store_register)
13724 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13725 register names to match the XML descriptions.
13726 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13727 restart register instead of $0.
13728
0e7f50da
UW
137292007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13730 Markus Deuling <deuling@de.ibm.com>
13731
13732 * remote-utils.c (decode_xfer_write): New function.
13733 * server.h (decode_xfer_write): Add prototype.
13734 * server.c (handle_query): Add PACKET_LEN argument. Support
13735 qXfer:spu:read and qXfer:spu:write packets.
13736 (main): Pass packet_len to handle_query.
13737 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13738 * target.h (target_ops): Add qxfer_spu.
13739
374c1d38
UW
137402007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13741
13742 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13743 accessing non-seekable spufs files.
13744
bb63802a
UW
137452007-05-16 Markus Deuling <deuling@de.ibm.com>
13746
889bf7c5 13747 * server.c (handle_query): Add reply for qC packet.
bb63802a 13748
7390519e
PA
137492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13750 Leo Zayas <lerele@champenstudios@com>
13751
13752 * server.h (check_remote_input_interrupt_request): New function.
13753 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13754 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13755 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13756 (check_remote_input_interrupt_request): New function.
13757 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13758 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13759 winapi_GenerateConsoleCtrlEvent): New typedefs.
13760 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13761 to 250 ms.
13762 (win32_wait): Check for remote interrupt request
13763 with check_remote_input_interrupt_request.
13764 (win32_request_interrupt): New function.
13765 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13766
34b34921
PA
137672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13768
13769 * win32-low.c (debug_registers_changed,
13770 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13771 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13772 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13773 (thread_rec): Get context using the low target.
13774 (child_add_thread): Call thread_added on the low target,
13775 which does the same thing.
13776 (regptr): Delete.
13777 (do_initial_child_stuff): Remove debug registers references.
13778 Set context using the low target. Resume threads after
13779 setting the contexts.
13780 (child_continue): Remove dead variable. Remove debug
13781 registers references.
13782 (child_fetch_inferior_registers): Go through the low target.
13783 (do_child_store_inferior_registers): Remove.
13784 (child_store_inferior_registers): Go through the low target.
13785 (win32_resume): Remove debug registers references.
13786 Set context using the low target.
13787 (handle_exception): Change return type to void. Don't record
13788 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13789 first chance exception.
889bf7c5 13790 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13791 goto loop. Always return after waiting for debug event.
13792 (win32_wait): Convert to switch statement. Handle spurious
13793 events.
13794
13795 * win32-i386-low.c (debug_registers_changed,
13796 debug_registers_used): New.
13797 (initial_stuff): Rename to ...
13798 (i386_initial_stuff): ... this. Clear debug registers
13799 state variables.
13800 (store_debug_registers): Delete.
13801 (i386_get_thread_context): New.
13802 (load_debug_registers): Delete.
13803 (i386_set_thread_context): New.
13804 (i386_thread_added): New.
13805 (single_step): Rename to ...
13806 (i386_single_step): ... this.
13807 (do_fetch_inferior_registers): Rename to ...
13808 (i386_fetch_inferior_register): ... this.
13809 (i386_store_inferior_register): New.
13810 (the_low_target): Adapt to new interface.
13811
13812 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13813 (arm_get_thread_context): New.
13814 (arm_set_thread_context): New.
13815 (regptr): New.
13816 (do_fetch_inferior_registers): Rename to ...
13817 (arm_fetch_inferior_register): ... this.
13818 (arm_store_inferior_register): New.
13819 (arm_wince_breakpoint): Reimplement as unsigned long.
13820 (arm_wince_breakpoint_len): Define.
13821 (the_low_target): Adapt to new interface.
13822
13823 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13824 load_debug_registers. Add get_thread_context, set_thread_context,
13825 thread_added and store_inferior_register. Rename
13826 fetch_inferior_registers to fetch_inferior_register.
13827 (regptr): Remove declaration.
13828
dd6953e1
PA
138292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13830
13831 * linux-low.c (linux_detach): Change return type to int. Return 0.
13832 * spu-low.c (spu_detach): Likewise.
13833
444d6139
PA
138342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13835
13836 * target.h (target_ops): Change return type of detach to int.
13837 Add join.
13838 (join_inferior): New.
13839 * server.c (main): Don't skip detach support on mingw32.
13840 If the inferior doesn't support detaching return error.
13841 Call join_inferior instead of using waitpid.
13842 * linux-low.c (linux_join): New.
13843 (linux_target_op): Add linux_join.
13844 * spu-low.c (spu_join): New.
13845 (spu_target_ops): Add spu_join.
13846 * win32-low.c (win32_detach): Adapt to new interface.
13847 Reopen current_process_handle before detaching. Issue a child
13848 resume before detaching.
13849 (win32_join): New.
13850 (win32_target_op): Add win32_join.
13851
1d5315fe
PA
138522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13853
13854 * win32-low.c (win32-attach): Fix return value.
13855 * target.h (target_ops): Describe ATTACH return values.
13856
bf914831
PA
138572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13858
13859 * win32-low.c (GETPROCADDRESS): Define.
13860 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13861 (winapi_DebugSetProcessKillOnExit): Likewise.
13862 (win32_create_inferior): Force usage of ansi CreateProcessA.
13863 (win32_attach): Use GETPROCADDRESS.
13864 (win32_detach): Likewise.
13865
f72f3e60
PA
138662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13867
13868 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13869
ed50f18f
PA
138702007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13871
13872 * win32-low.c: Commit leftover changes from 2007-03-29.
13873
0c2ead7e
DJ
138742007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13877 fields short instead of int. Add explicit padding.
13878 (i387_cache_to_fsave): Remove unnecessary casts.
13879 (i387_fsave_to_cache): Doc fix.
13880 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13881
73725ff3
DJ
138822007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13883
13884 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13885 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13886
d99f33d8
PA
138872007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13888
13889 * configure.srv (arm*-*-mingw32ce*): Move near the other
13890 arm targets.
13891
68070c10
PA
138922007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13893
2482afc6 13894 * configure.ac: Add errno checking.
68070c10
PA
13895 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13896 sys/file.h and malloc.h.
13897 (AC_CHECK_DECLS): Add perror.
13898 (srv_mingwce): Handle.
2482afc6 13899 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13900 win32-i386-low.o to srv_tgtobj.
13901 (i[34567]86-*-mingw*): Likewise.
13902 (arm*-*-mingw32ce*): Add case.
13903 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13904 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13905 [__MINGW32CE__] (strerror): New function.
13906 [__MINGW32CE__] (errno): Define to GetLastError.
13907 [__MINGW32CE__] (COUNTOF): New macro.
13908 (remote_open): Remove extra close call.
13909 * mem-break.c (delete_breakpoint_at): New function.
13910 * mem-break.h (delete_breakpoint_at): Declare.
13911 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13912 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13913 [USE_WIN32API] (read, write): Add char* casts.
13914 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13915 * server.h: Include wincecompat.h on Windows CE.
13916 [HAVE_ERRNO_H]: Check.
13917 (perror): Declare if not declared.
13918 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13919 (perror_with_name): Remove errno declaration.
13920 * wincecompat.h: New.
13921 * wincecompat.c: New.
13922 * win32-low.h: New.
13923 * win32-arm-low.c: New.
13924 * win32-i386-low.c: New.
13925 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13926 (OUTMSG2): Make it safe.
13927 (_T): New macro.
13928 (COUNTOF): New macro.
13929 (NUM_REGS): Get it from the low target.
13930 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13931 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13932 (thread_rec): Let low target handle debug registers.
13933 (child_add_thread): Likewise.
13934 (child_init_thread_list): Likewise.
13935 (continue_one_thread): Likewise.
13936 (regptr): New.
13937 (do_child_fetch_inferior_registers): Move to ...
13938 * win32-i386-low.c: ... here, and rename to ...
13939 (do_fetch_inferior_registers): ... this.
889bf7c5 13940 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13941 Go through the low target.
13942 (do_child_store_inferior_registers): Use regptr.
13943 (strwinerror): New function.
13944 (win32_create_inferior): Handle Windows CE.
13945 Use strwinerror instead of strerror on Windows error
13946 codes. Add program to the error output.
13947 Don't close the main thread handle on Windows CE.
13948 (win32_attach): Use coredll.dll on Windows CE.
13949 (win32_kill): Close current process and current
13950 thread handles.
13951 (win32_detach): Use coredll.dll on Windows CE.
13952 (win32_resume): Let low target handle debug registers, and
13953 step request.
13954 (handle_exception): Add/Remove initial breakpoint. Avoid
13955 non-existant WSTOPSIG on Windows CE.
13956 (win32_read_inferior_memory): Cast to remove warning.
13957 (win32_arch_string): Go through the low target.
13958 (initialize_low): Call set_breakpoint_data with the low
13959 target's breakpoint.
13960 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13961 FOP_REGNUM, mappings): Move to ...
13962 * win32-i386-low.c: ... here.
13963 * win32-low.c (win32_thread_info): Move to ...
13964 * win32-low.h: ... here.
13965 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13966 win32-arm-low.c and wincecompat.c.
13967 (all:): Add $EXEEXT.
13968 (install-only:): Likewise.
13969 (gdbserver:): Likewise.
13970 (gdbreplay:): Likewise.
13971 * config.in: Regenerate.
13972 * configure: Regenerate.
13973
41093d81
PA
139742007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13975
13976 * win32-low.c: Rename typedef thread_info to
13977 win32_thread_info throughout.
13978
544afa54
PA
139792007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13980
13981 * win32-i386-low.c: Rename to ...
13982 * win32-low.c: ... this.
13983 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13984 * Makefile.in: Likewise.
13985
bce7165d
PA
139862007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13987
13988 * remote-utils.c (monitor_output): Constify msg parameter.
13989 * server.h (monitor_output): Likewise.
13990 * win32-i386-low.c (handle_output_debug_string): New.
13991 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13992 handle_output_debug_string.
13993 (get_child_debug_event): Likewise.
13994
506c7aa0
DJ
139952007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13996
13997 * server.c (main): Correct strtoul check.
13998
42c81e2a
DJ
139992007-03-27 Jon Ringle <jon@ringle.org>
14000
14001 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14002
9453113a
DJ
140032007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14004
14005 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14006
64a69107
DJ
140072007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14008
14009 * terminal.h: Check HAVE_SGTTY_H.
14010
140112007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14012
14013 * remote-utils.c (remote_open): Print out the assigned port number.
14014
c74d0ad8
DJ
140152007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14016
14017 * remote-utils.c (monitor_output): New function.
14018 * server.c (debug_threads): Define here.
14019 (monitor_show_help): New function.
14020 (handle_query): Handle qRcmd.
14021 (main): Do not handle 'd' packet.
14022 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14023 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14024 of debug_threads.
14025
de7c3b4a
PA
140262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14027
14028 * Makefile.in (EXEEXT): New.
14029 (clean): Use $(EXEEXT).
14030
ef57601b
PA
140312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14032
14033 * target.h (target_ops): Rename send_signal to request_interrupt,
14034 and remove enum target_signal parameter.
14035 * linux-low.c (linux_request_interrupt): Rename from
14036 linux_send_signal, and always send SIGINT.
14037 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14038 and always send SIGINT.
14039 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14040 of send_signal.
14041 (input_interrupt): Likewise.
14042
820f2bda
PA
140432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14044
14045 * server.c (get_features_xml): Check if target implemented
14046 arch_string.
14047 * win32-i386-low.c (win32_arch_string): New.
14048 (win32_target_ops): Add win32_arch_string as arch_string member.
14049
ab39bf24
UW
140502007-02-22 Markus Deuling <deuling@de.ibm.com>
14051
14052 * spu-low.c (spu_arch_string): New.
14053 (spu_target_ops): Add spu_arch_string.
14054
61ff6e04
DJ
140552007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14056
14057 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14058 * configure.ac: Do not check for terminal.h.
14059 * configure, config.in: Regenerated.
14060
fb1e4ffc
DJ
140612007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14062
14063 * Makefile.in (OBS): Add $(XML_BUILTIN).
14064 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14065 (clean): Update.
14066 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14067 (arm-with-iwmmxt.c): New.
14068 * config.in, configure: Regenerate.
14069 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14070 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14071 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14072 (arm*-*-linux*): Add iWMMXt and regset support.
14073 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14074 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14075 (arm_store_wmmxregset, target_regsets): New.
14076 * server.c (get_features_xml): Take annex argument. Check builtin
14077 XML documents.
14078 (handle_query): Handle multiple annexes.
14079
0f48aa01
DJ
140802007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14081
14082 * remote-utils.c [USE_WIN32API] (read, write): Define.
14083 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14084 write.
14085
23181151
DJ
140862007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14087
14088 * linux-i386-low.c (the_low_target): Set arch_string.
14089 * linux-x86-64-low.c (the_low_target): Likewise.
14090 * linux-low.c (linux_arch_string): New.
14091 (linux_target_ops): Add it.
14092 * linux-low.h (struct linux_target_ops): Add arch_string.
14093 * server.c (write_qxfer_response): Use const void * for DATA.
14094 (get_features_xml): New.
14095 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14096 * target.h (struct target_ops): Add arch_string method.
14097
9d606399
DJ
140982007-01-03 Denis Pilat <denis.pilat@st.com>
14099 Daniel Jacobowitz <dan@codesourcery.com>
14100
14101 * linux-low.c (linux_kill): Handle being called with no threads.
14102 * win32-i386-low.c (win32_kill): Likewise.
14103 (get_child_debug_event): Clear current_process_handle.
14104
141052006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14106 Daniel Jacobowitz <dan@codesourcery.com>
14107
14108 * remote-utils.c (remote_open): Check the type of specified
14109 serial port devices before opening them.
14110 * server.c (main): Kill the inferior if an error occurs during
14111 the first remote_open.
14112
a5e13d24
DJ
141132006-12-05 Markus Deuling <deuling@de.ibm.com>
14114
14115 * README: Update supported targets.
14116
186947f7
DJ
141172006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14118
14119 * Makefile.in (clean): Remove reg-mips64.c.
14120 (reg-mips64.c, reg-mips64.o): New rules.
14121 * configure.srv: Handle mips64. Include regset support for mips.
14122 * linux-mips-low.c (union mips_register): New.
14123 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14124 (mips_breakpoint, mips_breakpoint_at): Use int.
14125 (mips_collect_register, mips_supply_register)
14126 (mips_collect_register_32bit, mips_supply_register_32bit)
14127 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14128 (mips_store_fpregset, target_regsets): New.
14129 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14130
a13e2c95
UW
141312006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14132
14133 * configure.srv: Add target "spu*-*-*".
14134 * Makefile.in (clean): Remove reg-spu.c.
14135 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14136 * spu-low.c: New file.
14137
cb7283db
DJ
141382006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14139
14140 * configure.ac: Correct td_thr_tls_get_addr test.
14141 * configure: Regenerated.
14142
89be2091
DJ
141432006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * linux-low.c (linux_wait_for_event): Reformat. Use the
14146 pass_signals array.
14147 * remote-utils.c (decode_address_to_semicolon): New.
14148 * server.c (pass_signals, handle_general_set): New.
14149 (handle_query): Mention QPassSignals for qSupported.
14150 (main): Call handle_general_set.
14151 * server.h (pass_signals, decode_address_to_semicolon): New.
14152
000ef4f0
DJ
141532006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14154
14155 * server.c (handle_query): Correct error handling for read_auxv.
14156
b7149293
UW
141572005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14158
14159 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14160 and srv_linux_thread_db to yes.
14161 * linux-s390-low.c (s390_fill_gregset): New function.
14162 (target_regsets): Define data structure.
14163
dae5f5cf
DJ
141642006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14165
14166 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14167 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14168 * config.in, configure: Regenerated.
14169 * inferiors.c (gdb_id_to_thread): New function.
14170 (gdb_id_to_thread_id): Use it.
14171 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14172 * linux-low.h (struct process_info): Add th member.
14173 (thread_db_get_tls_address): New prototype.
14174 * remote-utils.c (decode_address): Make non-static.
14175 * server.c (handle_query): Handle qGetTLSAddr.
14176 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14177 * target.h (struct target_ops): Add get_tls_address.
14178 * thread-db.c (maybe_attach_thread): Save the thread handle.
14179 (thread_db_get_tls_address): New.
14180
32ca6d61
DJ
141812006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14184 (linux_resume_one_process): Take a siginfo_t *. Update all
14185 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14186 (struct pending_signals): Add a siginfo_t.
14187 (linux_wait_for_process): Always set last_status.
14188 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14189 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14190 * linux-low.h (struct process_info): Add last_status.
14191
5ffff7c1
DJ
141922006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14193
14194 * remote-utils.c (try_rle): New function.
14195 (putpkt_binary): Use it.
14196
8695c747
DJ
141972006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14198
14199 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14200 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14201 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14202 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14203 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14204 point registers.
14205
290fadea
RS
142062006-08-08 Richard Sandiford <richard@codesourcery.com>
14207
14208 * server.c (terminal_fd): New variable.
14209 (old_foreground_pgrp): Likewise.
14210 (restore_old_foreground_pgrp): New function.
14211 (start_inferior): Record the terminal file descriptor in terminal_fd
14212 and its original foreground group in old_foreground_pgrp. Register
14213 restore_old_foreground_pgrp with atexit().
14214
9f2e1e63
DJ
142152006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14216
14217 * server.c (handle_query): Correct qPart to qXfer.
14218
b80864fb
DJ
142192006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * configure.ac: Check for more headers which are missing on
14222 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14223 * configure.srv: Add Cygwin and mingw32.
14224 * remote-utils.c: Don't include headers unconditionally which
14225 are missing on mingw32. Include <winsock.h> for mingw32.
14226 (remote_open): Adjust for mingw32 support. Flush
14227 standard error after writing to it.
14228 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14229 (unblock_async_io, enable_async_io, disable_async_io)
14230 (readchar, getpkt): Update for Winsock support.
14231 (prepare_resume_reply): Expect a protocol signal number.
14232 * server.c: Disable <sys/wait.h> on mingw32.
14233 (start_inferior): Adjust for mingw32 support. Flush
14234 standard error after writing to it.
14235 (attach_inferior): Likewise. Use protocol signal
14236 numbers.
14237 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14238 and names.
14239 * win32-i386-low.c: New file.
14240 * Makefile.in (XM_CLIBS): Set.
14241 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14242 (win32-i386-low.o): New dependency rule.
14243 * linux-low.c (linux_wait): Use target signal numbers.
14244 * target.h (struct target_ops): Doc fix.
14245 * server.h (target_signal_to_name): New prototype.
14246 * gdbreplay.c: Don't include headers unconditionally which
14247 are missing on mingw32. Include <winsock.h> for mingw32.
14248 (remote_close, remote_open): Adjust for Winsock support.
14249 * configure, config.in: Regenerated.
14250
0876f84a
DJ
142512006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * server.c (decode_xfer_read, write_qxfer_response): New.
14254 (handle_query): Take a packet length argument. Handle
14255 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14256 the qSupported response.
14257 (main): Update call to handle_query.
14258
01f9e8fa
DJ
142592006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14260
14261 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14262 (putpkt_binary): Renamed from putpkt and adjusted for binary
14263 data.
14264 (putpkt): New wrapper for putpkt_binary.
14265 (readchar): Don't mask off the high bit.
14266 (decode_X_packet): New function.
14267 * server.c (main): Call putpkt_binary if a handler sets the packet
14268 length. Save the length of the incoming packet. Handle 'X'.
14269 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14270
be2a5f71
DJ
142712006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * server.c (handle_query): Handle qSupported.
14274
ea025f5f
DJ
142752006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14276
14277 * remote-utils.c (all_symbols_looked_up): New variable.
14278 (look_up_one_symbol): Check it.
14279 * server.h (look_up_one_symbol): New declaration.
14280 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14281
9308fc88
DJ
142822006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14283
14284 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14285 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14286 (PTRACE_GET_THREAD_AREA): Define.
14287 (ps_get_thread_area): New function.
14288
52fb6437
NS
142892006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14290
14291 * configure.srv (m68k*-*-uclinux*): New target.
14292 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14293 (linux_resume_one_process): Remove extraneous cast.
14294 (linux_read_offsets): New.
14295 (linux_target_op): Add linux_read_offsets on mmuless systems.
14296 * server.c (handle_query): Add qOffsets logic.
14297 * target.h (struct target_ops): Add read_offsets.
14298
21b0f40c
DJ
142992006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14300
14301 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14302 (PTRACE_GET_THREAD_AREA): Define.
14303 (ps_get_thread_area): New function.
14304 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14305 (linux-x86-64-low.o): Update.
14306
0050a760
DJ
143072006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14308
14309 * configure.ac: Remove checks for prfpregset_t.
14310 * gdb_proc_service.h: New file.
14311 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14312 new "gdb_proc_service.h".
14313 * proc-service.c: Likewise.
14314 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14315 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14316 * Makefile.in (gdb_proc_service_h): Updated.
14317 * configure, config.in: Regenerated.
14318
b92a518e
DJ
143192006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * remote-utils.c (prepare_resume_reply): Move declaration
14322 of gdb_id_from_wait to the top of the block.
14323
545587ee
DJ
143242006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14325
14326 * linux-low.c (regsets_store_inferior_registers): Read the regset
14327 from the target before filling it.
14328
9db87ebd
DJ
143292006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14330
14331 * server.c (attach_inferior): Return SIGTRAP for a successful
14332 attach.
14333
dd24457d
DJ
143342006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14335
14336 * Makefile.in (OBS): Add version.o.
14337 (STAGESTUFF): Delete.
14338 (version.o): Add dependencies.
14339 (version.c): Replace rule.
14340 (clean): Remove version.c.
14341 * server.c (gdbserver_version): New.
14342 (gdbserver_usage): Use printf.
14343 (main): Handle --version and --help.
14344 * server.h (version, host_name): Add declarations.
14345
6f0f660e
EZ
143462005-12-23 Eli Zaretskii <eliz@gnu.org>
14347
889bf7c5
PA
14348 * linux-arm-low.c:
14349 * linux-arm-low.c:
14350 * inferiors.c:
14351 * i387-fp.h:
14352 * i387-fp.c:
14353 * gdbreplay.c:
14354 * regcache.c:
14355 * proc-service.c:
14356 * mem-break.h:
14357 * mem-break.c:
14358 * linux-x86-64-low.c:
14359 * linux-sh-low.c:
14360 * linux-s390-low.c:
14361 * linux-ppc64-low.c:
14362 * linux-ppc-low.c:
14363 * linux-mips-low.c:
14364 * linux-m68k-low.c:
14365 * linux-m32r-low.c:
14366 * linux-low.h:
14367 * linux-low.c:
14368 * linux-ia64-low.c:
14369 * linux-i386-low.c:
14370 * linux-crisv32-low.c:
14371 * thread-db.c:
14372 * terminal.h:
14373 * target.h:
14374 * target.c:
14375 * server.h:
14376 * server.c:
14377 * remote-utils.c:
14378 * regcache.h:
14379 * utils.c:
14380 * Makefile.in:
14381 * configure.ac:
6f0f660e
EZ
14382 * gdbserver.1: Add (C) after Copyright. Update the FSF
14383 address.
14384
9d1fb177
DJ
143852005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14388 (arm_breakpoint_at): Recognize both breakpoints.
14389 (the_low_target): Use the correct breakpoint instruction.
14390
011a70c2
DJ
143912005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14394 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14395 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14396 (the_low_target): Update.
14397
7fb85e41
AS
143982005-10-25 Andreas Schwab <schwab@suse.de>
14399
14400 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14401
14402 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14403 (ia64_num_regs): Reduce to 462.
14404
3db0444b
DJ
144052005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14406
14407 * acinclude.m4: Correct quoting.
14408 * aclocal.m4: Regenerated.
14409
14410 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14411 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14412 (thread_db_init): Call thread_db_err_str.
14413 * configure.ac: Check for TD_VERSION.
14414 * config.in, configure: Regenerated.
14415
bee0189a
DJ
144162005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14417
14418 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14419
e9d25b98
DJ
144202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14421
14422 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14423 is not available. Define HAVE_PTRACE_GETREGS if it is.
14424 * config.in, configure: Regenerated.
14425 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14426 * linux-i386-low.c, linux-m68k-low.c: Update to use
14427 HAVE_PTRACE_GETREGS.
14428 * linux-low.c (regsets_fetch_inferior_registers)
14429 (regsets_store_inferior_registers): Only return 0 if we processed
14430 GENERAL_REGS.
14431 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14432 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14433
a06660f7
DJ
144342005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14435
14436 * inferiors.c (struct thread_info): Add gdb_id.
14437 (add_thread): Add gdb_id argument.
14438 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14439 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14440 calls to add_thread.
14441 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14442 * server.c (handle_query): Use thread_to_gdb_id.
14443 (handle_v_cont, main): Use gdb_id_to_thread_id.
14444 * server.h (add_thread): Update prototype.
14445 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14446 prototypes.
14447
5a1f5858
DJ
144482005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14449
14450 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14451 left-padded registers.
14452 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14453 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14454
e122f1f5
SE
144552005-07-01 Steve Ellcey <sje@cup.hp.com>
14456
14457 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14458 * configure: Regenerate.
14459 * config.in: Regenerate.
14460 * server.h (NEED_DECLARATION_STRERROR):
14461 Replace with !HAVE_DECL_STRERROR.
14462
d592fa2f
DJ
144632005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14464
14465 * linux-low.c (linux_wait, linux_send_signal): Don't test
14466 an unsigned long variable for > 0 if it could be MAX_ULONG.
14467 * server.c (myresume): Likewise.
14468 * target.c (set_desired_inferior): Likewise.
14469
ccbd4912
MK
144702005-06-13 Mark Kettenis <kettenis@gnu.org>
14471
14472 * configure.ac: Simplify and improve check for socklen_t.
14473 * configure, config.in: Regenerate.
14474
f450004a
DJ
144752005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * acconfig.h: Remove.
14478 * configure.ac: Add a test for socklen_t. Use three-argument
14479 AC_DEFINE throughout.
14480 * config.in: Regenerated using autoheader 2.59.
14481 * configure: Regenerated.
14482
14483 * gdbreplay.c (socklen_t): Provide a default.
14484 (remote_open): Use socklen_t.
14485 * remote-utils.c (socklen_t): Provide a default.
14486 (remote_open): Use socklen_t.
14487 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14488 unsigned char.
14489
14490 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14491 char for buffers.
14492 * linux-low.c (linux_read_memory, linux_write_memory)
14493 (linux_read_auxv): Likewise.
14494 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14495 (check_mem_write): Likewise.
14496 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14497 Likewise.
14498 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14499 (registers_from_string, register_data): Likewise.
14500 * server.c (handle_query, main): Likewise.
14501 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14502 (decode_M_packet): Likewise.
14503 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14504 * target.h (struct target_ops): Update read_memory, write_memory,
14505 and read_auxv.
14506 (read_inferior_memory, write_inferior_memory): Update.
14507 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14508 to unsigned char *.
14509 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14510 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14511 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14512 linux-s390-low.c, linux-sh-low.c: Update for changes in
14513 read_inferior_memory and the_low_target->breakpoint.
14514
eee84df1
DJ
145152005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14516
14517 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14518 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14519 * configure.srv: Add powerpc64-*-linux*.
14520 * linux-ppc64-low.c: New file.
14521
45b134e5
OF
145222005-05-23 Orjan Friberg <orjanf@axis.com>
14523
14524 * linux-cris-low.c: New file with support for CRIS.
14525 * linux-crisv32-low.c: Ditto for CRISv32.
14526 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14527 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14528 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14529 reg-crisv32.o, and reg-crisv32.c to make rules.
14530 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14531 recognized targets.
14532
48d93c75
UW
145332005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14534
14535 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14536 of sizeof (PTRACE_XFER_TYPE).
14537 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14538
e013ee27
OF
145392005-05-12 Orjan Friberg <orjanf@axis.com>
14540
889bf7c5 14541 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14542 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14543 pointers for hardware watchpoint support.
14544 * linux-low.h (struct linux_target_ops): Ditto.
14545 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14546 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14547 to linux_target_ops.
14548 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14549 reply packet.
14550 * server.c (main): Recognize 'Z' and 'z' packets.
14551
b0ded00b
UW
145522005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14553
14554 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14555 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14556 (the_low_target): Add new members.
14557
8643e2ad
DJ
145582005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14559
14560 * proc-service.c (ps_lgetregs): Search all_processes instead of
14561 all_threads.
14562
fc620387
DJ
145632005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14564
14565 * server.c (start_inferior): Change return type to int.
14566 (attach_inferior): Change sigptr to int *.
14567 (handle_v_cont, handle_v_requests): Change signal to int *.
14568 (main): Change signal to int.
14569
145702005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14571
14572 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14573 * configure.srv: Add m32r*-*-linux*.
14574 * linux-m32r-low.c: New file.
14575
e0e76420
DJ
145762005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14577
14578 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14579
a1928bad
DJ
145802005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14581
14582 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14583 Take unsigned long arguments for PIDs.
14584 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14585 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14586 (wait_for_sigstop, linux_resume_one_process)
14587 (regsets_fetch_inferior_registers, linux_send_signal)
14588 (linux_read_auxv): Likewise. Update the types of variables holding
14589 PIDs. Update format string specifiers.
14590 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14591 * remote-utils.c (prepare_resume_reply): Likewise.
14592 * server.c (cont_thread, general_thread, step_thread)
14593 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14594 unsigned long.
14595 (handle_query): Update format specifiers.
14596 (handle_v_cont, main): Use strtoul for thread IDs.
14597 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14598 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14599 (general_thread, step_thread, thread_from_wait)
14600 (old_thread_from_wait): Update.
14601 * target.h (struct thread_resume): Use unsigned long for THREAD.
14602 (struct target_ops): Use unsigned long for arguments to attach and
14603 thread_alive.
14604
dcdb98d2
DJ
146052005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * acinclude.m4: Include bfd/bfd.m4 directly.
14608 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14609 <agriffis@toolchain.org>.
14610 * aclocal.m4, configure: Regenerated.
14611
bec39cab
AC
146122005-01-07 Andrew Cagney <cagney@gnu.org>
14613
14614 * configure.ac: Rename configure.in, require autoconf 2.59.
14615 * configure: Re-generate.
14616
434c4c77
DJ
146172004-12-08 Daniel Jacobowitz <dan@debian.org>
14618
14619 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14620 LIBS when finished.
14621 * aclocal.m4: Regenerated.
14622 * configure: Regenerated.
14623
db1d3e1b
AS
146242004-11-21 Andreas Schwab <schwab@suse.de>
14625
14626 * linux-m68k-low.c (m68k_num_gregs): Define.
14627 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14628 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14629 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14630 (m68k_breakpoint_at): New. Add to the_low_target.
14631
14632 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14633 srv_linux_thread_db to yes.
14634
43360365
JB
146352004-10-20 Joel Brobecker <brobecker@gnat.com>
14636
14637 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14638 (ARCH_SET_FS): Likewise.
14639 (ARCH_GET_FS): Likewise.
14640 (ARCH_GET_GS): Likewise.
14641
fd500816
DJ
146422004-10-16 Daniel Jacobowitz <dan@debian.org>
14643
14644 * linux-i386-low.c (ps_get_thread_area): New.
14645 * linux-x86-64-low.c (ps_get_thread_area): New.
14646 * linux-low.c: Include <sys/syscall.h>.
14647 (linux_kill_one_process): Don't kill the first thread here.
14648 (linux_kill): Kill the first thread here.
14649 (kill_lwp): New function.
14650 (send_sigstop, linux_send_signal): Use it.
14651 * proc-service.c: Clean up #ifdefs.
14652 (fpregset_info): Delete.
14653 (ps_lgetregs): Update and enable implementation.
14654 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14655 implementations.
14656 * remote-utils.c (struct sym_cache, symbol_cache): New.
14657 (input_interrupt): Print a clearer message.
14658 (async_io_enabled): New variable.
14659 (enable_async_io, disable_async_io): Use it. Update comments.
14660 (look_up_one_symbol): Use the symbol cache.
14661 * thread-db.c (thread_db_look_up_symbols): New function.
14662 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14663
f6de3c42
DJ
146642004-10-16 Daniel Jacobowitz <dan@debian.org>
14665
14666 * configure.in: Test for -rdynamic.
14667 * configure: Regenerated.
14668 * Makefile (INTERNAL_LDFLAGS): New.
14669 (gdbserver, gdbreplay): Use it.
14670
2c0fc042
AC
146712004-09-02 Andrew Cagney <cagney@gnu.org>
14672
14673 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14674
075b3282
DJ
146752004-03-23 Daniel Jacobowitz <drow@mvista.com>
14676
14677 * linux-low.c (linux_wait): Clear all_processes list also.
14678
fa6a77dc
DJ
146792004-03-12 Daniel Jacobowitz <drow@mvista.com>
14680
14681 * linux-low.c: Include <errno.h>. Remove extern declaration of
14682 errno.
14683
6d782a97
DJ
146842004-03-12 Daniel Jacobowitz <drow@mvista.com>
14685
14686 * gdbreplay.c, server.h, utils.c: Update copyright years.
14687
3a7fb99b
DJ
146882004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14689
14690 * server.c (main): Print child status or termination signal from
14691 variable 'signal', not 'sig'.
14692
c3e735a6
DJ
146932004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14694
14695 * linux-low.c (linux_read_memory): Change return type to
14696 int. Check for and return error from ptrace().
14697 * target.c (read_inferior_memory): Change return type to int. Pass
14698 back return status from the_target->read_memory().
14699 * target.h (struct target_ops): Adapt *read_memory() prototype.
14700 Update comment.
14701 (read_inferior_memory): Adapt prototype.
14702 * server.c (main): Return an error packet if
14703 read_inferior_memory() returns an error.
14704
a59d1c82
DJ
147052004-03-04 Daniel Jacobowitz <drow@mvista.com>
14706
14707 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14708 Unify with other clean targets.
14709
dc3f8883
DJ
147102004-02-29 Daniel Jacobowitz <drow@mvista.com>
14711
14712 * server.c (handle_v_cont): Call set_desired_inferior.
14713
89a208da
DJ
147142004-02-29 Daniel Jacobowitz <drow@mvista.com>
14715
14716 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14717
62ea82f5
DJ
147182004-02-29 Daniel Jacobowitz <drow@mvista.com>
14719
14720 * linux-low.c (linux_wait): Unblock async I/O.
14721 (linux_resume): Block and enable async I/O.
14722 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14723 * server.h (block_async_io, unblock_async_io): Add prototypes.
14724
6910d122
DJ
147252004-02-29 Daniel Jacobowitz <drow@mvista.com>
14726
14727 * remote-utils.c (remote_open): Print a status notice after
14728 opening a TCP port.
14729 * server.c (attach_inferior): Print a status notice after
14730 attaching.
14731
147322004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14733
14734 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14735
c89dc5d4
DJ
147362004-02-26 Daniel Jacobowitz <drow@mvista.com>
14737
14738 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14739 error packet.
14740 * server.c, target.h: Update copyright years.
14741
4b8dad4a
RM
147422004-02-25 Roland McGrath <roland@redhat.com>
14743
14744 * target.h (struct target_ops): New member `read_auxv'.
14745 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14746 * linux-low.c (linux_read_auxv): New function.
14747 (linux_target_ops): Initialize `read_auxv' member to that.
14748
d7446758
JB
147492004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14750
14751 Committed by Jim Blandy <jimb@redhat.com>.
14752
14753 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14754 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14755 instead of GPR_SIZE to distiguish s390 and s390x targets.
14756
5544ad89
DJ
147572004-01-31 Daniel Jacobowitz <drow@mvista.com>
14758
14759 * linux-low.c: Update copyright year.
14760 (check_removed_breakpoint): Clear pending_is_breakpoint.
14761 (linux_set_resume_request, linux_queue_one_thread)
14762 (resume_status_pending_p): New functions.
14763 (linux_continue_one_thread): Use process->resume.
14764 (linux_resume): Only resume threads if there are no pending events.
14765 * linux-low.h (struct process_info): Add resume request
14766 pointer.
14767
2a68b70e
DJ
147682004-01-30 Daniel Jacobowitz <drow@mvista.com>
14769
14770 * regcache.c (new_register_cache): Clear the allocated register
14771 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14772
64386c31
DJ
147732003-10-13 Daniel Jacobowitz <drow@mvista.com>
14774
14775 * linux-low.c (linux_resume): Take a struct thread_resume *
14776 argument.
14777 (linux_wait): Update call.
14778 (resume_ptr): New static variable.
14779 (linux_continue_one_thread): Renamed from
14780 linux_continue_one_process. Use resume_ptr.
14781 (linux_resume): Use linux_continue_one_thread.
14782 * server.c (handle_v_cont, handle_v_requests): New functions.
14783 (myresume): New function.
14784 (main): Handle 'v' case.
14785 * target.h (struct thread_resume): New type.
14786 (struct target_ops): Change argument of "resume" to struct
14787 thread_resume *.
14788 (myresume): Delete macro.
14789
c938e9b0
L
147902003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14791
14792 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14793 (uninstall): Support DESTDIR.
14794
7f313d07
BC
14795Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14796
14797 * configure.srv: Add xscale*linux copy of arm*linux entry.
14798
3b2fc2ea
DJ
147992003-07-24 Daniel Jacobowitz <drow@mvista.com>
14800
14801 * linux-arm-low.c (arm_reinsert_addr): New function.
14802 (the_low_target): Add arm_reinsert_addr.
14803
1c0a559e
MK
148042003-07-08 Mark Kettenis <kettenis@gnu.org>
14805
14806 * mem-break.c: Remove whitespace at end of file.
14807
43d5792c
DJ
148082003-06-28 Daniel Jacobowitz <drow@mvista.com>
14809
14810 * configure.in: Check whether we need to prototype strerror.
14811 * server.h: Optionally prototype strerror.
14812 * gdbreplay.c (perror_with_name): Use strerror.
14813 * linux-low.c (linux_attach_lwp): Use strerror.
14814 * utils.c (perror_with_name): Use strerror.
14815 * config.in, configure: Regenerated.
14816
c8a86edf
DJ
148172003-06-28 Daniel Jacobowitz <drow@mvista.com>
14818
14819 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14820 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14821
73d37363
DJ
148222003-06-20 Daniel Jacobowitz <drow@mvista.com>
14823
14824 * Makefile.in (SFILES): Update.
14825 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14826 low-sun3.c: Remove files.
14827
6ad8ae5c
DJ
148282003-06-17 Daniel Jacobowitz <drow@mvista.com>
14829
14830 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14831 (linux_detach_one_process, linux_detach): New functions.
14832 (linux_target_ops): Add linux_detach.
14833 * server.c (main): Handle 'D' packet.
14834 * target.h (struct target_ops): Add "detach" member.
14835 (detach_inferior): Define.
14836
1581182a
MK
148372003-06-13 Mark Kettenis <kettenis@gnu.org>
14838
14839 From Kelley Cook <kelleycook@wideopenwest.com>:
14840 * configure.srv: Accept i[34567]86 variants.
14841
e5379b03
DJ
148422003-06-05 Daniel Jacobowitz <drow@mvista.com>
14843
14844 * linux-low.c (linux_wait_for_event): Correct comment typos.
14845 (linux_resume_one_process): Call check_removed_breakpoint.
14846 (linux_send_signal): New function.
14847 (linux_target_ops): Add linux_send_signal.
14848 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14849 of kill.
14850 * target.h (struct target_ops): Add send_signal.
14851
2ff29de4
JB
148522003-05-29 Jim Blandy <jimb@redhat.com>
14853
14854 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14855 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14856 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14857 away part of the register's value.
14858
254787d4
DJ
148592003-03-26 Daniel Jacobowitz <drow@mvista.com>
14860
14861 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14862 (linux_wait_for_event, linux_init_signals): Likewise.
14863
94e10508
DJ
148642003-03-17 Daniel Jacobowitz <drow@mvista.com>
14865
14866 * configure.in: Check for stdlib.h.
14867 * configure: Regenerated.
14868 * config.in: Regenerated.
14869
4c0711e0
DJ
148702003-01-04 Andreas Schwab <schwab@suse.de>
14871
14872 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14873
ef66e766
AC
148742003-01-02 Andrew Cagney <ac131313@redhat.com>
14875
14876 * Makefile.in: Remove obsolete code.
14877
a1358604
DJ
148782002-11-20 Daniel Jacobowitz <drow@mvista.com>
14879
14880 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14881 defined(PT_FPR0_HI).
14882
23ce3b1c
DJ
148832002-11-17 Stuart Hughes <seh@zee2.com>
14884
14885 * linux-arm-low.c (arm_num_regs): Increase.
14886 (arm_regmap): Include status register.
14887
148882002-11-17 Daniel Jacobowitz <drow@mvista.com>
14889
14890 * linux-low.c (register_addr): Remove incorrect -1 check.
14891
a9fa9f7d
DJ
148922002-08-29 Daniel Jacobowitz <drow@mvista.com>
14893
14894 * linux-low.c (linux_create_inferior): Call setpgid. Return
14895 the new PID.
14896 (unstopped_p, linux_signal_pid): Remove.
14897 (linux_target_ops): Remove linux_signal_pid.
14898 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14899 global instead of target method.
14900 * target.h (struct target_ops): Remove signal_pid. Update comment
14901 for create_inferior.
14902 * server.c (signal_pid): New variable.
14903 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14904 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14905 (attach_inferior): Set signal_pid.
14906
17574093
DJ
149072002-08-23 Daniel Jacobowitz <drow@mvista.com>
14908
14909 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14910
149112002-08-20 Jim Blandy <jimb@redhat.com>
14912
14913 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14914 default for this.
14915
149162002-08-01 Andrew Cagney <cagney@redhat.com>
14917
14918 * Makefile.in: Make chill references obsolete.
14919
149202002-07-24 Kevin Buettner <kevinb@redhat.com>
14921
14922 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14923 * configure: Regenerate.
14924 * config.in: Regenerate.
14925
149262002-07-09 David O'Brien <obrien@FreeBSD.org>
14927
14928 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14929 (perror_with_name, remote_close, remote_open, expect, play): Static.
14930
149312002-07-04 Michal Ludvig <mludvig@suse.cz>
14932
4b8dad4a 14933 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14934 byte offsets instead of an array of indexes.
14935 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14936
149372002-06-13 Daniel Jacobowitz <drow@mvista.com>
14938
14939 * regcache.c: Add comment.
14940
149412002-06-11 Daniel Jacobowitz <drow@mvista.com>
14942
14943 * thread-db.c: New file.
14944 * proc-service.c: New file.
14945 * acinclude.m4: New file.
14946 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14947 proc-service.o, and thread-db.o.
14948 (linux-low.o): Add USE_THREAD_DB.
14949 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14950 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14951 * aclocal.m4: Regenerated.
14952 * config.in: Regenerated.
14953 * configure: Regenerated.
14954 * configure.in: Check for proc_service.h, sys/procfs.h,
14955 thread_db.h, and linux/elf.h headrs.
14956 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14957 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14958 Check for -lthread_db and thread support.
14959 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14960 PowerPC, and SuperH.
14961 * i387-fp.c: Constify arguments.
14962 * i387-fp.h: Likewise.
14963 * inferiors.c: (struct thread_info): Renamed from
14964 `struct inferior_info'. Remove PID member. Use generic inferior
14965 list header. All uses updated.
14966 (inferiors, signal_pid): Removed.
14967 (all_threads): New variable.
14968 (get_thread): Define.
14969 (add_inferior_to_list): New function.
14970 (for_each_inferior): New function.
14971 (change_inferior_id): New function.
14972 (add_inferior): Removed.
14973 (remove_inferior): New function.
14974 (add_thread): New function.
14975 (free_one_thread): New function.
14976 (remove_thread): New function.
14977 (clear_inferiors): Use for_each_inferior and free_one_thread.
14978 (find_inferior): New function.
14979 (find_inferior_id): New function.
14980 (inferior_target_data): Update argument type.
14981 (set_inferior_target_data): Likewise.
14982 (inferior_regcache_data): Likewise.
14983 (set_inferior_regcache_data): Likewise.
14984 * linux-low.c (linux_bp_reinsert): Remove.
14985 (all_processes, stopping_threads, using_thrads)
14986 (struct pending_signals, debug_threads, pid_of): New.
14987 (inferior_pid): Replace with macro.
14988 (struct inferior_linux_data): Remove.
14989 (get_stop_pc, add_process): New functions.
14990 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14991 Use add_process and add_thread.
14992 (linux_attach_lwp): New function, based on old linux_attach. Use
14993 add_process and add_thread. Set stop_expected for new threads.
14994 (linux_attach): New function.
14995 (linux_kill_one_process): New function.
14996 (linux_kill): Kill all LWPs.
14997 (linux_thread_alive): Use find_inferior_id.
14998 (check_removed_breakpoints, status_pending_p): New functions.
14999 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15000 Update. Use WNOHANG. Wait for cloned processes also. Update process
15001 struct for the found process.
15002 (linux_wait_for_event): New function.
15003 (linux_wait): Use it. Support LWPs.
15004 (send_sigstop, wait_for_sigstop, stop_all_processes)
15005 (linux_resume_one_process, linux_continue_one_process): New functions.
15006 (linux_resume): Support LWPs.
15007 (REGISTER_RAW_SIZE): Remove.
15008 (fetch_register): Use register_size instead. Call supply_register.
15009 (usr_store_inferior_registers): Likewise. Call collect_register.
15010 Fix recursive case.
15011 (regsets_fetch_inferior_registers): Improve error message.
15012 (regsets_store_inferior_registers): Add debugging.
15013 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15014 (unstopped_p, linux_signal_pid): New functions.
15015 (linux_target_ops): Add linux_signal_pid.
15016 (linux_init_signals): New function.
15017 (initialize_low): Call it. Initialize using_threads.
15018 * regcache.c (inferior_regcache_data): Add valid
15019 flag.
15020 (get_regcache): Fetch registers lazily. Add fetch argument
15021 and update all callers.
15022 (regcache_invalidate_one, regcache_invalidate): New
15023 functions.
15024 (new_register_cache): Renamed from create_register_cache.
15025 Return the new regcache.
15026 (free_register_cache): Change argument to a void *.
15027 (registers_to_string, registers_from_string): Call get_regcache
15028 with fetch flag set.
15029 (register_data): Make static. Pass fetch flag to get_regcache.
15030 (supply_register): Call get_regcache with fetch flag clear.
15031 (collect_register): Call get_regcache with fetch flag set.
15032 (collect_register_as_string): New function.
15033 * regcache.h: Update.
15034 * remote-utils.c (putpkt): Flush after debug output and use
15035 stderr.
15036 Handle input interrupts while waiting for an ACK.
15037 (input_interrupt): Use signal_pid method.
15038 (getpkt): Flush after debug output and use stderr.
15039 (outreg): Use collect_register_as_string.
15040 (new_thread_notify, dead_thread_notify): New functions.
15041 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15042 and general_thread.
15043 (look_up_one_symbol): Flush after debug output.
15044 * server.c (step_thread, server_waiting): New variables.
15045 (start_inferior): Don't use signal_pid. Update call to mywait.
15046 (attach_inferior): Update call to mywait.
15047 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15048 (main): Don't fetch/store registers explicitly. Use
15049 set_desired_inferior. Support proposed ``Hs'' packet. Update
15050 calls to mywait.
15051 * server.h: Update.
15052 (struct inferior_list, struct_inferior_list_entry): New.
15053 * target.c (set_desired_inferior): New.
15054 (write_inferior_memory): Constify.
15055 (mywait): New function.
15056 * target.h: Update.
15057 (struct target_ops): New signal_pid method.
15058 (mywait): Removed macro, added prototype.
15059
15060 * linux-low.h (regset_func): Removed.
15061 (regset_fill_func, regset_store_func): New.
15062 (enum regset_type): New.
15063 (struct regset_info): Add type field. Use new operation types.
15064 (struct linux_target_ops): stop_pc renamed to get_pc.
15065 Add decr_pc_after_break and breakpoint_at.
15066 (get_process, get_thread_proess, get_process_thread)
15067 (strut process_info, all_processes, linux_attach_lwp)
15068 (thread_db_init): New.
15069
15070 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15071 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15072 (the_low_target): Add new members.
15073 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15074 (i386_store_fpxregset): Constify.
15075 (target_regsets): Add new kind identifier.
15076 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15077 (i386_set_pc): Add debugging.
15078 (i386_breakpoint_at): New function.
15079 (the_low_target): Add new members.
15080 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15081 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15082 (mips_breakpoint_at): New.
15083 (the_low_target): Add new members.
15084 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15085 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15086 (the_low_target): Add new members.
15087 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15088 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15089 (the_low_target): Add new members.
15090 * linux-x86-64-low.c (target_regsets): Add new kind
15091 identifier.
15092
150932002-05-15 Daniel Jacobowitz <drow@mvista.com>
15094
15095 From Martin Pool <mbp@samba.org>:
15096 * server.c (gdbserver_usage): New function.
15097 (main): Call it.
15098
150992002-05-14 Daniel Jacobowitz <drow@mvista.com>
15100
15101 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15102 stop_at -> stop_pc.
15103
151042002-05-04 Andrew Cagney <ac131313@redhat.com>
15105
15106 * Makefile.in: Remove obsolete code.
15107
151082002-04-24 Michal Ludvig <mludvig@suse.cz>
15109
15110 * linux-low.c (regsets_fetch_inferior_registers),
15111 (regsets_store_inferior_registers): Removed cast to int from
15112 ptrace() calls.
15113 * regcache.h: Added declaration of struct inferior_info.
15114
151152002-04-20 Daniel Jacobowitz <drow@mvista.com>
15116
15117 * inferiors.c (struct inferior_info): Add regcache_data.
15118 (add_inferior): Call create_register_cache.
15119 (clear_inferiors): Call free_register_cache.
15120 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15121 * regcache.c (struct inferior_regcache_data): New.
15122 (registers): Remove.
15123 (get_regcache): New function.
15124 (create_register_cache, free_register_cache): New functions.
15125 (set_register_cache): Don't initialize the register cache here.
15126 (registers_to_string, registers_from_string, register_data): Call
15127 get_regcache.
15128 * regcache.h: Add prototypes.
15129 * server.h: Likewise.
15130
151312002-04-20 Daniel Jacobowitz <drow@mvista.com>
15132
15133 * mem-break.c: New file.
15134 * mem-break.h: New file.
15135 * Makefile.in: Add mem-break.o rule; update server.h
15136 dependencies.
15137 * inferiors.c (struct inferior_info): Add target_data
15138 member.
15139 (clear_inferiors): Free target_data member if set.
15140 (inferior_target_data, set_inferior_target_data): New functions.
15141 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15142 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15143 * linux-low.c (linux_bp_reinsert): New variable.
15144 (struct inferior_linux_data): New.
15145 (linux_create_inferior): Use set_inferior_target_data.
15146 (linux_attach): Likewise. Call add_inferior.
15147 (linux_wait_for_one_inferior): New function.
15148 (linux_wait): Call it.
15149 (linux_write_memory): Add const.
15150 (initialize_low): Call set_breakpoint_data.
15151 * linux-low.h (struct linux_target_ops): Add breakpoint
15152 handling members.
15153 * server.c (attach_inferior): Remove extra add_inferior
15154 call.
15155 * server.h: Include mem-break.h. Update inferior.c
15156 prototypes.
15157 * target.c (read_inferior_memory)
15158 (write_inferior_memory): New functions.
15159 * target.h (read_inferior_memory)
15160 (write_inferior_memory): Change macros to prototypes.
15161 (struct target_ops): Update comments. Add const to write_memory
15162 definition.
15163
151642002-04-11 Daniel Jacobowitz <drow@mvista.com>
15165
15166 * linux-low.c (usr_store_inferior_registers): Support
15167 registers which are allowed to fail to store.
15168 * linux-low.h (linux_target_ops): Likewise.
15169 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15170 (ppc_cannot_store_register): FPSCR may not be storable.
15171
151722002-04-09 Daniel Jacobowitz <drow@mvista.com>
15173
15174 * server.h: Include <string.h> if HAVE_STRING_H.
15175 * ChangeLog: Correct paths in last ChangeLog entry.
15176
151772002-04-09 Daniel Jacobowitz <drow@mvista.com>
15178
15179 * linux-low.h: Remove obsolete prototypes.
15180 (struct linux_target_ops): New.
15181 (extern the_low_target): New.
15182 * linux-low.c (num_regs, regmap): Remove declarations.
15183 (register_addr): Use the_low_target explicitly.
15184 (fetch_register): Likewise.
15185 (usr_fetch_inferior_registers): Likewise.
15186 (usr_store_inferior_registers): Likewise.
15187 * linux-arm-low.c (num_regs): Remove.
15188 (arm_num_regs): Define.
15189 (arm_regmap): Renamed from regmap, made static.
15190 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15191 made static.
15192 (arm_cannot_store_register): Renamed from cannot_store_register,
15193 made static.
15194 (the_low_target): New.
15195 * linux-i386-low.c (num_regs): Remove.
15196 (i386_num_regs): Define.
15197 (i386_regmap): Renamed from regmap, made static.
15198 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15199 made static.
15200 (i386_cannot_store_register): Renamed from cannot_store_register,
15201 made static.
15202 (the_low_target): New.
15203 * linux-ia64-low.c (num_regs): Remove.
15204 (ia64_num_regs): Define.
15205 (ia64_regmap): Renamed from regmap, made static.
15206 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15207 made static.
15208 (ia64_cannot_store_register): Renamed from cannot_store_register,
15209 made static.
15210 (the_low_target): New.
15211 * linux-m68k-low.c (num_regs): Remove.
15212 (m68k_num_regs): Define.
15213 (m68k_regmap): Renamed from regmap, made static.
15214 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15215 made static.
15216 (m68k_cannot_store_register): Renamed from cannot_store_register,
15217 made static.
15218 (the_low_target): New.
15219 * linux-mips-low.c (num_regs): Remove.
15220 (mips_num_regs): Define.
15221 (mips_regmap): Renamed from regmap, made static.
15222 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15223 made static.
15224 (mips_cannot_store_register): Renamed from cannot_store_register,
15225 made static.
15226 (the_low_target): New.
15227 * linux-ppc-low.c (num_regs): Remove.
15228 (ppc_num_regs): Define.
15229 (ppc_regmap): Renamed from regmap, made static.
15230 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15231 made static.
15232 (ppc_cannot_store_register): Renamed from cannot_store_register,
15233 made static.
15234 (the_low_target): New.
15235 * linux-s390-low.c (num_regs): Remove.
15236 (s390_num_regs): Define.
15237 (s390_regmap): Renamed from regmap, made static.
15238 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15239 made static.
15240 (s390_cannot_store_register): Renamed from cannot_store_register,
15241 made static.
15242 (the_low_target): New.
15243 * linux-sh-low.c (num_regs): Remove.
15244 (sh_num_regs): Define.
15245 (sh_regmap): Renamed from regmap, made static.
15246 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15247 made static.
15248 (sh_cannot_store_register): Renamed from cannot_store_register,
15249 made static.
15250 (the_low_target): New.
15251 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15252 (the_low_target): New.
15253
152542002-04-09 Daniel Jacobowitz <drow@mvista.com>
15255
15256 * Makefile.in: Add stamp-h target.
15257 * configure.in: Create stamp-h.
15258 * configure: Regenerated.
15259
152602002-04-09 Daniel Jacobowitz <drow@mvista.com>
15261
15262 * inferiors.c: New file.
15263 * target.c: New file.
15264 * target.h: New file.
15265 * Makefile.in: Add target.o and inferiors.o. Update
15266 dependencies.
15267 * linux-low.c (inferior_pid): New static variable,
15268 moved from server.c.
15269 (linux_create_inferior): Renamed from create_inferior.
15270 Call add_inferior. Return 0 on success instead of a PID.
15271 (linux_attach): Renamed from myattach.
15272 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15273 (linux_thread_alive): Renamed from mythread_alive.
15274 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15275 child dies.
15276 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15277 (regsets_store_inferior_registers): Correct error message.
15278 Add missing ``return 0''.
15279 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15280 (linux_store_registers): Renamed from store_inferior_registers.
15281 (linux_read_memory): Renamed from read_inferior_memory.
15282 (linux_write_memory): Renamed from write_inferior_memory.
15283 (linux_target_ops): New structure.
15284 (initialize_low): Call set_target_ops ().
15285 * remote-utils.c (unhexify): New function.
15286 (hexify): New function.
15287 (input_interrupt): Send signals to ``signal_pid''.
15288 * server.c (inferior_pid): Remove.
15289 (start_inferior): Update create_inferior call.
15290 (attach_inferior): Call add_inferior.
15291 (handle_query): New function.
15292 (main): Call handle_query for `q' packets.
15293 * server.h: Include "target.h". Remove obsolete prototypes.
15294 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15295
152962002-04-09 Daniel Jacobowitz <drow@mvista.com>
15297
15298 * Makefile.in: Add WARN_CFLAGS. Update configury
15299 dependencies.
15300 * configure.in: Check for <string.h>
15301 * configure: Regenerate.
15302 * config.in: Regenerate.
15303 * gdbreplay.c: Include needed system headers.
15304 (remote_open): Remove strchr prototype.
15305 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15306 * regcache.c (supply_register): Change buf argument to const void *.
15307 (supply_register_by_name): Likewise.
15308 (collect_register): Change buf argument to void *.
15309 (collect_register_by_name): Likewise.
15310 * regcache.h: Add missing prototypes.
15311 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15312 * server.c (handle_query): New function.
15313 (attached): New static variable, moved out of main.
15314 (main): Quiet longjmp clobber warnings.
15315 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15316 * utils.c (error): Remove NORETURN.
15317 (fatal): Likewise.