Remove features/i386/amd64-*linux.c and features/i386/x32-*linux.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
38602d55
YQ
12017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4 i386/amd64-XXX-linux from it.
5
44b886ff
YQ
62017-09-05 Yao Qi <yao.qi@linaro.org>
7
8 * configure.srv: Empty srv_amd64_linux_regobj if $development is
9 false.
10 (ipa_amd64_linux_regobj): Remove.
11 (ipa_x32_linux_regobj): Remove.
12
b4570e4b
YQ
132017-09-05 Yao Qi <yao.qi@linaro.org>
14
15 * Makefile.in (arch-amd64.o): New rule.
16 * configure.srv: Append arch-amd64.o.
17 * linux-amd64-ipa.c: Include common/x86-xstate.h.
18 (get_ipa_tdesc): Call amd64_linux_read_description.
19 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
20 and init_registers_amd64_XXX.
21 * linux-x86-low.c (x86_linux_read_description): Call
22 amd64_linux_read_description.
23 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
24 (initialize_low_arch): Don't call init_registers_x32_XXX and
25 init_registers_amd64_XXX.
26 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
27 and tdesc_amd64_XXX.
28 [__x86_64__] (amd64_tdesc_test): New function.
29 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
30 and init_registers_amd64_XXX.
31 * linux-x86-tdesc.c: Include arch/amd64.h.
32 (xcr0_to_tdesc_idx): New function.
33 (i386_linux_read_description): New function.
34 (amd64_get_ipa_tdesc_idx): New function.
35 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
36 (amd64_get_ipa_tdesc): Declare.
37
d1f28ea2
YQ
382017-09-05 Yao Qi <yao.qi@linaro.org>
39
40 * configure.srv (srv_i386_linux_xmlfiles): Remove
41 i386/i386-XXX-linux.xml from it.
42
25a93583
YQ
432017-09-05 Yao Qi <yao.qi@linaro.org>
44
45 * configure.srv: Set srv_i386_linux_regobj empty if $development
46 is false.
47 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
48 initialize_low_tdesc.
49 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
50 with #if initialize_low_tdesc.
51 * linux-x86-tdesc-selftest.c: New file.
52 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
53
5f035c07
YQ
542017-09-05 Yao Qi <yao.qi@linaro.org>
55
56 * Makefile.in (arch-i386.o): New rule.
57 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
58 (x86_64-*-linux*): Likewise.
59 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
60 include arch/i386.h.
61 (i386_linux_read_description): Remove code and call
62 i386_create_target_description.
63 * tdesc.c (allocate_target_description): New function.
64 * tdesc.h (set_tdesc_architecture): Remove declaration.
65 (set_tdesc_osabi): Likewise.
66
0abe8a89
YQ
672017-09-05 Yao Qi <yao.qi@linaro.org>
68
69 * linux-x86-tdesc.c: Don't include <inttypes.h>.
70 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
71 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
72 .xmltarget.
73 * server.c (get_features_xml): Call tdesc_get_features_xml.
74 * tdesc.c (set_tdesc_architecture): New function.
75 (set_tdesc_osabi): New function.
76 (tdesc_get_features_xml): New function.
77 (tdesc_create_feature): Add an argument.
78 * tdesc.h (struct target_desc) <features>: New field.
79 <arch, osabi>: New field.
80 (~target_desc): xfree features, arch, and osabi.
81 (target_desc::oerator==): Don't compare .xmltarget.
82 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
83 (set_tdesc_osabi): Likewise.
84 (tdesc_get_features_xml): Likewise.
85
0a188386
YQ
862017-09-05 Yao Qi <yao.qi@linaro.org>
87
88 * linux-x86-tdesc.c: Include selftest.h.
89 (i386_tdesc_test): New function.
90 (initialize_low_tdesc): Call selftests::register_test.
91 * tdesc.h: Include regdef.h.
92 (target_desc): Override operator == and !=.
93
f49ff000
YQ
942017-09-05 Yao Qi <yao.qi@linaro.org>
95
96 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
97 (ipa_obj): Likewise.
98 * linux-i386-ipa.c: Include common/x86-xstate.h
99 (get_ipa_tdesc): Call i386_linux_read_description.
100 (initialize_low_tracepoint): Don't call init_registers_XXX
101 functions, call initialize_low_tdesc instead.
102 * linux-x86-low.c (x86_linux_read_description): Call
103 i386_linux_read_description.
104 (initialize_low_arch): Don't call init_registers_i386_XXX
105 functions, call initialize_low_tdesc.
106 * linux-x86-tdesc.c: New file.
107 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
108 (i386_get_ipa_tdesc_idx): Declare.
109 (i386_get_ipa_tdesc): Declare.
110 (initialize_low_tdesc): Declare.
111
2b68ef2f
YQ
1122017-09-05 Yao Qi <yao.qi@linaro.org>
113
114 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
115 instead of 0.
116
f7000548
YQ
1172017-09-05 Yao Qi <yao.qi@linaro.org>
118
119 * Makefile.in (IPA_OBJS): Add vec-ipa.o
120 * regcache.c (get_thread_regcache): Use VEC_length.
121 (init_register_cache): Likewise.
122 (regcache_cpy): Likewise.
123 (registers_to_string): Iterate reg_defs via VEC_iterate.
124 (find_regno): Likewise.
125 (find_register_by_number): Use VEC_index.
126 (register_size): Call find_register_by_number.
127 (register_data): Call find_register_by_number.
128 (supply_regblock): Use VEC_length.
129 (regcache_raw_read_unsigned): Likewise.
130 * tdesc.c (init_target_desc): Iterate reg_defs via
131 VEC_iterate.
132 (default_description): Update initializer.
133 (copy_target_description): Don't update field num_registers.
134 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
135 <num_registers>: Remove.
136
50a421ac
SM
1372017-09-04 Simon Marchi <simon.marchi@ericsson.com>
138
139 * Makefile.in (.SECONDARY): Define target.
140
23fdd69e
SM
1412017-09-03 Simon Marchi <simon.marchi@ericsson.com>
142
143 * linux-low.c (linux_wait_1): Adjust.
144 * server.c (queue_stop_reply_callback): Adjust.
145
0a2dde4a
SDJ
1462017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
147
148 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
149 QEnvironmentUnset and QEnvironmentReset packets.
150 (handle_query): Inform remote that QEnvironmentHexEncoded,
151 QEnvironmentUnset and QEnvironmentReset are supported.
152
6afd337d
SM
1532017-08-25 Simon Marchi <simon.marchi@ericsson.com>
154
155 * inferiors.h (inferior_target_data): Rename to ...
156 (thread_target_data): ... this.
157 (inferior_regcache_data): Rename to ...
158 (thread_regcache_data): ... this.
159 (set_inferior_regcache_data): Rename to ...
160 (set_thread_regcache_data): ... this.
161 * inferiors.c (inferior_target_data): Rename to ...
162 (thread_target_data): ... this.
163 (inferior_regcache_data): Rename to ...
164 (thread_regcache_data): ... this.
165 (set_inferior_regcache_data): Rename to ...
166 (set_thread_regcache_data): ... this.
167 (free_one_thread): Update.
168 * linux-low.h (get_thread_lwp): Update.
169 * regcache.c (get_thread_regcache): Update.
170 (regcache_invalidate_thread): Update.
171 (free_register_cache_thread): Update.
172 * win32-i386-low.c (update_debug_registers_callback): Update.
173 (win32_get_current_dr): Update.
174 * win32-low.c (thread_rec): Update.
175 (delete_thread_info): Update.
176 (continue_one_thread): Update.
177 (suspend_one_thread): Update.
178
a160cc46
SM
1792017-08-24 Simon Marchi <simon.marchi@ericsson.com>
180
181 * inferiors.c (set_inferior_target_data): Remove.
182 * inferiors.h (set_inferior_target_data): Remove.
183
6d580b63
YQ
1842017-08-18 Yao Qi <yao.qi@linaro.org>
185
186 * Makefile.in (OBS): Add selftest.o.
187 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
188 * configure, config.in: Re-generated.
189 * server.c: Include common/sefltest.h.
190 (captured_main): Handle option --selftest.
191
f5a29eb0
YQ
1922017-08-09 Yao Qi <yao.qi@linaro.org>
193
194 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
195 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
196 i386-avx-mpx.o and i386-mmx.o.
197 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
198 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
199 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
200 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
201 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
202 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
203 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
204 i386/amd64-avx-mpx.xml.
205
57757c2f
YQ
2062017-08-09 Yao Qi <yao.qi@linaro.org>
207
208 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
209 and x32-avx-avx512.o.
210 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
211 i386/x32-avx-avx512.xml.
212
229d26fc
SM
2132017-07-26 Simon Marchi <simon.marchi@ericsson.com>
214
215 * tracepoint.h (enum class fast_tpoint_collect_result): New
216 enumeration.
217 (fast_tracepoint_collecting): Change return type to
218 fast_tpoint_collect_result.
219 * tracepoint.c (fast_tracepoint_collecting): Likewise.
220 * linux-low.h: Include tracepoint.h.
221 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
222 fast_tpoint_collect_result.
223 * linux-low.c (handle_tracepoints): Adjust.
224 (linux_fast_tracepoint_collecting): Change return type to
225 fast_tpoint_collect_result.
226 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
227 linux_wait_1, stuck_in_jump_pad_callback,
228 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
229 proceed_one_lwp): Adjust to type change.
230
2e1e43e1
YQ
2312017-07-10 Yao Qi <yao.qi@linaro.org>
232
233 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
234
adc764e7
YQ
2352017-06-29 Yao Qi <yao.qi@linaro.org>
236
237 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
238 Remove.
239 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
240
a206891a
SM
2412017-06-20 Simon Marchi <simon.marchi@ericsson.com>
242
243 * Makefile.in (IPA_OBJS): Sort and format one item per line.
244
9a6c7d9c
SDJ
2452017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
246
247 * linux-low.c (linux_create_inferior): Adjust code to access the
248 environment information via 'gdb_environ' class.
249 * lynx-low.c (lynx_create_inferior): Likewise.
250 * server.c (our_environ): Make it an instance of 'gdb_environ'.
251 (get_environ): Return a pointer to 'our_environ'.
252 (captured_main): Initialize 'our_environ'.
253 * server.h (get_environ): Adjust prototype.
254 * spu-low.c (spu_create_inferior): Adjust code to access the
255 environment information via 'gdb_environ' class.
256
ae3e2ccf
SM
2572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
258
259 * linux-low.c (linux_read_memory, linux_write_memory): Remove
260 usage of "register" keyword.
261
3e019bdc
SM
2622017-06-17 Simon Marchi <simon.marchi@ericsson.com>
263
264 * configure: Re-generate.
265
8465943a
SM
2662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
267
268 * configure: Re-generate.
269
cf0dd6f0
SM
2702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
271
272 * Makefile.in (COMPILE.pre): Add "-x c++".
273
9845682b
SDJ
2742017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
275
276 * fork-child.c: Conditionally include <signal.h>.
277
aefd8b33
SDJ
2782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
279
280 * server.c (handle_general_set): Handle new packet
281 "QStartupWithShell".
282 (handle_query): Add "QStartupWithShell" to the list of supported
283 packets.
284 (gdbserver_usage): Add help text explaining the
285 new "--startup-with-shell" and "--no-startup-with-shell" CLI
286 options.
287 (captured_main): Recognize and act upon the presence of the new
288 CLI options.
289
2090129c
SDJ
2902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
291 Pedro Alves <palves@redhat.com>
292
293 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
294 * configure: Regenerate.
295 * configure.srv (srv_linux_obj): Add "fork-child.o" and
296 "fork-inferior.o".
297 (i[34567]86-*-lynxos*): Likewise.
298 (spu*-*-*): Likewise.
299 * fork-child.c: New file.
300 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
301 and "environ.h".
302 (linux_ptrace_fun): New function.
303 (linux_create_inferior): Adjust function prototype to reflect
304 change on "target.h". Adjust function code to use
305 "fork_inferior".
306 (linux_request_interrupt): Delete "signal_pid".
307 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
308 (lynx_ptrace_fun): New function.
309 (lynx_create_inferior): Adjust function prototype to reflect
310 change on "target.h". Adjust function code to use
311 "fork_inferior".
312 * nto-low.c (nto_create_inferior): Adjust function prototype and
313 code to reflect change on "target.h". Update comments.
314 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
315 "common-terminal.h" and "environ.h".
316 (terminal_fd): Moved to fork-child.c.
317 (old_foreground_pgrp): Likewise.
318 (restore_old_foreground_pgrp): Likewise.
319 (last_status): Make it global.
320 (last_ptid): Likewise.
321 (our_environ): New variable.
322 (startup_with_shell): Likewise.
323 (program_name): Likewise.
324 (program_argv): Rename to...
325 (program_args): ...this.
326 (wrapper_argv): New variable.
327 (start_inferior): Delete function.
328 (get_exec_wrapper): New function.
329 (get_exec_file): Likewise.
330 (get_environ): Likewise.
331 (prefork_hook): Likewise.
332 (post_fork_inferior): Likewise.
333 (postfork_hook): Likewise.
334 (postfork_child_hook): Likewise.
335 (handle_v_run): Update code to deal with arguments coming from the
336 remote host. Update calls from "start_inferior" to
337 "create_inferior".
338 (captured_main): Likewise. Initialize environment variable. Call
339 "have_job_control".
340 * server.h (post_fork_inferior): New prototype.
341 (get_environ): Likewise.
342 (last_status): Declare.
343 (last_ptid): Likewise.
344 (signal_pid): Likewise.
345 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
346 (spu_ptrace_fun): New function.
347 (spu_create_inferior): Adjust function prototype to reflect change
348 on "target.h". Adjust function code to use "fork_inferior".
349 * target.c (target_terminal_init): New function.
350 (target_terminal_inferior): Likewise.
351 (target_terminal_ours): Likewise.
352 * target.h: Include <vector>.
353 (struct target_ops) <create_inferior>: Update prototype.
354 (create_inferior): Update macro.
355 * utils.c (gdb_flush_out_err): New function.
356 * win32-low.c (win32_create_inferior): Adjust function prototype
357 and code to reflect change on "target.h".
358
043a4934
SDJ
3592017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
360
361 * inferiors.c (switch_to_thread): New function.
362
15652511
SDJ
3632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
364
365 * Makefile.in (SFILE): Add "common/job-control.c".
366 (OBS): Add "job-control.o".
367
21ea5acd
SDJ
3682017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
369
370 * Makefile: Remove "@host_makefile_frag@".
371
e13cb306
PA
3722017-05-05 Pedro Alves <palves@redhat.com>
373
374 * configure: Regenerate.
375
c94fee56
SDJ
3762017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
377
378 * configure: Regenerate.
379
a0ff9e1a
SM
3802017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
381
382 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
383 software_single_step change of return type to
384 std::vector<CORE_ADDR>.
385 * linux-low.c (install_software_single_step_breakpoints):
386 Likewise.
387 * linux-low.h (install_software_single_step_breakpoints):
388 Likewise.
389
be628ab8
SDJ
3902017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
391
392 * remote-utils.c: Include "gdb_termios.h" instead of
393 "terminal.h".
394 * terminal.h: Delete file.
395
7c5ded6a
SDJ
3962017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
397
398 * server.c: Include <vector>.
399 <program_argv, wrapper_argv>: Convert to std::vector.
400 (start_inferior): Rewrite function to use C++.
401 (handle_v_run): Likewise. Update code that calculates the argv
402 based on the vRun packet; use C++.
403 (captured_main): Likewise.
404
436252de
SM
4052017-04-06 Simon Marchi <simon.marchi@ericsson.com>
406
407 * server.c (handle_v_cont): Initialize thread_resume::thread
408 with null_ptid.
409
9bf2a700
PA
4102017-04-05 Pedro Alves <palves@redhat.com>
411
412 * configure: Regenerate.
413
a121b7c1
PA
4142017-04-05 Pedro Alves <palves@redhat.com>
415
416 * gdbreplay.c (sync_error): Constify.
417 * linux-x86-low.c (push_opcode): Constify.
418
21c8a587
PA
4192017-04-05 Pedro Alves <palves@redhat.com>
420
421 * win32-low.c (get_child_debug_event)
422 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
423 Report TARGET_WAITKIND_SPURIOUS instead.
424
fb32b4f7
PA
4252017-04-05 Pedro Alves <palves@redhat.com>
426
427 * remote-utils.c (remote_prepare, remote_open): Constify.
428 * remote-utils.h (remote_prepare, remote_open): Constify.
429 * server.c (captured_main): Constify 'port' handling.
430
65dd1e59
SM
4312017-04-04 Simon Marchi <simon.marchi@ericsson.com>
432
433 * Makefile.in (clean): Clear .deps.
434
8fa5b777
SM
4352017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
436
437 * .gitignore: Remove generated files, replace with wildcard.
438 * (clean): Replace removal of generated files with wildcard.
439 (version.c): Replace with...
440 (version-generated.c): ...this.
441 (xml-builtin.c): Replace with...
442 (xml-builtin-generated.c): ...this.
443 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
444 (%.c: *regformats*): Replace with...
445 (%-generated.c: *regformats*): ...this.
446
a12e714b
MF
4472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
448
449 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
450 (xtensa_fill_gregset): Call collect_register_by_name for
451 threadptr register.
452 (xtensa_store_gregset): Call supply_register_by_name for
453 threadptr register.
454
1a09b50a
MF
4552017-03-27 Max Filippov <jcmvbkbc@gmail.com>
456
457 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
458 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
459 (xtensa_store_gregset): Call supply_register for all registers in
460 a0_regnum..a0_regnum + C0_NREGS range.
461
1a01e7c6
SM
4622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
463
464 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
465 (ax-ipa.o: ax.c): Remove.
466 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
467 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
468 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
469 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
470 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
471
36bc18a8
SM
4722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
473
474 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
475 (print-utils-ipa.o: ../common/print-utils.c): Remove.
476 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
477 (errors-ipa.o: ../common/errors.c): Remove.
478 (format-ipa.o: ../common/format.c): Remove.
479 (common-utils-ipa.o: ../common/common-utils.c): Remove.
480
a8ebe3d5
SM
4812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * Makefile.in (%-ipa.o: %.c): New rule.
484 (tracepoint-ipa.o: tracepoint.c): Remove.
485 (utils-ipa.o: utils.c): Remove.
486 (remote-utils-ipa.o: remote-utils.c): Remove.
487 (regcache-ipa.o: regcache.c): Remove.
488 (i386-linux-ipa.o: i386-linux.c): Remove.
489 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
490 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
491 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
492 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
493 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
494 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
495 (amd64-linux-ipa.o: amd64-linux.c): Remove.
496 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
497 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
498 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
499 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
500 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
501 (aarch64-ipa.o: aarch64.c): Remove.
502 (s390-linux32-ipa.o: s390-linux32.c): Remove.
503 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
504 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
505 (s390-linux64-ipa.o: s390-linux64.c): Remove.
506 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
507 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
508 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
509 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
510 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
511 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
512 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
513 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
514 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
515 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
516 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
517 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
518 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
519 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
520 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
521 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
522 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
523 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
524 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
525 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
526 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
527 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
528 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
529 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
530 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
531 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
532 (tdesc-ipa.o: tdesc.c): Remove.
533 (x32-linux-ipa.o: x32-linux.c): Remove.
534 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
535 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
536
50cfacb7
SM
5372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
538
539 * Makefile.in (%.o: ../arch/%.c): New rule.
540 (arm.o: ../arch/arm.c): Remove.
541 (arm-linux.o: ../arch/arm-linux.c): Remove.
542 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
543 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
544
c5a22423
SM
5452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
546
547 * Makefile.in (%.o: ../nat/%.c): New rule.
548 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
549 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
550 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
551 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
552 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
553 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
554 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
555 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
556 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
557 (linux-personality.o: ../nat/linux-personality.c): Remove.
558 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
559 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
560 (x86-linux.o: ../nat/x86-linux.c): Remove.
561 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
562 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
563
6bda016b
SM
5642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
565
566 * Makefile.in (%.o: ../common/%.c): New rule.
567 (signals.o: ../common/signals.c): Remove.
568 (print-utils.o: ../common/print-utils.c): Remove.
569 (rsp-low.o: ../common/rsp-low.c): Remove.
570 (common-utils.o: ../common/common-utils.c): Remove.
571 (posix-strerror.o: ../common/posix-strerror.c): Remove.
572 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
573 (vec.o: ../common/vec.c): Remove.
574 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
575 (xml-utils.o: ../common/xml-utils.c): Remove.
576 (ptid.o: ../common/ptid.c): Remove.
577 (buffer.o: ../common/buffer.c): Remove.
578 (format.o: ../common/format.c): Remove.
579 (filestuff.o: ../common/filestuff.c): Remove.
580 (agent.o: ../common/agent.c): Remove.
581 (errors.o: ../common/errors.c): Remove.
582 (environ.o: ../common/environ.c): Remove.
583 (common-debug.o: ../common/common-debug.c): Remove.
584 (cleanups.o: ../common/cleanups.c): Remove.
585 (common-exceptions.o: ../common/common-exceptions.c): Remove.
586 (fileio.o: ../common/fileio.c): Remove.
587 (common-regcache.o: ../common/common-regcache.c): Remove.
588 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
589 (new-op.o: ../common/new-op.c): Remove.
590 (btrace-common.o: ../common/btrace-common.c): Remove.
591
21122961
SM
5922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
593
594 * Makefile.in (%.o: ../target/%.c): New rule.
595 (waitstatus.o: ../target/waitstatus.c): Remove.
596
c362e621
SM
5972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
598
599 * Makefile.in
600 (%.c: ../regformats/%.dat,
601 (%.c: ../regformats/arm/%.dat,
602 (%.c: ../regformats/i386/%.dat,
603 (%.c: ../regformats/rs6000/%.dat): New rules.
604 (aarch64.c): Remove.
605 (reg-arm.c): Remove.
606 (arm-with-iwmmxt.c): Remove.
607 (arm-with-vfpv2.c): Remove.
608 (arm-with-vfpv3.c): Remove.
609 (arm-with-neon.c): Remove.
610 (reg-bfin.c): Remove.
611 (reg-cris.c): Remove.
612 (reg-crisv32.c): Remove.
613 (i386.c): Remove.
614 (i386-linux.c): Remove.
615 (i386-avx.c): Remove.
616 (i386-avx-linux.c): Remove.
617 (i386-avx-avx512.c): Remove.
618 (i386-avx-avx512-linux.c): Remove.
619 (i386-mpx.c): Remove.
620 (i386-mpx-linux.c): Remove.
621 (i386-avx-mpx-avx512-pku.c): Remove.
622 (i386-avx-mpx-avx512-pku-linux.c): Remove.
623 (i386-avx-mpx.c): Remove.
624 (i386-avx-mpx-linux.c): Remove.
625 (i386-mmx.c): Remove.
626 (i386-mmx-linux.c): Remove.
627 (reg-ia64.c): Remove.
628 (reg-m32r.c): Remove.
629 (reg-m68k.c): Remove.
630 (reg-cf.c): Remove.
631 (mips-linux.c): Remove.
632 (mips-dsp-linux.c): Remove.
633 (mips64-linux.c): Remove.
634 (mips64-dsp-linux.c): Remove.
635 (nios2-linux.c): Remove.
636 (powerpc-32.c): Remove.
637 (powerpc-32l.c): Remove.
638 (powerpc-altivec32l.c): Remove.
639 (powerpc-cell32l.c): Remove.
640 (powerpc-vsx32l.c): Remove.
641 (powerpc-isa205-32l.c): Remove.
642 (powerpc-isa205-altivec32l.c): Remove.
643 (powerpc-isa205-vsx32l.c): Remove.
644 (powerpc-e500l.c): Remove.
645 (powerpc-64l.c): Remove.
646 (powerpc-altivec64l.c): Remove.
647 (powerpc-cell64l.c): Remove.
648 (powerpc-vsx64l.c): Remove.
649 (powerpc-isa205-64l.c): Remove.
650 (powerpc-isa205-altivec64l.c): Remove.
651 (powerpc-isa205-vsx64l.c): Remove.
652 (s390-linux32.c): Remove.
653 (s390-linux32v1.c): Remove.
654 (s390-linux32v2.c): Remove.
655 (s390-linux64.c): Remove.
656 (s390-linux64v1.c): Remove.
657 (s390-linux64v2.c): Remove.
658 (s390-te-linux64.c): Remove.
659 (s390-vx-linux64.c): Remove.
660 (s390-tevx-linux64.c): Remove.
661 (s390x-linux64.c): Remove.
662 (s390x-linux64v1.c): Remove.
663 (s390x-linux64v2.c): Remove.
664 (s390x-te-linux64.c): Remove.
665 (s390x-vx-linux64.c): Remove.
666 (s390x-tevx-linux64.c): Remove.
667 (tic6x-c64xp-linux.c): Remove.
668 (tic6x-c64x-linux.c): Remove.
669 (tic6x-c62x-linux.c): Remove.
670 (reg-sh.c): Remove.
671 (reg-sparc64.c): Remove.
672 (reg-spu.c): Remove.
673 (amd64.c): Remove.
674 (amd64-linux.c): Remove.
675 (amd64-avx.c): Remove.
676 (amd64-avx-linux.c): Remove.
677 (amd64-avx-avx512.c): Remove.
678 (amd64-avx-avx512-linux.c): Remove.
679 (amd64-mpx.c): Remove.
680 (amd64-mpx-linux.c): Remove.
681 (amd64-avx-mpx-avx512-pku.c): Remove.
682 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
683 (amd64-avx-mpx.c): Remove.
684 (amd64-avx-mpx-linux.c): Remove.
685 (x32.c): Remove.
686 (x32-linux.c): Remove.
687 (x32-avx.c): Remove.
688 (x32-avx-linux.c): Remove.
689 (x32-avx-avx512.c): Remove.
690 (x32-avx-avx512-linux.c): Remove.
691 (reg-xtensa.c): Remove.
692 (reg-tilegx.c): Remove.
693 (reg-tilegx32.c): Remove.
694
1672e0d9
SDJ
6952017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
696
697 * Makefile.in (SFILES): Add "common/environ.c".
698 (OBJS): Add "common/environ.h".
699
239b6d10
WT
7002017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
701
702 * configure.ac: Check if the fs_base and gs_base members of
703 `struct user_regs_struct' exist.
704 * config.in: Regenerated.
705 * configure: Likewise.
706
694b382c
AT
7072017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
708
709 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
710 target_read_memory.
711 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
712 (get_next_pcs_syscall_next_pc): Likewise.
713
7dc53023
LM
7142016-12-23 Luis Machado <lgustavo@codesourcery.com>
715
716 * win32-i386-low.c: Fix incorrect reference to a couple source files.
717 * nto-x86-low.c: Likewise.
718
ad02e4fe
SM
7192016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
720
721 * Makefile.in: Include disable-implicit-rules.mk.
722
dcb07cfa
PA
7232016-11-23 Pedro Alves <palves@redhat.com>
724
725 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
726 (debug_vprintf): Use std::chrono::steady_clock instead of
727 gettimeofday. Use '.' instead of ':'.
728 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
729 (get_timestamp): Use std::chrono::steady_clock instead of
730 gettimeofday.
731
8629c02c
SM
7322016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
733
734 * Makefile.in: Fix whitespace formatting.
735
b593ecca
SM
7362016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
737
738 * Makefile.in (SFILES, OBS): Flatten list and order
739 alphabetically.
740
9986ba08
PA
7412016-11-23 Pedro Alves <palves@redhat.com>
742
743 * event-loop.c (handle_file_event): Use warning.
744 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
745 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
746 Use warning.
747
4eefa7bc
PA
7482016-11-23 Pedro Alves <palves@redhat.com>
749
750 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
751 output.
752 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
753 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
754 debug_printf and debug_flush for debug output.
755 * server.c (handle_general_set): Likewise.
756 * thread-db.c (try_thread_db_load): Use debug_printf for debug
757 output.
758
5443506e
SM
7592016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * Makefile.in (.c.o): Replace rule with ...
762 (%.o: %.c): ... this one.
763
3b165252
SM
7642016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
767 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
768 make.
769 * configure.ac: Remove checks for the make program.
770 * configure: Re-generate.
771
0bcda685
PA
7722016-10-28 Pedro Alves <palves@redhat.com>
773
774 * Makefile.in (CXX_DIALECT): Get from configure.
775 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
776 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
777 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
778 * config.in: Regenerate.
779 * configure: Regenerate.
780
c3805894
YQ
7812016-10-27 Yao Qi <yao.qi@linaro.org>
782
783 * linux-low.c (linux_supports_range_stepping): Return true if
784 can_software_single_step return true.
785
89342618
YQ
7862016-10-27 Yao Qi <yao.qi@linaro.org>
787
788 * inferiors.c (find_inferior_in_random): New function.
789 * inferiors.h (find_inferior_in_random): Declare.
790 * linux-low.c (linux_wait_for_event_filtered): Call
791 find_inferior_in_random instead of find_inferior.
792
e3652c84
YQ
7932016-10-27 Yao Qi <yao.qi@linaro.org>
794
795 * linux-low.c (linux_wait_1): If single-step breakpoints are
796 inserted, remove them.
797
5a04c4cf
PA
7982016-10-26 Pedro Alves <palves@redhat.com>
799
800 * linux-low.c (handle_extended_wait): Link parent/child fork
801 threads.
802 (linux_wait_1): Unlink them.
803 (linux_set_resume_request): Ignore resume requests for
804 already-resumed and unhandled fork child threads.
805 * linux-low.h (struct lwp_info) <fork_relative>: New field.
806 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
807 New functions.
808 (handle_v_requests) <vCont>: Don't call require_running.
809 * server.h (in_queued_stop_replies): New declaration.
810
cb93dc7f
YQ
8112016-10-24 Yao Qi <yao.qi@linaro.org>
812
813 PR server/20733
814 * linux-aarch64-low.c (append_insns): Cast the return value to
815 'uint32_t *'.
816
a1078bea
YQ
8172016-10-10 Yao Qi <yao.qi@linaro.org>
818
819 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
820
1fb77080
SDJ
8212016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
822
823 * target.c (target_supports_multi_process): New function, moved
824 from...
825 * target.h (target_supports_multi_process): ... here. Remove
826 macro.
827
39b5a3b9
TT
8282016-10-05 Tom Tromey <tom@tromey.com>
829
830 PR remote/20655:
831 * tracepoint.c (handle_tracepoint_bkpts): Check
832 ipa_error_tracepoint, not ipa_stopping_tracepoint.
833
c1d0b70a
YQ
8342016-10-05 Yao Qi <yao.qi@linaro.org>
835
836 * configure.srv: Update the path of arm-*.xml files.
837
0a69eedb
YQ
8382016-10-05 Terry Guo <terry.guo@arm.com>
839 Yao Qi <yao.qi@linaro.org>
840
841 * Makefile.in: Adjust the path of rules.
842 * configure.srv: Update the path of xml files.
843 * regformats/arm-with-iwmmxt.dat: Regenerated.
844 * regformats/arm-with-neon.dat: Likewise.
845 * regformats/arm-with-vfpv2.dat: Likewise.
846 * regformats/arm-with-vfpv3.dat Likewise.
847
17e16485
YQ
8482016-09-30 Yao Qi <yao.qi@linaro.org>
849
850 PR gdbserver/20627
851 * target.c (target_stop_and_wait): Don't call
852 target_continue_no_signal, use resume_stop instead.
853
edeeb602
YQ
8542016-09-26 Yao Qi <yao.qi@linaro.org>
855
856 * linux-low.c (linux_wait_1): Call debug_exit.
857
503b1c39
PA
8582016-09-23 Pedro Alves <palves@redhat.com>
859
860 * Makefile.in (SFILES): Add common/new-op.c.
861 (OBS): Add common/new-op.o.
862 (new-op.o): New rule.
863
74172ecf
SM
8642016-09-21 Simon Marchi <simon.marchi@ericsson.com>
865
866 * .gitinore: Ignore more files.
867
fc6cda2e
YQ
8682016-09-21 Yao Qi <yao.qi@linaro.org>
869
870 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
871 23.
872
bc1e6c81
SDJ
8732016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
874
875 * server.c (start_inferior): Call target_mourn_inferior instead of
876 mourn_inferior; pass ptid_t argument to it.
877 (resume): Likewise.
878 (handle_target_event): Likewise.
879 * target.c (target_mourn_inferior): New function.
880 * target.h (mourn_inferior): Delete macro.
881
0e00e962
AA
8822016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
883
884 * linux-low.c (lwp_is_stepping): New function.
885
1d8cb77d
CL
8862016-09-06 Carl Love <cel@us.ibm.com>
887
888 * server.c (start_inferior): Fixed comment, requested comment change
889 didn't get updated correctly. Removed reference to ptrace () call as
890 it is only true on Linux systems.
891
7313bced
CL
8922016-09-06 Carl Love <cel@us.ibm.com>
893
894 * server.c (start_inferior): Do not call
895 function target_post_create_inferior () if the
896 inferior process has already exited.
897
cf6de44d
PA
8982016-09-05 Pedro Alves <palves@redhat.com>
899
900 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
901 (COMPILE.pre, CC_LD): Use CXX directly.
902 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
903 * acinclude.m4: Don't include build-with-cxx.m4.
904 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
905 * configure: Regenerate.
906
c1da6748
AT
9072016-09-02 Akash Trehan <akash.trehan123@gmail.com>
908
909 PR gdb/19495
910 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
911 call writing data to own_buf.
912
f2b9e3df
SDJ
9132016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
914
915 * target.c (mywait): Call target_wait instead of
916 the_target->wait.
917 (target_wait): New function.
918
049a8570
SDJ
9192016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
920
921 * server.c (start_inferior): New variable 'ptid'. Replace calls
922 to the_target->resume by target_continue{,_no_signal}, depending
923 on the case.
924 * target.c (target_stop_and_wait): Call target_continue_no_signal
925 instead of the_target->resume.
926 (target_continue): New function.
927
3aa5cfa0
AT
9282016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
929
930 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
931
754653a7
AZ
9322016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
933
934 PR server/20491
935 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
936 ps_prochandle.
937 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
938 * linux-arm-low.c (ps_get_thread_area): Likewise.
939 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
940 * linux-m68k-low.c (ps_get_thread_area): Likewise.
941 * linux-mips-low.c (ps_get_thread_area): Likewise.
942 * linux-nios2-low.c (ps_get_thread_area): Likewise.
943 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
944 * linux-x86-low.c (ps_get_thread_area): Likewise.
945 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
946
ed036b40
PA
9472016-08-19 Pedro Alves <palves@redhat.com>
948
949 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
950
c8ef42ee
PA
9512016-08-19 Pedro Alves <palves@redhat.com>
952
953 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
954 comment. Use memcpy instead of casting through unsigned long.
955
9c235a72
PA
9562016-08-19 Pedro Alves <palves@redhat.com>
957
958 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
959 allocating around 0x80000000.
960
201506da
PA
9612016-08-19 Pedro Alves <palves@redhat.com>
962
963 PR gdb/20415
964 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
965 (x32-avx512-linux-ipa.o): New rules.
966 * configure.ac (x86_64-*-linux*): New x32 check.
967 * configure.srv (ipa_x32_linux_regobj): New.
968 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
969 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
970 descriptions.
971 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
972 descriptions.
973 * configure: Regenerate.
974
f348d89a
PA
9752016-08-09 Pedro Alves <palves@redhat.com>
976
977 PR gdb/18653
978 * Makefile.in (OBS): Add signals-state-save-restore.o.
979 (signals-state-save-restore.o): New rule.
980 * config.in: Regenerate.
981 * configure: Regenerate.
982 * linux-low.c: Include "signals-state-save-restore.h".
983 (linux_create_inferior): Call
984 restore_original_signals_state.
985 * server.c: Include "dispositions-save-restore.h".
986 (captured_main): Call save_original_signals_state.
987
1baf5149
PA
9882016-08-05 Pedro Alves <palves@redhat.com>
989
990 * configure: Regenerate.
991
fcd4a73d
YQ
9922016-08-04 Yao Qi <yao.qi@linaro.org>
993
994 * linux-low.c (regsets_fetch_inferior_registers): Check
995 errno is ESRCH or not.
996
979659d0
YQ
9972016-08-02 Yao Qi <yao.qi@linaro.org>
998
999 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1000 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1001 (thread_db_load_search): Update.
1002 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1003 td_ta_set_event and td_ta_event_getmsg.
1004
6598661d
PA
10052016-07-26 Pedro Alves <palves@redhat.com>
1006
1007 PR server/20414
1008 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1009 of unsigned long for 64-bit registers and use uint32_t instead of
1010 unsigned int for 32-bit registers.
1011
9cf12d57
PA
10122016-07-26 Pedro Alves <palves@redhat.com>
1013
1014 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1015 to 'ptrace'.
1016
305450ed
TT
10172016-07-21 Tom Tromey <tom@tromey.com>
1018
1019 * configure: Rebuild.
1020
2583da7c
YQ
10212016-07-21 Yao Qi <yao.qi@linaro.org>
1022
1023 * mem-break.c (find_gdb_breakpoint): Cast bp to
1024 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1025
21536b36
YQ
10262016-07-21 Yao Qi <yao.qi@linaro.org>
1027
1028 * server.c (handle_v_requests): Support s and S actions
1029 if target_supports_software_single_step return true.
1030
8901d193
YQ
10312016-07-21 Yao Qi <yao.qi@linaro.org>
1032
1033 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1034 is resume_step, call maybe_hw_step.
1035 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1036 and unstop them.
1037 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1038 breakpoints or not.
1039 (proceed_one_lwp): If resume request is resume_step, install
1040 reinsert breakpoints and call maybe_hw_step.
1041
0e9a339e
YQ
10422016-07-21 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-low.c (proceed_one_lwp): Declare.
1045 (linux_resume_one_thread): Remove local variable 'step'.
1046 Lift code enqueue signal. Call proceed_one_lwp instead of
1047 linux_resume_one_lwp.
1048
4281b351
YQ
10492016-07-21 Yao Qi <yao.qi@linaro.org>
1050
1051 * linux-low.c (linux_resume_one_thread): Call
1052 enqueue_pending_signal.
1053
984a2c04
YQ
10542016-07-21 Yao Qi <yao.qi@linaro.org>
1055
1056 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1057 * inferiors.c (do_restore_current_thread_cleanup): New function.
1058 (make_cleanup_restore_current_thread): Likewise.
1059 * linux-low.c (install_software_single_step_breakpoints): Call
1060 make_cleanup_restore_current_thread. Switch current_thread to
1061 thread.
1062
bec903c9
YQ
10632016-07-21 Yao Qi <yao.qi@linaro.org>
1064
1065 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1066 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1067 (clone_one_breakpoint): Likewise.
1068 (delete_reinsert_breakpoints): Change parameter to thread.
1069 Callers updated.
1070 (has_reinsert_breakpoints): Likewise.
1071 (uninsert_reinsert_breakpoints): Likewise.
1072 (reinsert_reinsert_breakpoints): Likewise.
1073 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1074 (delete_reinsert_breakpoints): Likewise.
1075 (reinsert_reinsert_breakpoints): Likewise.
1076 (uninsert_reinsert_breakpoints): Likewise.
1077 (has_reinsert_breakpoints): Likewise.
1078
63c40ec7
YQ
10792016-07-21 Yao Qi <yao.qi@linaro.org>
1080
1081 * inferiors.c (get_thread_process): Make parameter const.
1082 * inferiors.h (get_thread_process): Update declaration.
1083 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1084 Add new parameters child_thread and parent_thread. Callers
1085 updated.
1086 * mem-break.h (clone_all_breakpoints): Update declaration.
1087
9aa76cd0
YQ
10882016-07-21 Yao Qi <yao.qi@linaro.org>
1089
1090 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1091 <command_list, handler>: Remove.
1092 (struct gdb_breakpoint): New.
1093 (struct other_breakpoint): New.
1094 (struct reinsert_breakpoint): New.
1095 (is_gdb_breakpoint): New function.
1096 (any_persistent_commands): Update command_list if
1097 is_gdb_breakpoint returns true.
1098 (set_breakpoint): Create breakpoints according to their types.
1099 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1100 (set_gdb_breakpoint_1): Likewise.
1101 (set_gdb_breakpoint): Likewise.
1102 (clear_breakpoint_conditions): Change parameter type to
1103 'struct gdb_breakpoint *'.
1104 (clear_breakpoint_commands): Likewise.
1105 (clear_breakpoint_conditions_and_commands): Likewise.
1106 (add_condition_to_breakpoint): Likewise.
1107 (add_breakpoint_condition): Likewise.
1108 (add_commands_to_breakpoint): Likewise.
1109 (check_breakpoints): Check other_breakpoint.
1110 (clone_one_breakpoint): Clone breakpopint according to its type.
1111 * mem-break.h (struct gdb_breakpoint): Declare.
1112 (set_gdb_breakpoint): Update declaration.
1113 (clear_breakpoint_conditions_and_commands): Likewise.
1114 (add_breakpoint_condition): Likewise.
1115 (add_breakpoint_commands): Likewise.
1116 * server.c (process_point_options): Change parameter type to
1117 'struct gdb_breakpoint *'.
1118
811f8301
YQ
11192016-07-21 Yao Qi <yao.qi@linaro.org>
1120
1121 * mem-break.c (set_breakpoint_at): Rename it to ...
1122 (set_breakpoint_type_at): ... it.
1123 (set_breakpoint_at): Call set_breakpoint_type_at.
1124 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1125 * mem-break.h (set_breakpoint_at): Update comments.
1126
b1c51e36
CLT
11272016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1128
1129 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1130 to buf parameter.
1131 (nios2_store_gregset): Likewise.
1132
ced2dffb
PA
11332016-07-01 Pedro Alves <palves@redhat.com>
1134 Antoine Tremblay <antoine.tremblay@ericsson.com>
1135
1136 * linux-low.c: Change interface to take the target lwp_info
1137 pointer directly and return void. Handle detaching from a zombie
1138 thread.
1139 (linux_detach_lwp_callback): New function.
1140 (linux_detach): Detach from the leader thread after detaching from
1141 the clone threads.
1142
2ac09a5b
YQ
11432016-06-28 Yao Qi <yao.qi@linaro.org>
1144
1145 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1146 for variable new_offset.
1147 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1148 (aarch64_ftrace_insn_reloc_cb): Likewise.
1149 (aarch64_ftrace_insn_reloc_tb): Likewise.
1150 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1151 PRIx64 instead of PRIx32.
1152
79e7fd4f
YQ
11532016-06-28 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1156 (the_low_target): Install arm_get_syscall_trapinfo.
1157
061fc021
YQ
11582016-06-28 Yao Qi <yao.qi@linaro.org>
1159
1160 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1161 function.
1162 (the_low_target): Install aarch64_get_syscall_trapinfo.
1163
4cc32bec
YQ
11642016-06-28 Yao Qi <yao.qi@linaro.org>
1165
1166 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1167 Callers updated.
1168 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1169 Remove parameter sysno.
1170 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1171 sysret.
1172
782c1122
AA
11732016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1174
1175 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1176 (s390_emit_ne_goto): Likewise.
1177 (s390_emit_lt_goto): Likewise.
1178 (s390_emit_le_goto): Likewise.
1179 (s390_emit_gt_goto): Likewise.
1180 (s390_emit_ge_goto): Likewise.
1181 (s390x_emit_eq_goto): Likewise.
1182 (s390x_emit_ne_goto): Likewise.
1183 (s390x_emit_lt_goto): Likewise.
1184 (s390x_emit_le_goto): Likewise.
1185 (s390x_emit_gt_goto): Likewise.
1186 (s390x_emit_ge_goto): Likewise.
1187 (s390_emit_ops_impl): Mark variable static.
1188 (s390x_emit_ops): Likewise.
1189
2e7b624b
YQ
11902016-06-17 Yao Qi <yao.qi@linaro.org>
1191
1192 * linux-low.c (handle_extended_wait): Call
1193 uninsert_reinsert_breakpoints for the parent process. Remove
1194 reinsert breakpoints from the child process. Reinsert them to
1195 the parent process when vfork is done.
1196 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1197 (reinsert_reinsert_breakpoints): New function.
1198 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1199 (reinsert_reinsert_breakpoints): Declare.
1200
8a81c5d7
YQ
12012016-06-17 Yao Qi <yao.qi@linaro.org>
1202
1203 * linux-low.c (handle_extended_wait): If the parent is doing
1204 step-over, remove the reinsert breakpoints from the forked child.
1205
f50bf8e5
YQ
12062016-06-17 Yao Qi <yao.qi@linaro.org>
1207
1208 * linux-low.c (unsuspend_all_lwps): Declare.
1209 (linux_low_filter_event): If thread exited, call finish_step_over.
1210 If step-over is finished, unsuspend other threads.
1211
8376a3cb
YQ
12122016-06-17 Yao Qi <yao.qi@linaro.org>
1213
1214 * linux-low.c (linux_resume_one_lwp_throw): Assert
1215 has_reinsert_breakpoints returns false.
1216 * mem-break.c (delete_disabled_breakpoints): Assert
1217 bp type isn't reinsert_breakpoint.
1218
f79b145d
YQ
12192016-06-17 Yao Qi <yao.qi@linaro.org>
1220
1221 * linux-low.c (maybe_hw_step): New function.
1222 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1223 (finish_step_over): Switch current_thread to lwp temporarily,
1224 and assert has_reinsert_breakpoints returns true.
1225 (proceed_one_lwp): Call maybe_hw_step.
1226 * mem-break.c (has_reinsert_breakpoints): New function.
1227 * mem-break.h (has_reinsert_breakpoints): Declare.
1228
0ae534d2
JT
12292016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1230
1231 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1232
fcdad592
YQ
12332016-05-17 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1236 instead of find_inferior.
1237
9e784964
YQ
12382016-05-05 Yao Qi <yao.qi@linaro.org>
1239
1240 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1241 Initialize res to zero.
1242
cf2ebb6e
YQ
12432016-05-05 Yao Qi <yao.qi@linaro.org>
1244
1245 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1246 to uint32_t.
1247
c1aebf87
UW
12482016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1249
1250 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1251 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1252 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1253
35fd2deb 12542016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1255 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1256
1257 * tracepoint.c (write_inferior_int8): New function.
1258 (cmd_qtenable_disable): Write enable flag using
1259 write_inferior_int8.
1260
484b3c32
YQ
12612016-04-25 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1264 (need_step_over_p): Return zero if the LWP has pending signals
1265 can be delivered on software single step target.
1266
85ba7d86
YQ
12672016-04-25 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1270 return instead of error.
1271
3539aa13
YQ
12722016-04-22 Yao Qi <yao.qi@linaro.org>
1273
1274 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1275 to 23.
1276
5b061e98
YQ
12772016-04-22 Yao Qi <yao.qi@linaro.org>
1278
1279 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1280 signal when stepping over breakpoint with software single
1281 step.
1282
3451269c
PA
12832016-04-21 Pedro Alves <palves@redhat.com>
1284
1285 * linux-s390-low.c (s390_collect_ptrace_register)
1286 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1287 add casts.
1288 (s390_check_regset): Use void * instead of gdb_byte *.
1289
a2358508
PA
12902016-04-20 Pedro Alves <palves@redhat.com>
1291
1292 * configure: Renegerate.
1293
6885166d
YQ
12942016-04-20 Yao Qi <yao.qi@linaro.org>
1295
1296 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1297 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1298 number 16.
1299 (arm_store_gregset): Likewise.
1300
2b863f51
WT
13012016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1302
1303 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1304 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1305 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1306 (amd64-avx-mpx-linux.c): New rules.
1307 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1308 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1309 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1310 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1311 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1312 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1313 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1314 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1315 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1316 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1317 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1318 * linux-x86-low.c (x86_linux_read_description): Add case for
1319 X86_XSTATE_AVX_MPX_MASK.
1320 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1321 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1322 init_registers_i386_avx_mpx_linux.
1323 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1324 (initialize_low_tracepoint): Call
1325 init_registers_i386_avx_mpx_linux.
1326 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1327 (initialize_low_tracepoint): Call
1328 init_registers_amd64_avx_mpx_linux.
1329 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1330 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1331 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1332 declarations.
1333
9b30624b
PA
13342016-04-18 Pedro Alves <palves@redhat.com>
1335
1336 * configure: Regenerate.
1337
45e3745e
AT
13382016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1339
1340 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1341 (aarch64_emit_sub): Likewise.
1342
2afc13ff
PA
13432016-04-12 Pedro Alves <palves@redhat.com>
1344
1345 * utils.c (prepare_to_throw_exception): Delete.
1346
6e774b13
SM
13472016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1350
4dca19f8
MK
13512016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1352
1353 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1354
d0a9981f
MK
13552016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1356
1357 * linux-aarch64-ipa.c: Add <elf.h> include.
1358 * linux-ppc-ipa.c: Add <elf.h> include.
1359 * linux-s390-ipa.c: Add <elf.h> include.
1360
252db07e
MK
13612016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1362
1363 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1364 (get_raw_reg_ptr): Likewise.
1365 (get_trace_state_variable_value_ptr): Likewise.
1366 (set_trace_state_variable_value_ptr): Likewise.
1367 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1368 char *.
1369
14e2b6d9
MK
13702016-03-31 Wei-cheng Wang <cole945@gmail.com>
1371 Marcin Kościelnicki <koriakin@0x04.net>
1372
1373 PR/17221
1374 * linux-ppc-low.c (emit_insns): New function.
1375 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1376 (ppc_emit_prologue): New function.
1377 (ppc_emit_epilogue): New function.
1378 (ppc_emit_add): New function.
1379 (ppc_emit_sub): New function.
1380 (ppc_emit_mul): New function.
1381 (ppc_emit_lsh): New function.
1382 (ppc_emit_rsh_signed): New function.
1383 (ppc_emit_rsh_unsigned): New function.
1384 (ppc_emit_ext): New function.
1385 (ppc_emit_zero_ext): New function.
1386 (ppc_emit_log_not): New function.
1387 (ppc_emit_bit_and): New function.
1388 (ppc_emit_bit_or): New function.
1389 (ppc_emit_bit_xor): New function.
1390 (ppc_emit_bit_not): New function.
1391 (ppc_emit_equal): New function.
1392 (ppc_emit_less_signed): New function.
1393 (ppc_emit_less_unsigned): New function.
1394 (ppc_emit_ref): New function.
1395 (ppc_emit_const): New function.
1396 (ppc_emit_reg): New function.
1397 (ppc_emit_pop): New function.
1398 (ppc_emit_stack_flush): New function.
1399 (ppc_emit_swap): New function.
1400 (ppc_emit_stack_adjust): New function.
1401 (ppc_emit_call): New function.
1402 (ppc_emit_int_call_1): New function.
1403 (ppc_emit_void_call_2): New function.
1404 (ppc_emit_if_goto): New function.
1405 (ppc_emit_goto): New function.
1406 (ppc_emit_eq_goto): New function.
1407 (ppc_emit_ne_goto): New function.
1408 (ppc_emit_lt_goto): New function.
1409 (ppc_emit_le_goto): New function.
1410 (ppc_emit_gt_goto): New function.
1411 (ppc_emit_ge_goto): New function.
1412 (ppc_write_goto_address): New function.
1413 (ppc_emit_ops_impl): New static variable.
1414 (ppc64v1_emit_prologue): New function.
1415 (ppc64v2_emit_prologue): New function.
1416 (ppc64_emit_epilogue): New function.
1417 (ppc64_emit_add): New function.
1418 (ppc64_emit_sub): New function.
1419 (ppc64_emit_mul): New function.
1420 (ppc64_emit_lsh): New function.
1421 (ppc64_emit_rsh_signed): New function.
1422 (ppc64_emit_rsh_unsigned): New function.
1423 (ppc64_emit_ext): New function.
1424 (ppc64_emit_zero_ext): New function.
1425 (ppc64_emit_log_not): New function.
1426 (ppc64_emit_bit_and): New function.
1427 (ppc64_emit_bit_or): New function.
1428 (ppc64_emit_bit_xor): New function.
1429 (ppc64_emit_bit_not): New function.
1430 (ppc64_emit_equal): New function.
1431 (ppc64_emit_less_signed): New function.
1432 (ppc64_emit_less_unsigned): New function.
1433 (ppc64_emit_ref): New function.
1434 (ppc64_emit_const): New function.
1435 (ppc64v1_emit_reg): New function.
1436 (ppc64v2_emit_reg): New function.
1437 (ppc64_emit_pop): New function.
1438 (ppc64_emit_stack_flush): New function.
1439 (ppc64_emit_swap): New function.
1440 (ppc64v1_emit_call): New function.
1441 (ppc64v2_emit_call): New function.
1442 (ppc64v1_emit_int_call_1): New function.
1443 (ppc64v2_emit_int_call_1): New function.
1444 (ppc64v1_emit_void_call_2): New function.
1445 (ppc64v2_emit_void_call_2): New function.
1446 (ppc64_emit_if_goto): New function.
1447 (ppc64_emit_eq_goto): New function.
1448 (ppc64_emit_ne_goto): New function.
1449 (ppc64_emit_lt_goto): New function.
1450 (ppc64_emit_le_goto): New function.
1451 (ppc64_emit_gt_goto): New function.
1452 (ppc64_emit_ge_goto): New function.
1453 (ppc64v1_emit_ops_impl): New static variable.
1454 (ppc64v2_emit_ops_impl): New static variable.
1455 (ppc_emit_ops): New function.
1456 (linux_low_target): Wire in ppc_emit_ops.
1457
a2174ba4
MK
14582016-03-31 Wei-cheng Wang <cole945@gmail.com>
1459 Marcin Kościelnicki <koriakin@0x04.net>
1460
1461 PR/17221
1462 * Makefile.in: Add powerpc-*-ipa.o
1463 * configure.srv: Add ipa_obj for powerpc*-linux.
1464 * linux-ppc-ipa.c: New file.
1465 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1466 includes.
1467 (PPC_FIELD): New macro.
1468 (PPC_SEXT): New macro.
1469 (PPC_OP6): New macro.
1470 (PPC_BO): New macro.
1471 (PPC_LI): New macro.
1472 (PPC_BD): New macro.
1473 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1474 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1475 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1476 (ppc_get_thread_area): New function.
1477 (is_elfv2_inferior): New function.
1478 (gen_ds_form): New function.
1479 (GEN_STD): New macro.
1480 (GEN_STDU): New macro.
1481 (GEN_LD): New macro.
1482 (GEN_LDU): New macro.
1483 (gen_d_form): New function.
1484 (GEN_ADDI): New macro.
1485 (GEN_ADDIS): New macro.
1486 (GEN_LI): New macro.
1487 (GEN_LIS): New macro.
1488 (GEN_ORI): New macro.
1489 (GEN_ORIS): New macro.
1490 (GEN_LWZ): New macro.
1491 (GEN_STW): New macro.
1492 (GEN_STWU): New macro.
1493 (gen_xfx_form): New function.
1494 (GEN_MFSPR): New macro.
1495 (GEN_MTSPR): New macro.
1496 (GEN_MFCR): New macro.
1497 (GEN_MTCR): New macro.
1498 (GEN_SYNC): New macro.
1499 (GEN_LWSYNC): New macro.
1500 (gen_x_form): New function.
1501 (GEN_OR): New macro.
1502 (GEN_MR): New macro.
1503 (GEN_LWARX): New macro.
1504 (GEN_STWCX): New macro.
1505 (GEN_CMPW): New macro.
1506 (gen_md_form): New function.
1507 (GEN_RLDICL): New macro.
1508 (GEN_RLDICR): New macro.
1509 (gen_i_form): New function.
1510 (GEN_B): New macro.
1511 (GEN_BL): New macro.
1512 (gen_b_form): New function.
1513 (GEN_BNE): New macro.
1514 (GEN_LOAD): New macro.
1515 (GEN_STORE): New macro.
1516 (gen_limm): New function.
1517 (gen_atomic_xchg): New function.
1518 (gen_call): New function.
1519 (ppc_relocate_instruction): New function.
1520 (ppc_install_fast_tracepoint_jump_pad): New function.
1521 (ppc_get_min_fast_tracepoint_insn_len): New function.
1522 (ppc_get_ipa_tdesc_idx): New function.
1523 (the_low_target): Wire in the new functions.
1524 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1525 tdescs.
1526 * linux-ppc-tdesc.h: New file.
1527
a13c4696
MK
15282016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1529
1530 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1531 (alloc_jump_pad_buffer): New function.
1532 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1533 (alloc_jump_pad_buffer): New function.
1534 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1535 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1536 (alloc_jump_pad_buffer): New function.
1537 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1538 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1539 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1540 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1541
1cda1512
MK
15422016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1543
1544 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1545 * linux-amd64-ipa.c: Likewise.
1546 * linux-i386-ipa.c: Likewise.
1547 * linux-s390-ipa.c: Likewise.
1548 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1549 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1550 set_trace_state_variable_value_ptr.
1551 (struct ipa_sym_addresses): Likewise.
1552 (symbol_list): Likewise.
1553 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1554 accessing gdb_collect directly.
1555 (gdb_collect_ptr_type): New typedef.
1556 (get_raw_reg_ptr_type): New typedef.
1557 (get_trace_state_variable_value_ptr_type): New typedef.
1558 (set_trace_state_variable_value_ptr_type): New typedef.
1559 (gdb_collect_ptr): New global.
1560 (get_raw_reg_ptr): New global.
1561 (get_trace_state_variable_value_ptr): New global.
1562 (set_trace_state_variable_value_ptr): New global.
1563 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1564 accessing get_raw_reg directly.
1565 (get_get_tsv_func_addr): Likewise for
1566 get_trace_state_variable_value_ptr.
1567 (get_set_tsv_func_addr): Likewise for
1568 set_trace_state_variable_value_ptr.
1569 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1570
72fb5488
SM
15712016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1572
1573 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1574
28170b88
MK
15752016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1576
1577 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1578 packets.
1579 (relocate_instruction): Remove own_buf.
1580 * server.c (own_buf): Make global.
1581 (handle_v_requests): Make global.
1582 * server.h (own_buf): New declaration.
1583 (handle_v_requests): New prototype.
1584
f39e8743
MK
15852016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1586
1587 PR 18377
1588 * linux-s390-low.c (add_insns): New function.
1589 (s390_emit_prologue): New function.
1590 (s390_emit_epilogue): New function.
1591 (s390_emit_add): New function.
1592 (s390_emit_sub): New function.
1593 (s390_emit_mul): New function.
1594 (s390_emit_lsh): New function.
1595 (s390_emit_rsh_signed): New function.
1596 (s390_emit_rsh_unsigned): New function.
1597 (s390_emit_ext): New function.
1598 (s390_emit_log_not): New function.
1599 (s390_emit_bit_and): New function.
1600 (s390_emit_bit_or): New function.
1601 (s390_emit_bit_xor): New function.
1602 (s390_emit_bit_not): New function.
1603 (s390_emit_equal): New function.
1604 (s390_emit_less_signed): New function.
1605 (s390_emit_less_unsigned): New function.
1606 (s390_emit_ref): New function.
1607 (s390_emit_if_goto): New function.
1608 (s390_emit_goto): New function.
1609 (s390_write_goto_address): New function.
1610 (s390_emit_litpool): New function.
1611 (s390_emit_const): New function.
1612 (s390_emit_call): New function.
1613 (s390_emit_reg): New function.
1614 (s390_emit_pop): New function.
1615 (s390_emit_stack_flush): New function.
1616 (s390_emit_zero_ext): New function.
1617 (s390_emit_swap): New function.
1618 (s390_emit_stack_adjust): New function.
1619 (s390_emit_set_r2): New function.
1620 (s390_emit_int_call_1): New function.
1621 (s390_emit_void_call_2): New function.
1622 (s390_emit_eq_goto): New function.
1623 (s390_emit_ne_goto): New function.
1624 (s390_emit_lt_goto): New function.
1625 (s390_emit_le_goto): New function.
1626 (s390_emit_gt_goto): New function.
1627 (s390_emit_ge_goto): New function.
1628 (s390x_emit_prologue): New function.
1629 (s390x_emit_epilogue): New function.
1630 (s390x_emit_add): New function.
1631 (s390x_emit_sub): New function.
1632 (s390x_emit_mul): New function.
1633 (s390x_emit_lsh): New function.
1634 (s390x_emit_rsh_signed): New function.
1635 (s390x_emit_rsh_unsigned): New function.
1636 (s390x_emit_ext): New function.
1637 (s390x_emit_log_not): New function.
1638 (s390x_emit_bit_and): New function.
1639 (s390x_emit_bit_or): New function.
1640 (s390x_emit_bit_xor): New function.
1641 (s390x_emit_bit_not): New function.
1642 (s390x_emit_equal): New function.
1643 (s390x_emit_less_signed): New function.
1644 (s390x_emit_less_unsigned): New function.
1645 (s390x_emit_ref): New function.
1646 (s390x_emit_if_goto): New function.
1647 (s390x_emit_const): New function.
1648 (s390x_emit_call): New function.
1649 (s390x_emit_reg): New function.
1650 (s390x_emit_pop): New function.
1651 (s390x_emit_stack_flush): New function.
1652 (s390x_emit_zero_ext): New function.
1653 (s390x_emit_swap): New function.
1654 (s390x_emit_stack_adjust): New function.
1655 (s390x_emit_int_call_1): New function.
1656 (s390x_emit_void_call_2): New function.
1657 (s390x_emit_eq_goto): New function.
1658 (s390x_emit_ne_goto): New function.
1659 (s390x_emit_lt_goto): New function.
1660 (s390x_emit_le_goto): New function.
1661 (s390x_emit_gt_goto): New function.
1662 (s390x_emit_ge_goto): New function.
1663 (s390_emit_ops): New function.
1664 (struct linux_target_ops): Fill in emit_ops hook.
1665
abd9baf9
MK
16662016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1667
1668 PR 18377
1669 * Makefile.in: Add s390 IPA files.
1670 * configure.srv: Build IPA for s390.
1671 * linux-s390-ipa.c: New file.
1672 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1673 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1674 (tdesc_s390_linux32): Likewise.
1675 (init_registers_s390_linux32v1): Likewise.
1676 (tdesc_s390_linux32v1): Likewise.
1677 (init_registers_s390_linux32v2): Likewise.
1678 (tdesc_s390_linux32v2): Likewise.
1679 (init_registers_s390_linux64): Likewise.
1680 (tdesc_s390_linux64): Likewise.
1681 (init_registers_s390_linux64v1): Likewise.
1682 (tdesc_s390_linux64v1): Likewise.
1683 (init_registers_s390_linux64v2): Likewise.
1684 (tdesc_s390_linux64v2): Likewise.
1685 (init_registers_s390_te_linux64): Likewise.
1686 (tdesc_s390_te_linux64): Likewise.
1687 (init_registers_s390_vx_linux64): Likewise.
1688 (tdesc_s390_vx_linux64): Likewise.
1689 (init_registers_s390_tevx_linux64): Likewise.
1690 (tdesc_s390_tevx_linux64): Likewise.
1691 (init_registers_s390x_linux64): Likewise.
1692 (tdesc_s390x_linux64): Likewise.
1693 (init_registers_s390x_linux64v1): Likewise.
1694 (tdesc_s390x_linux64v1): Likewise.
1695 (init_registers_s390x_linux64v2): Likewise.
1696 (tdesc_s390x_linux64v2): Likewise.
1697 (init_registers_s390x_te_linux64): Likewise.
1698 (tdesc_s390x_te_linux64): Likewise.
1699 (init_registers_s390x_vx_linux64): Likewise.
1700 (tdesc_s390x_vx_linux64): Likewise.
1701 (init_registers_s390x_tevx_linux64): Likewise.
1702 (tdesc_s390x_tevx_linux64): Likewise.
1703 (have_hwcap_s390_vx): New static variable.
1704 (s390_arch_setup): Fill have_hwcap_s390_vx.
1705 (s390_get_thread_area): New function.
1706 (s390_ft_entry_gpr_esa): New const.
1707 (s390_ft_entry_gpr_zarch): New const.
1708 (s390_ft_entry_misc): New const.
1709 (s390_ft_entry_fr): New const.
1710 (s390_ft_entry_vr): New const.
1711 (s390_ft_main_31): New const.
1712 (s390_ft_main_64): New const.
1713 (s390_ft_exit_fr): New const.
1714 (s390_ft_exit_vr): New const.
1715 (s390_ft_exit_misc): New const.
1716 (s390_ft_exit_gpr_esa): New const.
1717 (s390_ft_exit_gpr_zarch): New const.
1718 (append_insns): New function.
1719 (s390_relocate_instruction): New function.
1720 (s390_install_fast_tracepoint_jump_pad): New function.
1721 (s390_get_min_fast_tracepoint_insn_len): New function.
1722 (s390_get_ipa_tdesc_idx): New function.
1723 (struct linux_target_ops): Wire in the above functions.
1724 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1725 * linux-s390-tdesc.h: New file.
1726
a4105d04
MK
17272016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1728
1729 * linux-s390-low.c (s390_supports_tracepoints): New function.
1730 (struct linux_target_ops): Fill supports_tracepoints hook.
1731
35ac8b3e
YQ
17322016-03-18 Yao Qi <yao.qi@linaro.org>
1733
1734 * linux-low.c (lwp_signal_can_be_delivered): New function.
1735 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1736
94610ec4
YQ
17372016-03-18 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1740 0 if signal is enqueued. Remove 'signal' from one debugging
1741 message. Move one debugging message to some lines below.
1742 Remove code setting 'signal' to 0.
1743
80aea927
YQ
17442016-03-18 Yao Qi <yao.qi@linaro.org>
1745
1746 * linux-low.c (linux_low_filter_event): Remove redundant
1747 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1748
b04fd3be
MK
17492016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1750
1751 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1752 (struct linux_target_ops): Wire in the above.
1753
c40c8d4b
YQ
17542016-03-03 Yao Qi <yao.qi@linaro.org>
1755
1756 * linux-low.c: Update comments to start_step_over.
1757
0f8288ae
YQ
17582016-03-03 Yao Qi <yao.qi@linaro.org>
1759
1760 PR server/19736
1761 * linux-low.c (handle_extended_wait): Set child suspended
1762 if event_lwp->bp_reinsert isn't zero.
1763
fdbd04a8
YQ
17642016-03-02 Yao Qi <yao.qi@linaro.org>
1765
1766 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1767 enqueue_pending_signal.
1768
6896a8fa
MK
17692016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1770
1771 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1772 is actually loaded.
1773
ab503087
MK
17742016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1775
1776 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1777 (s390_regmap_3264) [!__s390x__]: New global.
1778 (s390_collect_ptrace_register): Skip map entries containing -1.
1779 (s390_supply_ptrace_register): Ditto.
1780 (s390_fill_gprs_high): New function.
1781 (s390_store_gprs_high): New function.
1782 (s390_regsets): Add NT_S390_HIGH_GPRS.
1783 (s390_get_hwcap): Enable on 31-bit.
1784 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1785 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1786 Detect NT_S390_HIGH_GPRS.
1787 (s390_usrregs_info_3264): Enable on 31-bit.
1788 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1789 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1790
ae91f625
MK
17912016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1792
1793 PR gdb/13808
1794 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1795 * configure.srv: Ditto.
1796 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1797 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1798 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1799 (init_registers_amd64_linux): Remove prototype.
1800 (tdesc_amd64_linux): Remove declaration.
1801 (get_ipa_tdesc): New function.
1802 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1803 initialize remaining tdescs.
1804 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1805 (init_registers_i386_linux): Remove prototype.
1806 (tdesc_i386_linux): Remove declaration.
1807 (get_ipa_tdesc): New function.
1808 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1809 initialize remaining tdescs.
1810 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1811 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1812 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1813 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1814 (x86_get_ipa_tdesc_idx): New function.
1815 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1816 * linux-x86-tdesc.h: New file.
1817 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1818 (target_get_ipa_tdesc_idx): New macro.
1819 * tracepoint.c (ipa_tdesc_idx): New macro.
1820 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1821 (symbol_list): Add ipa_tdesc_idx.
1822 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1823 (ipa_tdesc): Remove.
1824 (ipa_tdesc_idx): New variable.
1825 (get_context_regcache): Use get_ipa_tdesc.
1826 (gdb_collect): Ditto.
1827 (gdb_probe): Ditto.
1828 * tracepoint.h (get_ipa_tdesc): New prototype.
1829 (ipa_tdesc): Remove.
1830
e7ad2f14
PA
18312016-02-24 Pedro Alves <palves@redhat.com>
1832
1833 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1834 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1835 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1836 Factor out common code between the USE_SIGTRAP_SIGINFO and
1837 !USE_SIGTRAP_SIGINFO blocks.
1838 (linux_low_filter_event): Call save_stop_reason instead of
1839 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1840 Update comments.
1841 (linux_wait_1): Update comments.
1842
657f9cde
WW
18432016-02-24 Wei-cheng Wang <cole945@gmail.com>
1844
1845 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1846 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1847 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1848 ppc_insert_point, ppc_remove_point.
1849
b00b61e1
MK
18502016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1851
1852 * linux-s390-low.c (s390_supports_z_point_type): New function.
1853 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1854
553cb527
YQ
18552016-02-16 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1858 PC. Get pc from regcache_read_pc.
1859
a5652c21
YQ
18602016-02-12 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1863 or linux_get_pc_32bit.
1864 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1865
ed443b61
YQ
18662016-02-12 Yao Qi <yao.qi@linaro.org>
1867
1868 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1869 arm_linux_get_next_pcs_fixup.
1870
020ecd38
MK
18712016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1872
1873 * tracepoint.c (x_tracepoint_action_download): Change
1874 write_inferior_data_ptr to write_inferior_data_pointer.
1875 (cmd_qtstart): Likewise.
1876 (write_inferior_data_ptr): Remove.
1877 (download_agent_expr): Change write_inferior_data_ptr to
1878 write_inferior_data_pointer.
1879 (download_tracepoint_1): Likewise.
1880 (download_tracepoint): Likewise.
1881 (download_trace_state_variables): Likewise.
1882
7cae9051
WW
18832016-02-11 Wei-cheng Wang <cole945@gmail.com>
1884 Marcin Kościelnicki <koriakin@0x04.net>
1885
1886 * tracepoint.c (struct tracepoint_action_ops): Remove.
1887 (struct tracepoint_action): Remove ops.
1888 (m_tracepoint_action_download, r_tracepoint_action_download)
1889 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1890 size and offset accordingly.
1891 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1892 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1893 (tracepoint_action_send, tracepoint_action_download): New functions.
1894 Helpers for trace action handlers.
1895 (add_tracepoint_action): Remove setup actions ops.
1896 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1897
9f6a71b4
YQ
18982016-02-10 Yao Qi <yao.qi@linaro.org>
1899
1900 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1901
1e94266c
SM
19022016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1903
1904 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1905 to AC_OUTPUT.
1906 * configure: Regenerate.
1907
8adce034
SM
19082016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1909
1910 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1911 void * to gdb_byte *.
1912 * linux-low.c (siginfo_fixup): Likewise.
1913 (linux_xfer_siginfo): Likewise.
1914 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1915 Likewise.
1916 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1917
93813b37
WT
19182016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1919
1920 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1921 to srv_tgtobj.
1922 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1923 to srv_tgtobj.
1924 * linux-x86-low.c [__x86_64__]: Include
1925 "nat/amd64-linux-siginfo.h".
1926 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1927 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1928 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1929 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1930 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1931 (cpt_si_fd, si_timerid, si_overrun): Move from
1932 nat/amd64-linux-siginfo.c.
1933 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1934
8424cc97
SM
19352016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1936
1937 * server.c (skip_to_semicolon): Remove.
1938 (process_point_options): Use strchrnul instead of
1939 skip_to_semicolon.
1940
4d18591b
YQ
19412016-01-26 Yao Qi <yao.qi@linaro.org>
1942
1943 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1944 * linux-low.c (install_software_single_step_breakpoints): Don't
1945 call regcache_read_pc.
1946 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1947 argument pc.
1948
d8020970
YQ
19492016-01-26 Yao Qi <yao.qi@linaro.org>
1950
1951 * linux-low.c (install_software_single_step_breakpoints): Call
1952 regcache_read_pc instead of get_pc.
1953
8b207339
YQ
19542016-01-26 Yao Qi <yao.qi@linaro.org>
1955
1956 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1957 (unblock_async_io): Rename to ...
1958 (block_unblock_async_io): ... it. New function.
1959 (enable_async_io): Don't install SIGIO handler. Unblock it
1960 instead.
1961 (disable_async_io): Don't ignore SIGIO. Block it instead.
1962 (initialize_async_io): Install SIGIO handler. Don't call
1963 unblock_async_io.
1964
18879fef
YQ
19652016-01-26 Yao Qi <yao.qi@linaro.org>
1966
1967 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1968 first character is '\003', call *the_target->request_interrupt.
1969
a0f8e08a
YQ
19702016-01-25 Yao Qi <yao.qi@linaro.org>
1971
1972 * remote-utils.c (new_thread_notify): Remove.
1973 (dead_thread_notify): Likewise.
1974 * remote-utils.h (new_thread_notify): Remove declaration.
1975 (dead_thread_notify): Likewise.
1976
cc5fd9ab
MK
19772016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1978
1979 * gdb.trace/pending.exp: Fix expected message on continue.
1980
99e8eb11
MK
19812016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1982
1983 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1984 it works properly on big-endian machines where sizeof (CORE_ADDR)
1985 != sizeof (void *).
1986
a994041d
PA
19872016-01-21 Pedro Alves <palves@redhat.com>
1988
1989 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1990 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1991 * configure: Regenerate.
1992
f7a6a40d
YQ
19932016-01-21 Yao Qi <yao.qi@linaro.org>
1994
1995 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1996 is_thumb and set it according to CPSR saved on the stack.
1997 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1998 arm_sigreturn_next_pc.
1999
6f69e520
YQ
20002016-01-18 Yao Qi <yao.qi@linaro.org>
2001
2002 * linux-low.c (linux_set_pc_64bit): New function.
2003 (linux_get_pc_64bit): New function.
2004 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2005 Declare.
2006 * linux-sparc-low.c (debug_threads): Remove declaration.
2007 (sparc_get_pc): Remove.
2008 (the_low_target): Use linux_get_pc_64bit instead of
2009 sparc_get_pc.
2010 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2011 (the_low_target): Use linux_get_pc_64bit and
2012 linux_set_pc_64bit.
2013
276d4552
YQ
20142016-01-18 Yao Qi <yao.qi@linaro.org>
2015
2016 * linux-arm-low.c (debug_threads): Remove declaration.
2017 (arm_get_pc, arm_set_pc): Remove.
2018 (the_low_target): Use linux_get_pc_32bit and
2019 linux_set_pc_32bit.
2020 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2021 (the_low_target): Use linux_get_pc_32bit and
2022 linux_set_pc_32bit.
2023 * linux-cris-low.c (debug_threads): Remove declaration.
2024 (cris_get_pc, cris_set_pc,): Remove.
2025 (the_low_target): Use linux_get_pc_32bit and
2026 linux_set_pc_32bit.
2027 * linux-crisv32-low.c (debug_threads): Remove declaration.
2028 (cris_get_pc, cris_set_pc): Remove.
2029 (the_low_target): Use linux_get_pc_32bit and
2030 linux_set_pc_32bit.
2031 * linux-low.c: Include inttypes.h.
2032 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2033 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2034 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2035 (the_low_target): Use linux_get_pc_32bit and
2036 linux_set_pc_32bit.
2037 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2038 (the_low_target): Use linux_get_pc_32bit and
2039 linux_set_pc_32bit.
2040 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2041 (the_low_target): Use linux_get_pc_32bit and
2042 linux_set_pc_32bit.
2043 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2044 (the_low_target): Use linux_get_pc_32bit and
2045 linux_set_pc_32bit.
2046 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2047 (the_low_target): Use linux_get_pc_32bit and
2048 linux_set_pc_32bit.
2049
eb0edac8
GB
20502016-01-18 Gary Benson <gbenson@redhat.com>
2051
2052 * configure.ac (AC_FUNC_FORK): New check.
2053 * config.in: Regenerate.
2054 * configure: Likewise.
2055
1b451dda
YQ
20562016-01-14 Yao Qi <yao.qi@linaro.org>
2057
2058 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2059 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2060 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2061 arm_get_next_pcs_ctor.
2062
82075af2
JS
20632016-01-12 Josh Stone <jistone@redhat.com>
2064 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2065
2066 * inferiors.h: Include "gdb_vecs.h".
2067 (struct process_info): Add syscalls_to_catch.
2068 * inferiors.c (remove_process): Free syscalls_to_catch.
2069 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2070 syscall_return stops.
2071 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2072 * server.c (handle_general_set): Handle QCatchSyscalls.
2073 (handle_query): Report support for QCatchSyscalls.
2074 * target.h (struct target_ops): Add supports_catch_syscall.
2075 (target_supports_catch_syscall): New macro.
2076 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2077 (struct lwp_info): Add syscall_state.
2078 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2079 Maintain syscall_state and syscalls_to_catch across exec.
2080 (get_syscall_trapinfo): New function, proxy to the_low_target.
2081 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2082 (linux_low_filter_event): Toggle syscall_state entry/return for
2083 syscall traps, and set it ignored for all others.
2084 (gdb_catching_syscalls_p): New function.
2085 (gdb_catch_this_syscall_p): New function.
2086 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2087 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2088 (linux_supports_catch_syscall): New function.
2089 (linux_target_ops): Install it.
2090 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2091 (the_low_target): Install it.
2092
8f13a3ce
MF
20932016-01-12 Mike Frysinger <vapier@gentoo.org>
2094
2095 * acinclude.m4: Include new ../warning.m4 file.
2096 * configure: Regenerated.
2097 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2098
5b3da067
MF
20992016-01-12 Mike Frysinger <vapier@gentoo.org>
2100
2101 * ax.c (is_goto_target): Mark static.
2102 * linux-low.c (register_addr): Likewise.
2103 (linux_fetch_registers, linux_store_registers): Likewise.
2104 * mem-break.c (any_persistent_commands): Fix old prototype.
2105 (add_commands_to_breakpoint): Mark static.
2106 * regcache.c (find_register_by_name): Delete unused func.
2107 * remote-utils.c (hex_or_minus_one): Mark static.
2108 * server.c (monitor_show_help): Mark static.
2109 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2110 handle_v_requests): Likewise.
2111
bc504a31
PA
21122016-01-12 Pedro Alves <palves@redhat.com>
2113
2114 Remove use of the registered trademark symbol throughout.
2115
5a0dd67a
YQ
21162016-01-08 Yao Qi <yao.qi@linaro.org>
2117
2118 * remote-utils.c (getpkt): If c is '\003', call target hook
2119 request_interrupt.
2120
b2ca446f
YQ
21212016-01-06 Yao Qi <yao.qi@linaro.org>
2122
2123 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2124 linux-aarch32-low.c.
2125 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2126 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2127 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2128 (thumb2_breakpoint): Declare.
2129 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2130 linux-aarch32-low.h.
2131 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2132 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2133 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2134
edd88788
JB
21352016-01-01 Joel Brobecker <brobecker@adacore.com>
2136
2137 * gdbreplay.c (gdbreplay_version): Change copyright year in
2138 version message.
2139 * server.c (gdbserver_version): Likewise.
2140
65da7f14
PP
21412015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2142
2143 * server.c (crc32_table): Delete.
2144 (crc32): Use libiberty's xcrc32 function.
2145
4abd5ed2
JB
21462015-12-22 Joel Brobecker <brobecker@adacore.com>
2147
2148 * lynx-low.c (lynx_delete_thread_callback): New function.
2149 (lynx_mourn): Properly delete our process and all of its
2150 threads. Remove call to clear_inferiors.
2151
0e50fe5c
JB
21522015-12-22 Joel Brobecker <brobecker@adacore.com>
2153
2154 * target.c (thread_search_callback): Add check that
2155 the thread_stopped target callback is not NULL before
2156 calling it.
2157
35adc03f
YQ
21582015-12-21 Yao Qi <yao.qi@linaro.org>
2159
2160 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2161 arm breakpoint.
2162
bd2b2909
AT
21632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2164
2165 * server.c (handle_query): Call target_supports_software_single_step.
2166
7fe5e27e
AT
21672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2168
2169 * linux-low.c (single_step): New function.
2170 (linux_resume_one_lwp_throw): Call single_step.
2171 (start_step_over): Likewise.
2172
d9311bfa
AT
21732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2174
2175 * Makefile.in (SFILES): Append arch/arm-linux.c,
2176 arch/arm-get-next-pcs.c.
2177 (arm-linux.o): New rule.
2178 (arm-get-next-pcs.o): New rule.
2179 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2180 arm-linux.o.
2181 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2182 to linux-aarch32-low.c.
2183 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2184 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2185 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2186 (thumb2_breakpoint_len): Likewise.
2187 (arm_is_thumb_mode): Make non-static.
2188 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2189 from linux-aarch32-low.c.
2190 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2191 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2192 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2193 (thumb2_breakpoint_len): Likewise.
2194 (arm_is_thumb_mode): New declaration.
2195 * linux-arm-low.c: Include arch/arm-linux.h
2196 aarch/arm-get-next-pcs.h, sys/syscall.h.
2197 (get_next_pcs_ops): New struct.
2198 (get_next_pcs_addr_bits_remove): New function.
2199 (get_next_pcs_is_thumb): New function.
2200 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2201 (arm_sigreturn_next_pc): Likewise.
2202 (get_next_pcs_syscall_next_pc): Likewise.
2203 (arm_gdbserver_get_next_pcs): Likewise.
2204 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2205 Initialize.
2206 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2207 * server.h: Include gdb_vecs.h.
2208
68ce2059
AT
22092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2210
2211 * Makefile.in (SFILES): Append common/common-regcache.c.
2212 (OBS): Append common-regcache.o.
2213 (common-regcache.o): New rule.
2214 * regcache.c (init_register_cache): Initialize cache to
2215 REG_UNAVAILABLE.
2216 (regcache_raw_read_unsigned): New function.
2217 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2218 register_status enum.
2219
fa5308bd
AT
22202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2221
2222 * linux-aarch64-low.c (the_low_targets): Rename
2223 breakpoint_reinsert_addr to get_next_pcs.
2224 * linux-arm-low.c (the_low_targets): Likewise.
2225 * linux-bfin-low.c (the_low_targets): Likewise.
2226 * linux-cris-low.c (the_low_targets): Likewise.
2227 * linux-crisv32-low.c (the_low_targets): Likewise.
2228 * linux-low.c (can_software_single_step): Likewise.
2229 (install_software_single_step_breakpoints): New function.
2230 (start_step_over): Use install_software_single_step_breakpoints.
2231 * linux-low.h: New CORE_ADDR vector.
2232 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2233 get_next_pcs.
2234 * linux-mips-low.c (the_low_targets): Likewise.
2235 * linux-nios2-low.c (the_low_targets): Likewise.
2236 * linux-sparc-low.c (the_low_targets): Likewise.
2237
4a6ed09b
PA
22382015-12-17 Pedro Alves <palves@redhat.com>
2239
2240 * linux-low.c (linux_kill_one_lwp): Remove references to
2241 LinuxThreads.
2242 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2243 to 'kill'.
2244 (linux_init_signals): Delete.
2245 (initialize_low): Adjust.
2246 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2247
7544db95
PA
22482015-12-16 Pedro Alves <palves@redhat.com>
2249
2250 * configure.ac (compiler warning flags): When testing a
2251 -Wno-foo option, check whether -Wfoo works instead.
2252 * configure: Regenerate.
2253
8020350c
DB
22542015-12-11 Don Breazeal <donb@codesourcery.com>
2255
2256 * server.c (process_serial_event): Don't exit from gdbserver
2257 in remote mode if there are still active inferiors.
2258
db91f502
YQ
22592015-12-11 Yao Qi <yao.qi@linaro.org>
2260
2261 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2262 arm_breakpoint_at if the process is 32-bit.
2263
b37a6290
YQ
22642015-12-11 Yao Qi <yao.qi@linaro.org>
2265
2266 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2267 arm breakpoint.
2268
17b1509a
YQ
22692015-12-07 Yao Qi <yao.qi@linaro.org>
2270
2271 * configure.srv: Append arm.o to srv_tgtobj for
2272 aarch64*-*-linux* target.
2273 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2274 from linux-arm-low.c.
2275 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2276 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2277 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2278 (thumb2_breakpoint_len): Likewise.
2279 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2280 (arm_breakpoint_kinds): Likewise.
2281 (arm_breakpoint_kind_from_pc): Likewise.
2282 (arm_sw_breakpoint_from_kind): Likewise.
2283 (arm_breakpoint_kind_from_current_state): Likewise.
2284 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2285 (arm_sw_breakpoint_from_kind): Declare.
2286 (arm_breakpoint_kind_from_current_state): Declare.
2287 (arm_breakpoint_at): Declare.
2288 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2289 arm_sw_breakpoint_from_kind if process is 32-bit.
2290 (aarch64_breakpoint_kind_from_pc): New function.
2291 (aarch64_breakpoint_kind_from_current_state): New function.
2292 (the_low_target): Initialize fields breakpoint_kind_from_pc
2293 and breakpoint_kind_from_current_state.
2294 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2295 linux-aarch32-low.c.
2296 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2297 (arm_breakpoint, arm_breakpoint_len): Likewise.
2298 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2299 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2300 (arm_is_thumb_mode): Likewise.
2301 (arm_breakpoint_at): Likewise.
2302 (arm_breakpoint_kind_from_pc): Likewise.
2303 (arm_sw_breakpoint_from_kind): Likewise.
2304 (arm_breakpoint_kind_from_current_state): Likewise.
2305
2306 Revert:
2307 2015-08-04 Yao Qi <yao.qi@linaro.org>
2308
2309 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2310 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2311 * server.c (extended_protocol): Remove "static".
2312 * server.h (extended_protocol): Declare it.
2313
ece66d65
JS
23142015-12-04 Josh Stone <jistone@redhat.com>
2315
2316 * target.h (struct target_ops) <arch_setup>: Rename to ...
2317 (struct target_ops) <post_create_inferior>: ... this.
2318 (target_arch_setup): Rename to ...
2319 (target_post_create_inferior): ... this, calling post_create_inferior.
2320 * server.c (start_inferior): Update target_arch_setup calls to
2321 target_post_create_inferior.
2322 * linux-low.c (linux_low_ptrace_options): Forward declare.
2323 (linux_arch_setup): Update its comment for general use.
2324 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2325 (struct linux_target_ops): Use linux_post_create_inferior.
2326 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2327 to post_create_inferior.
2328 * nto-low.c (struct nto_target_ops): Likewise.
2329 * spu-low.c (struct spu_target_ops): Likewise.
2330 * win32-low.c (struct win32_target_ops): Likewise.
2331
e58c48b4
AT
23322015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2333
2334 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2335
fbec8956
AT
23362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2337
2338 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2339 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2340 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2341 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2342 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2343 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2344 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2345 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2346 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2347 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2348 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2349 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2350
9b4c5f87
AT
23512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2352
2353 * linux-low.c (linux_look_up_symbols): Don't call
2354 linux_supports_traceclone.
2355 * linux-low.h (thread_db_init): Remove use_events argument.
2356 * thread-db.c (thread_db_use_event): Remove global variable.
2357 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2358 (struct thread_db) <td_create_bp>: Remove field.
2359 (thread_db_create_event): Remove function.
2360 (thread_db_enable_reporting): Likewise.
2361 (find_one_thread): Don't check for thread_db_use_events.
2362 (attach_thread): Likewise.
2363 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2364 (try_thread_db_load_1): Don't check for thread_db_use_events.
2365 (thread_db_init): Remove use_events argument and thread events
2366 handling.
2367 (remove_thread_event_breakpoints): Remove function.
2368 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2369
7d00775e
AT
23702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371
2372 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2373 New function.
2374 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2375 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2376 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2377 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2378 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2379 Initialize.
2380 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2381 New function.
2382 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2383 * linux-low.c (can_hardware_single_step): Use
2384 supports_hardware_single_step.
2385 (can_software_single_step): New function.
2386 (start_step_over): Call can_software_single_step.
2387 (linux_supports_hardware_single_step): New function.
2388 (struct target_ops) <supports_software_single_step>: Initialize.
2389 * linux-low.h (struct linux_target_ops)
2390 <supports_hardware_single_step>: Initialize.
2391 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2392 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2393 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2394 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2395 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2396 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2397 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2398 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2399 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2400 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2401 Initialize.
2402 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2403 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2404 Initialize.
2405 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2406 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2407 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2408 New function.
2409 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2410 * target.h (struct target_ops): <supports_software_single_step>:
2411 New field.
2412 (target_supports_software_single_step): New macro.
2413
2d97cd35
AT
24142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2415
2416 * linux-low.c (linux_wait_1): Fix pc advance condition.
2417 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2418 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2419
769ef81f
AT
24202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2421
2422 * linux-arm-low.c (arm_is_thumb_mode): New function.
2423 (arm_breakpoint_at): Use arm_is_thumb_mode.
2424 (arm_breakpoint_kind_from_current_state): New function.
2425 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2426 Initialize.
2427 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2428 (linux_breakpoint_kind_from_current_state): New function.
2429 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2430 * linux-low.h (struct linux_target_ops)
2431 <breakpoint_kind_from_current_state>: New field.
2432 * target.h (struct target_ops): Likewise.
2433 (target_breakpoint_kind_from_current_state): New macro.
2434
1bebeeca
PA
24352015-11-30 Pedro Alves <palves@redhat.com>
2436
2437 * linux-low.c (linux_resume): Wake up the event loop before
2438 returning.
2439
a67a9fae
PA
24402015-11-30 Pedro Alves <palves@redhat.com>
2441
2442 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2443 check.
2444 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2445 to -1.
2446 * target.c (struct thread_search): New structure.
2447 (thread_search_callback): New function.
2448 (prev_general_thread): New global.
2449 (prepare_to_access_memory, done_accessing_memory): New functions.
2450 * target.h (prepare_to_access_memory, done_accessing_memory):
2451 Replace macros with function declarations.
2452
f2faf941
PA
24532015-11-30 Pedro Alves <palves@redhat.com>
2454
2455 PR 14618
2456 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2457 report TARGET_WAITKIND_NO_RESUMED.
2458 * remote-utils.c (prepare_resume_reply): Handle
2459 TARGET_WAITKIND_NO_RESUMED.
2460 * server.c (report_no_resumed): New global.
2461 (handle_query) <qSupported>: Handle "no-resumed+". Report
2462 "no-resumed+" support.
2463 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2464 return error if the client doesn't support no-resumed events.
2465 (push_stop_notification): New function.
2466 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2467 events if the client supports them.
2468
a681f9c9
PA
24692015-11-30 Pedro Alves <palves@redhat.com>
2470
2471 * linux-low.c (thread_still_has_status_pending_p): Don't check
2472 vCont;t here.
2473 (lwp_resumed): New function.
2474 (status_pending_p_callback): Return early if the LWP is not
2475 supposed to be resumed.
2476
65706a29
PA
24772015-11-30 Pedro Alves <palves@redhat.com>
2478
2479 * linux-low.c (handle_extended_wait): Assert that the LWP's
2480 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2481 thread create events, leave the new child's status pending.
2482 (linux_low_filter_event): If GDB wants to hear about thread exit
2483 events, leave the LWP marked dead and don't delete it.
2484 (linux_wait_for_event_filtered): Don't check for thread exit.
2485 (filter_exit_event): New function.
2486 (linux_wait_1): Use it, when returning an exit event.
2487 (linux_resume_one_lwp_throw): Assert that the LWP's
2488 waitstatus is TARGET_WAITKIND_IGNORE.
2489 * remote-utils.c (prepare_resume_reply): Handle
2490 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2491 * server.c (report_thread_events): New global.
2492 (handle_general_set): Handle QThreadEvents.
2493 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2494 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2495 TARGET_WAITKIND_THREAD_EXITED.
2496 * server.h (report_thread_events): Declare.
2497
56cf4bed
PA
24982015-11-30 Pedro Alves <palves@redhat.com>
2499
2500 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2501 the thread's last_resume_kind was resume_stop.
2502
500c1d85
PA
25032015-11-30 Pedro Alves <palves@redhat.com>
2504
2505 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2506 before returning.
2507
de979965
PA
25082015-11-30 Pedro Alves <palves@redhat.com>
2509
2510 * server.c (handle_v_requests): Handle vCtrlC.
2511
34c65914
PA
25122015-11-30 Pedro Alves <palves@redhat.com>
2513
2514 * gdbthread.h (find_any_thread_of_pid): Declare.
2515 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2516 functions.
2517 * server.c (handle_query): If current_thread is NULL, look for
2518 another thread of the selected process.
2519
79efa585 25202015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2521 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2522
2523 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2524 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2525 name in reply.
2526 * target.h (struct target_ops) <thread_name>: New field.
2527 (target_thread_name): New macro.
2528
80d82c19
JB
25292015-11-23 Joel Brobecker <brobecker@adacore.com>
2530
2531 * regcache.h (regcache_invalidate_pid): Add declaration.
2532 * regcache.c (regcache_invalidate_pid): New function, extracted
2533 from regcache_invalidate.
2534 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2535 Add trivial documentation comment.
2536 * lynx-low.c: Use regcache_invalidate_pid instead of
2537 regcache_invalidate.
2538
64da5dd5
JB
25392015-11-23 Joel Brobecker <brobecker@adacore.com>
2540
2541 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2542 and Elf64_auxv_t if the target is Android.
2543
37ce4055
DE
25442015-11-22 Doug Evans <xdje42@gmail.com>
2545
2546 * target.h: #include <sys/types.h>.
2547
06e03fff
PA
25482015-11-19 Pedro Alves <palves@redhat.com>
2549
2550 * linux-low.c (linux_process_qsupported): Change prototype.
2551 Adjust.
2552 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2553 Change prototype.
2554 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2555 and adjust to loop over all features.
2556 * server.c (handle_query) <qSupported>: Adjust to call
2557 target_process_qsupported once, passing it a vector of unprocessed
2558 features.
2559 * target.h (struct target_ops) <process_qsupported>: Change
2560 prototype.
2561 (target_process_qsupported): Adjust.
2562
9a084706
PA
25632015-11-19 Pedro Alves <palves@redhat.com>
2564
2565 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2566 mode.
2567 * configure: Regenerate.
2568
dad44a1f
PA
25692015-11-19 Pedro Alves <palves@redhat.com>
2570
2571 * configure: Regenerate.
2572
231c0592
YQ
25732015-11-19 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2576 type to uint32_t.
2577
6c1c9a8b
YQ
25782015-11-19 Yao Qi <yao.qi@linaro.org>
2579
2580 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2581 (struct aarch64_operand): Move enum out.
2582
9caa3311
YQ
25832015-11-19 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2586 struct user_fpsimd_state *.
2587 (aarch64_store_fpregset): Likewise.
2588
6a69a054
YQ
25892015-11-19 Yao Qi <yao.qi@linaro.org>
2590
2591 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2592 struct user_pt_regs *.
2593 (aarch64_store_gregset): Likewise.
2594
1798301e
PA
25952015-11-18 Pedro Alves <palves@redhat.com>
2596
2597 * Makefile.in (all_object_files): Add $IPA_OBJS.
2598
ce7715e2
PA
25992015-11-17 Pedro Alves <palves@redhat.com>
2600
2601 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2602 GDB_SIGNAL_0 and gdb_signal_to_string.
2603
c0879059
PA
26042015-11-17 Pedro Alves <palves@redhat.com>
2605
2606 * win32-low.c (handle_output_debug_string): Remove parameter.
2607 (win32_kill): Remove our_status local and adjust call to
2608 handle_output_debug_string.
2609 (get_child_debug_event): Adjust call to
2610 handle_output_debug_string.
2611
1996e237
SM
26122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2613
2614 * linux-mips-low.c (mips_fill_gregset): Add cast.
2615 (mips_store_gregset): Likewise.
2616 (mips_fill_fpregset): Likewise.
2617 (mips_store_fpregset): Likewise.
2618
cbec665b
SM
26192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2620
2621 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2622 priv.
2623
eb3e3c67
SM
26242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2625
2626 * linux-mips-low.c (mips_linux_new_thread): Change type of
2627 watch_type to enum target_hw_bp_type.
2628
171de4b8
SM
26292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2630
2631 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2632 Change return type to arm_hwbp_type.
2633
04248ead
SM
26342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2635
2636 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2637 (arm_store_gregset): Likewise.
2638 * linux-arm-low.c (arm_get_hwcap): Likewise.
2639 (arm_read_description): Likewise.
2640
04b3479c
SM
26412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2642
2643 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2644
2bc84e8a
SM
26452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2646
2647 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2648 (ppc_fill_vsxregset): Likewise.
2649 (ppc_store_vsxregset): Likewise.
2650 (ppc_fill_vrregset): Likewise.
2651 (ppc_store_vrregset): Likewise.
2652 (ppc_fill_evrregset): Likewise.
2653 (ppc_store_evrregset): Likewise.
2654
e6c5bb05
SM
26552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * linux-ppc-low.c (ppc_usrregs_info): Remove
2658 forward-declaration.
2659 (ppc_arch_setup): Move lower in file.
2660
7ea45d72
SM
26612015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2662
2663 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2664 (ps_pdwrite): Likewise.
2665
69291610
HW
26662015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2667
2668 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2669 to after assert checks.
2670
b42945fd
SM
26712015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2672
2673 * proc-service.c (ps_pdread): Add/adjust casts.
2674 (ps_pdwrite): Add/adjust casts.
2675
d6f85c84
SM
26762015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2677
2678 * server.c (handle_search_memory_1): Cast return value of
2679 memmem.
2680
f98cd059
SM
26812015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2682
2683 * server.c (write_qxfer_response): Change type of data to
2684 gdb_byte *.
2685
d2412fa5
PA
26862015-10-29 Pedro Alves <palves@redhat.com>
2687
2688 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2689
c17414a2
PA
26902015-10-29 Pedro Alves <palves@redhat.com>
2691
2692 * tracepoint.c (clear_installed_tracepoints): Add casts.
2693
e053fbc4
PA
26942015-10-29 Pedro Alves <palves@redhat.com>
2695
2696 * server.c (handle_v_cont, process_serial_event): Add enum
2697 gdb_signal casts to signal parsing code.
2698
add67df8
PA
26992015-10-29 Pedro Alves <palves@redhat.com>
2700
2701 * linux-low.h (NULL_REGSET): Define.
2702 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2703 * linux-arm-low.c (arm_regsets): Likewise.
2704 * linux-crisv32-low.c (cris_regsets): Likewise.
2705 * linux-m68k-low.c (m68k_regsets): Likewise.
2706 * linux-mips-low.c (mips_regsets): Likewise.
2707 * linux-nios2-low.c (nios2_regsets): Likewise.
2708 * linux-ppc-low.c (ppc_regsets): Likewise.
2709 * linux-s390-low.c (s390_regsets): Likewise.
2710 * linux-sh-low.c (sh_regsets): Likewise.
2711 * linux-sparc-low.c (sparc_regsets): Likewise.
2712 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2713 * linux-tile-low.c (tile_regsets): Likewise.
2714 * linux-x86-low.c (x86_regsets): Likewise.
2715 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2716
50bc912a
PA
27172015-10-29 Pedro Alves <palves@redhat.com>
2718
2719 * linux-low.h (NULL_REGSET): Define.
2720 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2721 * linux-arm-low.c (arm_regsets): Likewise.
2722 * linux-crisv32-low.c (cris_regsets): Likewise.
2723 * linux-m68k-low.c (m68k_regsets): Likewise.
2724 * linux-mips-low.c (mips_regsets): Likewise.
2725 * linux-nios2-low.c (nios2_regsets): Likewise.
2726 * linux-ppc-low.c (ppc_regsets): Likewise.
2727 * linux-s390-low.c (s390_regsets): Likewise.
2728 * linux-sh-low.c (sh_regsets): Likewise.
2729 * linux-sparc-low.c (sparc_regsets): Likewise.
2730 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2731 * linux-tile-low.c (tile_regsets): Likewise.
2732 * linux-x86-low.c (x86_regsets): Likewise.
2733 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2734
682b2546
DE
27352015-10-26 Doug Evans <dje@google.com>
2736
2737 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2738
963843d4
DE
27392015-10-26 Doug Evans <dje@google.com>
2740
2741 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2742
d41401ac
DE
27432015-10-26 Doug Evans <dje@google.com>
2744
2745 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2746 for debug_printf.
2747 (attach_thread, find_new_threads_callback): Ditto.
2748
3db28855
AT
27492015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2750
2751 * mem-break.h (set_breakpoint_data): Remove.
2752
fb78e89c
AT
27532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2754
2755 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2756 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2757 (initialize_low): Remove set_breakpoint_data call.
2758 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2759 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2760 (initialize_low): Remove set_breakpoint_data call.
2761 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2762 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2763 (initialize_low): Remove set_breakpoint_data call.
2764
2e6ee069
AT
27652015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2766
2767 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2768 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2769 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2770 * target.h (target_breakpoint_kind_from_pc): New macro.
2771
1652a986
AT
27722015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2773
2774 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2775 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2776 the default breakpoint kind.
2777
abeead09
AT
27782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2779
2780 * linux-arm-low.c (arm_supports_z_point_type): Add software
2781 breakpoint support.
2782
b0b4b501
AT
27832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2784
2785 * linux-arm-low.c: Refactor breakpoint definitions.
2786 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2787 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2788
8689682c
AT
27892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2790
2791 * Makefile.in: Add arm.c/o.
2792 * configure.srv: Likewise.
2793 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2794 (arm_breakpoint_kind_from_pc): New function.
2795 (arm_sw_breakpoint_from_kind): Return proper kind.
2796 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2797
27165294
AT
27982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2799
2800 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2801 removal.
2802 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2803 (struct raw_breakpoint) <size>: Remove.
2804 (struct raw_breakpoint) <kind>: Add.
2805 (bp_size): New function.
2806 (bp_opcode): Likewise.
2807 (find_raw_breakpoint_at): Adjust for kind.
2808 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2809 (remove_memory_breakpoint): Adjust for kind call bp_size.
2810 (set_raw_breakpoint_at): Adjust for kind.
2811 (set_breakpoint): Likewise.
2812 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2813 (delete_raw_breakpoint): Adjust for kind.
2814 (delete_breakpoint): Likewise.
2815 (find_gdb_breakpoint): Likewise.
2816 (set_gdb_breakpoint_1): Likewise.
2817 (set_gdb_breakpoint): Likewise.
2818 (delete_gdb_breakpoint_1): Likewise.
2819 (delete_gdb_breakpoint): Likewise.
2820 (uninsert_raw_breakpoint): Likewise.
2821 (reinsert_raw_breakpoint): Likewise.
2822 (set_breakpoint_data): Remove.
2823 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2824 (check_mem_read): Adjust for kind call bp_size.
2825 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2826 (clone_one_breakpoint): Adjust for kind.
2827 * mem-break.h (set_gdb_breakpoint): Likewise.
2828 (delete_gdb_breakpoint): Likewise.
2829 * server.c (process_serial_event): Likewise.
2830
dd373349
AT
28312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2832
2833 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2839 (arm_sw_breakpoint_from_kind): New function.
2840 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2841 (struct linux_target_ops) <breakpoint>: Remove.
2842 (struct linux_target_ops) <breakpoint_len>: Remove.
2843 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2844 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2845 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2846 (struct linux_target_ops) <breakpoint>: Remove.
2847 (struct linux_target_ops) <breakpoint_len>: Remove.
2848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2850 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2851 (struct linux_target_ops) <breakpoint>: Remove.
2852 (struct linux_target_ops) <breakpoint_len>: Remove.
2853 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2855 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2856 and sw_breakpoint_from_kind to increment the pc.
2857 (linux_breakpoint_kind_from_pc): New function.
2858 (linux_sw_breakpoint_from_kind): New function.
2859 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2860 (initialize_low): Call breakpoint_kind_from_pc and
2861 sw_breakpoint_from_kind to replace breakpoint_data/len.
2862 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2863 New field.
2864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2865 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2866 (struct linux_target_ops) <breakpoint>: Remove.
2867 (struct linux_target_ops) <breakpoint_len>: Remove.
2868 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2870 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2871 (struct linux_target_ops) <breakpoint>: Remove.
2872 (struct linux_target_ops) <breakpoint_len>: Remove.
2873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2875 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2876 (struct linux_target_ops) <breakpoint>: Remove.
2877 (struct linux_target_ops) <breakpoint_len>: Remove.
2878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2880 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2881 (struct linux_target_ops) <breakpoint>: Remove.
2882 (struct linux_target_ops) <breakpoint_len>: Remove.
2883 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2884 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2885 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2886 (struct linux_target_ops) <breakpoint>: Remove.
2887 (struct linux_target_ops) <breakpoint_len>: Remove.
2888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2890 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2891 (struct linux_target_ops) <breakpoint>: Remove.
2892 (struct linux_target_ops) <breakpoint_len>: Remove.
2893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2894 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2895 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2896 (struct linux_target_ops) <breakpoint>: Remove.
2897 (struct linux_target_ops) <breakpoint_len>: Remove.
2898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2900 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2901 (struct linux_target_ops) <breakpoint>: Remove.
2902 (struct linux_target_ops) <breakpoint_len>: Remove.
2903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2905 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2906 (struct linux_target_ops) <breakpoint>: Remove.
2907 (struct linux_target_ops) <breakpoint_len>: Remove.
2908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2910 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2911 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2912 (struct linux_target_ops) <breakpoint>: Remove.
2913 (struct linux_target_ops) <breakpoint_len>: Remove.
2914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2916 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2917 (struct linux_target_ops) <breakpoint>: Remove.
2918 (struct linux_target_ops) <breakpoint_len>: Remove.
2919 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2920 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2921
4cd98a19
AT
29222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2923
2924 * linux-cris-low.c (cris_get_pc): Remove void arg.
2925
774ee6d2
AR
29262015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2927
2928 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2929 variable name.
2930
833dcd29
AR
29312015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2932
2933 * inferiors.c (thread_pid_matches_callback): New function.
2934 (find_thread_process): New function.
2935 (remove_thread): Reset current_thread.
2936 (remove_process): Assert threads have been removed first.
2937
8d689ee5
YQ
29382015-10-15 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2941 if it is 3.
2942 (aarch64_remove_point): Likewise.
2943 * regcache.c (regcache_register_size): New function.
2944
1c2e1515
YQ
29452015-10-12 Yao Qi <yao.qi@linaro.org>
2946
2947 * linux-aarch64-low.c: Update all callers as emit_load_store
2948 is renamed to aarch64_emit_load_store.
2949
e1c587c3
YQ
29502015-10-12 Yao Qi <yao.qi@linaro.org>
2951
2952 * linux-aarch64-low.c: Update all callers of function renaming
2953 from emit_insn to aarch64_emit_insn.
2954
b6542f81
YQ
29552015-10-12 Yao Qi <yao.qi@linaro.org>
2956
2957 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2958 arch/aarch64-insn.h.
2959 (struct aarch64_memory_operand): Likewise.
2960 (ENCODE): Likewise.
2961 (emit_insn): Move to arch/aarch64-insn.c.
2962 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2963 (emit_load_store): Move to arch/aarch64-insn.c.
2964 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2965 (can_encode_int32): Remove.
2966
246994ce
YQ
29672015-10-12 Yao Qi <yao.qi@linaro.org>
2968
2969 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2970 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2971 (aarch64_relocate_instruction): Likewise.
2972 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2973 (struct aarch64_insn_visitor): Likewise.
2974
0badd99f
YQ
29752015-10-12 Yao Qi <yao.qi@linaro.org>
2976
2977 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2978 (struct aarch64_insn_visitor): New.
2979 (struct aarch64_insn_relocation_data): New.
2980 (aarch64_ftrace_insn_reloc_b): New function.
2981 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2982 (aarch64_ftrace_insn_reloc_cb): Likewise.
2983 (aarch64_ftrace_insn_reloc_tb): Likewise.
2984 (aarch64_ftrace_insn_reloc_adr): Likewise.
2985 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2986 (aarch64_ftrace_insn_reloc_others): Likewise.
2987 (visitor): New.
2988 (aarch64_relocate_instruction): Use visitor.
2989
dfaffe9d
YQ
29902015-10-12 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2993 int. Add argument buf.
2994 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2995 aarch64_relocate_instruction.
2996
70b439f0
YQ
29972015-10-12 Yao Qi <yao.qi@linaro.org>
2998
2999 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3000 argument insn. Remove local variable insn. Don't call
3001 target_read_uint32.
3002 (aarch64_install_fast_tracepoint_jump_pad): Call
3003 target_read_uint32.
3004
7781c06f
YQ
30052015-09-30 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3008 (emit_load_store_pair): Likewise.
3009
9a3c8263
SM
30102015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3011
3012 * dll.c (match_dll): Add cast(s).
3013 (unloaded_dll): Likewise.
3014 * linux-low.c (second_thread_of_pid_p): Likewise.
3015 (delete_lwp_callback): Likewise.
3016 (count_events_callback): Likewise.
3017 (select_event_lwp_callback): Likewise.
3018 (linux_set_resume_request): Likewise.
3019 * server.c (accumulate_file_name_length): Likewise.
3020 (emit_dll_description): Likewise.
3021 (handle_qxfer_threads_worker): Likewise.
3022 (visit_actioned_threads): Likewise.
3023 * thread-db.c (any_thread_of): Likewise.
3024 * tracepoint.c (same_process_p): Likewise.
3025 (match_blocktype): Likewise.
3026 (build_traceframe_info_xml): Likewise.
3027
224c3ddb
SM
30282015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3029
3030 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3031 assignment.
3032 (gdb_unparse_agent_expr): Likewise.
3033 * hostio.c (require_data): Likewise.
3034 (handle_pread): Likewise.
3035 * linux-low.c (disable_regset): Likewise.
3036 (fetch_register): Likewise.
3037 (store_register): Likewise.
3038 (get_dynamic): Likewise.
3039 (linux_qxfer_libraries_svr4): Likewise.
3040 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3041 (set_fast_tracepoint_jump): Likewise.
3042 (uninsert_fast_tracepoint_jumps_at): Likewise.
3043 (reinsert_fast_tracepoint_jumps_at): Likewise.
3044 (validate_inserted_breakpoint): Likewise.
3045 (clone_agent_expr): Likewise.
3046 * regcache.c (init_register_cache): Likewise.
3047 * remote-utils.c (putpkt_binary_1): Likewise.
3048 (decode_M_packet): Likewise.
3049 (decode_X_packet): Likewise.
3050 (look_up_one_symbol): Likewise.
3051 (relocate_instruction): Likewise.
3052 (monitor_output): Likewise.
3053 * server.c (handle_search_memory): Likewise.
3054 (handle_qxfer_exec_file): Likewise.
3055 (handle_qxfer_libraries): Likewise.
3056 (handle_qxfer): Likewise.
3057 (handle_query): Likewise.
3058 (handle_v_cont): Likewise.
3059 (handle_v_run): Likewise.
3060 (captured_main): Likewise.
3061 * target.c (write_inferior_memory): Likewise.
3062 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3063 * tracepoint.c (init_trace_buffer): Likewise.
3064 (add_tracepoint_action): Likewise.
3065 (add_traceframe): Likewise.
3066 (add_traceframe_block): Likewise.
3067 (cmd_qtdpsrc): Likewise.
3068 (cmd_qtdv): Likewise.
3069 (cmd_qtstatus): Likewise.
3070 (response_source): Likewise.
3071 (response_tsv): Likewise.
3072 (cmd_qtnotes): Likewise.
3073 (gdb_collect): Likewise.
3074 (initialize_tracepoint): Likewise.
3075
afbe19f8
PL
30762015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3077
3078 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3079 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3080 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3081 <NOP>: New.
3082 (enum aarch64_condition_codes): New enum.
3083 (w0): New static global.
3084 (fp): Likewise.
3085 (lr): Likewise.
3086 (struct aarch64_memory_operand) <type>: New
3087 MEMORY_OPERAND_POSTINDEX type.
3088 (postindex_memory_operand): New helper function.
3089 (emit_ret): New function.
3090 (emit_load_store_pair): New function, factored out of emit_stp
3091 with support for MEMORY_OPERAND_POSTINDEX.
3092 (emit_stp): Rewrite using emit_load_store_pair.
3093 (emit_ldp): New function.
3094 (emit_load_store): Likewise.
3095 (emit_ldr): Mention post-index instruction in comment.
3096 (emit_ldrh): New function.
3097 (emit_ldrb): New function.
3098 (emit_ldrsw): Mention post-index instruction in comment.
3099 (emit_str): Likewise.
3100 (emit_subs): New function.
3101 (emit_cmp): Likewise.
3102 (emit_and): Likewise.
3103 (emit_orr): Likewise.
3104 (emit_orn): Likewise.
3105 (emit_eor): Likewise.
3106 (emit_mvn): Likewise.
3107 (emit_lslv): Likewise.
3108 (emit_lsrv): Likewise.
3109 (emit_asrv): Likewise.
3110 (emit_mul): Likewise.
3111 (emit_sbfm): Likewise.
3112 (emit_sbfx): Likewise.
3113 (emit_ubfm): Likewise.
3114 (emit_ubfx): Likewise.
3115 (emit_csinc): Likewise.
3116 (emit_cset): Likewise.
3117 (emit_nop): Likewise.
3118 (emit_ops_insns): New helper function.
3119 (emit_pop): Likewise.
3120 (emit_push): Likewise.
3121 (aarch64_emit_prologue): New function.
3122 (aarch64_emit_epilogue): Likewise.
3123 (aarch64_emit_add): Likewise.
3124 (aarch64_emit_sub): Likewise.
3125 (aarch64_emit_mul): Likewise.
3126 (aarch64_emit_lsh): Likewise.
3127 (aarch64_emit_rsh_signed): Likewise.
3128 (aarch64_emit_rsh_unsigned): Likewise.
3129 (aarch64_emit_ext): Likewise.
3130 (aarch64_emit_log_not): Likewise.
3131 (aarch64_emit_bit_and): Likewise.
3132 (aarch64_emit_bit_or): Likewise.
3133 (aarch64_emit_bit_xor): Likewise.
3134 (aarch64_emit_bit_not): Likewise.
3135 (aarch64_emit_equal): Likewise.
3136 (aarch64_emit_less_signed): Likewise.
3137 (aarch64_emit_less_unsigned): Likewise.
3138 (aarch64_emit_ref): Likewise.
3139 (aarch64_emit_if_goto): Likewise.
3140 (aarch64_emit_goto): Likewise.
3141 (aarch64_write_goto_address): Likewise.
3142 (aarch64_emit_const): Likewise.
3143 (aarch64_emit_call): Likewise.
3144 (aarch64_emit_reg): Likewise.
3145 (aarch64_emit_pop): Likewise.
3146 (aarch64_emit_stack_flush): Likewise.
3147 (aarch64_emit_zero_ext): Likewise.
3148 (aarch64_emit_swap): Likewise.
3149 (aarch64_emit_stack_adjust): Likewise.
3150 (aarch64_emit_int_call_1): Likewise.
3151 (aarch64_emit_void_call_2): Likewise.
3152 (aarch64_emit_eq_goto): Likewise.
3153 (aarch64_emit_ne_goto): Likewise.
3154 (aarch64_emit_lt_goto): Likewise.
3155 (aarch64_emit_le_goto): Likewise.
3156 (aarch64_emit_gt_goto): Likewise.
3157 (aarch64_emit_ge_got): Likewise.
3158 (aarch64_emit_ops_impl): New static global variable.
3159 (aarch64_emit_ops): New target function, return
3160 &aarch64_emit_ops_impl.
3161 (struct linux_target_ops): Install it.
3162
bb903df0
PL
31632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3164
3165 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3166 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3167 aarch64-ipa.o.
3168 * linux-aarch64-ipa.c: New file.
3169 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3170 and endian.h.
3171 (aarch64_get_thread_area): New target method.
3172 (extract_signed_bitfield): New helper function.
3173 (aarch64_decode_ldr_literal): New function.
3174 (enum aarch64_opcodes): New enum.
3175 (struct aarch64_register): New struct.
3176 (struct aarch64_operand): New struct.
3177 (x0): New static global.
3178 (x1): Likewise.
3179 (x2): Likewise.
3180 (x3): Likewise.
3181 (x4): Likewise.
3182 (w2): Likewise.
3183 (ip0): Likewise.
3184 (sp): Likewise.
3185 (xzr): Likewise.
3186 (aarch64_register): New helper function.
3187 (register_operand): Likewise.
3188 (immediate_operand): Likewise.
3189 (struct aarch64_memory_operand): New struct.
3190 (offset_memory_operand): New helper function.
3191 (preindex_memory_operand): Likewise.
3192 (enum aarch64_system_control_registers): New enum.
3193 (ENCODE): New macro.
3194 (emit_insn): New helper function.
3195 (emit_b): New function.
3196 (emit_bcond): Likewise.
3197 (emit_cb): Likewise.
3198 (emit_tb): Likewise.
3199 (emit_blr): Likewise.
3200 (emit_stp): Likewise.
3201 (emit_ldp_q_offset): Likewise.
3202 (emit_stp_q_offset): Likewise.
3203 (emit_load_store): Likewise.
3204 (emit_ldr): Likewise.
3205 (emit_ldrsw): Likewise.
3206 (emit_str): Likewise.
3207 (emit_ldaxr): Likewise.
3208 (emit_stxr): Likewise.
3209 (emit_stlr): Likewise.
3210 (emit_data_processing_reg): Likewise.
3211 (emit_data_processing): Likewise.
3212 (emit_add): Likewise.
3213 (emit_sub): Likewise.
3214 (emit_mov): Likewise.
3215 (emit_movk): Likewise.
3216 (emit_mov_addr): Likewise.
3217 (emit_mrs): Likewise.
3218 (emit_msr): Likewise.
3219 (emit_sevl): Likewise.
3220 (emit_wfe): Likewise.
3221 (append_insns): Likewise.
3222 (can_encode_int32_in): New helper function.
3223 (aarch64_relocate_instruction): New function.
3224 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3225 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3226 (struct linux_target_ops): Install aarch64_get_thread_area,
3227 aarch64_install_fast_tracepoint_jump_pad and
3228 aarch64_get_min_fast_tracepoint_insn_len.
3229
787749ea
PL
32302015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3231
3232 * Makefile.in (aarch64-insn.o): New rule.
3233 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3234
9812b2e6
YQ
32352015-09-21 Yao Qi <yao.qi@linaro.org>
3236
3237 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3238
18fe412b
YQ
32392015-09-21 Yao Qi <yao.qi@linaro.org>
3240
3241 * tracepoint.c (max_jump_pad_size): Remove.
3242
a0cc84cd
YQ
32432015-09-18 Yao Qi <yao.qi@linaro.org>
3244
3245 * linux-aarch64-low.c: Don't include sys/uio.h.
3246 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3247
d78908cf
WW
32482015-09-16 Wei-cheng Wang <cole945@gmail.com>
3249
3250 * tracepoint.c (eval_result_type): Change prototype.
3251 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3252
d57e0d50
PA
32532015-09-15 Pedro Alves <palves@redhat.com>
3254
3255 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3256 Check whether to report exec events instead of checking whether
3257 multiprocess is enabled.
3258
5a676acc
PA
32592015-09-15 Pedro Alves <palves@redhat.com>
3260
3261 PR remote/18965
3262 * remote-utils.c (prepare_resume_reply): Merge
3263 TARGET_WAITKIND_VFORK_DONE switch case with the
3264 TARGET_WAITKIND_FORKED case.
3265
7c5d0fad
YQ
32662015-09-15 Yao Qi <yao.qi@linaro.org>
3267
3268 * server.c (handle_query): Check string comparison using
3269 "else if" instead of "if".
3270
750ce8d1
YQ
32712015-09-15 Yao Qi <yao.qi@linaro.org>
3272
3273 * server.c (vCont_supported): New global variable.
3274 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3275 matches. Append ";vContSupported+" to own_buf.
3276 (handle_v_requests): Append ";s;S" to own_buf if target supports
3277 hardware single step or vCont_supported is false.
3278 (capture_main): Set vCont_supported to zero.
3279
70b90b91
YQ
32802015-09-15 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3283 it to ...
3284 (linux_supports_hardware_single_step): ... New function.
3285 (linux_target_ops): Update.
3286 * lynx-low.c (lynx_target_ops): Set field
3287 supports_hardware_single_step to target_can_do_hardware_single_step.
3288 * nto-low.c (nto_target_ops): Likewise.
3289 * spu-low.c (spu_target_ops): Likewise.
3290 * win32-low.c (win32_target_ops): Likewise.
3291 * target.c (target_can_do_hardware_single_step): New function.
3292 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3293 Remove. <supports_hardware_single_step>: New field.
3294 (target_supports_conditional_breakpoints): Remove.
3295 (target_supports_hardware_single_step): New macro.
3296 (target_can_do_hardware_single_step): Declare.
3297 * server.c (handle_query): Use target_supports_hardware_single_step
3298 instead of target_supports_conditional_breakpoints.
3299
ade90bde
YQ
33002015-09-15 Yao Qi <yao.qi@linaro.org>
3301
3302 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3303 function.
3304 (struct linux_target_ops the_low_target): Install
3305 aarch64_linux_siginfo_fixup.
3306
94585166
DB
33072015-09-11 Don Breazeal <donb@codesourcery.com>
3308 Luis Machado <lgustavo@codesourcery.com>
3309
3310 * linux-low.c (linux_mourn): Static declaration.
3311 (linux_arch_setup): Move in front of
3312 handle_extended_wait.
3313 (linux_arch_setup_thread): New function.
3314 (handle_extended_wait): Handle exec events. Call
3315 linux_arch_setup_thread. Make event_lwp argument a
3316 pointer-to-a-pointer.
3317 (check_zombie_leaders): Do not check stopped threads.
3318 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3319 (linux_low_filter_event): Add lwp and thread for exec'ing
3320 non-leader thread if leader thread has been deleted.
3321 Refactor code into linux_arch_setup_thread and call it.
3322 Pass child lwp pointer by reference to handle_extended_wait.
3323 (linux_wait_for_event_filtered): Update comment.
3324 (linux_wait_1): Prevent clobbering exec event status.
3325 (linux_supports_exec_events): New function.
3326 (linux_target_ops) <supports_exec_events>: Initialize new member.
3327 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3328 new member.
3329 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3330 * server.c (report_exec_events): New global variable.
3331 (handle_query): Handle qSupported query for exec-events feature.
3332 (captured_main): Initialize report_exec_events.
3333 * server.h (report_exec_events): Declare new global variable.
3334 * target.h (struct target_ops) <supports_exec_events>: New
3335 member.
3336 (target_supports_exec_events): New macro.
3337 * win32-low.c (win32_target_ops) <supports_exec_events>:
3338 Initialize new member.
3339
0568462b
MM
33402015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3341
3342 * linux-low.c (linux_low_enable_btrace): Remove.
3343 (linux_target_ops): Replace linux_low_enable_btrace with
3344 linux_enable_btrace.
3345
39edd165
YQ
33462015-09-03 Yao Qi <yao.qi@linaro.org>
3347
3348 * linux-aarch64-low.c (aarch64_insert_point): Call
3349 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3350 returns true.
3351
1db33b5a
UW
33522015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3353
3354 * linux-low.c (check_stopped_by_breakpoint): Use
3355 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3356
ab290430
PA
33572015-08-27 Pedro Alves <palves@redhat.com>
3358
3359 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3360
8d749320
SM
33612015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3362
6711b7f8
SM
3363 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3364 the XNEW-family equivalent.
8d749320
SM
3365 (compile_bytecodes): Likewise.
3366 * dll.c (loaded_dll): Likewise.
3367 * event-loop.c (append_callback_event): Likewise.
3368 (create_file_handler): Likewise.
3369 (create_file_event): Likewise.
3370 * hostio.c (handle_open): Likewise.
3371 * inferiors.c (add_thread): Likewise.
3372 (add_process): Likewise.
3373 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3374 * linux-arm-low.c (arm_new_process): Likewise.
3375 (arm_new_thread): Likewise.
3376 * linux-low.c (add_to_pid_list): Likewise.
3377 (linux_add_process): Likewise.
3378 (handle_extended_wait): Likewise.
3379 (add_lwp): Likewise.
3380 (enqueue_one_deferred_signal): Likewise.
3381 (enqueue_pending_signal): Likewise.
3382 (linux_resume_one_lwp_throw): Likewise.
3383 (linux_resume_one_thread): Likewise.
3384 (linux_read_memory): Likewise.
3385 (linux_write_memory): Likewise.
3386 * linux-mips-low.c (mips_linux_new_process): Likewise.
3387 (mips_linux_new_thread): Likewise.
3388 (mips_add_watchpoint): Likewise.
3389 * linux-x86-low.c (initialize_low_arch): Likewise.
3390 * lynx-low.c (lynx_add_process): Likewise.
3391 * mem-break.c (set_raw_breakpoint_at): Likewise.
3392 (set_breakpoint): Likewise.
3393 (add_condition_to_breakpoint): Likewise.
3394 (add_commands_to_breakpoint): Likewise.
3395 (clone_agent_expr): Likewise.
3396 (clone_one_breakpoint): Likewise.
3397 * regcache.c (new_register_cache): Likewise.
3398 * remote-utils.c (look_up_one_symbol): Likewise.
3399 * server.c (queue_stop_reply): Likewise.
3400 (start_inferior): Likewise.
3401 (queue_stop_reply_callback): Likewise.
3402 (handle_target_event): Likewise.
3403 * spu-low.c (fetch_ppc_memory): Likewise.
3404 (store_ppc_memory): Likewise.
3405 * target.c (set_target_ops): Likewise.
3406 * thread-db.c (thread_db_load_search): Likewise.
3407 (try_thread_db_load_1): Likewise.
3408 * tracepoint.c (add_tracepoint): Likewise.
3409 (add_tracepoint_action): Likewise.
3410 (create_trace_state_variable): Likewise.
3411 (cmd_qtdpsrc): Likewise.
3412 (cmd_qtro): Likewise.
3413 (add_while_stepping_state): Likewise.
3414 * win32-low.c (child_add_thread): Likewise.
3415 (get_image_name): Likewise.
3416
ed8b7b42
YQ
34172015-08-25 Yao Qi <yao.qi@linaro.org>
3418
3419 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3420
db3cb7cb
YQ
34212015-08-25 Yao Qi <yao.qi@linaro.org>
3422
3423 * Makefile.in (aarch64-linux.o): New rule.
3424 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3425 srv_tgtobj.
3426 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3427 (aarch64_init_debug_reg_state): Make it extern.
3428 (aarch64_linux_prepare_to_resume): Remove.
3429
f6011a1c
YQ
34302015-08-25 Yao Qi <yao.qi@linaro.org>
3431
3432 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3433 lwp_arch_private_info and ptid_of_lwp.
3434
88e2cf7e
YQ
34352015-08-25 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3438 Find proc_info by find_process_pid. All callers updated.
3439
5e35436e
YQ
34402015-08-25 Yao Qi <yao.qi@linaro.org>
3441
3442 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3443 Remove.
3444 (debug_reg_change_callback): Remove.
3445 (aarch64_notify_debug_reg_change): Remove.
3446
4a8a7965
YQ
34472015-08-25 Yao Qi <yao.qi@linaro.org>
3448
3449 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3450 Call current_lwp_ptid.
3451
32a271ee
YQ
34522015-08-25 Yao Qi <yao.qi@linaro.org>
3453
3454 * linux-aarch64-low.c (debug_reg_change_callback): Use
3455 debug_printf.
3456
0d51c8d7
YQ
34572015-08-25 Yao Qi <yao.qi@linaro.org>
3458
3459 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3460
31a43dd5
YQ
34612015-08-25 Yao Qi <yao.qi@linaro.org>
3462
3463 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3464
8ee52567
YQ
34652015-08-25 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3468 the code.
3469
ff3f0f45
YQ
34702015-08-25 Yao Qi <yao.qi@linaro.org>
3471
3472 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3473 Remove.
3474 (debug_reg_change_callback): Remove argument entry and add argument
3475 lwp. Remove local variable thread. Don't print thread id in the
3476 debugging output. Don't check whether pid of thread equals to pid.
3477 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3478 iterate_over_lwps instead find_inferior.
3479
3d40fbb5
PA
34802015-08-24 Pedro Alves <palves@redhat.com>
3481
3482 * inferiors.c (get_first_process): New function.
3483 * inferiors.h (get_first_process): New declaration.
3484 * remote-utils.c (read_ptid): Default to the first process in the
3485 list, instead of to the current thread's process.
3486
438e1e42
PA
34872015-08-24 Pedro Alves <palves@redhat.com>
3488
3489 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3490 * event-loop.c: Likewise.
3491 * remote-utils.c: Likewise.
3492 * tracepoint.c: Likewise.
3493
a8c6d4fc
PA
34942015-08-24 Pedro Alves <palves@redhat.com>
3495
3496 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3497 ptid_get_lwp.
3498
99b0bb12
PA
34992015-08-21 Pedro Alves <palves@redhat.com>
3500
3501 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3502 instead of literal 1.
3503
f8904751
PA
35042015-08-21 Pedro Alves <palves@redhat.com>
3505
3506 * tdesc.c (default_description): Explicitly zero-initialize.
3507
465a859e
PA
35082015-08-21 Pedro Alves <palves@redhat.com>
3509
3510 PR gdb/18749
3511 * inferiors.c (remove_thread): Discard any pending stop reply for
3512 this thread.
3513 * server.c (remove_all_on_match_pid): Rename to ...
3514 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3515 instead of a pid.
3516 (discard_queued_stop_replies): Change parameter to a ptid. Now
3517 extern.
3518 (handle_v_kill, kill_inferior_callback, captured_main)
3519 (process_serial_event): Adjust.
3520 * server.h (discard_queued_stop_replies): Declare.
3521
f0db101d
PA
35222015-08-21 Pedro Alves <palves@redhat.com>
3523
3524 * linux-low.c (wait_for_sigstop): Always switch to no thread
3525 selected if the previously current thread dies.
3526 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3527 process instead of the current thread's.
3528 * remote-utils.c (input_interrupt): Don't check if there's no
3529 current thread.
3530 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3531 current thread to the general thread fails, error out.
3532 (handle_qxfer_auxv, handle_qxfer_libraries)
3533 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3534 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3535 (handle_query): Check if there's a thread selected instead of
3536 checking whether there's any thread in the thread list.
3537 (handle_qxfer_threads, handle_qxfer_btrace)
3538 (handle_qxfer_btrace_conf): Don't error out early if there's no
3539 thread in the thread list.
3540 (handle_v_cont, myresume): Don't set the current thread to the
3541 continue thread.
3542 (process_serial_event) <Hg handling>: Also set thread_id if the
3543 previous general thread is still alive.
3544 (process_serial_event) <g/G handling>: If setting the current
3545 thread to the general thread fails, error out.
3546 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3547 thread's lwp instead of the current thread's.
3548 * target.c (set_desired_thread): If the desired thread was not
3549 found, leave the current thread pointing to NULL. Return an int
3550 (boolean) indicating success.
3551 * target.h (set_desired_thread): Change return type to int.
3552
40045d91
MF
35532015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3554
3555 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3556 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3557 #includes.
3558 (ps_get_thread_area): New function.
3559
45face3b
GB
35602015-08-19 Gary Benson <gbenson@redhat.com>
3561
3562 * hostio.c (handle_pread): Do not attempt to read more data
3563 than hostio_reply_with_data can fit in a packet.
3564
16d5f642
JB
35652015-08-18 Joel Brobecker <brobecker@adacore.com>
3566
3567 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3568
a738da3a
MF
35692015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3570
3571 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3572
33ebda9d
PA
35732015-08-06 Pedro Alves <palves@redhat.com>
3574
3575 * tracepoint.c (expr_eval_result): Now an int.
3576
a44892be
PA
35772015-08-06 Pedro Alves <palves@redhat.com>
3578
3579 * gdbthread.h (struct regcache): Forward declare.
3580 (struct thread_info) <regcache_data>: Now a struct regcache
3581 pointer.
3582 * inferiors.c (inferior_regcache_data)
3583 (set_inferior_regcache_data): Now work with struct regcache
3584 pointers.
3585 * inferiors.h (struct regcache): Forward declare.
3586 (inferior_regcache_data, set_inferior_regcache_data): Now work
3587 with struct regcache pointers.
3588 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3589 (free_register_cache_thread): Remove struct regcache pointer
3590 casts.
3591
608a1e46
PA
35922015-08-06 Pedro Alves <palves@redhat.com>
3593
3594 * server.c (captured_main): On error, print the exception message
3595 to stderr, and if run_once is set, throw a quit.
3596
f0ce0d3a
PA
35972015-08-06 Pedro Alves <palves@redhat.com>
3598
3599 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3600 the current thread.
3601
bf47e248
PA
36022015-08-06 Pedro Alves <palves@redhat.com>
3603
3604 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3605 reading beyond the passed in buffer length.
3606
b6b9ffcc
PL
36072015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3608
3609 * tracepoint.c (symbol_list) <required>: Remove.
3610
863d01bd
PA
36112015-08-06 Pedro Alves <palves@redhat.com>
3612
3613 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3614 count if stopping and suspending threads.
3615 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3616 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3617 (linux_detach): Complete an ongoing step-over.
3618 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3619 throughout.
3620 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3621 (linux_wait_1): If passing a signal to the inferior after
3622 finishing a step-over, unsuspend and re-resume all lwps. If we
3623 see a single-step event but the thread should be continuing, don't
3624 pass the trap to gdb.
3625 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3626 internal_error instead of gdb_assert.
3627 (enqueue_pending_signal): New function.
3628 (check_ptrace_stopped_lwp_gone): Add debug output.
3629 (start_step_over): Use internal_error instead of gdb_assert.
3630 (complete_ongoing_step_over): New function.
3631 (linux_resume_one_thread): Don't resume a suspended thread.
3632 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3633 it stepping.
3634
00db26fa
PA
36352015-08-06 Pedro Alves <palves@redhat.com>
3636
3637 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3638 (linux_thread_alive): Use lwp_is_marked_dead.
3639 (extended_event_reported): Delete.
3640 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3641 instead of extended_event_reported.
3642 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3643 as well.
3644 (lwp_is_marked_dead): New function.
3645 (lwp_running): Use lwp_is_marked_dead.
3646 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3647 comment.
3648
ad071a30
PA
36492015-08-06 Pedro Alves <palves@redhat.com>
3650
3651 * linux-low.c (linux_wait_1): Move fork event output out of the
3652 !report_to_gdb check. Pass event_child->waitstatus to
3653 target_waitstatus_to_string instead of ourstatus.
3654
524b57e6
YQ
36552015-08-04 Yao Qi <yao.qi@linaro.org>
3656
3657 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3658 if current_thread is 32 bit.
3659
6085d6f6
YQ
36602015-08-04 Yao Qi <yao.qi@linaro.org>
3661
3662 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3663 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3664 * server.c (extended_protocol): Remove "static".
3665 * server.h (extended_protocol): Declare it.
3666
8a7e4587
YQ
36672015-08-04 Yao Qi <yao.qi@linaro.org>
3668
3669 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3670 both aarch64 and aarch32.
3671 (aarch64_set_pc): Likewise.
3672
3b53ae99
YQ
36732015-08-04 Yao Qi <yao.qi@linaro.org>
3674
3675 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3676 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3677 arm-with-neon.xml to srv_xmlfiles.
3678 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3679 (is_64bit_tdesc): New function.
3680 (aarch64_linux_read_description): New function.
3681 (aarch64_arch_setup): Call aarch64_linux_read_description.
3682 (regs_info): Rename to regs_info_aarch64.
3683 (aarch64_regs_info): Return right regs_info.
3684 (initialize_low_arch): Call initialize_low_arch_aarch32.
3685
bd9e6534
YQ
36862015-08-04 Yao Qi <yao.qi@linaro.org>
3687
3688 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3689 * linux-aarch32-low.c: New file.
3690 * linux-aarch32-low.h: New file.
3691 * linux-arm-low.c (arm_fill_gregset): Move it to
3692 linux-aarch32-low.c.
3693 (arm_store_gregset): Likewise.
3694 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3695 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3696 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3697 (regs_info): Rename to regs_info_arm.
3698 (arm_regs_info): Return regs_info_aarch32 if
3699 have_ptrace_getregset is 1 and target description is
3700 arm_with_neon or arm_with_vfpv3.
3701 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3702 Call initialize_low_arch_aarch32 instead.
3703
ded48a5e
YQ
37042015-08-04 Yao Qi <yao.qi@linaro.org>
3705
3706 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3707 * linux-low.c: ... here.
3708 * linux-low.h (have_ptrace_getregset): Declare it.
3709
96e9210f
PA
37102015-08-04 Pedro Alves <palves@redhat.com>
3711
3712 * thread-db.c (struct thread_db): Use new typedefs.
3713 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3714 CHK calls.
3715 (disable_thread_event_reporting): Cast result of dlsym to
3716 destination function pointer type.
3717 (thread_db_mourn): Use td_ta_delete_ftype.
3718
af60a1ef
SL
37192015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3720
3721 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3722 arch variant.
3723 (CDX_BREAKPOINT): Define for R2.
3724 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3725 (the_low_target): Add comments.
3726
e8b41681
YQ
37272015-07-30 Yao Qi <yao.qi@linaro.org>
3728
3729 * linux-arm-low.c (arm_hwcap): Remove it.
3730 (arm_read_description): New local variable arm_hwcap. Don't
3731 set arm_hwcap to zero.
3732
89abb039
YQ
37332015-07-30 Yao Qi <yao.qi@linaro.org>
3734
3735 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3736 Use regcache->tdesc instead.
3737 (arm_store_wmmxregset): Likewise.
3738 (arm_fill_vfpregset): Likewise.
3739 (arm_store_vfpregset): Likewise.
3740
deca266c
YQ
37412015-07-30 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-arm-low.c: Include arch/arm.h.
3744 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3745 (arm_store_gregset): Likewise.
3746
aa58a496
SM
37472015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3748
3749 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3750 ptrace's 4th parameter.
3751
50904b25
YQ
37522015-07-27 Yao Qi <yao.qi@linaro.org>
3753
3754 * configure.srv (case aarch64*-*-linux*): Don't set
3755 srv_linux_usrregs.
3756
5826e159
PA
37572015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3758
3759 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3760 sys/ptrace.h.
3761 * linux-arm-low.c: Likewise.
3762 * linux-cris-low.c: Likewise.
3763 * linux-crisv32-low.c: Likewise.
3764 * linux-low.c: Likewise.
3765 * linux-m68k-low.c: Likewise.
3766 * linux-mips-low.c: Likewise.
3767 * linux-nios2-low.c: Likewise.
3768 * linux-s390-low.c: Likewise.
3769 * linux-sparc-low.c: Likewise.
3770 * linux-tic6x-low.c: Likewise.
3771 * linux-tile-low.c: Likewise.
3772 * linux-x86-low.c: Likewise.
3773
54019719
PA
37742015-07-24 Pedro Alves <palves@redhat.com>
3775
3776 * config.in: Regenerate.
3777 * configure: Regenerate.
3778
eb7aa561
PA
37792015-07-24 Pedro Alves <palves@redhat.com>
3780
3781 * acinclude.m4: Include ../ptrace.m4.
3782 * configure.ac: Call GDB_AC_PTRACE.
3783 * config.in, configure: Regenerate.
3784
55d7b841
YQ
37852015-07-24 Yao Qi <yao.qi@linaro.org>
3786
3787 * linux-low.c (linux_create_inferior): Remove setting to
3788 proc->priv->new_inferior.
3789 (linux_attach): Likewise.
3790 (linux_low_filter_event): Likewise.
3791 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3792
c06cbd92
YQ
37932015-07-24 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-low.c (linux_arch_setup): New function.
3796 (linux_low_filter_event): If proc->tdesc is NULL and
3797 proc->attached is true, call the_low_target.arch_setup.
3798 Otherwise, keep status pending, and return.
3799 (linux_resume_one_lwp_throw): Don't call get_pc if
3800 thread->while_stepping isn't NULL. Don't call
3801 get_thread_regcache if proc->tdesc is NULL.
3802 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3803 (linux_target_ops): Install arch_setup.
3804 * server.c (start_inferior): Call the_target->arch_setup.
3805 * target.h (struct target_ops) <arch_setup>: New field.
3806 (target_arch_setup): New marco.
3807 * lynx-low.c (lynx_target_ops): Update.
3808 * nto-low.c (nto_target_ops): Update.
3809 * spu-low.c (spu_target_ops): Update.
3810 * win32-low.c (win32_target_ops): Update.
3811
5ae3ebba
YQ
38122015-07-24 Yao Qi <yao.qi@linaro.org>
3813
3814 * linux-low.c (linux_add_process): Don't set
3815 proc->priv->new_inferior.
3816 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3817 (linux_attach): Likewise.
3818
eb97750b
YQ
38192015-07-24 Yao Qi <yao.qi@linaro.org>
3820
3821 * server.c (start_inferior): Code refactor.
3822
51aee833
YQ
38232015-07-24 Yao Qi <yao.qi@linaro.org>
3824
3825 * server.c (process_serial_event): Set general_thread.
3826
af1b22f3
YQ
38272015-07-21 Yao Qi <yao.qi@linaro.org>
3828
3829 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3830 aarch64_linux_get_debug_reg_capacity.
3831
554717a3
YQ
38322015-07-17 Yao Qi <yao.qi@linaro.org>
3833
3834 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3835 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3836 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3837 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3838 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3839 (AARCH64_HWP_ALIGNMENT): Likewise.
3840 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3841 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3842 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3843 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3844 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3845 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3846 (struct aarch64_debug_reg_state): Likewise.
3847 (struct arch_lwp_info): Likewise.
3848 (aarch64_align_watchpoint): Likewise.
3849 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3850 (aarch64_watchpoint_length): Likewise.
3851 (aarch64_point_encode_ctrl_reg): Likewise
3852 (aarch64_point_is_aligned): Likewise.
3853 (aarch64_align_watchpoint): Likewise.
3854 (aarch64_linux_set_debug_regs):
3855 (aarch64_dr_state_insert_one_point): Likewise.
3856 (aarch64_dr_state_remove_one_point): Likewise.
3857 (aarch64_handle_breakpoint): Likewise.
3858 (aarch64_handle_aligned_watchpoint): Likewise.
3859 (aarch64_handle_unaligned_watchpoint): Likewise.
3860 (aarch64_handle_watchpoint): Likewise.
3861
c67ca4de
YQ
38622015-07-17 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3865 and don't aarch64_get_debug_reg_state. All callers update.
3866 (aarch64_handle_aligned_watchpoint): Likewise.
3867 (aarch64_handle_unaligned_watchpoint): Likewise.
3868 (aarch64_handle_watchpoint): Likewise.
3869 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3870 (aarch64_remove_point): Likewise.
3871
25abf979
YQ
38722015-07-17 Yao Qi <yao.qi@linaro.org>
3873
3874 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3875 debug_printf.
3876 (aarch64_handle_unaligned_watchpoint): Likewise.
3877
db1ff28b
JK
38782015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3879
3880 Revert the previous 3 commits:
3881 Move gdb_regex* to common/
3882 Move linux_find_memory_regions_full & co.
3883 gdbserver build-id attribute generator
3884
700ca40f
JK
38852015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3886 Jan Kratochvil <jan.kratochvil@redhat.com>
3887
3888 gdbserver build-id attribute generator.
3889 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3890 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3891 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3892 (find_phdr): New.
3893 (get_dynamic): Use find_pdhr to traverse program headers.
3894 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3895 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3896 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3897 (get_hex_build_id): New.
3898 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3899 to reply XML document.
3900
9904185c
JK
39012015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3902 Jan Kratochvil <jan.kratochvil@redhat.com>
3903
3904 * target.c: Include target/target-utils.h and fcntl.h.
3905 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3906 (target_fileio_read_stralloc): New functions.
3907
6e5b4429
JK
39082015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3909
3910 * Makefile.in (OBS): Add gdb_regex.o.
3911 (gdb_regex.o): New.
3912 * config.in: Rebuilt.
3913 * configure: Rebuilt.
3914
ddc98fbf
JK
39152015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3916 Jan Kratochvil <jan.kratochvil@redhat.com>
3917
3918 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3919 * Makefile.in (OBS): Add target-utils.o.
3920 (linux-maps.o, target-utils.o): New.
3921 * configure.srv (srv_linux_obj): Add linux-maps.o.
3922
e57bb7a0
PL
39232015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3924
3925 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3926 function, return 1.
3927 (the_low_target): Install it.
3928
586b02a9
PA
39292015-07-14 Pedro Alves <palves@redhat.com>
3930
3931 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3932 Instead, ignore ECHILD, and throw an error for other errnos.
3933
58c1b36c
PA
39342015-07-10 Pedro Alves <palves@redhat.com>
3935
3936 * event-loop.c (struct callback_event) <data>: Change type to
3937 gdb_client_data instance instead of gdb_client_data pointer.
3938 (append_callback_event): Adjust.
3939
421530db
PL
39402015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3941
3942 * linux-aarch64-low.c: Add comments for each linux_target_ops
3943 method. Remove comments already covered in target_ops and
3944 linux_target_ops definitions.
3945 (the_low_target): Add comments for each unimplemented method.
3946
c2d65f38
YQ
39472015-07-09 Yao Qi <yao.qi@linaro.org>
3948
3949 * linux-aarch64-low.c (aarch64_regmap): Remove.
3950 (aarch64_usrregs_info): Remove.
3951 (regs_info): Set field usrregs to NULL.
3952
b20a6524
MM
39532015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3954
3955 * linux-low.c: Include "rsp-low.h"
3956 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3957 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3958 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3959 (handle_btrace_enable_pt): New.
3960 (handle_btrace_general_set): Support "pt".
3961 (handle_btrace_conf_general_set): Support "pt:size".
3962
96c97461
PL
39632015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3964
3965 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3966 Z_PACKET_SW_BP.
3967
37d66942
PL
39682015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3969
3970 * linux-aarch64-low.c: Remove comment about endianness.
3971 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3972 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3973 memcmp.
3974
dc06243f
GB
39752015-06-24 Gary Benson <gbenson@redhat.com>
3976
3977 * linux-i386-ipa.c (stdint.h): Do not include.
3978 * lynx-i386-low.c (stdint.h): Likewise.
3979 * lynx-ppc-low.c (stdint.h): Likewise.
3980 * mem-break.c (stdint.h): Likewise.
3981 * thread-db.c (stdint.h): Likewise.
3982 * tracepoint.c (stdint.h): Likewise.
3983 * win32-low.c (stdint.h): Likewise.
3984
124e13d9
SM
39852015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3986
3987 * server.c (write_qxfer_response): Update call to
3988 remote_escape_output.
3989
909c2cda
JK
39902015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3991 Jan Kratochvil <jan.kratochvil@redhat.com>
3992
3993 Merge multiple hex conversions.
3994 * gdbreplay.c (tohex): Rename to 'fromhex'.
3995 (logchar): Use fromhex.
3996
24c05f46
JK
39972015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3998
3999 * server.c (handle_qxfer_libraries): Set `version' attribute for
4000 <library-list>.
4001
14d2069a
GB
40022015-06-10 Gary Benson <gbenson@redhat.com>
4003
4004 * target.h (struct target_ops) <multifs_open>: New field.
4005 <multifs_unlink>: Likewise.
4006 <multifs_readlink>: Likewise.
4007 * linux-low.c (nat/linux-namespaces.h): New include.
4008 (linux_target_ops): Initialize the_target->multifs_open,
4009 the_target->multifs_unlink and the_target->multifs_readlink.
4010 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4011 * hostio.c (hostio_fs_pid): New static variable.
4012 (hostio_handle_new_gdb_connection): New function.
4013 (handle_setfs): Likewise.
4014 (handle_open): Use the_target->multifs_open as appropriate.
4015 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4016 (handle_readlink): Use the_target->multifs_readlink as
4017 appropriate.
4018 (handle_vFile): Handle vFile:setfs packets.
4019 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4020 after target_handle_new_gdb_connection.
4021
4b8b5e72
GB
40222015-06-10 Gary Benson <gbenson@redhat.com>
4023
4024 * configure.ac (AC_CHECK_FUNCS): Add setns.
4025 * config.in: Regenerate.
4026 * configure: Likewise.
4027 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4028 (linux-namespaces.o): New rule.
4029 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4030
3ac2e371
GB
40312015-06-09 Gary Benson <gbenson@redhat.com>
4032
4033 * hostio.c (handle_open): Process mode argument with
4034 fileio_to_host_mode.
4035
ca9b78ce
YQ
40362015-06-01 Yao Qi <yao.qi@linaro.org>
4037
4038 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4039 * linux-x86-low.c: Likewise.
4040
bfacd19d
DB
40412015-05-28 Don Breazeal <donb@codesourcery.com>
4042
4043 * linux-low.c (handle_extended_wait): Initialize
4044 thread_info.last_resume_kind for new fork children.
4045
452003ef
PA
40462015-05-15 Pedro Alves <palves@redhat.com>
4047
4048 * target.h (target_handle_new_gdb_connection): Rewrite using if
4049 wrapped in do/while.
4050
1041a03c
JB
40512015-05-14 Joel Brobecker <brobecker@adacore.com>
4052
4053 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4054 * configure, config.in: Regenerate.
4055 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4056 Declare typedef.
4057
c269dbdb
DB
40582015-05-12 Don Breazeal <donb@codesourcery.com>
4059
4060 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4061 PTRACE_EVENT_VFORK_DONE.
4062 (linux_low_ptrace_options, extended_event_reported): Add vfork
4063 events.
4064 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4065 and "vforkdone" for RSP 'T' Stop Reply Packet.
4066 * server.h (report_vfork_events): Declare
4067 global variable.
4068
3a8a0396
DB
40692015-05-12 Don Breazeal <donb@codesourcery.com>
4070
4071 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4072 (the_low_target) <new_fork>: Initialize new member.
4073 * linux-arm-low.c (arm_new_fork): New function.
4074 (the_low_target) <new_fork>: Initialize new member.
4075 * linux-low.c (handle_extended_wait): Call new target function
4076 new_fork.
4077 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4078 * linux-mips-low.c (mips_add_watchpoint): New function
4079 extracted from mips_insert_point.
4080 (the_low_target) <new_fork>: Initialize new member.
4081 (mips_linux_new_fork): New function.
4082 (mips_insert_point): Call mips_add_watchpoint.
4083 * linux-x86-low.c (x86_linux_new_fork): New function.
4084 (the_low_target) <new_fork>: Initialize new member.
4085
de0d863e
DB
40862015-05-12 Don Breazeal <donb@codesourcery.com>
4087
4088 * linux-low.c (handle_extended_wait): Implement return value,
4089 rename argument 'event_child' to 'event_lwp', handle
4090 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4091 (linux_low_ptrace_options): New function.
4092 (linux_low_filter_event): Call linux_low_ptrace_options,
4093 use different argument fo linux_enable_event_reporting,
4094 use return value from handle_extended_wait.
4095 (extended_event_reported): New function.
4096 (linux_wait_1): Call extended_event_reported and set
4097 status to report fork events.
4098 (linux_write_memory): Add pid to debug message.
4099 (reset_lwp_ptrace_options_callback): New function.
4100 (linux_handle_new_gdb_connection): New function.
4101 (linux_target_ops): Initialize new structure member.
4102 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4103 * lynx-low.c: Initialize new structure member.
4104 * remote-utils.c (prepare_resume_reply): Implement stop reason
4105 "fork" for "T" stop message.
4106 * server.c (handle_query): Call handle_new_gdb_connection.
4107 * server.h (report_fork_events): Declare global flag.
4108 * target.h (struct target_ops) <handle_new_gdb_connection>:
4109 New member.
4110 (target_handle_new_gdb_connection): New macro.
4111 * win32-low.c: Initialize new structure member.
4112
ddcbc397
DB
41132015-05-12 Don Breazeal <donb@codesourcery.com>
4114
4115 * mem-break.c (APPEND_TO_LIST): Define macro.
4116 (clone_agent_expr): New function.
4117 (clone_one_breakpoint): New function.
4118 (clone_all_breakpoints): New function.
4119 * mem-break.h: Declare new functions.
4120
89245bc0
DB
41212015-05-12 Don Breazeal <donb@codesourcery.com>
4122
4123 * linux-low.c (linux_supports_fork_events): New function.
4124 (linux_supports_vfork_events): New function.
4125 (linux_target_ops): Initialize new structure members.
4126 (initialize_low): Call linux_check_ptrace_features.
4127 * lynx-low.c (lynx_target_ops): Initialize new structure
4128 members.
4129 * server.c (report_fork_events, report_vfork_events):
4130 New global flags.
4131 (handle_query): Add new features to qSupported packet and
4132 response.
4133 (captured_main): Initialize new global variables.
4134 * target.h (struct target_ops) <supports_fork_events>:
4135 New member.
4136 <supports_vfork_events>: New member.
4137 (target_supports_fork_events): New macro.
4138 (target_supports_vfork_events): New macro.
4139 * win32-low.c (win32_target_ops): Initialize new structure
4140 members.
4141
835205d0
GB
41422015-05-12 Gary Benson <gbenson@redhat.com>
4143
4144 * server.c (handle_qxfer_exec_file): Use current process
4145 if annex is empty.
4146
21e94bd9
SL
41472015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4148
4149 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4150 Remove HAVE_PTRACE_GETREGS conditionals.
4151 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4152 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4153
45614f15
YQ
41542015-05-08 Yao Qi <yao.qi@linaro.org>
4155
4156 * linux-low.c (linux_supports_conditional_breakpoints): New
4157 function.
4158 (linux_target_ops): Install new target method.
4159 * lynx-low.c (lynx_target_ops): Install NULL hook for
4160 supports_conditional_breakpoints.
4161 * nto-low.c (nto_target_ops): Likewise.
4162 * spu-low.c (spu_target_ops): Likewise.
4163 * win32-low.c (win32_target_ops): Likewise.
4164 * server.c (handle_query): Check
4165 target_supports_conditional_breakpoints.
4166 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4167 New field.
4168 (target_supports_conditional_breakpoints): New macro.
4169
80ad801e
PA
41702015-05-06 Pedro Alves <palves@redhat.com>
4171
4172 PR server/18081
4173 * server.c (start_inferior): If the process exits, mourn it.
4174
819843c7
GB
41752015-04-21 Gary Benson <gbenson@redhat.com>
4176
4177 * hostio.c (fileio_open_flags_to_host): Factored out to
4178 fileio_to_host_openflags in common/fileio.c. Single use
4179 updated.
4180
a2d5a9d7
MF
41812015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4182
4183 * linux-xtensa-low.c (xtensa_fill_gregset)
4184 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4185 XCHAL_HAVE_LOOP.
4186
deb44829
MF
41872015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4188
4189 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4190 (regs_info): Replace usrregs pointer with NULL.
4191
e57f1de3
GB
41922015-04-17 Gary Benson <gbenson@redhat.com>
4193
4194 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4195 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4196 * server.c (handle_qxfer_exec_file): New function.
4197 (qxfer_packets): Add exec-file entry.
4198 (handle_query): Report qXfer:exec-file:read as supported packet.
4199
62828379
RN
42002015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4201
4202 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4203
b88bb450
GB
42042015-04-09 Gary Benson <gbenson@redhat.com>
4205
4206 * hostio-errno.c (errno_to_fileio_error): Remove function.
4207 Update caller to use remote_fileio_to_fio_error.
4208
c8f4bfdd
YQ
42092015-04-09 Yao Qi <yao.qi@linaro.org>
4210
4211 * linux-low.c (linux_insert_point): Call
4212 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4213 (linux_remove_point): Call remove_memory_breakpoint if type is
4214 raw_bkpt_type_sw.
4215 * linux-x86-low.c (x86_insert_point): Don't call
4216 insert_memory_breakpoint.
4217 (x86_remove_point): Don't call remove_memory_breakpoint.
4218
41f98f02
PA
42192015-04-01 Pedro Alves <palves@redhat.com>
4220 Cleber Rosa <crosa@redhat.com>
4221
4222 * server.c (gdbserver_usage): Reorganize and extend the usage
4223 message.
4224
2bf6fb9d
PA
42252015-03-24 Pedro Alves <palves@redhat.com>
4226
4227 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4228 output. Also dump TRAP_TRACE.
4229 (linux_low_filter_event): In debug output, distinguish a
4230 resume_stop SIGSTOP from a delayed SIGSTOP.
4231
369f6daa
GB
42322015-03-24 Gary Benson <gbenson@redhat.com>
4233
4234 * linux-x86-low.c (x86_linux_new_thread): Moved to
4235 nat/x86-linux.c.
4236 (x86_linux_prepare_to_resume): Likewise.
4237
8e5d4070
GB
42382015-03-24 Gary Benson <gbenson@redhat.com>
4239
4240 * Makefile.in (x86-linux-dregs.o): New rule.
4241 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4242 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4243 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4244 (x86_linux_dr_get): Likewise.
4245 (x86_linux_dr_set): Likewise.
4246 (update_debug_registers_callback): Likewise.
4247 (x86_linux_dr_set_addr): Likewise.
4248 (x86_linux_dr_get_addr): Likewise.
4249 (x86_linux_dr_set_control): Likewise.
4250 (x86_linux_dr_get_control): Likewise.
4251 (x86_linux_dr_get_status): Likewise.
4252 (x86_linux_update_debug_registers): Likewise.
4253
2b95d440
GB
42542015-03-24 Gary Benson <gbenson@redhat.com>
4255
4256 * linux-x86-low.c (x86_linux_update_debug_registers):
4257 New function, factored out from...
4258 (x86_linux_prepare_to_resume): ...this.
4259
14b0bc68
GB
42602015-03-24 Gary Benson <gbenson@redhat.com>
4261
4262 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4263 (x86_linux_dr_set): Likewise.
4264 (update_debug_registers_callback): Likewise.
4265 (x86_linux_dr_set_addr): Likewise.
4266 (x86_linux_dr_get_addr): Likewise.
4267 (x86_linux_dr_set_control): Likewise.
4268 (x86_linux_dr_get_control): Likewise.
4269 (x86_linux_dr_get_status): Likewise.
4270 (x86_linux_prepare_to_resume): Likewise.
4271
5dfe6ca8
GB
42722015-03-24 Gary Benson <gbenson@redhat.com>
4273
4274 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4275 Use perror_with_name. Pass string through gettext.
4276 (x86_linux_dr_set): Likewise.
4277
d33472ad
GB
42782015-03-24 Gary Benson <gbenson@redhat.com>
4279
4280 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4281 (x86_linux_dr_set_addr): ...this.
4282 (x86_dr_low_get_addr): Rename to...
4283 (x86_linux_dr_get_addr): ...this.
4284 (x86_dr_low_set_control): Rename to...
4285 (x86_linux_dr_set_control): ...this.
4286 (x86_dr_low_get_control): Rename to...
4287 (x86_linux_dr_get_control): ...this.
4288 (x86_dr_low_get_status): Rename to...
4289 (x86_linux_dr_get_status): ...this.
4290 (x86_dr_low): Update with new function names.
4291
4b134ca1
GB
42922015-03-24 Gary Benson <gbenson@redhat.com>
4293
4294 * Makefile.in (x86-linux.o): New rule.
4295 * configure.srv: Add x86-linux.o to relevant targets.
4296 * linux-low.c (lwp_set_arch_private_info): New function.
4297 (lwp_arch_private_info): Likewise.
4298 * linux-x86-low.c: Include nat/x86-linux.h.
4299 (arch_lwp_info): Removed structure.
4300 (update_debug_registers_callback):
4301 Use lwp_set_debug_registers_changed.
4302 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4303 and lwp_set_debug_registers_changed.
4304 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4305
34c703da
GB
43062015-03-24 Gary Benson <gbenson@redhat.com>
4307
4308 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4309 * linux-arm-low.c (arm_new_thread): Likewise.
4310 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4311 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4312 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4313 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4314
cff068da
GB
43152015-03-24 Gary Benson <gbenson@redhat.com>
4316
4317 * linux-low.c (ptid_of_lwp): New function.
4318 (lwp_is_stopped): Likewise.
4319 (lwp_stop_reason): Likewise.
4320 * linux-x86-low.c (update_debug_registers_callback):
4321 Use lwp_is_stopped.
4322 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4323 lwp_stop_reason.
4324
b2f7c7e8
GB
43252015-03-24 Gary Benson <gbenson@redhat.com>
4326
4327 * linux-low.h (linux_stop_lwp): Remove declaration.
4328
6d4ee8c6
GB
43292015-03-24 Gary Benson <gbenson@redhat.com>
4330
4331 * linux-low.h: Include nat/linux-nat.h.
4332 * linux-low.c (iterate_over_lwps_args): New structure.
4333 (iterate_over_lwps_filter): New function.
4334 (iterate_over_lwps): Likewise.
4335 * linux-x86-low.c (update_debug_registers_callback):
4336 Update signature to what iterate_over_lwps expects.
4337 Remove PID check that iterate_over_lwps now performs.
4338 (x86_dr_low_set_addr): Use iterate_over_lwps.
4339 (x86_dr_low_set_control): Likewise.
4340
70a0bb6b
GB
43412015-03-24 Gary Benson <gbenson@redhat.com>
4342
4343 * linux-x86-low.c (x86_debug_reg_state): New function.
4344 (x86_linux_prepare_to_resume): Use the above.
4345
7b669087
GB
43462015-03-24 Gary Benson <gbenson@redhat.com>
4347
4348 * linux-low.c (current_lwp_ptid): New function.
4349 * linux-x86-low.c: Include nat/linux-nat.h.
4350 (x86_dr_low_get_addr): Use current_lwp_ptid.
4351 (x86_dr_low_get_control): Likewise.
4352 (x86_dr_low_get_status): Likewise.
4353
eef49a3d
PA
43542015-03-20 Pedro Alves <palves@redhat.com>
4355
4356 * tracepoint.c (cmd_qtstatus): Make "str" const.
4357
b2333d22
PA
43582015-03-20 Pedro Alves <palves@redhat.com>
4359
4360 * server.c (handle_general_set): Make "req_str" const.
4361
23f238d3
PA
43622015-03-19 Pedro Alves <palves@redhat.com>
4363
4364 * linux-low.c (linux_resume_one_lwp): Rename to ...
4365 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4366 instead call perror_with_name.
4367 (check_ptrace_stopped_lwp_gone): New function.
4368 (linux_resume_one_lwp): Reimplement as wrapper around
4369 linux_resume_one_lwp_throw that swallows errors if the LWP is
4370 gone.
4371
91baf43f
PA
43722015-03-19 Pedro Alves <palves@redhat.com>
4373
4374 * linux-low.c (count_events_callback, select_event_lwp_callback):
4375 No longer check whether the thread has resume_stop as last resume
4376 kind.
4377
8bf3b159
PA
43782015-03-19 Pedro Alves <palves@redhat.com>
4379
4380 * linux-low.c (count_events_callback, select_event_lwp_callback):
4381 Use the lwp's status_pending_p field, not the thread's.
4382
b90fc188
PA
43832015-03-19 Pedro Alves <palves@redhat.com>
4384
4385 * linux-low.c (select_event_lwp_callback): Update comments to
4386 no longer mention SIGTRAP.
4387
464b0089
GB
43882015-03-18 Gary Benson <gbenson@redhat.com>
4389
4390 * server.c (handle_query): Do not report vFile:fstat as supported.
4391
aa9e327f
GB
43922015-03-11 Gary Benson <gbenson@redhat.com>
4393
4394 * hostio.c (sys/types.h): New include.
4395 (sys/stat.h): Likewise.
4396 (common-remote-fileio.h): Likewise.
4397 (handle_fstat): New function.
4398 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4399
791c0056
GB
44002015-03-11 Gary Benson <gbenson@redhat.com>
4401
4402 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4403 struct stat.st_blocks and struct stat.st_blksize.
4404 * configure: Regenerate.
4405 * config.in: Likewise.
4406 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4407 (OBS): Add common-remote-fileio.o.
4408 (common-remote-fileio.o): New rule.
4409
9a9df970
PA
44102015-03-09 Pedro Alves <palves@redhat.com>
4411
4412 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4413 'struct sockaddr' pointer in 'accept' call.
4414
9eb1356e
PA
44152015-03-09 Pedro Alves <palves@redhat.com>
4416
4417 Revert:
4418 2015-03-07 Pedro Alves <palves@redhat.com>
4419 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4420 or <winsock2.h> here. Instead include "gdb_socket.h".
4421 (remote_open): Use union gdb_sockaddr_u.
4422 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4423 or <winsock2.h> here. Instead include "gdb_socket.h".
4424 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4425 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4426 or <sys/un.h>.
4427 (init_named_socket, gdb_agent_helper_thread): Use union
4428 gdb_sockaddr_u.
4429
aac331e4
PA
44302015-03-07 Pedro Alves <palves@redhat.com>
4431
4432 * configure.ac (build_warnings): Move
4433 -Wdeclaration-after-statement to the C-specific set.
4434 * configure: Regenerate.
4435
366c75fc
PA
44362015-03-07 Pedro Alves <palves@redhat.com>
4437
4438 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4439 or <winsock2.h> here. Instead include "gdb_socket.h".
4440 (remote_open): Use union gdb_sockaddr_u.
4441 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4442 or <winsock2.h> here. Instead include "gdb_socket.h".
4443 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4444 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4445 or <sys/un.h>.
4446 (init_named_socket, gdb_agent_helper_thread): Use union
4447 gdb_sockaddr_u.
4448
492d29ea
PA
44492015-03-07 Pedro Alves <palves@redhat.com>
4450
4451 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4452 instead.
4453
60a191ed
YQ
44542015-03-06 Yao Qi <yao.qi@linaro.org>
4455
4456 * linux-aarch64-low.c (aarch64_insert_point): Use
4457 show_debug_regs as a boolean.
4458 (aarch64_remove_point): Likewise.
4459
f5771b1d
PA
44602015-03-05 Pedro Alves <palves@redhat.com>
4461
4462 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4463 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4464 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4465 * nto-low.c (nto_target_ops): Likewise.
4466 * spu-low.c (spu_target_ops): Likewise.
4467 * win32-low.c (win32_target_ops): Likewise.
4468
3e572f71
PA
44692015-03-04 Pedro Alves <palves@redhat.com>
4470
72f4393d 4471 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4472 Decide whether a breakpoint triggered based on the SIGTRAP's
4473 siginfo.si_code.
72f4393d
L
4474 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4475 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4476 (linux_low_filter_event): Check for breakpoints before checking
4477 watchpoints.
4478 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4479 siginfo.si_code.
72f4393d
L
4480 (linux_stopped_by_sw_breakpoint)
4481 (linux_supports_stopped_by_sw_breakpoint)
4482 (linux_stopped_by_hw_breakpoint)
4483 (linux_supports_stopped_by_hw_breakpoint): New functions.
4484 (linux_target_ops): Install new target methods.
3e572f71 4485
1ec68e26
PA
44862015-03-04 Pedro Alves <palves@redhat.com>
4487
4488 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4489 * server.c (swbreak_feature, hwbreak_feature): New globals.
4490 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4491 (captured_main): Clear swbreak_feature and hwbreak_feature.
4492 * server.h (swbreak_feature, hwbreak_feature): Declare.
4493 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4494 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4495 supports_stopped_by_hw_breakpoint>: New fields.
4496 (target_supports_stopped_by_sw_breakpoint)
4497 (target_stopped_by_sw_breakpoint)
4498 (target_supports_stopped_by_hw_breakpoint)
4499 (target_stopped_by_hw_breakpoint): Declare.
4500
15c66dd6
PA
45012015-03-04 Pedro Alves <palves@redhat.com>
4502
4503 enum lwp_stop_reason -> enum target_stop_reason
4504 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4505 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4506 (linux_wait_1, stuck_in_jump_pad_callback)
4507 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4508 (linux_stopped_by_watchpoint):
4509 * linux-low.h (enum lwp_stop_reason): Delete.
4510 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4511 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4512
98fc70d6
YQ
45132015-03-04 Yao Qi <yao.qi@linaro.org>
4514
4515 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4516
dd2ac174
GB
45172015-03-03 Gary Benson <gbenson@redhat.com>
4518
4519 * hostio.c (handle_vFile): Fix prefix lengths.
4520
d68e53f4
MM
45212015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4522
4523 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4524 ptr_bits.
4525
bf2d68ab
AA
45262015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4527
4528 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4529 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4530 (clean): Add "rm -f" for above C files.
4531 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4532 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4533 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4534 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4535 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4536 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4537 (init_registers_s390x_vx_linux64)
4538 (init_registers_s390x_tevx_linux64)
4539 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4540 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4541 declarations.
4542 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4543 (s390_store_vxrs_high): New functions.
4544 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4545 NT_S390_VXRS_HIGH.
4546 (s390_arch_setup): Add logic for selecting one of the new target
4547 descriptions. Activate the new vector regsets if applicable.
4548 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4549 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4550 and init_registers_s390x_tevx_linux64.
4551
c966a859
PA
45522015-03-01 Pedro Alves <palves@redhat.com>
4553
4554 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4555 parameter.
4556
4180215b
PA
45572015-02-27 Pedro Alves <palves@redhat.com>
4558
4559 * linux-x86-low.c (u_debugreg_offset): New function.
4560 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4561
749bab01
PA
45622015-02-27 Pedro Alves <palves@redhat.com>
4563
4564 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4565 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4566 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4567 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4568 (ps_lsetfpregs, ps_getpid)
4569 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4570 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4571 (ps_lsetxregs, ps_plog): Declare.
4572
3c14e5a3
PA
45732015-02-27 Pedro Alves <palves@redhat.com>
4574
4575 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4576 IP_AGENT_EXPORT_FUNC.
4577 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4578 IP_AGENT_EXPORT_FUNC.
4579 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4580 (IP_AGENT_EXPORT): Delete.
4581 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4582 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4583 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4584 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4585 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4586 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4587 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4588 (traceframe_read_count, traceframe_write_count)
4589 (traceframes_created, trace_state_variables, get_raw_reg)
4590 (get_trace_state_variable_value, set_trace_state_variable_value)
4591 (ust_loaded, helper_thread_id, cmd_buf): Use
4592 IPA_SYM_EXPORTED_NAME.
4593 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4594 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4595 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4596 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4597 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4598 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4599 EXTERN_C_PUSH/EXTERN_C_POP.
4600 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4601 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4602 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4603 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4604 (traceframe_write_count, traceframe_read_count)
4605 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4606 (about_to_request_buffer_space, get_trace_state_variable_value)
4607 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4608 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4609 EXTERN_C_PUSH/EXTERN_C_POP.
4610 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4611 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4612 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4613 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4614 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4615 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4616 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4617 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4618 Define.
4619 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4620 (IP_AGENT_EXPORT_VAR_DECL): Define.
4621 (tracing): Declare.
4622 (gdb_agent_get_raw_reg): Declare.
4623
fe978cb0
PA
46242015-02-27 Tom Tromey <tromey@redhat.com>
4625 Pedro Alves <palves@redhat.com>
4626
4627 Rename symbols whose names are reserved C++ keywords throughout.
4628
3bc3d82a
PA
46292015-02-27 Pedro Alves <palves@redhat.com>
4630
4631 * Makefile.in (COMPILER): New, get it from autoconf.
4632 (CXX): Get from autoconf instead.
4633 (COMPILE.pre): Use COMPILER.
4634 (CC-LD): Rename to ...
4635 (CC_LD): ... this. Use COMPILER.
4636 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4637 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4638 * acinclude.m4: Include build-with-cxx.m4.
4639 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4640 Disable -Werror by default if building in C++ mode.
4641 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4642 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4643 the C++ compiler. Save/restore CXXFLAGS too.
4644 * configure: Regenerate.
4645
07697489
PA
46462015-02-27 Pedro Alves <palves@redhat.com>
4647
4648 * acinclude.m4: Include libiberty.m4.
4649 * configure.ac: Call libiberty_INIT.
4650 * config.in, configure: Regenerate.
4651
9beb7c4e
PA
46522015-02-26 Pedro Alves <palves@redhat.com>
4653
4654 * linux-low.c (linux_wait_1): When incrementing the PC past a
4655 program breakpoint always use the_low_target.breakpoint_len as
4656 increment, rather than the maximum between that and
4657 the_low_target.decr_pc_after_break.
4658
8090aef2
PA
46592015-02-23 Pedro Alves <palves@redhat.com>
4660
4661 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4662 thread was doing a step-over; always adjust the PC if
4663 we stepped over a permanent breakpoint.
4664 (linux_wait_1): If we stepped over breakpoint that was on top of a
4665 permanent breakpoint, manually advance the PC past it.
4666
bc9540e8
PA
46672015-02-23 Pedro Alves <palves@redhat.com>
4668
4669 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4670 modes.
4671 (x86_fill_gregset, x86_store_gregset): Use it when handling
4672 $orig_eax.
4673
2db9a427
PA
46742015-02-20 Pedro Alves <palves@redhat.com>
4675
4676 * thread-db.c: Include "nat/linux-procfs.h".
4677 (thread_db_init): Skip listing new threads if the kernel supports
4678 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4679
afa8d396
PA
46802015-02-20 Pedro Alves <palves@redhat.com>
4681
4682 * linux-low.c (status_pending_p_callback): Use ptid_match.
4683
c9587f88
AT
46842015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4685
4686 PR breakpoints/16812
4687 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4688 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4689 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4690
b05ec7a5
AT
46912015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4692
4693 PR breakpoints/15956
4694 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4695
d33501a5
MM
46962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4697
4698 * linux-low.c (linux_low_btrace_conf): Print size.
4699 * server.c (handle_btrace_conf_general_set): New.
4700 (hanle_general_set): Call handle_btrace_conf_general_set.
4701 (handle_query): Report Qbtrace-conf:bts:size as supported.
4702
f4abbc16
MM
47032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4704
4705 * linux-low.c (linux_low_enable_btrace): Update parameters.
4706 (linux_low_btrace_conf): New.
4707 (linux_target_ops)<to_btrace_conf>: Initialize.
4708 * server.c (current_btrace_conf): New.
4709 (handle_btrace_enable): Rename to ...
4710 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4711 to target_enable_btrace. Update comment. Update users.
4712 (handle_qxfer_btrace_conf): New.
4713 (qxfer_packets): Add btrace-conf entry.
4714 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4715 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4716 (target_ops)<read_btrace_conf>: New.
4717 (target_enable_btrace): Update parameters.
4718 (target_read_btrace_conf): New.
4719
043c3577
MM
47202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4721
4722 * server.c (handle_btrace_general_set): Remove call to
4723 target_supports_btrace.
4724 (supported_btrace_packets): New.
4725 (handle_query): Call supported_btrace_packets.
4726 * target.h: include btrace-common.h.
4727 (btrace_target_info): Removed.
4728 (supports_btrace, target_supports_btrace): Update parameters.
4729
734b0e4b
MM
47302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4731
4732 * Makefile.in (SFILES): Add common/btrace-common.c.
4733 (OBS): Add common/btrace-common.o.
4734 (btrace-common.o): Add build rules.
4735 * linux-low: Include btrace-common.h.
4736 (linux_low_read_btrace): Use struct btrace_data. Call
4737 btrace_data_init and btrace_data_fini.
4738
d6c146e9
PA
47392015-02-06 Pedro Alves <palves@redhat.com>
4740
4741 * thread-db.c (find_new_threads_callback): Add debug output.
4742
20ba1ce6
PA
47432015-02-04 Pedro Alves <palves@redhat.com>
4744
4745 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4746 (resume_stopped_resumed_lwps): New function.
4747 (linux_wait_for_event_filtered): Use it.
4748
8cc73a39
SDJ
47492015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4750
4751 * Makefile.in (SFILES): Add linux-personality.c.
4752 (linux-personality.o): New rule.
4753 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4754 list of objects to be built.
4755 * linux-low.c: Include nat/linux-personality.h.
4756 (linux_create_inferior): Remove code to disable address space
4757 randomization (moved to ../nat/linux-personality.c). Create
4758 cleanup to disable address space randomization.
4759
fb23d554
SDJ
47602015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4761
4762 * Makefile.in (posix-strerror.o): New rule.
4763 (mingw-strerror.o): Likewise.
4764 * configure: Regenerated.
4765 * configure.ac: Source file ../common/common.host. Initialize new
4766 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4767
cdf43629
YQ
47682015-01-14 Yao Qi <yao@codesourcery.com>
4769
4770 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4771 (ppc-linux.o): New rule.
4772 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4773 * configure.ac: AC_CHECK_FUNCS(getauxval).
4774 * config.in: Re-generated.
4775 * configure: Re-generated.
4776 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4777 ppc64_64bit_inferior_p
4778
514c5338
YQ
47792015-01-14 Yao Qi <yao@codesourcery.com>
4780
4781 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4782 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4783 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4784 (PT_ORIG_R3, PT_TRAP): Likewise.
4785 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4786 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4787 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4788
3368c1e5
JB
47892015-01-10 Joel Brobecker <brobecker@adacore.com>
4790
4791 * i387-fp.c (i387_cache_to_xsave): In look over
4792 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4793 zmmh_low_space field by use of zmmh_high_space.
4794
582511be
PA
47952015-01-09 Pedro Alves <palves@redhat.com>
4796
4797 * linux-low.c (step_over_bkpt): Move higher up in the file.
4798 (handle_extended_wait): Don't store the stop_pc here.
4799 (get_stop_pc): Adjust comments and rename to ...
4800 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4801 stopped for a software breakpoint or hardware breakpoint.
4802 (thread_still_has_status_pending_p): New function.
4803 (status_pending_p_callback): Use
4804 thread_still_has_status_pending_p. If the event is no longer
4805 interesting, resume the LWP.
4806 (handle_tracepoints): Add assert.
4807 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4808 (wstatus_maybe_breakpoint): New function.
4809 (cancel_breakpoint): Delete function.
4810 (check_stopped_by_watchpoint): New function, factored out from
4811 linux_low_filter_event.
4812 (lp_status_maybe_breakpoint): Delete function.
4813 (linux_low_filter_event): Remove filter_ptid argument.
4814 Leave thread group exits pending here. Store the LWP's stop PC.
4815 Always leave events pending.
4816 (linux_wait_for_event_filtered): Pull all events out of the
4817 kernel, and leave them all pending.
4818 (count_events_callback, select_event_lwp_callback): Consider all
4819 events.
4820 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4821 (select_event_lwp): Only give preference to the stepping LWP in
4822 all-stop mode. Adjust comments.
4823 (ignore_event): New function.
4824 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4825 references to cancel_breakpoints. Adjust to renames. Also give
4826 equal priority to all LWPs that have had events in non-stop mode.
4827 If reporting a software breakpoint event, unadjust the LWP's PC.
4828 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4829 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4830 Adjust.
4831 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4832 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4833 (linux_stopped_by_watchpoint): Adjust.
4834 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4835 * linux-low.h (enum lwp_stop_reason): New.
4836 (struct lwp_info) <stop_pc>: Adjust comment.
4837 <stopped_by_watchpoint>: Delete field.
4838 <stop_reason>: New field.
4839 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4840 * mem-break.c (software_breakpoint_inserted_here)
4841 (hardware_breakpoint_inserted_here): New function.
4842 * mem-break.h (software_breakpoint_inserted_here)
4843 (hardware_breakpoint_inserted_here): Declare.
4844 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4845 (cancel_breakpoints): Delete.
4846 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4847 (upload_fast_traceframes): Remove references to
4848 cancel_breakpoints.
4849
a33e3959
PA
48502015-01-09 Pedro Alves <palves@redhat.com>
4851
4852 * thread-db.c (find_new_threads_callback): Ignore thread if the
4853 kernel thread ID is -1.
4854
8784d563
PA
48552015-01-09 Pedro Alves <palves@redhat.com>
4856
4857 * linux-low.c (linux_attach_fail_reason_string): Move to
4858 nat/linux-ptrace.c, and rename.
4859 (linux_attach_lwp): Update comment.
4860 (attach_proc_task_lwp_callback): New function.
4861 (linux_attach): Adjust to rename and use
4862 linux_proc_attach_tgid_threads.
4863 (linux_attach_fail_reason_string): Delete declaration.
4864
76f2b779
JB
48652015-01-01 Joel Brobecker <brobecker@adacore.com>
4866
4867 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4868 * server.c (gdbserver_version): Likewise.
4869
fafcc06a
SDJ
48702014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4871
4872 * remote-utils.c: Include ctype.h.
4873 (input_interrupt): Explicitly handle the case when the char
4874 received is the NUL byte. Improve the printing of non-ASCII
4875 characters.
4876
beed38b8
JB
48772014-12-16 Joel Brobecker <brobecker@adacore.com>
4878
4879 * linux-low.c (linux_low_filter_event): Update call to
4880 linux_enable_event_reporting following the addition of
4881 a new parameter to that function.
4882
bf330350
CU
48832014-12-16 Catalin Udma <catalin.udma@freescale.com>
4884
4885 PR server/17457
4886 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4887 (AARCH64_FPCR_REGNO): Likewise.
4888 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4889 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4890 (aarch64_store_fpregset): Likewise.
4891
5227d625
JB
48922014-12-15 Joel Brobecker <brobecker@adacore.com>
4893
4894 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4895 Remove FIXME comment about assumption about N.
4896
f93b65a0
JB
48972014-12-13 Joel Brobecker <brobecker@adacore.com>
4898
4899 * configure.ac: If large-file support is disabled in GDBserver,
4900 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4901 * configure: Regenerate.
4902
e5a9158d
AA
49032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4904
4905 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4906 warning upon ENODATA from ptrace.
4907 * linux-s390-low.c (s390_store_tdb): New.
4908 (s390_regsets): Add regset for NT_S390_TDB.
4909
feea5f36
AA
49102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4911
4912 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4913 without a fill_function.
4914 * linux-s390-low.c (s390_fill_last_break): Remove.
4915 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4916 (s390_arch_setup): Use regset's size instead of fill_function for
4917 loop end condition.
4918
098dbe61
AA
49192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4920
4921 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4922 the regset's store function when ptrace returned an error.
4923 * regcache.c (get_thread_regcache): Invalidate register cache
4924 before fetching inferior's registers.
4925
28eef672
AA
49262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4927
4928 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4929 while-loop as for-loop.
4930 (regsets_store_inferior_registers): Likewise.
4931
bdca27a2
YQ
49322014-11-28 Yao Qi <yao@codesourcery.com>
4933
4934 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4935 * config.in, configure: Re-generate.
4936 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4937 is defined.
4938
9c232dda
YQ
49392014-11-21 Yao Qi <yao@codesourcery.com>
4940
4941 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4942 (AC_CHECK_HEADERS): Remove malloc.h.
4943 * configure: Re-generated.
4944 * config.in: Re-generated.
4945 * server.h: Don't include alloca.h and malloc.h.
4946 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4947 Don't include malloc.h.
4948
43968415
JB
49492014-11-17 Joel Brobecker <brobecker@adacore.com>
4950
4951 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4952 corresponding ERRNO check in same block.
4953
40e91bc7
PA
49542014-11-12 Pedro Alves <palves@redhat.com>
4955
4956 * server.c (cont_thread): Update comment.
4957 (start_inferior, attach_inferior): No longer clear cont_thread.
4958 (handle_v_cont): No longer set cont_thread.
4959 (captured_main): Clear cont_thread each time a GDB connects.
4960
c2c118cf
PA
49612014-11-12 Pedro Alves <palves@redhat.com>
4962
4963 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4964 thread, and don't resume all threads if the Hc thread has exited.
4965
78708b7c
PA
49662014-11-12 Pedro Alves <palves@redhat.com>
4967
4968 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4969 the process group instead of to a specific LWP.
4970
a2abc7de
PA
49712014-10-15 Pedro Alves <palves@redhat.com>
4972
4973 PR server/17487
4974 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4975 parameter.
4976 (arm_set_thread_context): Delete.
4977 (the_low_target): Adjust.
4978 * win32-i386-low.c (debug_registers_changed)
4979 (debug_registers_used): Delete.
4980 (update_debug_registers_callback): New function.
4981 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4982 needing to update their debug registers.
4983 (win32_get_current_dr): New function.
4984 (x86_dr_low_get_addr, x86_dr_low_get_control)
4985 (x86_dr_low_get_status): Fetch the debug register from the thread
4986 record's context.
4987 (i386_initial_stuff): Adjust.
4988 (i386_get_thread_context): Remove current_event parameter. Don't
4989 clear debug_registers_changed nor copy DR values to
4990 debug_reg_state.
4991 (i386_set_thread_context): Delete.
4992 (i386_prepare_to_resume): New function.
4993 (i386_thread_added): Mark the thread as needing to update irs
4994 debug registers.
4995 (the_low_target): Remove i386_set_thread_context and install
4996 i386_prepare_to_resume.
4997 * win32-low.c (win32_get_thread_context): Adjust.
4998 (win32_set_thread_context): Use SetThreadContext
4999 directly.
5000 (win32_prepare_to_resume): New function.
5001 (win32_require_context): New function, factored out from ...
5002 (thread_rec): ... this.
5003 (continue_one_thread): Call win32_prepare_to_resume on each thread
5004 we're about to continue.
5005 (win32_resume): Call win32_prepare_to_resume on the event thread.
5006 * win32-low.h (struct win32_thread_info)
5007 <debug_registers_changed>: New field.
5008 (struct win32_target_ops): Change prototype of set_thread_context,
5009 delete set_thread_context and add prepare_to_resume.
5010 (win32_require_context): New declaration.
5011
a442d071
GB
50122014-10-08 Gary Benson <gbenson@redhat.com>
5013
5014 * server.h: Do not include common-exceptions.h.
5015
6f1947e8
GB
50162014-10-08 Gary Benson <gbenson@redhat.com>
5017
5018 * server.h: Do not include cleanups.h.
5019
63b434a4
JH
50202014-09-30 James Hogan <james.hogan@imgtec.com>
5021
5022 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5023 mips64-dsp-linux.c.
5024
c4d9ceb6
YQ
50252014-09-23 Yao Qi <yao@codesourcery.com>
5026
5027 * linux-low.c (lp_status_maybe_breakpoint): New function.
5028 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5029 (count_events_callback): Likewise.
5030 (select_event_lwp_callback): Likewise.
5031 (cancel_breakpoints_callback): Likewise.
5032
89a5711c
DB
50332014-09-19 Don Breazeal <donb@codesourcery.com>
5034
5035 * linux-low.c (handle_extended_wait): Call
5036 linux_ptrace_get_extended_event.
5037 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5038 linux_is_extended_waitstatus.
5039
bffc0964
JB
50402014-09-16 Joel Brobecker <brobecker@adacore.com>
5041
5042 * Makefile.in (CPPFLAGS): Define.
5043 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5044 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5045
0bfdf32f
GB
50462014-09-16 Gary Benson <gbenson@redhat.com>
5047
5048 * inferiors.h (current_inferior): Renamed as...
5049 (current_thread): New variable. All uses updated.
5050 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5051 (maybe_move_out_of_jump_pad): Likewise.
5052 (cancel_breakpoint): Likewise.
5053 (linux_low_filter_event): Likewise.
5054 (wait_for_sigstop): Likewise.
5055 (linux_resume_one_lwp): Likewise.
5056 (need_step_over_p): Likewise.
5057 (start_step_over): Likewise.
5058 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5059 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5060 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5061 and save_inferior as saved_thread.
5062 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5063 saved_thread.
5064 (regcache_invalidate_thread): Likewise.
5065 * remote-utils.c (prepare_resume_reply): Likewise.
5066 * thread-db.c (thread_db_get_tls_address): Likewise.
5067 (disable_thread_event_reporting): Likewise.
5068 (remove_thread_event_breakpoints): Likewise.
5069 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5070 as saved_thread.
5071 * target.h (set_desired_inferior): Renamed as...
5072 (set_desired_thread): New declaration. All uses updated.
5073 * server.c (myresume): Updated comment to reference thread instead
5074 of inferior.
5075 (handle_serial_event): Likewise.
5076 (handle_target_event): Likewise.
5077
361c8ade
GB
50782014-09-12 Tom Tromey <tromey@redhat.com>
5079 Gary Benson <gbenson@redhat.com>
5080
5081 * regcache.h: Include common-regcache.h.
5082 (regcache_read_pc): Don't declare.
5083 * regcache.c (get_thread_regcache_for_ptid): New function.
5084
bd9269f7
GB
50852014-09-11 Tom Tromey <tromey@redhat.com>
5086 Gary Benson <gbenson@redhat.com>
5087
5088 * symbol.c: New file.
5089 * Makefile.in (SFILES): Add symbol.c.
5090 (OBS): Add symbol.o.
5091
f8c1d06b
GB
50922014-09-11 Gary Benson <gbenson@redhat.com>
5093
5094 * target.c (target_stop_ptid, target_continue_ptid): New
5095 functions.
5096
721ec300
GB
50972014-09-11 Tom Tromey <tromey@redhat.com>
5098 Gary Benson <gbenson@redhat.com>
5099
5100 * target.h: Include target/target.h.
5101 * target.c (target_read_memory, target_read_uint32)
5102 (target_write_memory): New functions.
5103
c5e92cca
GB
51042014-09-11 Gary Benson <gbenson@redhat.com>
5105
5106 * server.h (debug_hw_points): Don't declare.
5107 * server.c (debug_hw_points): Don't define. Replace all uses
5108 with show_debug_regs.
5109 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5110 all uses with show_debug_regs.
5111
2e4bb98a
EBM
51122014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5113
5114 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5115 endianness into account.
5116 (ppc_supply_ptrace_register): Likewise.
5117
ac740bc7
JH
51182014-09-03 James Hogan <james.hogan@imgtec.com>
5119
5120 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5121 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5122
97ea6506
GB
51232014-09-03 Gary Benson <gbenson@redhat.com>
5124
5125 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5126 ALL_DEBUG_ADDRESS_REGISTERS.
5127
df7e5265
GB
51282014-09-02 Gary Benson <gbenson@redhat.com>
5129
5130 * i386-low.h: Renamed as...
5131 * x86-low.h: New file. All type, function and variable name
5132 prefixes changed from "i386_" to "x86_". All references updated.
5133 * i386-low.c: Renamed as...
5134 * x86-low.c: New file. All type, function and variable name
5135 prefixes changed from "i386_" to "x86_". All references updated.
5136
ed859da7
GB
51372014-09-02 Gary Benson <gbenson@redhat.com>
5138
5139 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5140 (x86_linux_new_thread): Likewise.
5141
860789c7
GB
51422014-08-29 Gary Benson <gbenson@redhat.com>
5143
5144 * server.h (setjmp.h): Do not include.
5145 (toplevel): Do not declare.
5146 (common-exceptions.h): Include.
5147 (cleanups.h): Likewise.
5148 * server.c (toplevel): Do not define.
5149 (exit_code): New static global.
5150 (detach_or_kill_for_exit_cleanup): New function.
5151 (main): New function. Original main renamed to...
5152 (captured_main): New function.
5153 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5154
ff55e1b5
GB
51552014-08-29 Gary Benson <gbenson@redhat.com>
5156
5157 * Makefile.in (SFILES): Add common/common-exceptions.c.
5158 (OBS): Add common-exceptions.o.
5159 (common-exceptions.o): New rule.
5160 * utils.c (prepare_to_throw_exception): New function.
5161
e9bcb658
GB
51622014-08-29 Gary Benson <gbenson@redhat.com>
5163
5164 * config.in: Regenerate.
5165 * configure: Likewise.
5166
e3180625
GB
51672014-08-29 Gary Benson <gbenson@redhat.com>
5168
5169 * Makefile.in (SFILES): Add common/cleanups.c.
5170 (OBS): cleanups.o.
5171 (cleanups.o): New rule.
5172
e3d6ba5d
GB
51732014-08-29 Gary Benson <gbenson@redhat.com>
5174
5175 * utils.c (internal_vwarning): New function.
5176
7096e886
GB
51772014-08-28 Gary Benson <gbenson@redhat.com>
5178
5179 * utils.h (fatal): Remove declaration.
5180 * utils.c (fatal): Remove function.
5181
14ce3192
GB
51822014-08-28 Gary Benson <gbenson@redhat.com>
5183
5184 * tracepoint.c (gdb_agent_init): Replace fatal with
5185 perror_with_name.
5186 (initialize_tracepoint): Likewise.
5187
50278d59
GB
51882014-08-28 Gary Benson <gbenson@redhat.com>
5189
5190 * remote-utils.c (remote_prepare): Replace fatal with error.
5191
aa96c426
GB
51922014-08-28 Gary Benson <gbenson@redhat.com>
5193
5194 * linux-low.c (linux_async): Replace fatal with warning.
5195 Tidy up and return.
5196 (linux_start_non_stop): Return -1 if linux_async failed.
5197
f7160e97
GB
51982014-08-28 Gary Benson <gbenson@redhat.com>
5199
5200 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5201 gdb_assert.
5202 (i386_dr_low_get_addr): Remove vague comment.
5203 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5204 gdb_assert.
5205
38e08fca
GB
52062014-08-28 Gary Benson <gbenson@redhat.com>
5207
5208 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5209 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5210 internal_error.
5211 (linux_resume_one_lwp): Likewise.
5212 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5213 gdb_assert.
5214 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5215 with internal_error.
5216 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5217 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5218 (find_register_by_name): Replace fatal with internal_error.
5219 (find_regno): Likewise.
5220 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5221 * thread-db.c (thread_db_create_event): Likewise.
5222 (thread_db_load_search): Likewise.
5223 (try_thread_db_load_1): Likewise.
5224 * tracepoint.c (get_jump_space_head): Replace fatal with
5225 internal_error.
5226 (claim_trampoline_space): Likewise.
5227 (have_fast_tracepoint_trampoline_buffer): Likewise.
5228 (cmd_qtstart): Likewise.
5229 (stop_tracing): Likewise.
5230 (fast_tracepoint_collecting): Likewise.
5231 (target_malloc): Likewise.
5232 (download_tracepoint): Likewise.
5233 (download_trace_state_variables): Replace check with gdb_assert.
5234 (upload_fast_traceframes): Replace fatal with internal_error.
5235
34abf635
GB
52362014-08-19 Tom Tromey <tromey@redhat.com>
5237 Gary Benson <gbenson@redhat.com>
5238
5239 * Makefile.in (SFILES): Add common/common-debug.c.
5240 (OBS): Add common-debug.o.
5241 (common-debug.o): New rule.
5242 * debug.h (debug_printf): Don't declare.
5243 * debug.c (debug_printf): Renamed and rewritten as...
5244 (debug_vprintf): New function.
5245
f6e94d78
GB
52462014-08-19 Gary Benson <gbenson@redhat.com>
5247
5248 * utils.h: Do not include print-utils.h.
5249
9239eeab
GB
52502014-08-19 Tom Tromey <tromey@redhat.com>
5251 Gary Benson <gbenson@redhat.com>
5252
5253 * server.h: Add static assertion.
5254 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5255
ef87c8bb
GB
52562014-08-19 Tom Tromey <tromey@redhat.com>
5257 Gary Benson <gbenson@redhat.com>
5258
5259 * Makefile.in (SFILES): Add common/errors.c.
5260 (OBS): Add errors.o.
5261 (IPA_OBS): Add errors-ipa.o.
5262 (errors.o): New rule.
5263 (errors-ipa.o): Likewise.
5264 * utils.h (perror_with_name, error, warning): Don't declare.
5265 * utils.c (warning): Renamed and rewritten as...
5266 (vwarning): New function.
5267 (error): Renamed and rewritten as...
5268 (verror): New function.
5269 (internal_error): Renamed and rewritten as...
5270 (internal_verror): New function.
5271
bb974a24
GB
52722014-08-07 Gary Benson <gbenson@redhat.com>
5273
5274 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5275 * configure: Regenerate.
5276 * config.in: Likewise.
5277 * server.h: Do not include errno.h.
5278 * event-loop.c: Likewise.
5279 * hostio-errno.c: Likewise.
5280 * linux-low.c: Likewise.
5281 * remote-utils.c: Likewise.
5282 * spu-low.c: Likewise.
5283 * utils.c: Likewise.
5284 * gdbreplay.c: Unconditionally include errno.h.
5285
6d3d12eb
GB
52862014-08-07 Gary Benson <gbenson@redhat.com>
5287
5288 * server.h: Do not include string.h.
5289 * event-loop.c: Likewise.
5290 * linux-low.c: Likewise.
5291 * regcache.c: Likewise.
5292 * remote-utils.c: Likewise.
5293 * spu-low.c: Likewise.
5294 * utils.c: Likewise.
5295
dccbb609
GB
52962014-08-07 Gary Benson <gbenson@redhat.com>
5297
5298 * server.h: Do not include gdb_assert.h.
5299
e76df0d0
GB
53002014-08-07 Gary Benson <gbenson@redhat.com>
5301
5302 * server.h: Do not include common-utils.h.
5303
4cb9c816
GB
53042014-08-07 Gary Benson <gbenson@redhat.com>
5305
5306 * server.h: Do not include ptid.h.
5307 * notif.h: Likewise.
5308
3995eeee
GB
53092014-08-07 Gary Benson <gbenson@redhat.com>
5310
5311 * server.h: Do not include gdb_locale.h.
5312
cb9f1a9b
GB
53132014-08-07 Gary Benson <gbenson@redhat.com>
5314
5315 * server.h: Do not include gdb/signals.h.
5316 * win32-low.c: Likewise.
5317
a5fceff8
GB
53182014-08-07 Gary Benson <gbenson@redhat.com>
5319
5320 * server.h: Do not include pathmax.h.
5321
b9391142
GB
53222014-08-07 Gary Benson <gbenson@redhat.com>
5323
5324 * server.h: Do not include libiberty.h.
5325 * linux-bfin-low.c: Likewise.
5326
0e443c87
GB
53272014-08-07 Gary Benson <gbenson@redhat.com>
5328
5329 * server.h: Do not include ansidecl.h.
5330
8ebb3f56
GB
53312014-08-07 Gary Benson <gbenson@redhat.com>
5332
5333 * linux-x86-low.c: Do not include stddef.h.
5334 * lynx-ppc-low.c: Likewise.
5335 * tracepoint.c: Likewise.
5336
8980bdf6
GB
53372014-08-07 Gary Benson <gbenson@redhat.com>
5338
5339 * server.h: Do not include stdarg.h.
5340 * nto-low.c: Likewise.
5341
d7096f71
GB
53422014-08-07 Gary Benson <gbenson@redhat.com>
5343
5344 * server.h: Do not include stdlib.h.
5345 * inferiors.c: Likewise.
5346 * linux-low.c: Likewise.
5347 * regcache.c: Likewise.
5348 * spu-low.c: Likewise.
5349 * tracepoint.c: Likewise.
5350 * utils.c: Likewise.
5351
d02f550d
GB
53522014-08-07 Gary Benson <gbenson@redhat.com>
5353
5354 * server.h: Do not include stdio.h.
5355 * linux-low.c: Likewise.
5356 * remote-utils.c: Likewise.
5357 * spu-low.c: Likewise.
5358 * utils.c: Likewise.
5359 * wincecompat.c: Likewise.
5360
87f6c4e3
GB
53612014-08-06 Gary Benson <gbenson@redhat.com>
5362
5363 * regcache.c (init_register_cache): Move conditionals inside if.
5364
7089dca4
GB
53652014-08-06 Gary Benson <gbenson@redhat.com>
5366
5367 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5368
462f517e
GB
53692014-07-31 Gary Benson <gbenson@redhat.com>
5370
5371 * ax.h: Do not include server.h.
5372 * gdbthread.h: Likewise.
5373 * lynx-low.h: Likewise.
5374 * notif.h: Likewise.
5375
976411d6
GB
53762014-07-30 Gary Benson <gbenson@redhat.com>
5377
5378 * server.h: Include common-defs.h.
5379 Do not include config.h or build-gnulib-gdbserver/config.h.
5380
d41f6d8e
GB
53812014-07-30 Gary Benson <gbenson@redhat.com>
5382
5383 * hostio-errno.c: Move server.h to top of includes list.
5384 * inferiors.c: Likewise.
5385 * linux-x86-low.c: Likewise.
5386 * notif.c: Include server.h.
5387
314c6a35
TT
53882014-07-24 Tom Tromey <tromey@redhat.com>
5389 Gary Benson <gbenson@redhat.com>
5390
5391 * server.h (CORE_ADDR): Now unsigned.
5392
69ff6be5
PA
53932014-07-16 Pedro Alves <palves@redhat.com>
5394
5395 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5396
ce9e3fe7
PA
53972014-07-15 Pedro Alves <palves@redhat.com>
5398
5399 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5400 copy.
5401
e76126e8
PA
54022014-07-11 Pedro Alves <palves@redhat.com>
5403
5404 * linux-low.c (kill_wait_lwp): New function, based on
5405 kill_one_lwp_callback, but use my_waitpid directly.
5406 (kill_one_lwp_callback, linux_kill): Use it.
5407
8e9db26e
PA
54082014-06-23 Pedro Alves <palves@redhat.com>
5409
5410 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5411 before setting DR0..DR3.
5412
698b3e08
GB
54132014-06-20 Gary Benson <gbenson@redhat.com>
5414
5415 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5416 * configure: Regenerated.
5417 * config.in: Likewise.
5418
125f8a3d
GB
54192014-06-20 Gary Benson <gbenson@redhat.com>
5420
5421 * Makefile.in (SFILES): Update locations for files moved
5422 from common to nat.
5423 (object file files): Reordered.
5424
42995dbd
GB
54252014-06-20 Gary Benson <gbenson@redhat.com>
5426
5427 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5428 (i386_dr_low_set_addr): Likewise.
5429 (i386_dr_low_get_addr): Likewise.
5430 (i386_dr_low_can_set_control): Likewise.
5431 (i386_dr_low_set_control): Likewise.
5432 (i386_dr_low_get_control): Likewise.
5433 (i386_dr_low_get_status): Likewise.
5434 (i386_get_debug_register_length): Likewise.
5435 * linux-x86-low.c (i386_dr_low_set_addr):
5436 Changed signature. Made static.
5437 (i386_dr_low_get_addr): Likewise.
5438 (i386_dr_low_set_control): Likewise.
5439 (i386_dr_low_get_control): Likewise.
5440 (i386_dr_low_get_status): Likewise.
5441 (i386_dr_low): New global variable.
5442 * win32-i386-low.c (i386_dr_low_set_addr):
5443 Changed signature. Made static.
5444 (i386_dr_low_get_addr): Likewise.
5445 (i386_dr_low_set_control): Likewise.
5446 (i386_dr_low_get_control): Likewise.
5447 (i386_dr_low_get_status): Likewise.
5448 (i386_dr_low): New global variable.
5449
e1d2394b
MS
54502014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5451
5452 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5453 * Makefile.in (AR, AR_FLAGS): Define.
5454 * configure: Regenerate.
5455
3a8ee006
GB
54562014-06-19 Gary Benson <gbenson@redhat.com>
5457
5458 * Makefile.in (i386-dregs.o): New rule.
5459 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5460 * i386-low.c (target.h): Remove include.
5461 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5462 (DR_CONTROL_SHIFT): Likewise.
5463 (DR_CONTROL_SIZE): Likewise.
5464 (DR_RW_EXECUTE): Likewise.
5465 (DR_RW_WRITE): Likewise.
5466 (DR_RW_READ): Likewise.
5467 (DR_RW_IORW): Likewise.
5468 (DR_LEN_1): Likewise.
5469 (DR_LEN_2): Likewise.
5470 (DR_LEN_4): Likewise.
5471 (DR_LEN_8): Likewise.
5472 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5473 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5474 (DR_ENABLE_SIZE): Likewise.
5475 (DR_LOCAL_SLOWDOWN): Likewise.
5476 (DR_GLOBAL_SLOWDOWN): Likewise.
5477 (DR_CONTROL_RESERVED): Likewise.
5478 (I386_DR_CONTROL_MASK): Likewise.
5479 (I386_DR_VACANT): Likewise.
5480 (I386_DR_LOCAL_ENABLE): Likewise.
5481 (I386_DR_GLOBAL_ENABLE): Likewise.
5482 (I386_DR_DISABLE): Likewise.
5483 (I386_DR_SET_RW_LEN): Likewise.
5484 (I386_DR_GET_RW_LEN): Likewise.
5485 (I386_DR_WATCH_HIT): Likewise.
5486 (i386_wp_op_t): Likewise.
5487 (i386_show_dr): Likewise.
5488 (i386_length_and_rw_bits): Likewise.
5489 (i386_insert_aligned_watchpoint): Likewise.
5490 (i386_remove_aligned_watchpoint): Likewise.
5491 (i386_handle_nonaligned_watchpoint): Likewise.
5492 i386_update_inferior_debug_regs(): Likewise.
5493 (i386_dr_insert_watchpoint): Likewise.
5494 (i386_dr_remove_watchpoint): Likewise.
5495 (i386_dr_region_ok_for_watchpoint): Likewise.
5496 (i386_dr_stopped_data_address): Likewise.
5497 (i386_dr_stopped_by_watchpoint): Likewise.
5498
8f26655c
GB
54992014-06-19 Gary Benson <gbenson@redhat.com>
5500
5501 * i386-low.c (i386_dr_show): Renamed to
5502 i386_show_dr and made static. All uses updated.
5503 (i386_dr_length_and_rw_bits): Renamed to
5504 i386_length_and_rw_bits and made static.
5505 All uses updated.
5506 (i386_dr_insert_aligned_watchpoint): Renamed to
5507 i386_insert_aligned_watchpoint and made static.
5508 All uses updated.
5509 (i386_dr_remove_aligned_watchpoint): Renamed to
5510 i386_remove_aligned_watchpoint and made static.
5511 All uses updated.
5512 (i386_dr_update_inferior_debug_regs): Renamed to
5513 i386_update_inferior_debug_regs and made static.
5514 All uses updated.
5515
b9228891
GB
55162014-06-18 Gary Benson <gbenson@redhat.com>
5517
5171def3
GB
5518 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5519 (i386_dr_low_can_set_control): Likewise.
5520 (i386_get_debug_register_length): Likewise.
5521 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5522 (i386_dr_low_can_set_control): Likewise.
5523 (i386_get_debug_register_length): Likewise.
5524
55252014-06-17 Gary Benson <gbenson@redhat.com>
5526
b9228891
GB
5527 * i386-low.h (i386-dregs.h): New include.
5528 (DR_FIRSTADDR): Now in i386-dregs.h.
5529 (DR_LASTADDR): Likewise.
5530 (DR_NADDR): Likewise.
5531 (DR_STATUS): Likewise.
5532 (DR_CONTROL): Likewise.
5533 (i386_debug_reg_state): Likewise.
5534 (i386_dr_insert_watchpoint): Likewise.
5535 (i386_dr_remove_watchpoint): Likewise.
5536 (i386_dr_region_ok_for_watchpoint): Likewise.
5537 (i386_dr_stopped_data_address): Likewise.
5538 (i386_dr_stopped_by_watchpoint): Likewise.
5539 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5540
4be83cc2
GB
55412014-06-18 Gary Benson <gbenson@redhat.com>
5542
5543 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5544 i386_dr_insert_watchpoint.
5545 (i386_low_remove_watchpoint): Renamed to
5546 i386_dr_remove_watchpoint.
5547 (i386_low_region_ok_for_watchpoint): Renamed to
5548 i386_dr_region_ok_for_watchpoint.
5549 (i386_low_stopped_data_address): Renamed to
5550 i386_dr_stopped_data_address.
5551 (i386_low_stopped_by_watchpoint): Renamed to
5552 i386_dr_stopped_by_watchpoint.
5553 * i386-low.c (i386_show_dr): Renamed to
5554 i386_dr_show and made nonstatic. All uses updated.
5555 (i386_length_and_rw_bits): Renamed to
5556 i386_dr_length_and_rw_bits and made nonstatic.
5557 All uses updated.
5558 (i386_insert_aligned_watchpoint): Renamed to
5559 i386_dr_insert_aligned_watchpoint and made nonstatic.
5560 All uses updated.
5561 (i386_remove_aligned_watchpoint): Renamed to
5562 i386_dr_remove_aligned_watchpoint and made nonstatic.
5563 All uses updated.
5564 (i386_update_inferior_debug_regs): Renamed to
5565 i386_dr_update_inferior_debug_regs and made nonstatic.
5566 All uses updated.
5567 (i386_low_insert_watchpoint): Renamed to
5568 i386_dr_insert_watchpoint. All uses updated.
5569 (i386_low_remove_watchpoint): Renamed to
5570 i386_dr_remove_watchpoint. All uses updated.
5571 (i386_low_region_ok_for_watchpoint): Renamed to
5572 i386_dr_region_ok_for_watchpoint. All uses updated.
5573 (i386_low_stopped_data_address): Renamed to
5574 i386_dr_stopped_data_address. All uses updated.
5575 (i386_low_stopped_by_watchpoint): Renamed to
5576 i386_dr_stopped_by_watchpoint. All uses updated.
5577
131aa0d4
GB
55782014-06-18 Gary Benson <gbenson@redhat.com>
5579
5580 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5581 (i386_dr_low_can_set_control): Likewise.
5582 (i386_insert_aligned_watchpoint): New check.
5583
d9305f7f
GB
55842014-06-18 Gary Benson <gbenson@redhat.com>
5585
5586 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5587 Renamed to state.
5588
e927c9fc
GB
55892014-06-18 Gary Benson <gbenson@redhat.com>
5590
5591 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5592 instead of fatal and error.
5593 (i386_handle_nonaligned_watchpoint): Likewise.
5594
1b6d4134
GB
55952014-06-18 Gary Benson <gbenson@redhat.com>
5596
5597 * i386-low.c (i386_get_debug_register_length): New macro.
5598 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5599 (i386_show_dr): Use debug_printf instead of fprintf. Use
5600 phex to format values.
5601
6e62758f
GB
56022014-06-18 Gary Benson <gbenson@redhat.com>
5603
5604 * i386-low.h: Comment changes.
5605 * i386-low.c: Likewise.
5606
fc6e2f03
GB
56072014-06-18 Gary Benson <gbenson@redhat.com>
5608
5609 * i386-low.c: Whitespace changes.
5610
f9d1eeed
TT
56112014-06-12 Tom Tromey <tromey@redhat.com>
5612
5613 * utils.c (freeargv): Remove.
5614
0b04e523
TT
56152014-06-12 Tom Tromey <tromey@redhat.com>
5616
5617 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5618 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5619 (parse_debug_format_options): Likewise.
5620 (gdbserver_usage): Likewise.
5621 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5622 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5623 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5624 against libiberty.
5625 ($(LIBGNU)): Depend on libiberty.
5626 (all-lib): Recurse into all subdirs.
5627 (install-only): Invoke "install" target in subdirs.
5628 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5629 targets.
5630 * configure: Rebuild.
5631 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5632 for vasprintf, vsnprintf, or gettimeofday.
5633 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5634 srv_tgtobj.
5635
270c9937
JB
56362014-06-05 Joel Brobecker <brobecker@adacore.com>
5637
5638 * development.sh: Delete.
5639 * Makefile.in (config.status): Adjust dependency on development.sh.
5640 * configure.ac: Adjust development.sh source call.
5641 * configure: Regenerate.
5642
0a261ed8
PA
56432014-06-02 Pedro Alves <palves@redhat.com>
5644
5645 * ax.c (gdb_free_agent_expr): New function.
5646 * ax.h (gdb_free_agent_expr): New declaration.
5647 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5648 list.
5649 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5650 static.
5651 (clear_breakpoint_conditions_and_commands): New function.
5652 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5653 (clear_breakpoint_conditions_and_commands): New declaration.
5654
e9dae05e
RR
56552014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5656
5657 * linux-aarch64-low.c (asm/ptrace.h): Include.
5658
5876f503
JK
56592014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5660
5661 Fix TLS access for -static -pthread.
5662 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5663 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5664 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5665
802e8e6d
PA
56662014-05-20 Pedro Alves <palves@redhat.com>
5667
5668 * linux-aarch64-low.c (aarch64_insert_point)
5669 (aarch64_remove_point): No longer check whether the type is
5670 supported here. Adjust to new interface.
5671 (the_low_target): Install aarch64_supports_z_point_type as
5672 supports_z_point_type method.
5673 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5674 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5675 instead of a Z packet char. Adjust.
5676 (arm_supports_z_point_type): New function.
5677 (arm_insert_point, arm_remove_point): Adjust to new interface.
5678 (the_low_target): Install arm_supports_z_point_type.
5679 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5680 (cris_insert_point, cris_remove_point): Adjust to new interface.
5681 Don't check whether the type is supported here.
5682 (the_low_target): Install cris_supports_z_point_type.
5683 * linux-low.c (linux_supports_z_point_type): New function.
5684 (linux_insert_point, linux_remove_point): Adjust to new interface.
5685 * linux-low.h (struct linux_target_ops) <insert_point,
5686 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5687 raw_breakpoint pointer parameter.
5688 <supports_z_point_type>: New method.
5689 * linux-mips-low.c (mips_supports_z_point_type): New function.
5690 (mips_insert_point, mips_remove_point): Adjust to new interface.
5691 Use mips_supports_z_point_type.
5692 (the_low_target): Install mips_supports_z_point_type.
5693 * linux-ppc-low.c (the_low_target): Install NULL as
5694 supports_z_point_type method.
5695 * linux-s390-low.c (the_low_target): Install NULL as
5696 supports_z_point_type method.
5697 * linux-sparc-low.c (the_low_target): Install NULL as
5698 supports_z_point_type method.
5699 * linux-x86-low.c (x86_supports_z_point_type): New function.
5700 (x86_insert_point): Adjust to new insert_point interface. Use
5701 insert_memory_breakpoint. Adjust to new
5702 i386_low_insert_watchpoint interface.
5703 (x86_remove_point): Adjust to remove_point interface. Use
5704 remove_memory_breakpoint. Adjust to new
5705 i386_low_remove_watchpoint interface.
5706 (the_low_target): Install x86_supports_z_point_type.
5707 * lynx-low.c (lynx_target_ops): Install NULL as
5708 supports_z_point_type callback.
5709 * nto-low.c (nto_supports_z_point_type): New.
5710 (nto_insert_point, nto_remove_point): Adjust to new interface.
5711 (nto_target_ops): Install nto_supports_z_point_type.
5712 * mem-break.c: Adjust intro comment.
5713 (struct raw_breakpoint) <raw_type, size>: New fields.
5714 <inserted>: Update comment.
5715 <shlib_disabled>: Delete field.
5716 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5717 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5718 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5719 (raw_bkpt_type_to_target_hw_bp_type): New function.
5720 (find_enabled_raw_code_breakpoint_at): New function.
5721 (find_raw_breakpoint_at): New type and size parameters. Use them.
5722 (insert_memory_breakpoint): New function, based off
5723 set_raw_breakpoint_at.
5724 (remove_memory_breakpoint): New function.
5725 (set_raw_breakpoint_at): Reimplement.
5726 (set_breakpoint): New, based on set_breakpoint_at.
5727 (set_breakpoint_at): Reimplement.
5728 (delete_raw_breakpoint): Go through the_target->remove_point
5729 instead of assuming memory breakpoints.
5730 (find_gdb_breakpoint_at): Delete.
5731 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5732 (find_gdb_breakpoint): New function.
5733 (set_gdb_breakpoint_at): Delete.
5734 (z_type_supported): New function.
5735 (set_gdb_breakpoint_1): New function, loosely based off
5736 set_gdb_breakpoint_at.
5737 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5738 (delete_gdb_breakpoint_at): Delete.
5739 (delete_gdb_breakpoint_1): New function, loosely based off
5740 delete_gdb_breakpoint_at.
5741 (delete_gdb_breakpoint): New function.
5742 (clear_gdb_breakpoint_conditions): Rename to ...
5743 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5744 breakpoint.
5745 (add_condition_to_breakpoint): Make static.
5746 (add_breakpoint_condition): Take a struct breakpoint pointer
5747 instead of an address. Adjust.
5748 (gdb_condition_true_at_breakpoint): Rename to ...
5749 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5750 z_type parameter.
5751 (gdb_condition_true_at_breakpoint): Reimplement.
5752 (add_breakpoint_commands): Take a struct breakpoint pointer
5753 instead of an address. Adjust.
5754 (gdb_no_commands_at_breakpoint): Rename to ...
5755 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5756 parameter. Return true if no breakpoint was found. Change debug
5757 output.
5758 (gdb_no_commands_at_breakpoint): Reimplement.
5759 (run_breakpoint_commands): Rename to ...
5760 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5761 and change return type to boolean.
5762 (run_breakpoint_commands): New function.
5763 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5764 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5765 breakpoint. Go through the_target->remove_point instead of
5766 assuming memory breakpoint.
5767 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5768 software and hardware breakpoints.
5769 (reinsert_raw_breakpoint): Go through the_target->insert_point
5770 instead of assuming memory breakpoint.
5771 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5772 software and hardware breakpoints.
5773 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5774 Check both software and hardware breakpoints.
5775 (validate_inserted_breakpoint): Assert the breakpoint is a
5776 software breakpoint. Set the inserted flag to -1 instead of
5777 setting shlib_disabled.
5778 (delete_disabled_breakpoints): Adjust.
5779 (validate_breakpoints): Only validate software breakpoints.
5780 Adjust to inserted flag change.
5781 (check_mem_read, check_mem_write): Skip breakpoint types other
5782 than software breakpoints. Adjust to inserted flag change.
5783 * mem-break.h (enum raw_bkpt_type): New enum.
5784 (raw_breakpoint, struct process_info): Forward declare.
5785 (Z_packet_to_target_hw_bp_type): Delete declaration.
5786 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5787 (set_gdb_breakpoint, delete_gdb_breakpoint)
5788 (clear_breakpoint_conditions): New declarations.
5789 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5790 (breakpoint_inserted_here): Update comment.
5791 (add_breakpoint_condition, add_breakpoint_commands): Replace
5792 address parameter with a breakpoint pointer parameter.
5793 (gdb_breakpoint_here): Update comment.
5794 (delete_gdb_breakpoint_at): Delete.
5795 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5796 * server.c (process_point_options): Take a struct breakpoint
5797 pointer instead of an address. Adjust.
5798 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5799 delete_gdb_breakpoint.
5800 * spu-low.c (spu_target_ops): Install NULL as
5801 supports_z_point_type method.
5802 * target.h: Include mem-break.h.
5803 (struct target_ops) <prepare_to_access_memory>: Update comment.
5804 <supports_z_point_type>: New field.
5805 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5806 instead of a char. Also take a raw breakpoint pointer.
5807 * win32-arm-low.c (the_low_target): Install NULL as
5808 supports_z_point_type.
5809 * win32-i386-low.c (i386_supports_z_point_type): New function.
5810 (i386_insert_point, i386_remove_point): Adjust to new interface.
5811 (the_low_target): Install i386_supports_z_point_type.
5812 * win32-low.c (win32_supports_z_point_type): New function.
5813 (win32_insert_point, win32_remove_point): Adjust to new interface.
5814 (win32_target_ops): Install win32_supports_z_point_type.
5815 * win32-low.h (struct win32_target_ops):
5816 <supports_z_point_type>: New method.
5817 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5818 instead of a char. Also take a raw breakpoint pointer.
5819
932539e3
PA
58202014-05-20 Pedro Alves <palves@redhat.com>
5821
5822 * mem-break.h: Include break-common.h.
5823 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5824 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5825 (Z_packet_to_target_hw_bp_type): New declaration.
5826 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5827 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5828 (Z_PACKET_ACCESS_WP): Delete macros.
5829 (Z_packet_to_hw_type): Delete function.
5830 * i386-low.h: Don't include break-common.h here.
5831 (Z_packet_to_hw_type): Delete declaration.
5832 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5833 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5834 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5835 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5836 * linux-aarch64-low.c: Don't include break-common.h here.
5837 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5838 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5839 (Z_packet_to_target_hw_bp_type): Delete function.
5840 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5841 function.
5842 (mips_insert_point, mips_remove_point): Use
5843 Z_packet_to_target_hw_bp_type.
5844
4ff0d3d8
PA
58452014-05-20 Pedro Alves <palves@redhat.com>
5846
5847 * linux-aarch64-low.c: Include break-common.h.
5848 (enum target_point_type): Delete.
5849 (Z_packet_to_point_type): Rename to ...
5850 (Z_packet_to_target_hw_bp_type): ... this, and return a
5851 target_hw_bp_type instead.
5852 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5853 instead of an enum target_point_type.
5854 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5855 breakpoint type.
5856 (aarch64_dr_state_insert_one_point)
5857 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5858 (aarch64_handle_aligned_watchpoint)
5859 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5860 Take an enum target_hw_bp_type instead of an enum
5861 target_point_type.
5862 (aarch64_supports_z_point_type): New function.
5863 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5864 use Z_packet_to_target_hw_bp_type.
5865
786dc519
JB
58662014-05-20 Joel Brobecker <brobecker@adacore.com>
5867
5868 * configure.ac: Only use -Werror by default when DEVELOPMENT
5869 is true.
5870 * configure: Regenerate.
5871
9e0aa64f
JK
58722014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5873
5874 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5875 * linux-x86-low.c (X86_64_USER_REGS): New.
5876 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5877
2b577b92
YQ
58782014-04-28 Yao Qi <yao@codesourcery.com>
5879
5880 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5881 name.
5882
94611da2
PA
58832014-04-25 Pedro Alves <palves@redhat.com>
5884
5885 PR server/16255
5886 * linux-low.c (linux_attach_fail_reason_string): New function.
5887 (linux_attach_lwp): Delete.
5888 (linux_attach_lwp_1): Rename to ...
5889 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5890 argument. Remove "initial" parameter. Return int instead of
5891 void. Don't error or warn here.
5892 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5893 failure to attach to the tgid. Call warning when failing to
5894 attach to an lwp.
5895 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5896 argument. Remove "initial" parameter. Return int instead of
5897 void. Don't error or warn here.
5898 (linux_attach_fail_reason_string): New declaration.
5899 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5900 interface change. Use linux_attach_fail_reason_string.
5901
01f9f808
MS
59022014-04-24 Michael Sturm <michael.sturm@mintel.com>
5903 Walfred Tedeschi <walfred.tedeschi@intel.com>
5904
5905 * Makefile.in: Added rules to handle new files
5906 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5907 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5908 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5909 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5910 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5911 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5912 x32-avx512-linux.o.
5913 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5914 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5915 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5916 i386/x32-avx512.xml.
5917 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5918 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5919 i386/x32-avx512-linux.xml.
5920 * i387-fp.c (num_avx512_k_registers): New constant for number
5921 of K registers.
5922 (num_avx512_zmmh_low_registers): New constant for number of
5923 lower ZMM registers (0-15).
5924 (num_avx512_zmmh_high_registers): New constant for number of
5925 higher ZMM registers (16-31).
5926 (num_avx512_ymmh_registers): New contant for number of higher
5927 YMM registers (ymm16-31 added by avx521 on x86_64).
5928 (num_avx512_xmm_registers): New constant for number of higher
5929 XMM registers (xmm16-31 added by AVX512 on x86_64).
5930 (struct i387_xsave): Add space for AVX512 registers.
5931 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5932 Add code to handle AVX512 registers.
5933 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5934 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5935 prototypei from generated file.
5936 (tdesc_amd64_avx512_linux): Likewise.
5937 (init_registers_x32_avx512_linux): Likewise.
5938 (tdesc_x32_avx512_linux): Likewise.
5939 (init_registers_i386_avx512_linux): Likewise.
5940 (tdesc_i386_avx512_linux): Likewise.
5941 (x86_64_regmap): Add AVX512 registers.
5942 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5943 mask.
5944 (initialize_low_arch): Add code to initialize AVX512 registers.
5945
51aa91f9
PA
59462014-04-23 Pedro Alves <palves@redhat.com>
5947
5948 * mem-break.c (find_gdb_breakpoint_at): Make static.
5949 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5950
a4165e94
PA
59512014-04-23 Pedro Alves <palves@redhat.com>
5952
5953 * i386-low.c: Don't include break-common.h here.
5954 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5955 prototype to take target_hw_bp_type as argument instead of a Z
5956 packet char.
5957 * i386-low.h: Include break-common.h here.
5958 (Z_packet_to_hw_type): Declare.
5959 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5960 prototypes.
5961 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5962 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5963 (x86_remove_point): Convert the packet number to a
5964 target_hw_bp_type before calling i386_low_remove_watchpoint.
5965 * win32-i386-low.c (i386_insert_point): Convert the packet number
5966 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5967 (i386_remove_point): Convert the packet number to a
5968 target_hw_bp_type before calling i386_low_remove_watchpoint.
5969
b8acf843
PA
59702014-04-23 Pedro Alves <palves@redhat.com>
5971
5972 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5973
d708bcd1
PA
59742014-04-10 Pedro Alves <palves@redhat.com>
5975
5976 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5977 Check if the condition or command is NULL before checking if the
5978 breakpoint is known. On success, return true.
5979 * mem-break.h (add_breakpoint_condition): Document return.
5980 (add_breakpoint_commands): Add describing comment.
5981 * server.c (skip_to_semicolon): New function.
5982 (process_point_options): Use it.
5983
2eec7d5b
PA
59842014-04-09 Pedro Alves <palves@redhat.com>
5985
5986 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5987 to lwpid_of.
5988
fa96cb38
PA
59892014-02-27 Pedro Alves <palves@redhat.com>
5990
5991 PR 12702
5992 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5993 macros.
5994 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5995 output.
5996 (last_thread_of_process_p): Take a PID argument instead of a
5997 thread pointer.
5998 (linux_wait_for_lwp): Delete.
5999 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6000 functions.
6001 (linux_low_filter_event): New function, party factored out from
6002 linux_wait_for_event.
6003 (linux_wait_for_event): Rename to ...
6004 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6005 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6006 sigsuspend. Check for zombie leaders.
6007 (linux_wait_for_event): Reimplement as wrapper around
6008 linux_wait_for_event_filtered.
6009 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6010 a normal or signal exit is seen, it's the whole process exiting.
6011 (wait_for_sigstop): No longer a for_each_inferior callback.
6012 Rewrite on top of linux_wait_for_event_filtered.
6013 (stop_all_lwps): Call wait_for_sigstop directly.
6014 * server.c (resume, handle_target_event): Handle
6015 TARGET_WAITKIND_NO_RESUMED.
6016
d763de10
JB
60172014-02-26 Joel Brobecker <brobecker@adacore.com>
6018
6019 * win32-low.c (psapi_get_dll_name,
6020 * win32_CreateToolhelp32Snapshot): Delete.
6021 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6022 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6023 Delete.
6024 (handle_load_dll): Add function description.
6025 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6026
850a0f76
JB
60272014-02-26 Joel Brobecker <brobecker@adacore.com>
6028
6029 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6030 Add comment.
6031 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6032 base address when calling win32_add_one_solib.
6033 (handle_load_dll): Delete local variable load_addr.
6034 Remove 0x1000 offset applied to DLL base address when calling
6035 win32_add_one_solib.
6036 (handle_unload_dll): Add comment.
6037
f25b3fc3
JB
60382014-02-26 Joel Brobecker <brobecker@adacore.com>
6039
6040 * win32-low.c (win32_add_all_dlls): Renames
6041 win32_ensure_ntdll_loaded. Rewrite function documentation.
6042 Adjust implementation to always load all DLLs.
6043 Add 0x1000 offset to DLL base address when calling
6044 win32_add_one_solib.
6045 (child_initialization_done): New static global.
6046 (do_initial_child_stuff): Set child_initialization_done to
6047 zero during child initialization, and 1 after. Replace call
6048 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6049 Add comment.
6050 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6051 (handle_unload_dll): Add function documentation.
6052 (get_child_debug_event): Ignore load and unload DLL events
6053 during child initialization.
6054
d86d4aaf
DE
60552014-02-20 Doug Evans <dje@google.com>
6056
3bc32da3 6057 Remove global all_lwps.
d86d4aaf
DE
6058 * inferiors.h (ptid_of): Move here from linux-low.h.
6059 (pid_of, lwpid_of): Ditto.
6060 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6061 parameter is a struct thread_info * now.
6062 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6063 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6064 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6065 directly.
6066 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6067 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6068 * linux-arm-low.c (update_registers_callback): Update, "entry"
6069 parameter is a struct thread_info * now.
6070 Fetch lwpid from current_inferior directly.
6071 (arm_insert_point): Pass &all_threads to find_inferior instead of
6072 &all_lwps.
6073 (arm_remove_point): Ditto.
6074 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6075 (arm_prepare_to_resume): Fetch pid from thread.
6076 (arm_read_description): Fetch lwpid from current_inferior directly.
6077 * linux-low.c (all_lwps): Delete.
6078 (delete_lwp): Delete call to remove_inferior.
6079 (handle_extended_wait): Fetch lwpid from thread.
6080 (add_lwp): Don't set lwp->entry.id. Remove call to
6081 add_inferior_to_list.
6082 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6083 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6084 (kill_one_lwp_callback): Ditto.
6085 (linux_kill): Don't dereference NULL pointer.
6086 Fetch ptid,lwpid from thread.
6087 (get_detach_signal): Fetch ptid from thread.
6088 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6089 Simplify call to regcache_invalidate_thread.
6090 (delete_lwp_callback): Update, "entry" parameter is a
6091 struct thread_info * now. Fetch pid from thread.
6092 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6093 (status_pending_p_callback): Update, "entry" parameter is a
6094 struct thread_info * now. Fetch ptid from thread.
6095 (find_lwp_pid): Update, "entry" parameter is a
6096 struct thread_info * now.
6097 (linux_wait_for_lwp): Fetch pid from thread.
6098 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6099 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6100 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6101 (dequeue_one_deferred_signal): Ditto.
6102 (cancel_breakpoint): Fetch ptid from current_inferior.
6103 (linux_wait_for_event): Pass &all_threads to find_inferior,
6104 not &all_lwps. Fetch ptid, lwpid from thread.
6105 (count_events_callback): Update, "entry" parameter is a
6106 struct thread_info * now.
6107 (select_singlestep_lwp_callback): Ditto.
6108 (select_event_lwp_callback): Ditto.
6109 (cancel_breakpoints_callback): Ditto.
6110 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6111 not &all_lwps.
6112 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6113 (unsuspend_one_lwp): Update, "entry" parameter is a
6114 struct thread_info * now.
6115 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6116 not &all_lwps.
6117 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6118 Fetch lwpid from thread, not lwp.
6119 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6120 Pass &all_threads to find_inferior, not &all_lwps.
6121 (send_sigstop): Fetch lwpid from thread, not lwp.
6122 (send_sigstop_callback): Update, "entry" parameter is a
6123 struct thread_info * now.
6124 (suspend_and_send_sigstop_callback): Ditto.
6125 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6126 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6127 struct thread_info * now.
6128 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6129 from thread, lwp.
6130 (lwp_running): Update, "entry" parameter is a
6131 struct thread_info * now.
6132 (stop_all_lwps): Fetch ptid from thread.
6133 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6134 (linux_resume_one_lwp): Fetch lwpid from thread.
6135 (linux_set_resume_request): Update, "entry" parameter is a
6136 struct thread_info * now. Fetch pid, lwpid from thread.
6137 (resume_status_pending_p): Update, "entry" parameter is a
6138 struct thread_info * now.
6139 (need_step_over_p): Ditto. Fetch lwpid from thread.
6140 (start_step_over): Fetch lwpid from thread.
6141 (linux_resume_one_thread): Update, "entry" parameter is a
6142 struct thread_info * now. Fetch lwpid from thread.
6143 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6144 (proceed_one_lwp): Update, "entry" parameter is a
6145 struct thread_info * now. Fetch lwpid from thread.
6146 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6147 struct thread_info * now.
6148 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6149 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6150 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6151 directly.
6152 (regsets_store_inferior_registers): Ditto.
6153 (fetch_register, store_register): Ditto.
6154 (linux_read_memory, linux_write_memory): Ditto.
6155 (linux_request_interrupt): Ditto.
6156 (linux_read_auxv): Ditto.
6157 (linux_xfer_siginfo): Ditto.
6158 (linux_qxfer_spu): Ditto.
6159 (linux_qxfer_libraries_svr4): Ditto.
6160 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6161 moved to inferiors.h.
6162 (get_lwp): Delete.
6163 (get_thread_lwp): Update.
6164 (struct lwp_info): Delete member "entry". Simplify comment for
6165 member "thread".
6166 (all_lwps): Delete.
6167 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6168 current_inferior directly.
6169 (update_watch_registers_callback): Update, "entry" parameter is a
6170 struct thread_info * now. Fetch pid from thread.
6171 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6172 (mips_insert_point): Fetch lwpid from current_inferior.
6173 Pass &all_threads to find_inferior, not &all_lwps.
6174 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6175 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6176 directly.
6177 (mips_stopped_data_address): Ditto.
6178 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6179 directly.
6180 * linux-tile-low.c (tile_arch_setup): Ditto.
6181 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6182 (update_debug_registers_callback): Update, "entry" parameter is a
6183 struct thread_info * now. Fetch pid from thread.
6184 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6185 Pass &all_threads to find_inferior, not &all_lwps.
6186 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6187 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6188 Pass &all_threads to find_inferior, not &all_lwps.
6189 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6190 (i386_dr_low_get_status): Ditto.
6191 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6192 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6193 (x86_linux_read_description): Ditto.
6194 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6195
3b8361aa
DE
61962014-02-20 Doug Evans <dje@google.com>
6197
6198 * inferiors.c (get_first_inferior): Fix buglet.
6199
f7667f0d
DE
62002014-02-19 Doug Evans <dje@google.com>
6201
6202 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6203 * inferiors.c (add_thread): Change result type to struct thread_info *.
6204 All callers updated.
6205 (add_lwp): Call add_thread here instead of in callers.
6206 All callers updated.
6207 * linux-low.h (get_lwp_thread): Rewrite.
6208 (struct lwp_info): New member "thread".
6209
b3312d80
DE
62102014-02-19 Doug Evans <dje@google.com>
6211
6212 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6213 All callers updated.
6214
ecc6f45c
DE
62152014-02-19 Doug Evans <dje@google.com>
6216
6217 * inferiors.c (add_thread): Fix whitespace.
6218
649ebbca
DE
62192014-02-19 Doug Evans <dje@google.com>
6220
6221 * dll.c (clear_dlls): Replace accessing list implemention details
6222 with API function.
6223 * gdbthread.h (get_first_thread): Declare.
6224 * inferiors.c (for_each_inferior_with_data): New function.
6225 (get_first_thread): New function.
6226 (find_thread_ptid): Simplify.
6227 (get_first_inferior): New function.
6228 (clear_list): Delete.
6229 (one_inferior_p): New function.
6230 (clear_inferior_list): New function.
6231 (clear_inferiors): Update.
6232 * inferiors.h (for_each_inferior_with_data): Declare.
6233 (clear_inferior_list): Declare.
6234 (one_inferior_p): Declare.
6235 (get_first_inferior): Declare.
6236 * linux-low.c (linux_wait_for_event): Replace accessing list
6237 implemention details with API function.
6238 * server.c (target_running): Ditto.
6239 (accumulate_file_name_length): New function.
6240 (emit_dll_description): New function.
6241 (handle_qxfer_libraries): Replace accessing list implemention
6242 details with API function.
6243 (handle_qxfer_threads_worker): New function.
6244 (handle_qxfer_threads_proper): Replace accessing list implemention
6245 details with API function.
6246 (handle_query): Ditto.
6247 (visit_actioned_threads_callback_ftype): New typedef.
6248 (visit_actioned_threads_data): New struct.
6249 (visit_actioned_threads): Rewrite to be find_inferior callback.
6250 (resume): Call find_inferior.
6251 (handle_status): Replace accessing list implemention
6252 details with API function.
6253 (process_serial_event): Replace accessing list implemention details
6254 with API function.
6255 * target.c (set_desired_inferior): Replace accessing list implemention
6256 details with API function.
6257 * tracepoint.c (same_process_p): New function.
6258 (gdb_agent_about_to_close): Replace accessing list implemention
6259 details with API function.
6260 * win32-low.c (child_delete_thread): Replace accessing list
6261 implemention details with API function.
6262 (match_dll_by_basename): New function.
6263 (dll_is_loaded_by_basename): New function.
6264 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6265 details call to dll_is_loaded_by_basename.
6266
80894984
DE
62672014-02-19 Doug Evans <dje@google.com>
6268
6269 * dll.h (struct dll_info): Add comment.
6270 * gdbthread.h (struct thread_info): Add comment.
6271 (current_ptid): Simplify.
6272 * inferiors.c (add_process): Update.
6273 (remove_process): Update.
6274 * inferiors.h (struct process_info): Rename member "head" to "entry".
6275 * linux-low.c (delete_lwp): Update.
6276 (add_lwp): Update.
6277 (last_thread_of_process_p): Update.
6278 (kill_one_lwp_callback, linux_kill): Update.
6279 (status_pending_p_callback): Update.
6280 (wait_for_sigstop): Update. Simplify read of ptid.
6281 (start_step_over): Update.
6282 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6283 (get_lwp_thread): Update.
6284 (struct lwp_info): Rename member "head" to "entry".
6285 * regcache.h (inferior_list_entry): Delete.
6286 * server.c (kill_inferior_callback): Update.
6287 (detach_or_kill_inferior_callback): Update.
6288 (print_started_pid): Update.
6289 (print_attached_pid): Update.
6290 (process_serial_event): Simplify read of ptid.
6291 * thread-db.c (thread_db_create_event): Update.
6292 (thread_db_get_tls_address): Update.
6293 * win32-low.c (current_inferior_ptid): Simplify.
6294
46917d26
TT
62952014-02-19 Tom Tromey <tromey@redhat.com>
6296
6297 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6298 argument.
6299 (target_supports_btrace): Update.
6300
0759a81e
YQ
63012014-02-14 Yao Qi <yao@codesourcery.com>
6302
6303 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6304 (rsp-low-ipa.o): New target.
6305
a7191e8b
TT
63062014-02-12 Tom Tromey <tromey@redhat.com>
6307
6308 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6309 convert_ascii_to_int.
6310 * regcache.c (registers_to_string): Likewise.
6311 * remote-utils.c (decode_M_packet): Likewise.
6312 * server.c (process_serial_event): Likewise.
6313
ff0e980e
TT
63142014-02-12 Tom Tromey <tromey@redhat.com>
6315
6316 * server.c (handle_query, handle_v_run): Use hex2bin, not
6317 unhexify.
6318 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6319
e9371aff
TT
63202014-02-12 Tom Tromey <tromey@redhat.com>
6321
6322 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6323 convert_int_to_ascii.
6324 * regcache.c (registers_to_string, collect_register_as_string):
6325 Likewise.
6326 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6327 Likewise.
6328 * server.c (process_serial_event): Likewise.
6329 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6330 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6331
971dc0b8
TT
63322014-02-12 Tom Tromey <tromey@redhat.com>
6333
6334 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6335 bin2hex, not hexify.
6336 * tracepoint.c (cmd_qtstatus): Likewise.
6337
0a822afb
TT
63382014-02-12 Tom Tromey <tromey@redhat.com>
6339
6340 * remote-utils.c (monitor_output): Pass explicit length to
6341 hexify.
6342
9c3d6531
TT
63432014-02-12 Tom Tromey <tromey@redhat.com>
6344
6345 * tracepoint.c: Include rsp-low.h.
6346 * server.c: Include rsp-low.h.
6347 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6348 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6349 declare.
6350 * remote-utils.c: Include rsp-low.h.
6351 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6352 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6353 (convert_int_to_ascii, convert_ascii_to_int): Move to
6354 common/rsp-low.c.
6355 * regcache.c: Include rsp-low.h.
6356 * ax.c: Include rsp-low.h.
6357 * Makefile.in (SFILES): Add common/rsp-low.c.
6358 (OBS): Add rsp-low.o.
6359 (rsp-low.o): New target.
6360
01fd3ea5
TT
63612014-02-12 Tom Tromey <tromey@redhat.com>
6362
6363 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6364 Include print-utils.h.
6365 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6366 (plongest, thirty_two, phex_nz): Remove.
6367 * Makefile.in (SFILES): Add common/print-utils.c.
6368 (OBS): Add print-utils.o.
6369 (print-utils-ipa.o): New target.
6370 (print-utils.o): New target.
6371 (IPA_OBJS): Add print-utils-ipa.o.
6372
e99dc820
TT
63732014-02-06 Tom Tromey <tromey@redhat.com>
6374
6375 * Makefile.in (SFILES): Fix indentation.
6376
ee1e2d4f
DE
63772014-02-05 Doug Evans <dje@google.com>
6378
6379 * linux-low.c (linux_wait_for_event): Improve comment.
6380 (linux_wait_1): Keep current_inferior in sync with event_child.
6381
f5a02773
DE
63822014-01-22 Doug Evans <dje@google.com>
6383
6384 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6385
87ce2a04
DE
63862014-01-22 Doug Evans <dje@google.com>
6387
6388 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6389 * configure: Regenerate.
6390 * config.in: Regenerate.
6391 * Makefile.in (SFILES): Add debug.c.
6392 (OBS): Add debug.o.
6393 * debug.c: New file.
6394 * debug.h: New file.
6395 * linux-aarch64-low.c (*): Update all debugging printfs to use
6396 debug_printf instead of fprintf.
6397 * linux-arm-low.c (*): Ditto.
6398 * linux-cris-low.c (*): Ditto.
6399 * linux-crisv32-low.c (*): Ditto.
6400 * linux-m32r-low.c (*): Ditto.
6401 * linux-sparc-low.c (*): Ditto.
6402 * linux-x86.c (*): Ditto.
6403 * linux-low.c (*): Ditto.
6404 (linux_wait_1): Add calls to debug_enter, debug_exit.
6405 (linux_wait): Remove redundant debugging printf.
6406 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6407 (linux_resume, unstop_all_lwps): Ditto.
6408 * mem-break.c (*): Update all debugging printfs to use
6409 debug_printf instead of fprintf.
6410 * remote-utils.c (*): Ditto.
6411 * thread-db.c (*): Ditto.
6412 * server.c #include <ctype.h>, "gdb_vecs.h".
6413 (debug_threads): Moved to debug.c.
6414 (*): Update all debugging printfs to use debug_printf instead of
6415 fprintf.
6416 (start_inferior): Replace call to fflush with call to debug_flush.
6417 (monitor_show_help): Mention set debug-format.
6418 (parse_debug_format_options): New function.
6419 (handle_monitor_command): Handle "monitor set debug-format".
6420 (gdbserver_usage): Mention --debug-format.
6421 (main): Parse --debug-format.
6422 * server.h (debug_threads): Declaration moved to debug.h.
6423 #include "debug.h".
6424 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6425 trace_debug_1 that uses debug_printf.
6426 (tracepoint_look_up_symbols): Update all debugging printfs to use
6427 debug_printf instead of fprintf.
6428
e671835b
BS
64292014-01-20 Baruch Siach <baruch@tkos.co.il>
6430
6431 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6432 sys/ptrace.h.
6433
b5737fa9
PA
64342014-01-17 Pedro Alves <palves@redhat.com>
6435
ea38d2a9 6436 PR build/16445
c7faa97a
PA
6437 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6438 defined after including gdb_proc_service.h.
b5737fa9 6439
40ed484e
DE
64402014-01-16 Doug Evans <dje@google.com>
6441
6442 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6443 (match_dll): Use it.
6444
969c39fb
MM
64452014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6446
6447 * target.h (target_ops) <read_btrace>: Change parameters and
6448 return type to allow error reporting.
6449 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6450 trace reading errors on.
6451 * linux-low.c (linux_low_read_btrace): Pass trace reading
6452 errors on.
6453 (linux_low_disable_btrace): New.
6454
ab7f45ba
DE
64552014-01-15 Doug Evans <dje@google.com>
6456
6457 * inferiors.c (thread_id_to_gdb_id): Delete.
6458 * inferiors.h (thread_id_to_gdb_id): Delete.
6459
66af0f44
EZ
64602014-01-13 Eli Zaretskii <eliz@gnu.org>
6461
6462 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6463 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6464 versions.
6465
9939e131
PA
64662014-01-08 Pedro Alves <palves@redhat.com>
6467
6468 * server.c (handle_status): Don't discard previous queued stop
6469 replies or thread's pending status here.
6470 (main) <disconnection>: Do it here instead.
6471
b7ea362b
PA
64722014-01-08 Pedro Alves <palves@redhat.com>
6473
6474 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6475 * server.c (visit_actioned_threads, handle_pending_status): New
6476 function.
6477 (handle_v_cont): Factor out parts to ...
6478 (resume): ... this new function. If in all-stop, and a thread
6479 being resumed has a pending status, report it without actually
6480 resuming.
6481 (myresume): Adjust to use the new 'resume' function.
6482 (clear_pending_status_callback, set_pending_status_callback)
6483 (find_status_pending_thread_callback): New functions.
6484 (handle_status): Handle the case of multiple threads having
6485 interesting statuses to report. Report threads' real last signal
6486 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6487 with an interesting thread to report the status for, instead of
6488 always reporting the status of the first thread.
6489
28498c42
JB
64902014-01-01 Joel Brobecker <brobecker@adacore.com>
6491
6492 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6493 * gdbreplay.c (gdbreplay_version): Likewise.
6494
f45c82da
YZ
64952013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6496
6497 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6498 iov.iov_len with the real length in use.
6499
379a5e2d
JB
65002013-12-13 Joel Brobecker <brobecker@adacore.com>
6501
6502 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6503 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6504 for all targets that use win32-low.c.
6505 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6506 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6507
4210d83e
PA
65082013-12-13 Pedro Alves <palves@redhat.com>
6509
6510 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6511 if equal to TARGET_WAITKIND_LOADED.
6512 * win32-low.c (cached_status): New static global.
6513 (win32_wait): Add declaration.
6514 (do_initial_child_stuff): Flush all initial pending debug events
6515 up to the initial breakpoint.
6516 (win32_wait): If CACHED_STATUS was set, return that instead
6517 of doing a real wait. Remove the code resuming the execution
6518 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6519 during the initial phase. Also remove the code changing
6520 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6521 TARGET_WAITKIND_STOPPED.
6522
e7f0d979
YQ
65232013-12-11 Yao Qi <yao@codesourcery.com>
6524
6525 * notif.c (handle_notif_ack): Return 0 if no notification
6526 matches.
6527
ebcf782c
DE
65282013-11-20 Doug Evans <dje@google.com>
6529
6530 * linux-low.c (linux_set_resume_request): Fix comment.
6531
20ad9378
DE
65322013-11-20 Doug Evans <dje@google.com>
6533
6534 * linux-low.c (resume_status_pending_p): Tweak comment.
6535
a196ebeb
WT
65362013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6537
6538 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6539 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6540 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6541 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6542 (srv_amd64_regobj): Add amd64-mpx.o.
6543 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6544 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6545 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6546 * i387-fp.c (num_pl_bnd_register) Added constant.
6547 (num_pl_bnd_cfg_registers) Added constant.
6548 (struct i387_xsave) Added reserved area and MPX fields.
6549 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6550 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6551 function.
6552 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6553 (init_registers_amd64_mpx_linux): Declare new function.
6554 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6555 (x86_64_regmap): Add MPX registers.
6556 (x86_linux_read_description): Add MPX case.
6557 (initialize_low_arch): Initialize MPX targets.
6558
0080a2f6
TT
65592013-11-18 Tom Tromey <tromey@redhat.com>
6560
6561 * configure: Rebuild.
6562 * configure.ac: Don't check for stdlib.h.
6563 * gdbreplay.c: Unconditionally include stdlib.h.
6564
2978b111
TT
65652013-11-18 Tom Tromey <tromey@redhat.com>
6566
6567 * config.in: Rebuild.
6568 * configure: Rebuild.
6569 * configure.ac: Don't use AC_HEADER_DIRENT.
6570
a3d08894
TT
65712013-11-18 Tom Tromey <tromey@redhat.com>
6572
6573 * server.h: Don't check HAVE_STRING_H.
6574 * gdbreplay.c: Don't check HAVE_STRING_H.
6575 * configure: Rebuild.
6576
0a5dd17d
TT
65772013-11-18 Tom Tromey <tromey@redhat.com>
6578
6579 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6580 LIBGNU.
6581
1bd2f0ba
TT
65822013-11-08 Tom Tromey <tromey@redhat.com>
6583
6584 * configure, config.in: Rebuild.
6585 * configure.ac: Remove unused configury.
6586
3266f10b
TT
65872013-11-08 Tom Tromey <tromey@redhat.com>
6588
6589 * acinclude.m4: Include common.m4, codeset.m4.
6590 * configure, config.in: Rebuild.
6591 * configure.ac: Use GDB_AC_COMMON.
6592
6682d959
AA
65932013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6594
6595 * linux-s390-low.c (HWCAP_S390_TE): New define.
6596 (s390_arch_setup): Consider the TE field in the HWCAP for
6597 determining 'have_regset_tdb'.
6598
fd0a4d76
SDJ
65992013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6600
6601 PR gdb/16014
6602 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6603 call to sizeof.
6604
1a3d890b
PA
66052013-10-02 Pedro Alves <palves@redhat.com>
6606
6607 * server.c (process_serial_event): Don't output "GDBserver
6608 exiting" if GDB is connected through stdio.
6609 * target.c (mywait): Likewise, be silent if GDB is connected
6610 through stdio.
6611
97ad4581
JB
66122013-10-01 Joel Brobecker <brobecker@adacore.com>
6613
6614 * lynx-low.c (lynx_add_threads_after_attach): New function.
6615 (lynx_attach): Remove call to add_thread. Add call to
6616 lynx_add_threads_after_attach instead.
6617
5b4e221c
MF
66182013-09-28 Mike Frysinger <vapier@gentoo.org>
6619
6620 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6621 * config.in, configure: Regenerated.
6622
ee47b2f8
YQ
66232013-09-18 Yao Qi <yao@codesourcery.com>
6624
6625 PR server/15959
6626 * server.c (start_inferior): Clear 'resume_info'.
6627
d6707650 66282013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6629
d6707650
JW
6630 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6631 for each register.
6632
9243dd0e 66332013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6634
9243dd0e
JW
6635 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6636 linux-tile-low.o to srv_tgtobj.
6637
c623a6ef
WN
66382013-09-16 Will Newton <will.newton@linaro.org>
6639
6640 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6641 out regs.
6642
fb71d39e
PA
66432013-09-06 Pedro Alves <palves@redhat.com>
6644
6645 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6646 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6647 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6648 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6649 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6650 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6651
8e7e9910
PA
66522013-09-06 Pedro Alves <palves@redhat.com>
6653
6654 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6655 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6656
7c3a12ca
PA
66572013-09-06 Pedro Alves <palves@redhat.com>
6658
6659 * linux-amd64-ipa.c: Include tracepoint.h.
6660 * linux-i386-ipa.c: Include tracepoint.h.
6661
8eb3d7b6
RW
66622013-09-06 Ricard Wanderlof <ricardw@axis.com>
6663
6664 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6665 (ps_get_thread_area): New function.
6666
eddddb9d
RW
66672013-09-06 Ricard Wanderlof <ricardw@axis.com>
6668
6669 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6670 (initialize_low_arch): Call init_registers_crisv32 rather than
6671 init_register_crisv32.
6672
533b0600
PA
66732013-09-05 Pedro Alves <palves@redhat.com>
6674
6675 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6676 to ...
6677 * hostio.h: ... this new file.
6678 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6679 win32-low.c: Include hostio.h.
6680
0ce3d3b5
PA
66812013-09-05 Pedro Alves <palves@redhat.com>
6682
6683 * server.h (gdb_client_data, handler_func, callback_handler_func)
6684 (delete_file_handler, add_file_handler, append_callback_event)
6685 (delete_callback_event, start_event_loop, initialize_event_loop):
6686 Move to event-loop.h and include it.
6687 * event-loop.h: New file.
6688
799cdc37
PA
66892013-09-05 Pedro Alves <palves@redhat.com>
6690
6691 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6692 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6693 (loaded_dll, unloaded_dll): Move to ...
6694 * dll.h: ... this new file.
6695 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6696
6a6bbd9d
PA
66972013-09-05 Pedro Alves <palves@redhat.com>
6698
6699 * server.h (current_process, get_thread_process, all_processes)
6700 (add_inferior_to_list, for_each_inferior, current_inferior)
6701 (remove_inferior, add_process, remove_process, find_process_pid)
6702 (have_started_inferiors_p, have_attached_inferiors_p)
6703 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6704 (clear_inferiors, find_inferior, find_inferior_id)
6705 (inferior_target_data, set_inferior_target_data)
6706 (inferior_regcache_data, set_inferior_regcache_data): Move to
6707 inferiors.h, and include it.
6708 * inferiors.h: New file.
6709
f699aaba
PA
67102013-09-05 Pedro Alves <palves@redhat.com>
6711
6712 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6713 Move ...
72f4393d 6714 * ax.h: ... here.
f699aaba 6715
c144c7a0
PA
67162013-09-05 Pedro Alves <palves@redhat.com>
6717
6718 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6719 tracepoint.h.
6720 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6721 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6722 (handle_tracepoint_general_set, handle_tracepoint_query)
6723 (tracepoint_finished_step, tracepoint_was_hit)
6724 (release_while_stepping_state_list, current_traceframe)
6725 (in_readonly_region, traceframe_read_mem)
6726 (fetch_traceframe_registers, traceframe_read_sdata)
6727 (traceframe_read_info, struct fast_tpoint_collect_status)
6728 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6729 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6730 (supply_fast_tracepoint_registers)
6731 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6732 (ipa_tdesc, claim_trampoline_space)
6733 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6734 (agent_mem_read, agent_get_trace_state_variable_value)
6735 (agent_set_trace_state_variable_value, agent_tsv_read)
6736 (agent_mem_read_string, get_raw_reg_func_addr)
6737 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6738 * tracepoint.h: ... this new file.
6739
ff42e6ab
PA
67402013-09-05 Pedro Alves <palves@redhat.com>
6741
6742 * server.h (perror_with_name, error, fatal, warning, paddress)
6743 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6744 include it.
6745 * utils.h: New file.
6746
541af0f4
PA
67472013-09-05 Pedro Alves <palves@redhat.com>
6748
6749 * server.h (remote_debug, noack_mode, transport_is_reliable)
6750 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6751 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6752 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6753 (write_enn, initialize_async_io, enable_async_io)
6754 (disable_async_io, check_remote_input_interrupt_request)
6755 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6756 (dead_thread_notify, prepare_resume_reply)
6757 (decode_address_to_semicolon, decode_address, decode_m_packet)
6758 (decode_M_packet, decode_X_packet, decode_xfer_write)
6759 (decode_search_memory_packet, unhexify, hexify)
6760 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6761 (look_up_one_symbol, relocate_instruction)
6762 (monitor_output): Move to remote-utils.h, and include it.
6763 * remote-utils.h: New file.
6764
eebdf26b
PA
67652013-09-05 Pedro Alves <palves@redhat.com>
6766
6767 * server.h (_): Delete.
6768
3aafd2ff
PA
67692013-09-02 Pedro Alves <palves@redhat.com>
6770
6771 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6772 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6773 allocated.
6774 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6775
cee83bcb
PM
67762013-09-02 Pierre Muller <muller@sourceware.org>
6777
6778 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6779 or WriteProcessMemory complete successfully and handle
6780 ERROR_PARTIAL_COPY error.
6781
9a13b2fa
PA
67822013-09-02 Pedro Alves <palves@redhat.com>
6783
6784 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6785 error instead of EIO.
6786
602e3198
JK
67872013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6788
6789 PR server/15604
6790 * linux-low.c: Include filestuff.h.
6791 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6792 * lynx-low.c: Include filestuff.h.
6793 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6794 * server.c: Include filestuff.h.
6795 (main): Call notice_open_fds.
6796 * spu-low.c: Include filestuff.h.
6797 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6798
96d7229d
LM
67992013-08-22 Luis Machado <lgustavo@codesourcery.com>
6800
6801 * Makefile.in: Explain why ../target and ../nat are not
6802 listed as include file search paths.
6803 (linux-waitpid.o): New object file rule.
6804 * configure.srv (srv_native_linux_obj): New variable.
6805 Replace all occurrences of linux native object files with
6806 $srv_native_linux_obj.
6807 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6808 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6809 (linux_enable_event_reporting): Remove declaration.
6810 (my_waitpid): Moved to common/linux-waitpid.c.
6811 (linux_wait_for_event): Pass ptid when calling
6812 linux_enable_event_reporting.
6813 (linux_supports_tracefork_flag): Remove.
6814 (linux_enable_event_reporting): Likewise.
6815 (linux_tracefork_grandchild): Remove.
6816 (STACK_SIZE): Moved to common/linux-ptrace.c.
6817 (linux_tracefork_child): Remove.
6818 (linux_test_for_tracefork): Remove.
6819 (linux_look_up_symbols): Call linux_supports_traceclone.
6820 (initialize_low): Remove call to linux_test_for_tracefork.
6821 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6822 common/linux-ptrace.h.
6823 (PTRACE_TYPE_ARG4): Likewise.
6824 Include linux-ptrace.h.
6825
32940073
PA
68262013-08-21 Pedro Alves <palves@redhat.com>
6827
6828 * config.in: Renegerate.
6829
33b60d58 68302013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6831
33b60d58
LM
6832 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6833 (SFILES): Remove $(srcdir)/common/target-common.c and
6834 add $(srcdir)/target/waitstatus.c.
6835 (OBS): Remove target-common.o and add waitstatus.o.
6836 (server_h): Remove $(srcdir)/../common/target-common.h and
6837 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6838 and $(srcdir)/../target/waitstatus.h.
6839 (target-common.o): Remove.
6840 (waitstatus.o): New target object file.
6841 * target.h: Do not include target-common.h and
6842 include target/resume.h, target/wait.h and
6843 target/waitstatus.h.
6844
b8e1b30e
LM
68452013-08-13 Luis Machado <lgustavo@codesourcery.com>
6846
6847 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6848 to PTRACE_TYPE_ARG3.
6849 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6850 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6851 PTRACE_TYPE_ARG4.
6852 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6853 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6854
7a60ad40
YQ
68552013-07-27 Jie Zhang <jie@codesourcery.com>
6856 Daniel Jacobowitz <dan@codesourcery.com>
6857 Yao Qi <yao@codesourcery.com>
6858
6859 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6860 (mips-linux-watch.o): New rule.
6861 (mips_linux_watch_h): New variable.
6862 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6863 srv_tgtobj.
6864 * linux-mips-low.c: Include mips-linux-watch.h.
6865 (struct arch_process_info, struct arch_lwp_info): New.
6866 (update_watch_registers_callback): New function.
6867 (mips_linux_new_process, mips_linux_new_thread) New functions.
6868 (mips_linux_prepare_to_resume, mips_insert_point): New
6869 functions.
6870 (mips_remove_point, mips_stopped_by_watchpoint): New
6871 functions.
6872 (rsp_bp_type_to_target_hw_bp_type): New function.
6873 (mips_stopped_data_address): New function.
6874 (the_low_target): Add watchpoint support functions.
6875
de6f69ad
YQ
68762013-07-27 Yao Qi <yao@codesourcery.com>
6877
6878 * i386-low.c: Include break-common.h.
6879 (enum target_hw_bp_type): Remove.
6880
3360c0bf
LM
68812013-07-24 Luis Machado <lgustavo@codesourcery.com>
6882
6883 * Makefile.in (SFILES): /common/target-common.c.
6884 (OBS): Add target-common.o.
6885 (server_h): Add $(srcdir)/../common/target-common.h.
6886 (target-common.o): New target.
6887 * server.c (queue_stop_reply_callback): Free
6888 status string after use.
6889 * target.c (target_waitstatus_to_string): Remove.
6890 * target.h: Include target-common.h.
6891 (resume_kind): Likewise.
6892 (target_waitkind): Likewise.
6893 (target_waitstatus): Likewise.
6894 (TARGET_WNOHANG): Likewise.
6895
bd885420
YQ
68962013-07-04 Yao Qi <yao@codesourcery.com>
6897
6898 * Makefile.in (host_alias): Use @host_noncanonical@.
6899 (target_alias): Use @target_noncanonical@.
6900 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6901 ACX_NONCANONICAL_HOST.
6902 * configure: Regenerated.
6903
6904 Revert:
6905 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6906
6907 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6908 * configure: Rebuild.
6909 * Makefile.in (version_host, version_target): Get from configure.
6910 (version.c): Use $(version_host) and $(version_target).
6911
17ef446e
PA
69122013-07-03 Pedro Alves <palves@redhat.com>
6913
6914 * Makefile.in (config.status): Depend on development.sh.
6915 * acinclude.m4: Include libmcheck.m4.
6916 * configure: Regenerate.
6917
7a9a7487
MG
69182013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6919
6920 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6921 attribute inside the parentheses.
6922 (winapi_DebugSetProcessKillOnExit): Ditto.
6923 (winapi_DebugBreakProcess): Ditto.
6924 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6925
49b64de6
MG
69262013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6927
6928 * notif.h (notif_event): Add a dummy member to avoid compiler
6929 errors.
6930
d5749ee7
PA
69312013-07-01 Pedro Alves <palves@redhat.com>
6932
6933 * hostio.c (HOSTIO_PATH_MAX): Define.
6934 (require_filename, handle_open, handle_unlink, handle_readlink):
6935 Use it.
6936
d8d2a3ee
PA
69372013-07-01 Pedro Alves <palves@redhat.com>
6938
6939 * server.h: Include "pathmax.h".
6940 * linux-low.c: Don't include sys/param.h.
6941 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6942 MAXPATHLEN.
6943 * win32-low.c: Don't include sys/param.h.
6944 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6945
bc7dea8d
PA
69462013-07-01 Pedro Alves <palves@redhat.com>
6947
6948 * event-loop.c: Don't check HAVE_UNISTD_H before including
6949 <unistd.h>.
6950 * gdbreplay.c: Likewise.
6951 * remote-utils.c: Likewise.
6952 * server.c: Likewise.
6953 * configure.ac: Don't check for unistd.h.
6954 * configure: Regenerate.
6955
d6c2da54
TT
69562013-06-28 Tom Tromey <tromey@redhat.com>
6957
6958 * Makefile.in (version.c): Use version.in, not
6959 common/version.in.
6960
257b6bec
MG
69612013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6962
6963 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6964 * configure: Rebuild.
6965 * Makefile.in (version_host, version_target): Get from configure.
6966 (version.c): Use $(version_host) and $(version_target).
6967
86ebe149
DK
69682013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6969
6970 Fix trace-status to output user name without trailing colon.
6971 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6972
f30aa5af
DK
69732013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6974
6975 Fix trace-status to output proper start-time and stop-time.
6976 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6977 output start time and stop time in hex as gdb expects.
6978
28a93511
YQ
69792013-06-26 Pedro Alves <pedro@codesourcery.com>
6980
6981 * tracepoint.c (build_traceframe_info_xml): Output trace state
6982 variables present in the trace buffer.
6983
01208463
TT
69842013-06-24 Tom Tromey <tromey@redhat.com>
6985
6986 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6987 create-version.sh.
6988 (version.o): Remove.
6989 * gdbreplay.c: Include version.h.
6990 (version, host_name): Don't declare.
6991 * server.h: Include version.h.
6992 (version, host_name): Don't declare.
6993
760256f9
PA
69942013-06-12 Pedro Alves <palves@redhat.com>
6995
6996 * linux-x86-low.c (linux_is_elf64): Delete global.
6997 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6998 with local linux_pid_exe_is_elf_64_file use.
6999
030031ee
PA
70002013-06-11 Pedro Alves <palves@redhat.com>
7001
7002 * linux-low.c (regset_disabled, disable_regset): New functions.
7003 (regsets_fetch_inferior_registers)
7004 (regsets_store_inferior_registers): Use them.
7005 (initialize_regsets_info); Don't allocate the disabled_regsets
7006 array here.
7007 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7008 comment.
7009
5da6eb0a
PA
70102013-06-11 Pedro Alves <palves@redhat.com>
7011
7012 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7013 xmalloc.
7014
7e5aaa09
PA
70152013-06-11 Pedro Alves <palves@redhat.com>
7016
7017 * linux-x86-low.c (initialize_low_arch): Call
7018 init_registers_x32_avx_linux.
7019
d878444c
JK
70202013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7021
7022 Fix compatibility with Android Bionic.
7023 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7024 it is not empty.
7025
3aee8918
PA
70262013-06-07 Pedro Alves <palves@redhat.com>
7027
5f2b57b5 7028 PR server/14823
3aee8918
PA
7029 * Makefile.in (OBS): Add tdesc.o.
7030 (IPA_OBJS): Add tdesc-ipa.o.
7031 (tdesc-ipa.o): New rule.
7032 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7033 interface.
7034 * linux-low.c (new_inferior): Delete.
7035 (disabled_regsets, num_regsets): Delete.
7036 (linux_add_process): Adjust to set the new per-process
7037 new_inferior flag.
7038 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7039 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7040 was a stop. When calling arch_setup, switch the current inferior
7041 to the thread that got an event.
7042 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7043 (regsets_fetch_inferior_registers)
7044 (regsets_store_inferior_registers): New regsets_info parameter.
7045 Adjust to use it.
7046 (linux_register_in_regsets): New regs_info parameter. Adjust to
7047 use it.
7048 (register_addr, fetch_register, store_register): New usrregs_info
7049 parameter. Adjust to use it.
7050 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7051 parameter regs_info. Adjust to use it.
7052 (linux_fetch_registers): Get the current inferior's regs_info, and
7053 adjust to use it.
7054 (linux_store_registers): Ditto.
7055 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7056 (initialize_low): Don't initialize the target_regsets here. Call
7057 initialize_low_arch.
7058 * linux-low.h (target_regsets): Delete declaration.
7059 (struct regsets_info): New.
7060 (struct usrregs_info): New.
7061 (struct regs_info): New.
7062 (struct process_info_private) <new_inferior>: New field.
7063 (struct linux_target_ops): Delete the num_regs, regmap, and
7064 regset_bitmap fields. New field regs_info.
7065 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7066 * i387-fp.c (num_xmm_registers): Delete.
7067 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7068 calls to new interface.
7069 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7070 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7071 Infer the number of xmm registers from the regcache's target
7072 description.
7073 * i387-fp.h (num_xmm_registers): Delete.
7074 * inferiors.c (add_thread): Don't install the thread's regcache
7075 here.
7076 * proc-service.c (gregset_info): Fetch the current inferior's
7077 regs_info. Adjust to use it.
7078 * regcache.c: Include tdesc.h.
7079 (register_bytes, reg_defs, num_registers)
7080 (gdbserver_expedite_regs): Delete.
7081 (get_thread_regcache): If the thread doesn't have a regcache yet,
7082 create one, instead of aborting gdbserver.
7083 (regcache_invalidate_one): Rename to ...
7084 (regcache_invalidate_thread): ... this.
7085 (regcache_invalidate_one): New.
7086 (regcache_invalidate): Only invalidate registers of the current
7087 process.
7088 (init_register_cache): Add target_desc parameter, and use it.
7089 (new_register_cache): Ditto. Assert the target description has a
7090 non zero registers_size.
7091 (regcache_cpy): Add assertions. Adjust.
7092 (realloc_register_cache, set_register_cache): Delete.
7093 (registers_to_string, registers_from_string): Adjust.
7094 (find_register_by_name, find_regno, find_register_by_number)
7095 (register_cache_size): Add target_desc parameter, and use it.
7096 (free_register_cache_thread, free_register_cache_thread_one)
7097 (regcache_release, register_cache_size): New.
7098 (register_size): Add target_desc parameter, and use it.
7099 (register_data, supply_register, supply_register_zeroed)
7100 (supply_regblock, supply_register_by_name, collect_register)
7101 (collect_register_as_string, collect_register_by_name): Adjust.
7102 * regcache.h (struct target_desc): Forward declare.
7103 (struct regcache) <tdesc>: New field.
7104 (init_register_cache, new_register_cache): Add target_desc
7105 parameter.
7106 (regcache_invalidate_thread): Declare.
7107 (regcache_invalidate_one): Delete declaration.
7108 (regcache_release): Declare.
7109 (find_register_by_number, register_cache_size, register_size)
7110 (find_regno): Add target_desc parameter.
7111 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7112 declarations.
7113 * remote-utils.c: Include tdesc.h.
7114 (outreg, prepare_resume_reply): Adjust.
7115 * server.c: Include tdesc.h.
7116 (gdbserver_xmltarget): Delete declaration.
7117 (get_features_xml, process_serial_event): Adjust.
7118 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7119 declare.
7120 (struct process_info) <tdesc>: New field.
7121 (ipa_tdesc): Declare.
7122 * tdesc.c: New file.
7123 * tdesc.h: New file.
7124 * tracepoint.c: Include tdesc.h.
7125 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7126 (get_context_regcache): Adjust to pass ipa_tdesc down.
7127 (do_action_at_tracepoint): Adjust to get the register cache size
7128 from the context regcache's description.
7129 (traceframe_walk_blocks): Adjust to get the register cache size
7130 from the current trace frame's description.
7131 (traceframe_get_pc): Adjust to get current trace frame's
7132 description and pass it down.
7133 (gdb_collect): Adjust to get the register cache size from the
7134 IPA's description.
7135 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7136 (gdbserver_xmltarget): Delete.
7137 (initialize_low_tracepoint): Set the ipa's target description.
7138 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7139 (initialize_low_tracepoint): Set the ipa's target description.
7140 * linux-x86-low.c: Include tdesc.h.
7141 [__x86_64__] (is_64bit_tdesc): New.
7142 (ps_get_thread_area, x86_get_thread_area): Use it.
7143 (i386_cannot_store_register): Rename to ...
7144 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7145 (i386_cannot_fetch_register): Rename to ...
7146 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7147 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7148 to new interface.
7149 (target_regsets): Rename to ...
7150 (x86_regsets): ... this.
7151 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7152 interface.
7153 (x86_siginfo_fixup): Use is_64bit_tdesc.
7154 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7155 (tdesc_x32_avx_linux, tdesc_x32_linux)
7156 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7157 Declare.
7158 (x86_linux_update_xmltarget): Delete.
7159 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7160 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7161 (AMD64_LINUX_USER64_CS): New.
7162 (x86_linux_read_description): New, based on
7163 x86_linux_update_xmltarget.
7164 (same_process_callback): New.
7165 (x86_arch_setup_process_callback): New.
7166 (x86_linux_update_xmltarget): New.
7167 (x86_regsets_info): New.
7168 (amd64_linux_regs_info): New.
7169 (i386_linux_usrregs_info): New.
7170 (i386_linux_regs_info): New.
7171 (x86_linux_regs_info): New.
7172 (x86_arch_setup): Reimplement.
7173 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7174 (x86_emit_ops): Ditto.
7175 (the_low_target): Adjust. Install x86_linux_regs_info,
7176 x86_cannot_fetch_register, and x86_cannot_store_register.
7177 (initialize_low_arch): New.
7178 * linux-ia64-low.c (tdesc_ia64): Declare.
7179 (ia64_fetch_register): Adjust.
7180 (ia64_usrregs_info, regs_info): New globals.
7181 (ia64_regs_info): New function.
7182 (the_low_target): Adjust.
7183 (initialize_low_arch): New function.
7184 * linux-sparc-low.c (tdesc_sparc64): Declare.
7185 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7186 Adjust.
7187 (sparc_arch_setup): New function.
7188 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7189 (the_low_target): Adjust.
7190 (initialize_low_arch): New function.
7191 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7192 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7193 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7194 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7195 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7196 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7197 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7198 (tdesc_powerpc_isa205_vsx64l): Declare.
7199 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7200 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7201 (ppc_set_pc, ppc_get_hwcap): Adjust.
7202 (ppc_usrregs_info): Forward declare.
7203 (!__powerpc64__) ppc_regmap_adjusted: New global.
7204 (ppc_arch_setup): Adjust to the current process'es target
7205 description.
7206 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7207 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7208 (ppc_store_evrregset): Adjust.
7209 (target_regsets): Rename to ...
7210 (ppc_regsets): ... this, and make static.
7211 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7212 (ppc_regs_info): New function.
7213 (the_low_target): Adjust.
7214 (initialize_low_arch): New function.
7215 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7216 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7217 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7218 (tdesc_s390x_linux64v2): Declare.
7219 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7220 (s390_fill_gregset, s390_store_last_break): Adjust.
7221 (target_regsets): Rename to ...
7222 (s390_regsets): ... this, and make static.
7223 (s390_get_pc, s390_set_pc): Adjust.
7224 (s390_get_hwcap): New target_desc parameter, and use it.
7225 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7226 (s390_arch_setup): Adjust to set the current process'es target
7227 description. Don't adjust the regmap.
7228 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7229 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7230 (regs_info_3264): New globals.
7231 (s390_regs_info): New function.
7232 (the_low_target): Adjust.
7233 (initialize_low_arch): New function.
7234 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7235 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7236 [__mips64] (init_registers_mips_linux)
7237 (init_registers_mips_dsp_linux): Delete defines.
7238 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7239 (have_dsp): New global.
7240 (mips_read_description): New, based on mips_arch_setup.
7241 (mips_arch_setup): Reimplement.
7242 (get_usrregs_info): New function.
7243 (mips_cannot_fetch_register, mips_cannot_store_register)
7244 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7245 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7246 (target_regsets): Rename to ...
7247 (mips_regsets): ... this, and make static.
7248 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7249 (dsp_regs_info, regs_info): New globals.
7250 (mips_regs_info): New function.
7251 (the_low_target): Adjust.
7252 (initialize_low_arch): New function.
7253 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7254 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7255 Declare.
7256 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7257 (arm_read_description): New, with bits factored from
7258 arm_arch_setup.
7259 (arm_arch_setup): Reimplement.
7260 (target_regsets): Rename to ...
7261 (arm_regsets): ... this, and make static.
7262 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7263 (arm_regs_info): New function.
7264 (the_low_target): Adjust.
7265 (initialize_low_arch): New function.
7266 * linux-m68k-low.c (tdesc_m68k): Declare.
7267 (target_regsets): Rename to ...
7268 (m68k_regsets): ... this, and make static.
7269 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7270 (m68k_regs_info): New function.
7271 (m68k_arch_setup): New function.
7272 (the_low_target): Adjust.
7273 (initialize_low_arch): New function.
7274 * linux-sh-low.c (tdesc_sharch): Declare.
7275 (target_regsets): Rename to ...
7276 (sh_regsets): ... this, and make static.
7277 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7278 (sh_regs_info, sh_arch_setup): New functions.
7279 (the_low_target): Adjust.
7280 (initialize_low_arch): New function.
7281 * linux-bfin-low.c (tdesc_bfin): Declare.
7282 (bfin_arch_setup): New function.
7283 (bfin_usrregs_info, regs_info): New globals.
7284 (bfin_regs_info): New function.
7285 (the_low_target): Adjust.
7286 (initialize_low_arch): New function.
7287 * linux-cris-low.c (tdesc_cris): Declare.
7288 (cris_arch_setup): New function.
7289 (cris_usrregs_info, regs_info): New globals.
7290 (cris_regs_info): New function.
7291 (the_low_target): Adjust.
7292 (initialize_low_arch): New function.
7293 * linux-cris-low.c (tdesc_crisv32): Declare.
7294 (cris_arch_setup): New function.
7295 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7296 (cris_regs_info): New function.
7297 (the_low_target): Adjust.
7298 (initialize_low_arch): New function.
7299 * linux-m32r-low.c (tdesc_m32r): Declare.
7300 (m32r_arch_setup): New function.
7301 (m32r_usrregs_info, regs_info): New globals.
7302 (m32r_regs_info): Adjust.
7303 (initialize_low_arch): New function.
7304 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7305 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7306 (tic6x_usrregs_info): Forward declare.
7307 (tic6x_read_description): New function, based on ...
7308 (tic6x_arch_setup): ... this. Reimplement.
7309 (target_regsets): Rename to ...
7310 (tic6x_regsets): ... this, and make static.
7311 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7312 (tic6x_regs_info): New function.
7313 (the_low_target): Adjust.
7314 (initialize_low_arch): New function.
7315 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7316 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7317 (target_regsets): Rename to ...
7318 (xtensa_regsets): ... this, and make static.
7319 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7320 globals.
7321 (xtensa_arch_setup, xtensa_regs_info): New functions.
7322 (the_low_target): Adjust.
7323 (initialize_low_arch): New function.
7324 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7325 (nios2_arch_setup): Set the current process'es tdesc.
7326 (target_regsets): Rename to ...
7327 (nios2_regsets): ... this.
7328 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7329 (nios2_regs_info): New function.
7330 (the_low_target): Adjust.
7331 (initialize_low_arch): New function.
a261b8f5
PA
7332 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7333 (aarch64_arch_setup): Set the current process'es tdesc.
7334 (target_regsets): Rename to ...
7335 (aarch64_regsets): ... this.
7336 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7337 (aarch64_regs_info): New function.
7338 (the_low_target): Adjust.
7339 (initialize_low_arch): New function.
3aee8918
PA
7340 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7341 globals.
7342 (target_regsets): Rename to ...
7343 (tile_regsets): ... this.
7344 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7345 (tile_regs_info): New function.
7346 (tile_arch_setup): Set the current process'es tdesc.
7347 (the_low_target): Adjust.
7348 (initialize_low_arch): New function.
7349 * spu-low.c (tdesc_spu): Declare.
7350 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7351 * win32-arm-low.c (tdesc_arm): Declare.
7352 (arm_arch_setup): New function.
7353 (the_low_target): Install arm_arch_setup instead of
7354 init_registers_arm.
7355 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7356 (init_windows_x86): Rename to ...
7357 (i386_arch_setup): ... this. Set `win32_tdesc'.
7358 (the_low_target): Adjust.
7359 * win32-low.c (win32_tdesc): New global.
7360 (child_add_thread): Don't create the thread cache here.
7361 (do_initial_child_stuff): Set the new process'es tdesc.
7362 * win32-low.h (struct target_desc): Forward declare.
7363 (win32_tdesc): Declare.
7364 * lynx-i386-low.c (tdesc_i386): Declare global.
7365 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7366 * lynx-low.c (lynx_tdesc): New global.
7367 (lynx_add_process): Set the new process'es tdesc.
7368 * lynx-low.h (struct target_desc): Forward declare.
7369 (lynx_tdesc): Declare global.
7370 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7371 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7372 * nto-low.c (nto_tdesc): New global.
7373 (do_attach): Set the new process'es tdesc.
7374 * nto-low.h (struct target_desc): Forward declare.
7375 (nto_tdesc): Declare.
7376 * nto-x86-low.c (tdesc_i386): Declare.
7377 (nto_x86_arch_setup): Set `nto_tdesc'.
7378
b1fbec62
GB
73792013-06-04 Gary Benson <gbenson@redhat.com>
7380
7381 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7382 to qSupported response when appropriate.
7383 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7384 with nonzero-length annex.
7385 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7386 arguments supplied in annex.
7387
d1ec4ce7
DE
73882013-05-31 Doug Evans <dje@google.com>
7389
ac44adcb 7390 PR server/15594
d1ec4ce7
DE
7391 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7392 64 bits in 64-cross-32 environment.
7393
9b25f2d3
PA
73942013-05-28 Pedro Alves <palves@redhat.com>
7395
7396 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7397 (aarch64-without-fpu.c): Delete rule.
7398 * configure.srv (aarch64*-*-linux*): Remove references to
7399 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7400 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7401 declaration.
7402
6740dc9c
PA
74032013-05-24 Pedro Alves <palves@redhat.com>
7404
7405 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7406 instead of strchr/decode_address. Error if the range isn't split
7407 with a ','. Don't assume there's be a ':' in the action.
7408
c2d6af84
PA
74092013-05-23 Yao Qi <yao@codesourcery.com>
7410 Pedro Alves <palves@redhat.com>
7411
7412 * linux-low.c (lwp_in_step_range): New function.
7413 (linux_wait_1): If the thread was range stepping and stopped
7414 outside the stepping range, report the stop to GDB. Otherwise,
7415 continue stepping. Add range stepping debug output.
7416 (linux_set_resume_request): Copy the step range from the resume
7417 request to the lwp.
7418 (linux_supports_range_stepping): New.
7419 (linux_target_ops) <supports_range_stepping>: Set to
7420 linux_supports_range_stepping.
7421 * linux-low.h (struct linux_target_ops)
7422 <supports_range_stepping>: New field.
7423 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7424 * linux-x86-low.c (x86_supports_range_stepping): New.
7425 (the_low_target) <supports_range_stepping>: Set to
7426 x86_supports_range_stepping.
7427 * server.c (handle_v_cont): Handle 'r' action.
7428 (handle_v_requests): Append ";r" if the target supports range
7429 stepping.
7430 * target.h (struct thread_resume) <step_range_start,
7431 step_range_end>: New fields.
7432 (struct target_ops) <supports_range_stepping>:
7433 New field.
7434 (target_supports_range_stepping): New macro.
7435
58794e1a
JB
74362013-05-17 Joel Brobecker <brobecker@adacore.com>
7437
7438 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7439 confusion in comment.
7440
d631c5a7
JB
74412013-05-17 Joel Brobecker <brobecker@adacore.com>
7442
7443 * lynx-low.c (struct process_info_private): New type.
7444 (lynx_add_process): New function.
7445 (lynx_create_inferior, lynx_attach): Replace calls to
7446 add_process by calls to lynx_add_process.
7447 (lynx_resume): If PTID is null, then try using
7448 current_process()->private->last_wait_event_ptid.
7449 Add comments.
7450 (lynx_clear_inferiors): Delete. The contents of that function
7451 has been inlined in lynx_mourn;
7452 (lynx_wait_1): Save the ptid in the process's private data.
7453 (lynx_mourn): Free the process' private data. Replace call
7454 to lynx_clear_inferiors by call to clear_inferiors.
7455
96f7a20f
YQ
74562013-05-17 Yao Qi <yao@codesourcery.com>
7457
7458 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7459 the right place.
7460
db0dfaa0
LM
74612013-05-16 Luis Machado <lgustavo@codesourcery.com>
7462
7463 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7464 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7465 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7466 PT_TEXT_END_ADDR guards. Update comments.
7467 (linux_target_op) <read_offsets>: Conditionally define to
7468 linux_read_offsets if the target is UCLIBC and if it defines
7469 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7470
68f5f838
SL
74712013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7472 Andrew Jenner <andrew@codesourcery.com>
7473
7474 * Makefile.in (SFILES): Add linux-nios2-low.c.
7475 (clean): Add action to delete nios2-linux.c.
7476 (nios2-linux.c): New rule.
7477 * configure.srv: Add nios2*-*-linux*.
7478 * linux-nios2-low.c: New.
7479
1ebff1fd
HAQ
74802013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7481
7482 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7483
f6150862
HZ
74842013-04-25 Hui Zhu <hui@codesourcery.com>
7485
7486 PR gdb/15186
f6150862
HZ
7487 * ax.c (ax_printf): Add fflush.
7488
614c279d
TT
74892013-04-22 Tom Tromey <tromey@redhat.com>
7490
7491 * Makefile.in (SFILES): Add filestuff.c.
7492 (OBS): Add filestuff.o.
7493 (filestuff.o): New target.
7494 * config.in, configure: Rebuild.
7495 * configure.ac: Check for fdwalk, pipe2.
7496
7d4e5717
PA
74972013-04-17 Pedro Alves <palves@redhat.com>
7498
7499 * configure.ac (USE_THREAD_DB): Delete variable.
7500 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7501 Don't AC_SUBST USE_THREAD_DB.
7502 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7503 * config.in, configure: Regenerate.
7504
d5c93e41
PA
75052013-04-16 Pedro Alves <palves@redhat.com>
7506
7507 * linux-low.h (struct lwp_info) <thread_known>: Move under
7508 the USE_THREAD_DB #ifdef.
7509
04f5fe89
PA
75102013-04-16 Pedro Alves <palves@redhat.com>
7511
7512 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7513 (linux-low.o): Delete rule.
7514 * linux-low.h: Always include "gdb_thread_db.h" instead of
7515 conditionally including thread_db.h.
7516 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7517 HAVE_THREAD_DB_H.
7518
480b27bf
JK
75192013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7520
7521 * Makefile.in (install-only): Fix make install regression.
7522
43662968
JK
75232013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7524
7525 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7526 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7527 installation.
7528 * gdbserver.1: Remove.
7529
3e74e146
PA
75302013-03-22 Pedro Alves <palves@redhat.com>
7531
7532 * linux-low.c (handle_extended_wait): Don't call
7533 linux_enable_event_reporting.
7534
a8347a2a
TT
75352013-03-15 Tony Theodore <tonyt@logyst.com>
7536
7537 PR build/9098:
7538 * Makefile.in (SHELL): Use @SHELL@.
7539
eeb56fa7
SDJ
75402013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7541
7542 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7543 compiler warning.
7544
4fa7e2ff
JB
75452013-03-13 Joel Brobecker <brobecker@adacore.com>
7546
7547 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7548 Remove extraneous NULL element.
7549
8ddb1965
YQ
75502013-03-13 Yao Qi <yao@codesourcery.com>
7551
7552 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7553 'V' block in trace frame.
7554
9accd112
MM
75552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7556
7557 * target.h (struct target_ops): Add btrace ops.
7558 (target_supports_btrace): New macro.
7559 (target_enable_btrace): New macro.
7560 (target_disable_btrace): New macro.
7561 (target_read_btrace): New macro.
7562 * gdbthread.h (struct thread_info): Add btrace field.
7563 * server.c: Include btrace-common.h.
7564 (handle_btrace_general_set): New function.
7565 (handle_btrace_enable): New function.
7566 (handle_btrace_disable): New function.
7567 (handle_general_set): Call handle_btrace_general_set.
7568 (handle_qxfer_btrace): New function.
7569 (struct qxfer qxfer_packets[]): Add btrace entry.
7570 * inferiors.c (remove_thread): Disable btrace.
7571 * linux-low: Include linux-btrace.h.
7572 (linux_low_enable_btrace): New function.
7573 (linux_low_read_btrace): New function.
7574 (linux_target_ops): Add btrace ops.
7575 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7576 Add srv_linux_btrace=yes.
7577 (x86_64-*-linux*): Add linux-btrace.o.
7578 Add srv_linux_btrace=yes.
7579 * configure.ac: Define HAVE_LINUX_BTRACE.
7580 * config.in: Regenerated.
7581 * configure: Regenerated.
7582
5cc22e4c
MM
75832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7584
7585 * server.c (handle_qxfer): Preserve error message if -3 is
7586 returned.
7587 (qxfer): Document the -3 return value.
7588
7c97f91e
MM
75892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7590
7591 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7592 (linux_btrace_h): New variable.
7593 (linux-btrace.o): New rule.
7594
be9a119c 75952013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7596 Hafiz Abid Qadeer <abidh@codesourcery.com>
7597
7598 * tracepoint.c (trace_buffer_size): New global.
7599 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7600 (init_trace_buffer): Change to one-argument function. Allocate
7601 trace buffer memory.
7602 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7603 handle QTBuffer:size packet.
7604 (cmd_bigqtbuffer_size): New function.
7605 (initialize_tracepoint): Call init_trace_buffer with
7606 DEFAULT_TRACE_BUFFER_SIZE.
7607 * server.c (handle_query): Add QTBuffer:size in the
7608 supported packets.
7609
e64f7499
YQ
76102013-03-07 Yao Qi <yao@codesourcery.com>
7611
7612 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7613 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7614 of -1.
7615 (cmd_qtsp): Adjust condition. Do post increment.
7616 Set cur_action and cur_step_action back to 0.
7617
f0ae6fc3
PA
76182013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7619
7620 PR server/15236
7621 * linux-low.c (linux_write_memory): Return early success if LEN is
7622 zero.
7623
b5b0b0af
CV
76242013-03-05 Corinna Vinschen <vinschen@redhat.de>
7625
334ad4a8 7626 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7627
589bc927
TT
76282013-02-28 Tom Tromey <tromey@redhat.com>
7629
7630 * configure.ac: Invoke AC_SYS_LARGEFILE.
7631 * configure, config.in: Rebuild.
7632
dfe07582
CV
76332013-02-28 Corinna Vinschen <vinschen@redhat.com>
7634
7635 * win32-low.c: Throughout, fix format strings and casts of
7636 printf-like functions to avoid type related warnings on all
7637 platforms.
7638 (get_child_debug_event): Print dwDebugEventCode as hex since
7639 that's how it's usually documented.
7640
736cd585
YQ
76412013-02-28 Yao Qi <yao@codesourcery.com>
7642
7643 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7644 pulongest.
7645
e1f58301
JW
76462013-02-27 Jiong Wang <jiwang@tilera.com>
7647
7648 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7649 (reg-tilegx32.c): New rule.
7650 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7651 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7652 different register info initializer according to elf class.
7653 (init_registers_tilgx32): New function. The tilegx32 register info
7654 initializer.
7655 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7656 (tile_store_gregset): Likewise.
7657
d171ca78
YQ
76582013-02-27 Yao Qi <yao@codesourcery.com>
7659
7660 * server.c (process_point_options): Print debug message when
7661 debug_threads is true.
7662
282bbdf3
YQ
76632013-02-26 Yao Qi <yao@codesourcery.com>
7664
7665 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7666
aca22551
PA
76672013-02-19 Pedro Alves <palves@redhat.com>
7668 Kai Tietz <ktietz@redhat.com>
7669
7670 PR gdb/15161
7671
7672 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7673 instead of strtoul to extract address from packet.
7674 (process_serial_event) <'z'>: Likewise.
7675
4f3cee1c
YQ
76762013-02-18 Yao Qi <yao@codesourcery.com>
7677
7678 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7679
8e1d55a3
PA
76802013-02-14 Pedro Alves <palves@redhat.com>
7681
7682 Plug memory leak.
7683
7684 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7685 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7686
458820da
PA
76872013-02-14 Pedro Alves <palves@redhat.com>
7688
7689 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7690
baea0dae
PA
76912013-02-14 Pedro Alves <palves@redhat.com>
7692
7693 * tracepoint.c (save_string): Delete.
7694 (add_tracepoint_action): Use savestring instead of save_string.
7695
0b1afbb3
PA
76962013-02-12 Pedro Alves <palves@redhat.com>
7697
7698 * linux-xtensa-low.c: Ditto.
7699 * xtensa-xtregs.c: Ditto.
7700
8a4ac37e
PA
77012013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7702
7703 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7704 thread_db.
7705
148de6bb
MS
77062013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7707
7708 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7709 aarch64_num_wp_regs and aarch64_num_bp_regs to
7710 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7711
55fac6e0
MS
77122013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7713
7714 * linux-aarch64-low.c (ps_get_thread_area): Replace
7715 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7716
176eb98c
MS
77172013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7718 Marcus Shawcroft <marcus.shawcroft@arm.com>
7719 Nigel Stephens <nigel.stephens@arm.com>
7720 Yufeng Zhang <yufeng.zhang@arm.com>
7721
7722 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7723 (aarch64.c, aarch64-without-fpu.c): New targets.
7724 * configure.srv (aarch64*-*-linux*): New.
7725 * linux-aarch64-low.c: New file.
7726
56f7af9c
MS
77272013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7728
43aaf8b6 7729 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7730 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7731 (dequeue_one_deferred_signal, linux_resume_one_thread)
7732 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7733 (linux_tracefork_grandchild, linux_test_for_tracefork)
7734 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7735 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7736 where the argument is 0.
7737
60f662b0
YQ
77382013-01-25 Yao Qi <yao@codesourcery.com>
7739
7740 * event-loop.c: Include "queue.h".
7741 (gdb_event_p): New typedef.
7742 (struct gdb_event) <next_event>: Remove.
7743 (event_queue): Change to QUEUE(gdb_event_p).
7744 (async_queue_event): Remove.
7745 (gdb_event_xfree): New.
7746 (initialize_event_loop): New.
7747 (process_event): Use API from QUEUE.
7748 (wait_for_event): Likewise.
7749 * server.c (main): Call initialize_event_loop.
7750 * server.h (initialize_event_loop): Declare.
7751
5ae4861a
YQ
77522013-01-18 Yao Qi <yao@codesourcery.com>
7753
7754 * ax.h (struct eval_agent_expr_context): New.
7755 (gdb_eval_agent_expr): Update declaration.
7756 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7757 TFRAME. Add new argument CTX.
7758 * server.h (struct eval_agent_expr_context): Declare.
7759 (agent_mem_read, agent_tsv_read): Update declaration.
7760 (agent_mem_read_string): Likewise.
7761 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7762 (add_traceframe_block): Add new argument TPOINT.
7763 Increase TPOINT->traceframe_usage.
7764 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7765 eval_tracepoint_agent_expr.
7766 (condition_true_at_tracepoint): Likewise.
7767 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7768 (agent_mem_read_string, agent_tsv_read): Likewise.
7769
85e00e85
YQ
77702013-01-16 Yao Qi <yao@codesourcery.com>
7771
7772 * linux-low.c (linux_resume_one_lwp): Don't check
7773 'lwp->bp_reinsert != 0'.
7774
4039cf45
JB
77752013-01-07 Joel Brobecker <brobecker@adacore.com>
7776 Pedro Alves <palves@redhat.com>
7777
7778 * lynx-low.c (ptrace_request_to_str): Define a temporary
7779 macro and use it to simplify this function's implementation.
7780
9044dee2
JB
77812013-01-07 Joel Brobecker <brobecker@adacore.com>
7782
7783 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7784 sets errno.
7785
e6352c8f
JB
77862013-01-07 Joel Brobecker <brobecker@adacore.com>
7787
7788 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7789
50681a27
JB
77902013-01-07 Joel Brobecker <brobecker@adacore.com>
7791
7792 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7793
3f6e77ef
JB
77942013-01-07 Joel Brobecker <brobecker@adacore.com>
7795
7796 * lynx-low.c (lynx_resume): Use the resume_info parameter
7797 to determine the ptid for the lynx_ptrace call, unless
7798 it is equal to minus_one_ptid, in which case we use the
7799 ptid of the current_inferior.
7800 (lynx_wait_1): After having received a thread create/exit
7801 event, resume the inferior's execution using the signaling
7802 thread's ptid, rather than the old ptid.
7803
7fda33ae
JB
78042013-01-07 Joel Brobecker <brobecker@adacore.com>
7805
7806 * lynx-low.c (lynx_resume): Delete variable ret.
7807
b9786c74
JB
78082013-01-01 Joel Brobecker <brobecker@adacore.com>
7809
7810 * gdbreplay.c (gdbreplay_version): Update copyright year.
7811 * server.c (gdbserver_version): Likewise.
7812
8b93d60f
JB
78132012-12-17 Joel Brobecker <brobecker@adacore.com>
7814
7815 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7816 new thread.
7817
037335a7
JB
78182012-12-17 Joel Brobecker <brobecker@adacore.com>
7819
7820 * lynx-low.c (ptrace_request_to_str): Add handling for
7821 PTRACE_GETTRACESIG.
7822
52d4cbd8
JB
78232012-12-17 Joel Brobecker <brobecker@adacore.com>
7824
7825 * lynx-low.c (lynx_attach): Delete variable new_process.
7826
ab8f6ca9
JB
78272012-12-17 Joel Brobecker <brobecker@adacore.com>
7828
7829 * lynx-low.c (lynx_create_inferior): Delete variable
7830 new_process.
7831
78cbc024
JB
78322012-12-17 Joel Brobecker <brobecker@adacore.com>
7833
7834 * lynx-low.c (ptrace_request_to_str): Do not handle
7835 PTRACE_GETTHREADLIST if this macro does not exist.
7836
14a00470
YQ
78372012-12-15 Yao Qi <yao@codesourcery.com>
7838
7839 * Makefile.in (OBS): Add notif.o.
7840 * notif.c, notif.h: New.
7841 * server.c: Include "notif.h".
7842 (struct vstop_notif) <next>: Remove.
7843 <base>: New field.
7844 (queue_stop_reply): Update.
7845 (push_event, send_next_stop_reply): Remove.
7846 (discard_queued_stop_replies): Update.
7847 (notif_stop): New variable.
7848 (handle_v_stopped): Remove.
7849 (handle_v_requests): Don't call handle_v_stopped. Call
7850 handle_ack_notif instead.
7851 (queue_stop_reply_callback): Call notif_event_enque instead
7852 of queue_stop_reply.
7853 (handle_status): Don't call send_next_stop_reply, call
7854 notif_write_event instead.
7855 (kill_inferior_callback): Likewise.
7856 (detach_or_kill_inferior_callback): Likewise.
7857 (main): Call initialize_notif.
7858 (process_serial_event): Call QUEUE_is_empty.
7859 (handle_target_event): Call notif_push instead of push event.
7860 * server.h (push_event): Remove declaration.
7861
61c125b9
TT
78622012-12-10 Tom Tromey <tromey@redhat.com>
7863
7864 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7865 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7866 macros.
7867 (.c.o): Rewrite.
7868 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7869 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7870 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7871 (amd64-linux-ipa.o, ax.o): Rewrite.
7872 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7873 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7874 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7875 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7876 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7877 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7878 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7879 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7880 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7881 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7882 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7883 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7884 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7885 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7886 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7887 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7888 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7889 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7890 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7891 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7892 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7893 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7894 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7895 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7896 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7897 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7898 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7899 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7900 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7901 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7902 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7903 (reg-tilegx.o): Remove.
7904 (all_object_files): New macro.
7905 Include .deps files.
7906 * aclocal.m4, configure: Rebuild.
7907 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7908 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7909 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7910
e90e9ad9
TT
79112012-12-05 Tom Tromey <tromey@redhat.com>
7912
7913 PR gdb/14917:
7914 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7915
02d403bf 79162012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7917
7918 * configure.ac: Check for linux/perf_event.h.
7919 * config.in: Regenerated.
7920 * configure: Regenerated.
7921
0270a750
PA
79222012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7923
7924 * hostio.c (handle_readlink): Decrease buffer size
7925 parameter passed to readlink by one byte.
7926
8c29b58e
YQ
79272012-11-26 Yao Qi <yao@codesourcery.com>
7928
7929 * configure.ac (build_warnings): Append '-Wempty-body'.
7930 * configure: Regenerated.
7931 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7932 body.
7933
8bdce1ff
PM
79342012-11-15 Pierre Muller <muller@sourceware.org>
7935
7936 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7937 * config.in: Regenerate.
7938 * configure: Regenerate.
7939 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7940 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7941 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7942 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7943 header.
7944 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7945 instead of <sys/wait.h> header.
7946 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7947
02d403bf 79482012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7949
7950 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7951 (various make rules): Remove -DGDBSERVER
7952
fbd5db48
YQ
79532012-11-09 Yao Qi <yao@codesourcery.com>
7954
7955 * spu-low.c (current_ptid): Move it to ..
7956 * gdbthread.h: ... here. New.
7957 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7958 * server.c (myresume, process_serial_event): Likewise.
7959 * thread-db.c (thread_db_find_new_threads): Likewise.
7960 * tracepoint.c (run_inferior_command): Likewise.
7961
b3dc46ff
AB
79622012-10-01 Andrew Burgess <aburgess@broadcom.com>
7963
7964 * server.c (handle_search_memory_1): Include access length in
7965 warning message.
7966
07c04788
HPN
79672012-09-05 Michael Brandt <michael.brandt@axis.com>
7968
7969 * linux-crisv32-low.c: Fix compile errors.
7970
918d227b
YQ
79712012-09-04 Yao Qi <yao@codesourcery.com>
7972
7973 * tracepoint.c (cmd_qtsv): Adjust debug message.
7974 Don't check CUR_TPOINT.
7975
18c1b81a
YQ
79762012-08-28 Yao Qi <yao@codesourcery.com>
7977
7978 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7979 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7980 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7981 Remove declarations of xmalloc, xreallloc, xstrdup and
7982 freeargv.
7983 * Makefile.in (libiberty_h): New.
7984 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7985 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7986
dc82f37b
YQ
79872012-08-23 Yao Qi <yao@codesourcery.com>
7988
7989 * server.h: Remove declaration of 'xsnprintf'.
7990
406b1477
KS
79912012-08-22 Keith Seitz <keiths@redhat.com>
7992
7993 * server.h: Include build-gnulib-gbserver/config.h.
7994 * gdbreplay.c: Likewise.
7995
e6712ff1
DE
79962012-08-08 Doug Evans <dje@google.com>
7997
7998 * Makefile.in (SFILES): Add gdb_vecs.c.
7999 (OBS): Add gdb_vecs.o.
8000 (gdb_vecs_h, host_defs_h): New variables.
8001 (thread-db.o): Add $(gdb_vecs_h) dependency.
8002 (gdb_vecs.o): New rule.
8003 * thread-db.c: #include "gdb_vecs.h".
8004 (thread_db_load_search): Use a vector to iterate over path elements.
8005 Handle text appearing after "$pdir".
8006
8007 * configure.ac: Add check for strstr.
8008 * config.in: Regenerate.
8009 * configure: Regenerate.
8010
7c3270ae
UW
80112012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8012
8013 * hostio.c (handle_pread): If pread fails, fall back to attempting
8014 lseek/read.
8015 (handle_pwrite): Likewise for pwrite.
8016
b62e2b27
UW
80172012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8018
8019 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8020 between unsupported TYPE and unimplementable ADDR/LEN combination.
8021 (arm_insert_point): Act on new return value.
8022
78a99e91
PA
80232012-07-31 Pedro Alves <palves@redhat.com>
8024
8025 * server.c (process_point_options): Only skip tokens if we find
8026 one that is unrecognized. Don't treat 'X' specially while
8027 skipping unrecognized tokens.
8028
fcf303ab
UW
80292012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8030
8031 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8032 to 4-byte-align HW breakpoint addresses for Thumb.
8033
7255706c
YQ
80342012-07-27 Yao Qi <yao@codesourcery.com>
8035
8036 PR remote/14161.
8037
8038 * server.h: Declare gdb_agent_about_to_close.
8039 * target.c (kill_inferior): Include "agent.h".
8040 New. Send command 'kill'.
8041 * target.h (kill_inferior): Removed macro.
8042 * tracepoint.c (gdb_agent_about_to_close): New.
8043 (gdb_agent_helper_thread): Handle command 'close'.
8044 Wait endlessly until the inferior stops.
8045 Install gdb_agent_remove_socket to atexit hook.
8046 (agent_socket_name): New static variable.
8047 (gdb_agent_socket_init): Replace local variable 'name' with
8048 'agent_socket_name'.
8049 (gdb_agent_remove_socket): New.
8050
5a3f286f
YQ
80512012-07-27 Yao Qi <yao@codesourcery.com>
8052
8053 * server.c (process_point_options): Stop at 'X' when parsing.
8054
961bd387
ME
80552012-07-19 Michael Eager <eager@eagercon.com>
8056
a261b8f5 8057 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8058 to hw_execute.
8059 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8060 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8061 hardware breakpoint.
8062
aa7c7447
JK
80632012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8064
8065 * gdbserver/linux-low.c (initialize_low): Call
8066 linux_ptrace_init_warnings.
8067
7f216e7c
DE
80682012-07-02 Doug Evans <dje@google.com>
8069
8070 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8071 pointer to int.
8072
d3ce09f5
SS
80732012-07-02 Stan Shebs <stan@codesourcery.com>
8074
8075 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8076 (ax.o): Add it to build rule.
8077 (ax-ipa.o): Ditto.
8078 (OBS): Add format.o.
8079 (IPA_OBS): Add format.o.
8080 * server.c (handle_query): Claim support for breakpoint commands.
8081 (process_point_options): Add command case.
8082 (process_serial_event): Leave running if there are printfs in
8083 effect.
8084 * mem-break.h (any_persistent_commands): Declare.
8085 (add_breakpoint_commands): Declare.
8086 (gdb_no_commands_at_breakpoint): Declare.
8087 (run_breakpoint_commands): Declare.
8088 * mem-break.c (struct point_command_list): New struct.
8089 (struct breakpoint): New field command_list.
8090 (any_persistent_commands): New function.
8091 (add_commands_to_breakpoint): New function.
8092 (add_breakpoint_commands): New function.
8093 (gdb_no_commands_at_breakpoint): New function.
8094 (run_breakpoint_commands): New function.
8095 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8096 locally.
8097 * ax.c: Include format.h.
8098 (ax_printf): New function.
8099 (gdb_eval_agent_expr): Add printf opcode.
8100
2f8f6aed
YQ
81012012-06-13 Yao Qi <yao@codesourcery.com>
8102
8103 * server.c (start_inferior): Remove duplicated writes to fields
8104 'last_resume_kind' and 'last_status' of 'current_inferior'.
8105
0c9070b3
YQ
81062012-06-12 Yao Qi <yao@codesourcery.com>
8107 Pedro Alves <palves@redhat.com>
8108
8109 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8110 comment.
8111 * server.c (handle_v_cont): Extend comment.
8112
c52daf70
YQ
81132012-06-11 Yao Qi <yao@codesourcery.com>
8114
8115 * linux-low.c (linux_attach): Add 'static'.
8116
d38bbb0a
YQ
81172012-06-06 Yao Qi <yao@codesourcery.com>
8118
8119 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8120
89dc0afd
JK
81212012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8122
8123 Fix gcc -flto compilation warning.
8124 * server.c (main): Make variable multi_mode and attach volatile.
8125
75f62ce7
TJB
81262012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8127
8128 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8129 if the platform doesn't know about it.
8130
65f479b6
PA
81312012-05-30 Jeff Kenton <jkenton@tilera.com>
8132
8133 * Makefile.in (SFILES): Add linux-tile-low.c.
8134 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8135 * configure.srv: Handle tilegx-*-linux*.
8136 * linux-tile-low.c: New file.
8137
0c5bf5a9
JK
81382012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8139
8140 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8141
a493e3e2
PA
81422012-05-24 Pedro Alves <palves@redhat.com>
8143
8144 PR gdb/7205
8145
43aaf8b6 8146 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8147
2ea28649
PA
81482012-05-24 Pedro Alves <palves@redhat.com>
8149
8150 PR gdb/7205
8151
8152 Replace target_signal with gdb_signal throughout.
8153
8d409d16
MR
81542012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8155
8156 * linux-low.c (linux_store_registers): Avoid the copying sequence
8157 when no data has been retrieved by ptrace.
8158
23512c01
MGD
81592012-05-22 Will Deacon <will.deacon@arm.com>
8160
8161 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8162 Include asm/ptrace.h.
8163 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8164 already defined.
8165
4934b29e
MR
81662012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8167
8168 * linux-low.c (linux_store_registers): Don't re-retrieve data
8169 with ptrace that has already been obtained from /proc. Always
8170 copy any data retrieved with ptrace to the buffer supplied.
8171
bde24c0a
PA
81722012-05-11 Yao Qi <yao@codesourcery.com>
8173 Pedro Alves <palves@redhat.com>
8174
8175 * linux-low.c (enum stopping_threads_kind): New.
8176 (stopping_threads): Change type to `enum stopping_threads_kind'.
8177 (handle_extended_wait): If stopping and suspending threads, leave
8178 the new_lwp suspended too.
8179 (linux_wait_for_event): Adjust.
8180 (stop_all_lwps): Set `stopping_threads' to
8181 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8182 whether we're suspending threads or just stopping them. Assert no
8183 recursion happens.
8184
623b6bdf
YQ
81852012-04-29 Yao Qi <yao@codesourcery.com>
8186
8187 * server.h: Move some code to ...
8188 * gdbthread.h: ... here. New.
8189 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8190 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8191 (nto-low.o, win32-low.o): Likewise.
8192 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8193 * regcache.c, remote-utils.c, server.c: Likewise.
8194 * target.c, tracepoint.c, win32-low.c: Likewise.
8195
f15f9948
TJB
81962012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8197
8198 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8199 (PTRACE_ARG4_TYPE): Likewise.
8200 (PTRACE_XFER_TYPE): Likewise.
8201 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8202 ptrace to PTRACE_ARG3_TYPE.
8203 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8204 (PTRACE_ARG4_TYPE): Likewise.
8205 (PTRACE_XFER_TYPE): Likewise.
8206 (linux_detach_one_lwp): Cast fourth argument of
8207 ptrace to long then PTRACE_ARG4_TYPE.
8208 (regsets_fetch_inferior_registers): Cast third argument of
8209 ptrace to long then PTRACE_ARG3_TYPE.
8210 (regsets_store_inferior_registers): Likewise.
8211
38ea300a
PA
82122012-04-20 Pedro Alves <palves@redhat.com>
8213
8214 * configure: Regenerate.
8215
c971b7fa
PA
82162012-04-19 Pedro Alves <palves@redhat.com>
8217
43aaf8b6 8218 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8219 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8220 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8221 (all, install-only, uninstall, clean-info, all-lib, clean): No
8222 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8223 (maintainer-clean realclean distclean): Use subdir_do.
8224 (subdir_do): New.
8225 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8226 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8227 * acinclude.m4: Include acx_configure_dir.m4.
8228 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8229 calls. Call AC_PROG_RANLIB. Configure gnulib using
8230 ACX_CONFIGURE_DIR.
8231 (GNULIB): New.
8232 (GNULIB_STDINT_H): Adjust.
8233 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8234 * gdbreplay.c: Include build-gnulib/config.h.
8235 * server.h: Likewise.
8236 * aclocal.m4: Regenerate.
8237 * config.in: Regenerate.
8238 * configure: Regenerate.
c971b7fa 8239
809277f8
PA
82402012-04-19 Pedro Alves <palves@redhat.com>
8241
8242 * Makefile.in (LIBGNU, INCGNU): Adjust.
8243 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8244 (all, install-only, uninstall, clean-info, all-lib, clean)
8245 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8246 * configure.ac: Adjust AC_OUTPUT output.
8247 * aclocal.m4: Regenerate.
8248 * configure: Regenerate.
8249
fd9bb8b8
PA
82502012-04-19 Pedro Alves <palves@redhat.com>
8251
8252 * Makefile.in (generated_files): New.
8253 (server_h): Remove the explicit dependency on config.h, and depend
8254 on $generated_files.
8255
1c298c66
PA
82562012-04-19 Pedro Alves <palves@redhat.com>
8257
8258 * Makefile.in (INCGNU): Add -Ignulib.
8259
57c4b50b
PA
82602012-04-19 Pedro Alves <palves@redhat.com>
8261
8262 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8263 (INCGNU): ... this, and spell out -I here.
8264 (GNULIB_LIB): Rename to ...
8265 (LIBGNU): ... this.
8266 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8267
1030e047
PA
82682012-04-19 Pedro Alves <palves@redhat.com>
8269
8270 * config.in: Regenerate.
8271
447d4319
PA
82722012-04-19 Pedro Alves <palves@redhat.com>
8273
8274 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8275 * server.h (memmem): Remove declaration.
8276 * config.in: Regenerate.
8277 * configure: Regenerate.
8278
aad9eab9
YQ
82792012-04-19 Yao Qi <yao@codesourcery.com>
8280
8281 * Makefile.in (SFILES): Add common/vec.c.
8282 (OBS): Add vec.o.
8283 (vec.o): New rule.
8284
3e10640f
YQ
82852012-04-19 Yao Qi <yao@codesourcery.com>
8286
8287 * remote-utils.c (prepare_resume_reply): Replace with macro
8288 target_core_of_thread.
8289 * server.c (handle_qxfer_threads_proper): Likewise.
8290 * target.h (traget_core_of_thread): New macro.
8291
71622373
PA
82922012-04-18 Pedro Alves <palves@redhat.com>
8293
8294 * aclocal.m4: Regenerate.
8295 * configure: Regenerate.
8296
80d26939
YQ
82972012-04-16 Yao Qi <yao@codesourcery.com>
8298
8299 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8300 duplicated on address.
8301
42476b70
YQ
83022012-04-16 Yao Qi <yao@codesourcery.com>
8303
8304 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8305 (struct tracepoint_action_ops) <send>: New field.
8306 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8307 (agent_expr_send, x_tracepoint_action_send): New.
8308 (l_tracepoint_action_send): New.
8309 (cmd_qtdp): Download and install tracepoint
8310 according to `use_agent'.
8311 (run_inferior_command): Add one more parameter `len'.
8312 Update callers.
8313 (tracepoint_send_agent): New.
8314 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8315
7bc83639
YQ
83162012-04-16 Yao Qi <yao@codesourcery.com>
8317
8318 * tracepoint.c (download_tracepoints): Moved to ...
8319 (cmd_qtstart): ... here.
8320
5f18041e
YQ
83212012-04-14 Yao Qi <yao@codesourcery.com>
8322
8323 * tracepoint.c: Include inttypes.h.
8324 (struct collect_memory_action): Use sized types.
8325 (struct tracepoint): Likewise.
8326 (cmd_qtdp, stop_tracing): Update print specifiers.
8327 (cmd_qtp, response_tracepoint): Likewise.
8328 (collect_data_at_tracepoint): Likewise.
8329 (collect_data_at_step): Likewise.
8330
55a8c076
YQ
83312012-04-14 Yao Qi <yao@codesourcery.com>
8332
8333 Import gnulib module inttypes.
8334 * aclocal.m4, config.in, configure: Regenerated.
8335
dc750257
YQ
83362012-04-14 Yao Qi <yao@codesourcery.com>
8337
8338 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8339 Makefile and config.status at last.
8340
0ab5faf9
YQ
83412012-04-13 Yao Qi <yao@codesourcery.com>
8342
8343 * tracepoint.c: Include stdint.h unconditionally.
8344
18f5fd81
TJB
83452012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8346
8347 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8348 on BFD_HAVE_SYS_PROCFS_TYPE.
8349 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8350 * configure: Regenerate.
8351 * config.in: Likewise.
8352
4d47af5c
L
83532012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8354
8355 * Makefile.in (clean): Also remove x32.c x32-linux.c
8356 x32-avx.c x32-avx-linux.c.
8357 (x32.o): New target.
8358 (x32.c): Likewise.
8359 (x32-linux.o): Likewise.
8360 (x32-linux.c): Likewise.
8361 (x32-avx.o): Likewise.
8362 (x32-avx.c): Likewise.
8363 (x32-avx-linux.o): Likewise.
8364 (x32-avx-linux.c): Likewise.
8365
8366 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8367 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8368 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8369 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8370 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8371 i386/x32-avx-linux.xml.
8372
8373 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8374 (init_registers_x32_avx_linux): Likwise.
8375 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8376 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8377
ecedbe58
PA
83782012-04-13 Pedro Alves <palves@redhat.com>
8379
8380 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8381 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8382 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8383 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8384 the sub-make.
8385
c92b5177
L
83862012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8387
8388 * linux-x86-low.c (compat_x32_clock_t): New.
8389 (compat_x32_siginfo_t): Likewise.
8390 (compat_x32_siginfo_from_siginfo): Likewise.
8391 (siginfo_from_compat_x32_siginfo): Likewise.
8392 (linux_is_elf64): Likewise.
8393 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8394 and siginfo_from_compat_x32_siginfo for x32.
8395 (x86_arch_setup): Set linux_is_elf64.
8396
214d508e
L
83972012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8398
8399 PR gdb/13969
8400 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8401 e_machine field.
8402 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8403 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8404 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8405 compatible with process.
8406
c9a1864a
YQ
84072012-04-12 Yao Qi <yao@codesourcery.com>
8408
8409 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8410 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8411 (install-only, install-info, clean): Handle sub dir gnulib.
8412 (all-lib, am--refresh): New targets.
8413 (memmem.o): Remove target.
8414 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8415 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8416 (AC_REPLACE_FUNCS): Remove memmem.
8417 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8418 (AC_OUTPUT): Generate Makefile in gnulib/.
8419 * aclocal.m4, config.in, configure: Regenerated.
8420
367ba2c2
MR
84212012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8422
8423 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8424
9d236627
PA
84252012-04-05 Pedro Alves <palves@redhat.com>
8426
8427 -Werror=strict-aliasing
8428
8429 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8430 pointer.
8431
111217b3
PA
84322012-04-04 Pedro Alves <palves@redhat.com>
8433
8434 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8435 (sparc_store_gregset_from_stack, sparc_store_gregset)
8436 (sparc_breakpoint_at): Fix formatting.
8437
8365dcf5
TJB
84382012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8439
8440 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8441 are available.
8442 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8443 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8444 * config.in: Regenerate.
8445 * configure: Likewise.
8446
689cc2ae
PA
84472012-03-29 Pedro Alves <palves@redhat.com>
8448
8449 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8450 Correct ptrace arguments.
8451
c14dfd32
PA
84522012-03-28 Pedro Alves <palves@redhat.com>
8453
8454 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8455 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8456 (IA64_FR1_REGNUM): New defines.
8457 (ia64_fetch_register): New.
8458 (the_low_target): Install it.
8459 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8460 field.
8461 * linux-low.c (linux_fetch_registers): Try the
8462 the_low_target.fetch_register hook first.
8463
8464 * linux-arm-low.c (the_low_target): Adjust.
8465 * linux-bfin-low.c (the_low_target): Adjust.
8466 * linux-cris-low.c (the_low_target): Adjust.
8467 * linux-crisv32-low.c (the_low_target): Adjust.
8468 * linux-m32r-low.c (the_low_target): Adjust.
8469 * linux-m68k-low.c (the_low_target): Adjust.
8470 * linux-mips-low.c (the_low_target): Adjust.
8471 * linux-ppc-low.c (the_low_target): Adjust.
8472 * linux-s390-low.c (the_low_target): Adjust.
8473 * linux-sh-low.c (the_low_target): Adjust.
8474 * linux-sparc-low.c (the_low_target): Adjust.
8475 * linux-tic6x-low.c (the_low_target): Adjust.
8476 * linux-x86-low.c (the_low_target): Adjust.
8477 * linux-xtensa-low.c (the_low_target): Adjust.
8478
63c88e13
PA
84792012-03-26 Pedro Alves <palves@redhat.com>
8480
8481 * server.c (handle_qxfer_libraries): Don't bail early if
8482 the_target->qxfer_libraries_svr4 is not NULL.
8483
fb723180
PA
84842012-03-26 Pedro Alves <palves@redhat.com>
8485
8486 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8487
0afae3cf
PA
84882012-03-23 Pedro Alves <palves@redhat.com>
8489
8490 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8491 "library-list-svr4" element's start tag when the the DSO list is
8492 empty.
8493
485f1ee4
PA
84942012-03-23 Pedro Alves <palves@redhat.com>
8495
8496 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8497 a variable whose type size is the same as the inferior's pointer
8498 size.
8499
a5362b9a
TS
85002012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8501
8502 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8503 struct siginfo.
8504 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8505 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8506 * linux-low.h: Include <signal.h>.
8507 (struct siginfo): Remove forward declaration.
8508 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8509 struct siginfo.
8510
d226c142
MF
85112012-03-21 Mike Frysinger <vapier@gentoo.org>
8512
8513 * .gitignore: Ignore more files.
8514
122f36ef
PA
85152012-03-19 Pedro Alves <palves@redhat.com>
8516 Jan Kratochvil <jan.kratochvil@redhat.com>
8517
8518 * server.c (cont_thread, general_thread): Add describing comments.
8519 (start_inferior): Clear `cont_thread'.
8520 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8521 of a process.
8522
fc3e5175
YQ
85232012-03-15 Yao Qi <yao@codesourcery.com>
8524
8525 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8526 handling to ...
8527 (cmd_qtdp): ... here.
8528
8d0d92cd
YQ
85292012-03-15 Yao Qi <yao@codesourcery.com>
8530
8531 * tracepoint.c (struct tracepoint_action_ops): New.
8532 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8533 (m_tracepoint_action_download): New.
8534 (r_tracepoint_action_download): New.
8535 (x_tracepoint_action_download): New.
8536 (l_tracepoint_action_download): New.
8537 (add_tracepoint_action): Install `action->ops' according type.
8538 (download_tracepoint_1): Move code `download' function pointer
8539 of various tracepoint_action_ops.
8540
87b0bb13
JK
85412012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8542
8543 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8544 linux_ptrace_attach_warnings.
8545
5f572dec
JK
85462012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8547
8548 * Makefile.in (linux-ptrace.o): New.
8549 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8550 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8551 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8552 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8553 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8554 of these targets.
8555 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8556
f4647387
YQ
85572012-03-08 Yao Qi <yao@codesourcery.com>
8558 Pedro Alves <palves@redhat.com>
8559
8560 Fix PR server/13392.
8561 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8562 offset of JMP insn.
8563 * tracepoint.c (remove_tracepoint): New.
8564 (cmd_qtdp): Call remove_tracepoint when failed to install.
8565
9b224c5e
PA
85662012-03-07 Pedro Alves <palves@redhat.com>
8567
8568 * linux-low.c (get_detach_signal): New.
8569 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8570 Pass on pending signals to PTRACE_DETACH. Check the result of the
8571 ptrace call.
8572 * server.c (program_signals, program_signals_p): New.
8573 (handle_general_set): Handle QProgramSignals.
8574 * server.h (program_signals, program_signals_p): Declare.
8575
e237a7e2
JK
85762012-03-05 Pedro Alves <palves@redhat.com>
8577 Jan Kratochvil <jan.kratochvil@redhat.com>
8578
8579 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8580 New comment why.
8581
5808517f
YQ
85822012-03-03 Yao Qi <yao@codesourcery.com>
8583
8584 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8585 agent_look_up_symbols.
8586
58b4daa5
YQ
85872012-03-03 Yao Qi <yao@codesourcery.com>
8588
8589 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8590 (linux-x86-low.o): Likewise.
8591 * server.h: Remove in_process_agent_loaded.
8592 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8593 common/agent.c.
8594 Update callers.
8595
8ffcbaaf
YQ
85962012-03-03 Yao Qi <yao@codesourcery.com>
8597
8598 * tracepoint.c (gdb_agent_capability): New global.
8599 (in_process_agent_loaded_ust): Renamed to
8600 `in_process_agent_supports_ust'.
8601 Update callers.
8602 (in_process_agent_supports_ust): Call agent_capability_check.
8603 (clear_installed_tracepoints): Assert that agent supports
8604 agent.
8605
d1feda86
YQ
86062012-03-03 Yao Qi <yao@codesourcery.com>
8607
8608 * linux-low.c (linux_supports_agent): New.
8609 (linux_target_ops): Initialize field `supports_agent' with
8610 linux_supports_agent.
8611 * target.h (struct target_ops) <supports_agent>: New.
8612 (target_supports_agent): New macro.
8613 * server.c (handle_general_set): Handle packet 'QAgent'.
8614 (handle_query): Send `QAgent+'.
8615 * Makefile.in (server.o): Depends on agent.h.
8616
2fa291ac
YQ
86172012-03-03 Yao Qi <yao@codesourcery.com>
8618
8619 * Makefile.in (OBS): Add agent.o.
8620 Add new rule for agent.o.
8621 Track dependence of tracepoint.c on agent.h.
8622 * tracepoint.c (run_inferior_command_1):
8623 (run_inferior_command): Call agent_run_command.
8624 (gdb_ust_connect_sync_socket): Deleted. Move it to
8625 common/agent.c.
8626 (resume_thread, stop_thread): Likewise.
8627 (gdb_ust_socket_init): Renamed to ...
8628 (gdb_agent_socket_init): ... New.
8629 (gdb_ust_thread): Renamed to ...
8630 (gdb_agent_helper_thread): ... New.
8631 (gdb_ust_init): Move some code to ...
8632 (gdb_agent_init): ... here. New.
8633 [HAVE_UST]: Call gdb_ust_init.
8634 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8635 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8636 * config.in, configure: Regenerated.
8637
05044653
PA
86382012-03-02 Pedro Alves <palves@redhat.com>
8639
8640 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8641 * linux-low.c (struct simple_pid_list): New.
8642 (stopped_pids): New a struct simple_pid_list pointer.
8643 (add_to_pid_list, pull_pid_from_list): New.
8644 (handle_extended_wait): Don't assume the first signal new children
8645 report is SIGSTOP. Adjust call to pull_pid_from_list.
8646 (linux_wait_for_lwp): Adjust.
8647
8d00225b
YQ
86482012-03-02 Yao Qi <yao@codesourcery.com>
8649
8650 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8651 debug log.
8652
19560ba5
YQ
86532012-03-02 Yao Qi <yao@codesourcery.com>
8654
8655 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8656 `stop_pc' and `tpoint'. Update caller.
8657
1faeff08
MR
86582012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8659
8660 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8661 * linux-low.c (use_linux_regsets): New macro.
8662 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8663 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8664 (linux_register_in_regsets): New function.
8665 (usr_fetch_inferior_registers): Skip registers covered by
8666 regsets.
8667 (usr_store_inferior_registers): Likewise.
8668 (usr_fetch_inferior_registers): New macro.
8669 (usr_store_inferior_registers): Likewise.
8670 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8671 (linux_store_registers): Likewise.
8672 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8673 prototype.
8674 (init_registers_mips64_dsp_linux): Likewise.
8675 (init_registers_mips_linux): New macro.
8676 (init_registers_mips_dsp_linux): Likewise.
8677 (mips_dsp_num_regs): Likewise.
8678 (DSP_BASE, DSP_CONTROL): New fallback macros.
8679 (mips_base_regs): New macro.
8680 (mips_regmap): Use it. Fix the size.
8681 (mips_dsp_regmap): New variable.
8682 (mips_dsp_regset_bitmap): Likewise.
8683 (mips_arch_setup): New function.
8684 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8685 than mips_regmap.
8686 (mips_cannot_store_register): Likewise.
8687 (the_low_target): Update .arch_setup, .num_regs and .regmap
8688 initializers. Add .regset_bitmap initializer.
8689 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8690 initializer.
8691 * linux-bfin-low.c (the_low_target): Likewise.
8692 * linux-cris-low.c (the_low_target): Likewise.
8693 * linux-crisv32-low.c (the_low_target): Likewise.
8694 * linux-ia64-low.c (the_low_target): Likewise.
8695 * linux-m32r-low.c (the_low_target): Likewise.
8696 * linux-m68k-low.c (the_low_target): Likewise.
8697 * linux-ppc-low.c (the_low_target): Likewise.
8698 * linux-s390-low.c (the_low_target): Likewise.
8699 * linux-sh-low.c (the_low_target): Likewise.
8700 * linux-sparc-low.c (the_low_target): Likewise.
8701 * linux-tic6x-low.c (the_low_target): Likewise.
8702 * linux-x86-low.c (the_low_target): Likewise.
8703 * linux-xtensa-low.c (the_low_target): Likewise.
8704 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8705 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8706 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8707 srv_xmlfiles.
8708 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8709 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8710
c03e6ccc
YQ
87112012-02-29 Yao Qi <yao@codesourcery.com>
8712 Pedro Alves <palves@redhat.com>
8713
8714 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8715 `step_over_finished' is true.
8716
644cebc9
PA
87172012-02-27 Pedro Alves <palves@redhat.com>
8718
8719 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8720 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8721
c14d7ab2
PA
87222012-02-27 Pedro Alves <palves@redhat.com>
8723
8724 PR server/9684
8725 * linux-low.c (pid_is_stopped): New.
8726 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8727
412c89dd
LM
87282012-02-25 Luis Machado <lgustavo@codesourcery.com>
8729
8730 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8731 of conditions.
8732
b745defe
MR
87332012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8734
8735 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8736
9f3a5c85
LM
87372012-02-24 Luis Machado <lgustavo@codesourcery>
8738
8739 * server.c (handle_query): Advertise support for target-side
8740 breakpoint condition evaluation.
8741 (process_point_options): New function.
8742 (process_serial_event): When inserting a breakpoint, check for
8743 a target-side condition that should be evaluated.
8744
8745 * mem-break.c: Include regcache.h and ax.h.
8746 (point_cond_list_t): New data structure.
8747 (breakpoint) <cond_list>: New field.
8748 (find_gdb_breakpoint_at): Make non-static.
8749 (delete_gdb_breakpoint_at): Clear any target-side
8750 conditions.
8751 (clear_gdb_breakpoint_conditions): New function.
8752 (add_condition_to_breakpoint): Likewise.
8753 (add_breakpoint_condition): Likewise.
8754 (gdb_condition_true_at_breakpoint): Likewise.
8755 (gdb_breakpoint_here): Return result directly instead
8756 of going through a local variable.
8757
8758 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8759 (clear_gdb_breakpoint_conditions): Likewise.
8760 (add_breakpoint_condition): Likewise.
8761 (gdb_condition_true_at_breakpoint): Likewise.
8762
8763 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8764 (need_step_over_p): Take target-side breakpoint condition into
8765 consideration.
8766
5e1dc496
LM
87672012-02-24 Luis Machado <lgustavo@codesourcery>
8768
8769 * server.h: Include tracepoint.h.
8770 (agent_mem_read, agent_get_trace_state_variable_value,
8771 agent_set_trace_state_variable_value,
8772 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8773 get_set_tsv_func_addr): New prototypes.
8774
8775 * ax.h: New include file.
8776 * ax.c: New source file.
8777
8778 * tracepoint.c: Include ax.h.
8779 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8780 agent_expr, eval_result_type): Move to ax.h.
8781 (parse_agent_expr): Rename to ...
8782 (gdb_parse_agent_expr): ... this, make it non-static and move
8783 to ax.h.
8784 (unparse_agent_expr) Rename to ...
8785 (gdb_unparse_agent_expr): ... this, make it non-static and move
8786 to ax.h.
8787 (eval_agent_expr): Rename to ...
8788 (eval_tracepoint_agent_expr): ... this.
8789 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8790 forward declarations.
8791 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8792 (agent_get_trace_state_variable_value): New function.
8793 (agent_set_trace_state_variable_value): New function.
8794 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8795 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8796 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8797 (condition_true_at_tracepoint): Likewise.
8798 (parse_agent_expr): Rename to ...
8799 (gdb_parse_agent_expr): ... this and move to ax.c.
8800 (unparse_agent_expr): Rename to ...
8801 (gdb_unparse_agent_expr): ... this and move to ax.c.
8802 (gdb_agent_op_name): Move to ax.c.
8803 (eval_agent_expr): Rename to ...
8804 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8805 and move to ax.c.
8806 (eval_tracepoint_agent_expr): New function.
8807 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8808 non-static.
5e1dc496
LM
8809 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8810 ax.c.
8811 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8812 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8813 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8814 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8815 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8816 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8817 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8818 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8819 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8820 (compile_bytecodes): Remove forward declaration.
8821 (is_goto_target): Move to ax.c.
8822 (compile_bytecodes): Move to ax.c and call
8823 agent_get_trace_state_variable_value (...) and
8824 agent_set_trace_state_variable_value (...).
8825
8826 * Makefile.in: Update ax.c and IPA dependencies.
8827
277e4e52
PA
88282012-02-24 Pedro Alves <palves@redhat.com>
8829
8830 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8831 (cmd_bigqtbuffer_circular): ... this. Only handle
8832 'QTBuffer:circular:'.
8833 (handle_tracepoint_general_set): Adjust.
8834
bf4c19f7
YQ
88352012-02-16 Yao Qi <yao@codesourcery.com>
8836
8837 * inferiors.c: Move code to ...
8838 * dll.c: .... here. New.
8839 * server.h: Declare clear_dlls.
8840 * Makefile.in (SFILES): Add dll.c.
8841 (OBS): Add dll.o
8842 (dll.o): New rule.
8843
d73f2619
YQ
88442012-02-11 Yao Qi <yao@codesourcery.com>
8845
8846 * server.c: (handle_monitor_command): Add a new parameter
8847 `own_buf'.
8848 (handle_query): Update caller.
8849
f8255c2a
JB
88502012-02-09 Joel Brobecker <brobecker@adacore.com>
8851
8852 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8853 * configure, config.in: Regenerate.
8854 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8855 is not defined.
8856
da84f473
PA
88572012-02-02 Pedro Alves <palves@redhat.com>
8858
8859 Try SIGKILL first, then PTRACE_KILL.
8860 * linux-low.c (linux_kill_one_lwp): New.
8861 (linux_kill_one_lwp): Rename to ...
8862 (kill_one_lwp_callback): ... this. Use the new
8863 linux_kill_one_lwp.
8864
e886a173
PA
88652012-02-02 Pedro Alves <palves@redhat.com>
8866
8867 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8868 inferior.
8869
be07f1a2
PA
88702012-01-27 Pedro Alves <palves@redhat.com>
8871
8872 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8873 (elf_64_file_p): Make static.
8874 (linux_pid_exe_is_elf_64_file): New.
8875 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8876 Delete declarations.
8877 (linux_pid_exe_is_elf_64_file): Declare.
8878 * linux-x86-low.c (x86_arch_setup): Use
8879 linux_pid_exe_is_elf_64_file.
8880
d8301ad1
JK
88812012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8882
8883 * linux-low.c (linux_wait_for_event_1): Rename to ...
8884 (linux_wait_for_event): ... here and merge it with former
8885 linux_wait_for_event - new variable wait_ptid, use it.
8886 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8887
01b17894
PA
88882012-01-23 Pedro Alves <palves@redhat.com>
8889
8890 * server.c (main): Avoid yet another case of infinite loop while
8891 detaching/killing after a longjmp.
8892
e825046f
JK
88932012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8894
8895 Code cleanup.
8896 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8897
b9e7b9c3
UW
88982012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8899
8900 * hostio.c (handle_readlink): New function.
8901 (handle_vFile): Call it to handle "vFile:readlink" packets.
8902
901f9912
UW
89032012-01-20 Pedro Alves <palves@redhat.com>
8904 Ulrich Weigand <ulrich.weigand@linaro.org>
8905
8906 * server.c (handle_v_requests): Only support vAttach and vRun to
8907 start multiple processes when in extended protocol mode.
8908
fc1ab1a0
PA
89092012-01-17 Pedro Alves <palves@redhat.com>
8910
8911 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8912 memalign plus mprotect to allocate the scratch buffer.
8913
7d5d4e98
PA
89142012-01-13 Pedro Alves <palves@redhat.com>
8915
8916 * server.c (attach_inferior): Clear `cont_thread'.
8917
f128d5e9
PA
89182012-01-13 Pedro Alves <palves@redhat.com>
8919
8920 * server.c (main): Avoid infinite loop while detaching/killing
8921 after a longjmp.
8922
06db92f0
DE
89232012-01-09 Doug Evans <dje@google.com>
8924
8925 * server.c (start_inferior): Set last_ptid in --wrapper case.
8926
32d92999
YQ
89272012-01-06 Yao Qi <yao@codesourcery.com>
8928
8929 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8930 defined.
8931 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8932
5e0a92a9
YQ
89332012-01-04 Yao Qi <yao@codesourcery.com>
8934
8935 * tracepoint.c (cmd_qtdp): Print debug message
8936 for static tracepoint.
8937
ae639e8c
YQ
89382012-01-04 Yao Qi <yao@codesourcery.com>
8939
8940 * tracepoint.c (trace_vdebug): Differentiate debug message
8941 between gdbserver and IPA.
8942
f72429c5
YQ
89432012-01-03 Yao Qi <yao@codesourcery.com>
8944
8945 * tracepoint.c (tracepoint_was_hit): Don't collect for
8946 static tracepoint.
8947
12c3e59c
JB
89482012-01-02 Joel Brobecker <brobecker@adacore.com>
8949
8950 * terminal.h: Reformat copyright header.
8951
67827812
JB
89522012-01-02 Joel Brobecker <brobecker@adacore.com>
8953
8954 * server.c (gdbserver_version): Update copyright year.
8955 * gdbreplay.c (gdbreplay_version): Likewise.
8956
3e52c33d
JK
89572011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8958
8959 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8960
8961 Revert:
8962 2011-12-18 Hui Zhu <teawater@gmail.com>
8963 * linux-low.c (linux_create_inferior): Save return value to ret.
8964
66f1260e
HZ
89652011-12-18 Hui Zhu <teawater@gmail.com>
8966
8967 * linux-low.c (linux_create_inferior): Save return value to ret.
8968
e77616d7
DE
89692011-12-16 Doug Evans <dje@google.com>
8970
e7b06c57
DE
8971 * linux-low.c (linux_create_inferior): If stdio connection,
8972 redirect stdin from /dev/null, stdout to stderr.
8973 * remote-utils.c (remote_is_stdio): New static global.
8974 (remote_connection_is_stdio): New function.
8975 (remote_prepare): Handle stdio connection.
8976 (remote_open): Ditto.
8977 (remote_close): Don't close stdin for stdio connections.
8978 (read_prim,write_prim): New functions. Replace all calls to
8979 read/write to these.
8980 * server.c (main): Watch for "-" argument. Move call to
8981 remote_prepare before start_inferior.
8982 * server.h (STDIO_CONNECTION_NAME): New macro.
8983 (remote_connection_is_stdio): Declare.
8984
e77616d7
DE
8985 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8986 in debugging output.
8987
82067193
YQ
89882011-12-15 Yao Qi <yao@codesourcery.com>
8989
8990 * tracepoint.c: Include sys/syscall.h.
8991 (gdb_ust_thread): Remove preprocessor conditional.
8992
82bfbe7e
PA
89932011-12-14 Pedro Alves <pedro@codesourcery.com>
8994
8995 * linux-low.c (linux_detach_one_lwp): Call
8996 the_low_target.prepare_to_resume before detaching.
8997
712c6575
YQ
89982011-12-14 Yao Qi <yao@codesourcery.com>
8999
9000 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9001 of write.
9002
d54d1edf
YQ
90032011-12-14 Yao Qi <yao@codesourcery.com>
9004
9005 * i386-low.c (i386_low_stopped_data_address): Initialize local
9006 variable `control'.
9007
6210a125
PA
90082011-12-13 Pedro Alves <pedro@codesourcery.com>
9009
9010 PR remote/13492
9011
9012 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9013 DR_CONTROL unless necessary. Extend comments.
9014 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9015 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9016
2ece8244
YQ
90172011-12-13 Yao Qi <yao@codesourcery.com>
9018
9019 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9020 macros.
9021 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9022
784867a5
JK
90232011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9024
9025 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9026 Print new debug message for such case.
9027
6bf36717
JK
90282011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9029
9030 Fix overlapping memcpy.
9031 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9032 the read_inferior_memory transfer.
9033 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9034 write_inferior_memory transfer.
9035 (set_fast_tracepoint_jump): New variable buf. Use it for the
9036 read_inferior_memory and write_inferior_memory transfers.
9037 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9038 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9039 Use it for the write_inferior_memory transfer.
9040 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9041 buffers.
9042
50275556
MR
90432011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9044
9045 * linux-low.c (fetch_register, store_register): Make code
9046 consistent, fix formatting.
9047
7325beb4
MR
90482011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9049
9050 * linux-low.c (usr_store_inferior_registers): Factor out code
9051 to handle individual registers into...
9052 (store_register): ... this new function.
9053
c642a434
UW
90542011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9055
9056 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9057 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9058 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9059 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9060 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9061 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9062 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9063 (srv_xmlfiles): Add new XML files.
9064
9065 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9066 and <sys/uio.h>.
9067 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9068 (init_registers_s390_linux32v1): Add prototype.
9069 (init_registers_s390_linux32v2): Likewise.
9070 (init_registers_s390_linux64v1): Likewise.
9071 (init_registers_s390_linux64v2): Likewise.
9072 (init_registers_s390x_linux64v1): Likewise.
9073 (init_registers_s390x_linux64v2): Likewise.
9074 (s390_num_regs): Increment to 52.
9075 (s390_regmap): Add orig_r2 register.
9076 (s390_num_regs_3264): Increment to 68.
9077 (s390_regmap_3264): Add orig_r2 register.
9078 (s390_collect_ptrace_register): Handle orig_r2 register.
9079 (s390_supply_ptrace_register): Likewise.
9080 (s390_fill_last_break): New function.
9081 (s390_store_last_break): Likewise.
9082 (s390_fill_system_call): New function.
9083 (s390_store_system_call): Likewise.
9084 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9085 register sets.
9086 (s390_check_regset): New function.
9087 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9088 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9089 Update target_regsets for available register sets.
9090
2268b414
JK
90912011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9092 Jan Kratochvil <jan.kratochvil@redhat.com>
9093
9094 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9095 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9096 New.
9097 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9098 * linux-low.h (struct process_info_private): New member r_debug.
9099 * server.c (handle_qxfer_libraries): Call
9100 the_target->qxfer_libraries_svr4.
9101 (handle_qxfer_libraries_svr4): New function.
9102 (qxfer_packets): New entry "libraries-svr4".
9103 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9104 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9105 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9106 PACKET_qXfer_libraries_svr4.
9107
d6db1fab
UW
91082011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9109
9110 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9111 PSW address/mask between 8-byte and 16-byte formats.
9112 (s390_supply_ptrace_register): Likewise.
9113 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9114 basic addressing mode bit.
9115
242f5f1c
SS
91162011-11-24 Stan Shebs <stan@codesourcery.com>
9117
9118 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9119
f196051f
SS
91202011-11-17 Stan Shebs <stan@codesourcery.com>
9121
9122 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9123 (tracing_start_time): New global.
9124 (tracing_stop_time): New global.
9125 (tracing_user_name): New global.
9126 (tracing_notes): New global.
9127 (tracing_stop_note): New global.
9128 (cmd_qtstart): Set traceframe_usage, start_time.
9129 (stop_tracing): Set stop_time.
9130 (cmd_qtstatus): Report additional status.
9131 (cmd_qtp): New function.
9132 (handle_tracepoint_query): Call it.
9133 (cmd_qtnotes): New function.
9134 (handle_tracepoint_general_set): Call it.
9135 (get_timestamp): Rename from tsv_get_timestamp.
9136
405f8e94
SS
91372011-11-14 Stan Shebs <stan@codesourcery.com>
9138 Kwok Cheung Yeung <kcy@codesourcery.com>
9139
9140 * linux-x86-low.c (small_jump_insn): New.
9141 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9142 trampoline and error message, build a trampoline and issue a small
9143 jump instruction to it.
9144 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9145 trampoline and error message.
9146 (x86_get_min_fast_tracepoint_insn_len): New.
9147 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9148 * linux-low.h (struct linux_target_ops): Add arguments to
9149 install_fast_tracepoint_jump_pad operation, add new operation.
9150 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9151 arguments.
9152 (linux_get_min_fast_tracepoint_insn_len): New function.
9153 (linux_target_op): Add new operation.
9154 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9155 (gdb_trampoline_buffer_end): Ditto.
9156 (gdb_trampoline_buffer_error): Ditto.
9157 (struct ipa_sym_addresses): Add fields for new IPA variables.
9158 (symbol_list): Add entries for new IPA variables.
9159 (struct tracepoint): Add fields to hold the address range of the
9160 trampoline used by the tracepoint.
9161 (trampoline_buffer_head): New static variable.
9162 (trampoline_buffer_tail): Ditto.
9163 (claim_trampoline_space): New function.
9164 (have_fast_tracepoint_trampoline_buffer): New function.
9165 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9166 structure.
9167 (install_fast_tracepoint): Ditto, also add error buffer argument.
9168 (cmd_qtminftpilen): New function.
9169 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9170 (fast_tracepoint_from_trampoline_address): New function.
9171 (fast_tracepoint_collecting): Handle trampoline as part of jump
9172 pad space.
9173 (set_trampoline_buffer_space): New function.
9174 (initialize_tracepoint): Initialize new IPA variables.
9175 * target.h (struct target_ops): Add arguments to
9176 install_fast_tracepoint_jump_pad operation, add new
9177 get_min_fast_tracepoint_insn_len operation.
9178 (target_get_min_fast_tracepoint_insn_len): New.
9179 (install_fast_tracepoint_jump_pad): Add arguments.
9180 * server.h (IPA_BUFSIZ): Define.
9181 * linux-i386-ipa.c: Include extra header files.
9182 (initialize_fast_tracepoint_trampoline_buffer): New function.
9183 (initialize_low_tracepoint): Call it.
9184 * server.h (set_trampoline_buffer_space): Declare.
9185 (claim_trampoline_space): Ditto.
9186 (have_fast_tracepoint_trampoline_buffer): Ditto.
9187
1e4d1764
YQ
91882011-11-14 Yao Qi <yao@codesourcery.com>
9189
9190 * server.c (handle_query): Handle InstallInTrace for qSupported.
9191 * tracepoint.c (add_tracepoint): Sort list.
9192 (install_tracepoint, download_tracepoint): New.
9193 (cmd_qtdp): Call them to install and download tracepoints.
9194 (sort_tracepoints): Removed.
9195 (cmd_qtstart): Update.
9196
5c73ff4e
YQ
91972011-11-14 Yao Qi <yao@codesourcery.com>
9198
9199 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9200 * mem-break.h: Declare.
9201 * tracepoint.c (cmd_qtstart): Move some code to ...
9202 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9203 New.
9204 (download_tracepoints): Move some code to ...
9205 (download_tracepoint_1): ... here. New.
9206
86a30030
YQ
92072011-11-08 Yao Qi <yao@codesourcery.com>
9208
9209 * remote-utils.c (relocate_instruction): A comment fix.
9210
8d26e50c
JB
92112011-11-07 Joel Brobecker <brobecker@adacore.com>
9212
9213 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9214 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9215 dr_status_mirror and dr_control_mirror from debug_reg_state.
9216 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9217 (i386_initial_stuff): Remove use of deleted globals.
9218 (i386_get_thread_context, i386_set_thread_context,
9219 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9220 from debug_reg_state.
9221
a59306a3
YQ
92222011-11-05 Yao Qi <yao@codesourcery.com>
9223
9224 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9225 address as TPOINT's.
9226
3065dfb6
SS
92272011-11-02 Stan Shebs <stan@codesourcery.com>
9228
9229 * tracepoint.c (agent_mem_read_string): New function.
9230 (eval_agent_expr): Call it for tracenz.
9231 * server.c (handle_query): Report support for tracenz.
9232
fd0d8c7c
YQ
92332011-11-02 Yao Qi <yao@codesourcery.com>
9234
9235 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9236
609086b1
YQ
92372011-11-02 Yao Qi <yao@codesourcery.com>
9238
9239 * target.h: Fix a typo in comment.
9240
b9fd1791
PA
92412011-10-31 Pedro Alves <pedro@codesourcery.com>
9242
9243 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9244 clobber the breakpoints' shadows with fast tracepoint jumps.
9245 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9246 * target.c (write_inferior_memory): Also pass MYADDR down to
9247 check_mem_write.
9248
03583c20
UW
92492011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9250
9251 * configure.ac: Check support for personality routine.
9252 * configure: Regenerate.
9253 * config.in: Likewise.
9254 * linux-low.c: Include <sys/personality.h>.
9255 Define ADDR_NO_RANDOMIZE if necessary.
9256 (linux_create_inferior): Disable address space randomization when
9257 forking inferior, if requested.
9258 (linux_supports_disable_randomization): New function.
9259 (linux_target_ops): Install it.
9260 * server.h (disable_randomization): Declare.
9261 * server.c (disable_randomization): New global variable.
9262 (handle_general_set): Handle QDisableRandomization.
9263 (handle_query): Likewise for qSupported.
9264 (main): Support --disable-randomization and --no-disable-randomization
9265 command line arguments.
9266 * target.h (struct target_ops): Add supports_disable_randomization.
9267 (target_supports_disable_randomization): New macro.
9268
723b724b
MF
92692011-09-29 Mike Frysinger <vapier@gentoo.org>
9270
9271 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9272 ifdef check.
9273 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9274 [!PT_GETDSBT] (target_loadmap): New definition.
9275 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9276 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9277 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9278 and PT_GETDSBT to LINUX_LOADMAP.
9279 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9280 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9281
55329a5c 92822011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9283
9284 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9285 (arm_linux_hwbp_cap): New static variable.
9286 (arm_linux_get_hwbp_cap): Replace by ...
9287 (arm_linux_init_hwbp_cap): ... this new function.
9288 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9289 (arm_linux_get_hw_watchpoint_count): Likewise.
9290 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9291 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9292 (arm_prepare_to_resume): Use perror_with_name instead of error.
9293
55329a5c 92942011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9295
9296 * linux-arm-low.c: Include <signal.h>.
9297 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9298 (struct arm_linux_hwbp_cap): New data type.
9299 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9300 (struct arm_linux_hw_breakpoint): New data type.
9301 (MAX_BPTS, MAX_WPTS): Define.
9302 (struct arch_process_info, struct arch_lwp_info): New data types.
9303 (arm_linux_get_hwbp_cap): New function.
9304 (arm_linux_get_hw_breakpoint_count): Likewise.
9305 (arm_linux_get_hw_watchpoint_count): Likewise.
9306 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9307 (arm_hwbp_control_initialize): Likewise.
9308 (arm_hwbp_control_is_enabled): Likewise.
9309 (arm_hwbp_control_is_initialized): Likewise.
9310 (arm_hwbp_control_disable): Likewise.
9311 (arm_linux_hw_breakpoint_equal): Likewise.
9312 (arm_linux_hw_point_initialize): Likewise.
9313 (struct update_registers_data): New data structure.
9314 (update_registers_callback: New function.
9315 (arm_insert_point): Likewise.
9316 (arm_remove_point): Likewise.
9317 (arm_stopped_by_watchpoint): Likewise.
9318 (arm_stopped_data_address): Likewise.
9319 (arm_new_process): Likewise.
9320 (arm_new_thread): Likewise.
9321 (arm_prepare_to_resume): Likewise.
9322 (the_low_target): Register arm_insert_point, arm_remove_point,
9323 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9324 arm_new_thread, and arm_prepare_to_resume.
9325
6b9801d4
SS
93262011-09-15 Stan Shebs <stan@codesourcery.com>
9327
9328 * server.h (struct emit_ops): Add compare-goto fields.
9329 * tracepoint.c (gdb_agent_op_sizes): New table.
9330 (emit_eq_goto): New function.
9331 (emit_ne_goto): New function.
9332 (emit_lt_goto): New function.
9333 (emit_le_goto): New function.
9334 (emit_gt_goto): New function.
9335 (emit_ge_goto): New function.
9336 (is_goto_target): New function.
9337 (compile_bytecodes): Recognize special cases of compare-goto
9338 combinations and call specialized emitters for them.
9339 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9340 (amd64_emit_ne_goto): New function.
9341 (amd64_emit_lt_goto): New function.
9342 (amd64_emit_le_goto): New function.
9343 (amd64_emit_gt_goto): New function.
9344 (amd64_emit_ge_goto): New function.
9345 (amd64_emit_ops): Add the new functions.
9346 (i386_emit_eq_goto): New function.
9347 (i386_emit_ne_goto): New function.
9348 (i386_emit_lt_goto): New function.
9349 (i386_emit_le_goto): New function.
9350 (i386_emit_gt_goto): New function.
9351 (i386_emit_ge_goto): New function.
9352 (i386_emit_ops): Add the new functions.
9353
bf15cbda
SS
93542011-09-08 Stan Shebs <stan@codesourcery.com>
9355
9356 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9357 (i386_emit_epilogue): Restore %ebx.
9358
943ca1dd
JZ
93592011-08-31 Jie Zhang <jzhang918@gmail.com>
9360
9361 * server.c (step_thread): Remove definition.
9362 (process_serial_event): Don't handle Hs.
9363 * server.h (step_thread): Remove declaration.
9364 * target.c (set_desired_inferior): Remove use of step_thread.
9365
e3deef73
LM
93662011-08-24 Luis Machado <lgustavo@codesourcery.com>
9367
9368 * linux-low.c: Include linux-procfs.h.
9369 (linux_attach_lwp_1): Update comments.
9370 (linux_attach): Scan for existing threads when attaching to a
9371 process that is the tgid.
9372 * Makefile.in: Update dependencies.
9373
13da1c97
LM
93742011-08-24 Luis Machado <lgustavo@codesourcery.com>
9375
9376 * configure.srv: Add linux-procfs.o dependencies.
9377
881127c9
YQ
93782011-08-14 Yao Qi <yao@codesourcery.com>
9379
9380 * target.h (struct target_ops): Fix indent.
9381 * win32-low.c (win32_target_ops): Fix comment.
9382
58dbd541
YQ
93832011-08-14 Andrew Jenner <andrew@codesourcery.com>
9384 Yao Qi <yao@codesourcery.com>
9385
9386 * Makefile.in (clean): Remove tic6x-*.c files.
9387 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9388 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9389 (tic6x-c64xp-linux.c): Likewise.
9390 * configure.srv: Add support for tic6x-*-uclinux.
9391 * linux-tic6x-low.c: New.
9392 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9393
78d85199
YQ
93942011-08-14 Andrew Stubbs <ams@codesourcery.com>
9395 Yao Qi <yao@codesourcery.com>
9396
9397 * target.h (struct target_ops): Add read_loadmap.
9398 * linux-low.c (struct target_loadseg): New type.
9399 (struct target_loadmap): New type.
9400 (linux_read_loadmap): New function.
9401 (linux_target_ops): Add linux_read_loadmap.
9402 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9403 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9404 to NULL.
78d85199 9405
a959a88d
EZ
94062011-08-05 Eli Zaretskii <eliz@gnu.org>
9407
9408 * win32-low.c: Include <stdint.h>.
9409
1ced966e
PA
94102011-07-22 Pedro Alves <pedro@codesourcery.com>
9411
9412 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9413 to the inferior here.
9414 (i386_remove_aligned_watchpoint): Ditto.
9415 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9416 fit part of the watchpoint in the debug registers.
9417 (i386_update_inferior_debug_regs): New.
9418 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9419 registers, and only update the inferior on success.
9420 (i386_low_remove_watchpoint): Ditto.
9421
d26e3629
KY
94222011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9423
9424 * linux-low.c (compare_ints, unique, list_threads, show_process,
9425 linux_core_of_thread): Delete.
9426 (linux_target_ops): Change linux_core_of_thread to
9427 linux_common_core_of_thread.
9428 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9429 * utils.c (malloc_failure): Change type of argument.
9430 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9431 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9432 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9433 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9434 (IPA_OBJS): Add common-utils-ipa.o.
9435 (ptid_h, linux_osdata_h): New macros.
9436 (server_h): Add common/common-utils.h, common/xml-utils.h,
9437 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9438 common/ptid.h.
9439 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9440 ptid.o, buffer.o): New rules.
9441 (linux-low.o): Add common/linux-osdata.h as a dependency.
9442 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9443 * configure.ac: Add AC_HEADER_DIRENT check.
9444 * config.in: Regenerate.
9445 * configure: Regenerate.
9446 * remote-utils.c (xml_escape_text): Delete.
9447 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9448 buffer_xml_printf): Move to common/buffer.c.
9449 * server.c (main): Remove call to initialize_inferiors.
9450 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9451 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9452 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9453 internal_error, gdb_assert, gdb_assert_fail): Delete.
9454 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9455 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9456 common/buffer.h.
9457 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9458 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9459 initialize_inferiors): Delete.
9460
2275a1a7
PA
94612011-07-20 Pedro Alves <pedro@codesourcery.com>
9462
9463 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9464 symbol error.
9465
0a5b1e09
PA
94662011-05-31 Pedro Alves <pedro@codesourcery.com>
9467
9468 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9469 assertion.
9470 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9471
6938fd34
YQ
94722011-05-26 Yao Qi <yao@codesourcery.com>
9473
9474 * Makefile.in (thread-db.o): Track dependence to
9475 common/gdb_thread_db.h.
9476 * thread-db.c: include gdb_thread_db.h from right place.
9477
b481f9e0
TT
94782011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9479
9480 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9481 __FILE__ and __LINE__ to internal_error.
9482
98a5dd13
DE
94832011-05-13 Doug Evans <dje@google.com>
9484
9485 * thread-db.c (try_thread_db_load_from_sdir): New function.
9486 (try_thread_db_load_from_dir): New function.
9487 (thread_db_load_search): Handle $sdir, ignore $pdir.
9488 Remove trying of system directories if search of
9489 libthread-db-search-path fails, that is now done via $sdir.
9490
d248b706
KY
94912011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9492
9493 * server.c (handle_query): Add EnableDisableTracepoints to the list
9494 of supported features.
43aaf8b6 9495 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9496 tracepoints.
43aaf8b6
PA
9497 (cmd_qtenable_disable): New.
9498 (cmd_qtstart): Install tracepoints even if disabled.
9499 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9500 receiving a QTEnable or QTDisable packet.
9501 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9502 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9503 tracepoints.
9504 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9505
84e578fb
DE
95062011-05-10 Doug Evans <dje@google.com>
9507
9508 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9509
71f55dd8
DE
95102011-05-04 Doug Evans <dje@google.com>
9511
9512 * linux-low.c (linux_join): Skip process lookup.
9513 * spu-low.c (spu_join): Ditto.
9514 * server.c (join_inferiors_callback): Delete.
9515 (process_serial_event): For 'D' packet (detach) call join_inferior
9516 directly.
9517
4d393d60
JM
95182011-05-04 Joseph Myers <joseph@codesourcery.com>
9519
9520 * README: Don't mention xscale*-*-linux*.
9521 * configure.srv (xscale*-*-linux*): Don't handle target.
9522
b00ad6ff
NF
95232011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9524
9525 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9526 casting pointers.
9527 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9528 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9529 (i386_emit_void_call_2): Likewise.
9530
af96c192
YQ
95312011-04-26 Yao Qi <yao@codesourcery.com>
9532
43aaf8b6
PA
9533 * linux-low.c: Move common macros to linux-ptrace.h.
9534 Include linux-ptrace.h.
af96c192
YQ
9535 * Makefile.in (linux_ptrace_h): New.
9536 (linux-low.o): Depends on linux-ptrace.h.
9537
03f2bd59
JK
95382011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9539
9540 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9541 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9542 (remote_prepare): New function with most of the TCP code from ...
9543 (remote_open): ... here. Detect PORT here unconditionally. Move also
9544 setting transport_is_reliable.
9545 * server.c (run_once): New variable.
9546 (gdbserver_usage): Document it.
9547 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9548 the first run if RUN_ONCE.
9549 * server.h (run_once, remote_prepare): New declarations.
9550
7a9dd1b2
TT
95512011-04-19 Tom Tromey <tromey@redhat.com>
9552
9553 * win32-low.c (handle_load_dll): Remove duplicate "the".
9554
81239425
PM
95552011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9556
9557 Remove support for old Cygwin 1.5 versions.
9558 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9559 function to avoid warning.
9560 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9561 warning.
9562
9e0627f1
PM
95632011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9564
9565 * gdbserver/server.h (Macro _): Define it if not available.
9566
588eebee
MS
95672011-03-14 Michael Snyder <msnyder@vmware.com>
9568
348af9f7 9569 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9570
43f70d4c
JB
95712011-03-10 Joel Brobecker <brobecker@adacore.com>
9572
9573 * Makefile.in (maintainer-clean realclean distclean): Remove
9574 "make ... subdir_do" command.
9575
348af9f7
MS
95762011-03-10 Michael Snyder <msnyder@vmware.com>
9577
9578 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9579
9580 * server.c (handle_v_run): Free alloced buffer on early return.
9581
e637a4f5
YQ
95822011-03-09 Yao Qi <yao@codesourcery.com>
9583
9584 Revert:
9585 2011-03-04 Yao Qi <yao@codesourcery.com>
9586
9587 * Makefile.in: Remove GNU make feature --directory.
9588
9589 2011-03-05 Yao Qi <yao@codesourcery.com>
9590
9591 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9592 (subdir_do): New make target. Copied from gdb/Makefile.
9593 (maintainer-clean, realclean, distclean, clean): Call corresponding
9594 make targets in common/Makefile.
9595
9596 2011-02-11 Yao Qi <yao@codesourcery.com>
9597
9598 * configure.ac: Call AC_PROG_RANLIB.
9599 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9600 * configure: Regenerate.
9601
e6edda56
JK
96022011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9603
9604 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9605
e5141119
JB
96062011-03-06 Yao Qi <yao@codesourcery.com>
9607
9608 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9609
64794aa4
JB
96102011-03-05 Yao Qi <yao@codesourcery.com>
9611
9612 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9613 (subdir_do): New make target. Copied from gdb/Makefile.
9614 (maintainer-clean, realclean, distclean, clean): Call corresponding
9615 make targets in common/Makefile.
9616
7a762829
YQ
96172011-03-04 Yao Qi <yao@codesourcery.com>
9618
9619 * Makefile.in: Remove GNU make feature --directory.
9620
348af9f7
MS
96212011-03-04 Michael Snyder <msnyder@vmware.com>
9622
9623 * server.c (queue_stop_reply): Call xmalloc not malloc.
9624
96252011-03-02 Michael Snyder <msnyder@vmware.com>
9626
9627 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9628
9f72fee2
MS
96292011-02-28 Michael Snyder <msnyder@vmware.com>
9630
588eebee
MS
9631 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9632 (cmd_qtframe): Ditto.
9633 (cmd_qtbuffer): Ditto.
9634 (cmd_bigqtbuffer): Ditto.
9635
9f72fee2
MS
9636 * utils.c (decimal2str): Initialize 'width' to nine, then
9637 don't mess with it.
9638
8040bd49
UW
96392011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9640
9641 * hostio.c (require_data): Free *data, not data.
9642
7e52cbd0
JK
96432011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9644
9645 * hostio.c (require_data): Use free, not xfree.
9646
9130f83e
MS
96472011-02-27 Michael Snyder <msnyder@vmware.com>
9648
4b812f4e
MS
9649 * server.c (handle_query): Discard unused value.
9650
9130f83e
MS
9651 * hostio.c (require_data): Free malloc memory before returning
9652 error.
9653
69d37113
MS
96542011-02-26 Michael Snyder <msnyder@vmware.com>
9655
9656 * linux-low.c (list_threads): Call closedir for dirent.
9657
35f5825a
MS
96582011-02-27 Michael Snyder <msnyder@vmware.com>
9659
2a589cef
MS
9660 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9661 a case statement falls through.
9662
0adea5f7
MS
9663 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9664
35f5825a
MS
9665 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9666 in comparison.
9667
238f1c74
MS
96682011-02-26 Michael Snyder <msnyder@vmware.com>
9669
9670 * utils.c (decimal2str): Eliminate dead code and dead param.
9671 (pulongest): Drop dead param from call to decimal2str.
9672 (plongest): Ditto.
9673
633ff500
JB
96742011-02-24 Joel Brobecker <brobecker@adacore.com>
9675
9676 Revert the following patch (not approved yet):
9677 2011-02-21 Hui Zhu <teawater@gmail.com>
9678 * tracepoint.c (tp_printf): New function.
9679 (eval_agent_expr): Handle gdb_agent_op_printf.
9680
f9c6ff72
HZ
96812011-02-21 Hui Zhu <teawater@gmail.com>
9682
9683 * tracepoint.c (tp_printf): New function.
9684 (eval_agent_expr): Handle gdb_agent_op_printf.
9685
94d5e490
TT
96862011-02-18 Tom Tromey <tromey@redhat.com>
9687
9688 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9689 (tracepoint.o): Likewise.
9690 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9691 (gdb_agent_op_names): Likewise.
9692
c7f96d2b
TT
96932011-02-18 Tom Tromey <tromey@redhat.com>
9694
9695 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9696 gdb_agent_op_rot>: New constants.
9697 (gdb_agent_op_names): Add pick and roll.
9698 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9699 cases.
9700
0feedb2c
JK
97012011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9702
9703 * aclocal.m4: Regenerated with aclocal-1.11.1.
9704
b3b9301e
PA
97052011-02-14 Pedro Alves <pedro@codesourcery.com>
9706
9707 * server.c (handle_qxfer_traceframe_info): New.
9708 (qxfer_packets): Register "traceframe-info".
9709 (handle_query): Report support for qXfer:traceframe-info:read+.
9710 * tracepoint.c (match_blocktype): New.
9711 (traceframe_find_block_type): Rename to ...
9712 (traceframe_walk_blocks): ... this. Add callback filter argument,
9713 and use it.
9714 (traceframe_find_block_type): New, reimplemented on top of
9715 traceframe_walk_blocks.
9716 (build_traceframe_info_xml): New.
9717 (traceframe_read_info): New.
9718 * server.h (traceframe_read_info): Declare.
9719
4f3e6fb7
YQ
97202011-02-11 Yao Qi <yao@codesourcery.com>
9721
9722 * configure.ac: Call AC_PROG_RANLIB.
9723 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9724 * configure: Regenerate.
9725
764880b7
PA
97262011-02-07 Pedro Alves <pedro@codesourcery.com>
9727
9728 * server.c (gdb_read_memory): Change return semantics to allow
9729 partial transfers.
9730 (handle_search_memory_1): Adjust.
9731 (process_serial_event) <'m' packet>: Handle partial transfers.
9732 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9733
1c79eb8a
PA
97342011-01-28 Pedro Alves <pedro@codesourcery.com>
9735
9736 * regcache.c (init_register_cache): Initialize
9737 regcache->register_status.
9738 (free_register_cache): Release regcache->register_status.
9739 (regcache_cpy): Copy register_status.
9740 (registers_to_string): Print 'x's for unavailable registers.
9741 (supply_register): Mark the register's status valid or
9742 unavailable, depending on whether a buffer was passed in or not.
9743 (supply_register_zeroed): New.
9744 (supply_regblock): Mark the registers' status valid or
9745 unavailable, depending on whether a buffer was passed in or not.
9746 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9747 (struct regcache): New `register_status' field.
9748 (supply_register_zeroed): Declare.
9749 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9750 supply_register_zeroed, rather than passing a NULL buffer to
9751 supply_register.
9752 * tracepoint.c (fetch_traceframe_registers): Update comment.
9753
85724a0e
PA
97542011-01-28 Pedro Alves <pedro@codesourcery.com>
9755
9756 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9757 buffer explicit.
9758
d08aafef
PA
97592011-01-25 Pedro Alves <pedro@codesourcery.com>
9760
9761 * server.h (decode_xfer_write): Change prototype.
9762 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9763 and don't extract the annex here.
9764 * server.c (decode_xfer_read): Remove `annex' parameter,
9765 and don't extract the annex here.
9766 (decode_xfer): New.
9767 (struct qxfer): New.
9768 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9769 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9770 (handle_qxfer_statictrace): New functions, abstracted out from
9771 handle_query, and made to use the struct qxfer interface.
9772 (handle_threads_qxfer_proper): Rename to ...
9773 (handle_qxfer_threads_proper): ... this.
9774 (handle_threads_qxfer): Rename to ...
9775 (handle_qxfer_threads): ... this. Adjust.
9776 (qxfer_packets): New array.
9777 (handle_qxfer): New function.
9778 (handle_query): Use handle_qxfer.
9779
493e2a69
MS
97802011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9781
9782 * gdbreplay.c: Shorten lines of >= 80 columns.
9783 * linux-low.c: Ditto.
9784 * linux-ppc-low.c: Ditto.
9785 * linux-s390-low.c: Ditto.
9786 * linux-sparc-low.c: Ditto.
9787 * linux-x86-low.c: Ditto.
9788 * linux-xtensa-low.c: Ditto.
9789 * mem-break.c: Ditto.
9790 * nto-low.c: Ditto.
9791 * regcache.h: Ditto.
9792 * remote-utils.c: Ditto.
9793 * server.c: Ditto.
9794 * server.h: Ditto.
9795 * thread-db.c: Ditto.
9796 * tracepoint.c: Ditto.
9797 * utils.c: Ditto.
9798 * win32-low.h: Ditto.
9799
44944448
JB
98002011-01-05 Joel Brobecker <brobecker@adacore.com>
9801
9802 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9803 update.
9804
71ce852c
JB
98052011-01-01 Joel Brobecker <brobecker@adacore.com>
9806
9807 * server.c (gdbserver_version): Update copyright year in version
9808 output.
9809 * gdbreplay.c (gdbreplay_version): Ditto.
9810
eb826dc6
MF
98112010-12-29 Jie Zhang <jie.zhang@analog.com>
9812
9813 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9814 * linux-bfin-low.c: New file.
9815 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9816 PT_DATA_ADDR for BFIN targets.
9817 * Makefile.in (SFILES): Add linux-bfin-low.c.
9818 (clean): Remove reg-bfin.c.
9819 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9820 * README: Mention supported Blackfin targets.
9821
39ab222a
MF
98222010-12-23 Mike Frysinger <vapier@gentoo.org>
9823
9824 * .gitignore: New file.
9825
a1f2ce7d
MF
98262010-11-16 Mike Frysinger <vapier@gentoo.org>
9827
9828 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9829
f474844c
JZ
98302010-10-22 Jie Zhang <jie@codesourcery.com>
9831
9832 * Makefile.in: Add FLAGS_TO_PASS variable.
9833 (install): Remove dependency of install-only and recursively
9834 invoke make for install-only.
9835
f1048712
DE
98362010-10-04 Doug Evans <dje@google.com>
9837
9838 * Makefile.in (uninstall): Use $(DESTDIR).
9839
b53a1623
PA
98402010-09-24 Pedro Alves <pedro@codesourcery.com>
9841
e6ee044d
PA
9842 PR gdb/11842
9843
b53a1623
PA
9844 * linux-x86-low.c (compat_siginfo_from_siginfo)
9845 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9846 si_code is < 0. Check for si_code == SI_TIMER before checking for
9847 si_code < 0.
9848
fa1bd1e4
JB
98492010-09-13 Joel Brobecker <brobecker@adacore.com>
9850
9851 * lynx-i386-low.c: New file.
9852 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9853
47fac8f8
JB
98542010-09-13 Joel Brobecker <brobecker@adacore.com>
9855
9856 * lynx-low.c (ptrace_request_to_str): Remove handling for
9857 request values that have been removed in LynxOS 5.x.
9858
1adfc54d
JB
98592010-09-13 Joel Brobecker <brobecker@adacore.com>
9860
9861 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9862 <ptrace.h>
9863
c2a66c29
NS
98642010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9865
9866 * configure.ac: Add --enable-inprocess-agent option.
9867 * configure: Rebuilt.
9868
32fcada3
YQ
98692010-09-06 Yao Qi <yao@codesourcery.com>
9870
9871 * linux-low.c (linux_kill): Remove unused variable.
9872 (linux_stabilize_threads): Likewise.
9873 * server.c (start_inferior): Likewise.
9874 (queue_stop_reply_callback): Likewise.
9875 * tracepoint.c (do_action_at_tracepoint): Likewise.
9876
0cccb683
YQ
98772010-09-06 Yao Qi <yao@codesourcery.com>
9878
9879 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9880 on return.
9881
423ec54c
JK
98822010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9883
9884 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9885
12ac6819
PA
98862010-09-06 Pedro Alves <pedro@codesourcery.com>
9887
9888 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9889 "$(IPA_DEPFILES)".
9890
8ed54b31
JB
98912010-09-01 Joel Brobecker <brobecker@adacore.com>
9892
9893 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9894 gdbserver/lynx-ppc-low.c: New files.
9895 * Makefile.in (lynx_low_h): New variable.
9896 (lynx-low.o, lynx-ppc-low.o): New rules.
9897 * configure.ac: On LynxOS, link with -lnetinet.
9898 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9899 * configure: regenerate.
9900
bb0116a4
JB
99012010-09-01 Joel Brobecker <brobecker@adacore.com>
9902
9903 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9904 * configure.ac: Add check for vasprintf and vsnprintf.
9905 * configure, config.in: Regenerate.
9906 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9907
a778ab81 99082010-09-01 Joel Brobecker <brobecker@adacore.com>
9909
9910 * gdbreplay.c: Move include of alloca.h up, next to include of
9911 malloc.h.
9912 * server.h: Add include of malloc.h.
9913 * mem-break.c: Remove include of malloc.h.
9914 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9915
8b034a19 99162010-09-01 Joel Brobecker <brobecker@adacore.com>
9917
9918 * Makefile.in (memmem.o): Build with -Wno-error.
9919
99202010-09-01 Joel Brobecker <brobecker@adacore.com>
9921
9922 * utils.c (xsnprintf): Make non-static.
9923 * server.h: Add xsnprintf declaration.
9924 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9925 replace calls to snprintf by calls to xsnprintf throughout.
9926
99272010-09-01 Joel Brobecker <brobecker@adacore.com>
9928
9929 * configure.ac: Add configure check for alloca.
9930 * configure, config.in: Regenerate.
9931 * server.h: Include alloca.h if it exists.
9932 * gdbreplay.c: Include alloca.h if it exists.
9933
1a981360
PA
99342010-08-28 Pedro Alves <pedro@codesourcery.com>
9935
9936 * linux-low.c (__SIGRTMIN): Define if not already defined.
9937 (linux_create_inferior): Check for __ANDROID__ rather than
9938 __SIGRTMIN.
9939 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9940 are already deferred.
9941 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9942 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9943 stopped and already has a pending signal to report.
9944 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9945 a pending signal to report or is moving out of a jump pad.
9946 (linux_init_signals): Check for __ANDROID__ rather than
9947 __SIGRTMIN.
9948
b4d51a55
PA
99492010-08-28 Pedro Alves <pedro@codesourcery.com>
9950
9951 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9952 debug_threads check. Avoid a linear search when not doing debug
9953 output.
9954
ec48365d
PA
99552010-08-27 Pedro Alves <pedro@codesourcery.com>
9956
9957 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9958 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9959 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9960 (process_event): Change local fd's type to gdb_fildes_t.
9961 (create_file_handler): Adjust prototype.
9962 (delete_file_handler): Adjust prototype.
9963 (handle_file_event): Adjust prototype. Use pfildes.
9964 (create_file_event): Adjsut prototype.
9965 * remote-utils.c (remote_desc, listen_desc): Change type to
9966 gdb_fildes_t.
9967 * server.h: New gdb_fildes_t typedef.
9968 [USE_WIN32API]: Include winsock2.h.
9969 (delete_file_handler, add_file_handler): Adjust prototypes.
9970 (pfildes): Declare.
9971 * utils.c (pfildes): New.
9972
854d88f0
PA
99732010-08-27 Pedro Alves <pedro@codesourcery.com>
9974
9975 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9976 * configure: Regenerate.
9977
0146f85b
PA
99782010-08-27 Pedro Alves <pedro@codesourcery.com>
9979
9980 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9981 (linux_done_accessing_memory): ... this.
9982 (linux_target_ops): Adjust.
9983 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9984 * nto-low.c (nto_target_ops): Adjust comment.
9985 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9986 * spu-low.c (spu_target_ops): Adjust comment.
9987 * target.h (target_ops): Rename unprepare_to_access_memory field
9988 to done_accessing_memory.
9989 (unprepare_to_access_memory): Rename to ...
9990 (done_accessing_memory): ... this.
9991
90d74c30
PA
99922010-08-26 Pedro Alves <pedro@codesourcery.com>
9993
9994 * linux-low.c (linux_prepare_to_access_memory): New.
9995 (linux_unprepare_to_access_memory): New.
9996 (linux_target_ops): Install them.
9997 * server.c (read_memory): Rename to ...
9998 (gdb_read_memory): ... this. Use
9999 prepare_to_access_memory/prepare_to_access_memory.
10000 (write_memory): Rename to ...
10001 (gdb_write_memory): ... this. Use
10002 prepare_to_access_memory/prepare_to_access_memory.
10003 (handle_search_memory_1): Adjust.
10004 (process_serial_event): Adjust.
10005 * target.h (struct target_ops): New fields
10006 prepare_to_access_memory and unprepare_to_access_memory.
10007 (prepare_to_access_memory, unprepare_to_access_memory): New.
10008 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10009 prepare_to_access_memory/prepare_to_access_memory.
10010 * nto-low.c (nto_target_ops): Adjust.
10011 * spu-low.c (spu_target_ops): Adjust.
10012 * win32-low.c (win32_target_ops): Adjust.
10013
fd467969
PA
100142010-08-26 Pedro Alves <pedro@codesourcery.com>
10015
10016 * Makefile.in (WARN_CFLAGS): Get it from configure.
10017 (WERROR_CFLAGS): New.
10018 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10019 * configure.ac: Introduce --enable-werror, which adds -Werror to
10020 the compiler command line. Enabled by default. Disable with
10021 --disable-werror. Add -Wdeclaration-after-statement
10022 Wpointer-arith and -Wformat-nonliteral to warning flags.
10023 * configure: Regenerate.
10024
331e2f5f
PA
100252010-08-26 Pedro Alves <pedro@codesourcery.com>
10026
10027 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10028
e581f2b4
PA
100292010-08-26 Pedro Alves <pedro@codesourcery.com>
10030
10031 * gdbreplay.c (remote_error): New.
10032 (gdbchar): New.
10033 (expect): Use gdbchar. Check for error reading from GDB.
10034 Clarify sync error output.
10035 (play): Check for errors writing to GDB.
10036 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10037 * remote-utils.c (getpkt): Check for errors writing to the remote
10038 descriptor.
10039
3c11dd79
PA
100402010-08-25 Pedro Alves <pedro@codesourcery.com>
10041
10042 * linux-low.c (linux_wait_1): Move non-debugging code out of
10043 `debug_threads' control.
10044
d20a8ad9
PA
100452010-08-25 Pedro Alves <pedro@codesourcery.com>
10046
10047 * linux-low.c (linux_wait_1): Don't set last_status here.
10048 * server.c (push_event, queue_stop_reply_callback): Assert we're
10049 not pushing a TARGET_WAITKIND_IGNORE event.
10050 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10051 (myresume, handle_target_event): Set the thread's last_resume_kind
10052 and last_status from the target returned status.
10053
964e4306
PA
100542010-08-25 Pedro Alves <pedro@codesourcery.com>
10055
10056 PR threads/10729
10057
10058 * linux-x86-low.c (update_debug_registers_callback): New.
10059 (i386_dr_low_set_addr): Use it.
10060 (i386_dr_low_get_addr): New.
10061 (i386_dr_low_set_control): Use update_debug_registers_callback.
10062 (i386_dr_low_get_control): New.
10063 (i386_dr_low_get_status): Adjust.
10064 * linux-low.c (linux_stop_lwp): New.
10065 * linux-low.h (linux_stop_lwp): Declare.
10066
10067 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10068 argument instead of a i386_debug_reg_state.
10069 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10070 a i386_debug_reg_state.
10071 (i386_insert_aligned_watchpoint): Adjust.
10072 (i386_remove_aligned_watchpoint): Adjust.
10073 (i386_low_stopped_data_address): Read the debug registers from the
10074 inferior instead of from the mirrors.
10075 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10076 (i386_dr_low_get_addr): Declare.
10077 (i386_dr_low_get_control): Declare.
10078 (i386_dr_low_get_status): Change prototype.
10079
10080 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10081 (i386_dr_low_get_addr): New.
10082 (i386_dr_low_get_control): New.
10083 (i386_dr_low_get_status): Adjust prototype. Return
10084 dr_status_mirror.
10085 (i386_initial_stuff): Clear dr_status_mirror and
10086 dr_control_mirror.
10087 (i386_get_thread_context): Adjust.
10088 (i386_set_thread_context): Adjust.
10089 (i386_thread_added): Adjust.
10090
5f21a75b
PA
100912010-08-24 Pedro Alves <pedro@codesourcery.com>
10092
10093 * linux-low.h (linux_thread_area): Delete declaration.
10094
3e4c1235
TS
100952010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10096
10097 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10098 after its termination.
10099
1971b033
PA
101002010-08-09 Pedro Alves <pedro@codesourcery.com>
10101
10102 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10103 (gdb_wants_all_stopped): Delete.
10104 (linux_wait_1): Don't call them.
10105 * server.c (handle_v_cont): Tag all threads as want-stopped.
10106 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10107 stopped as "client-wants-stopped".
10108
310444ac
PA
101092010-07-31 Pedro Alves <pedro@codesourcery.com>
10110
10111 * Makefile.in (signals_h): New.
10112 (server_h): Depend on it.
10113 (server.o): Don't depend on $(signals_def).
10114 (signals.o): Depend on $(signals_def).
10115
a19cae16
JK
101162010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10117
10118 * Makefile.in (signals_def): New.
10119 (server_h): Append include/gdb/signals.h and signals_def.
10120 (server.o): Append signals_def.
10121
30d50328
JK
101222010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10123
10124 * server.c (handle_target_event): Use target_signal_to_host for
10125 resume_info.sig initialization.
10126 * target.h (struct thread_resume) <sig>: New comment.
10127
5c3216e2
OS
101282010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10129
c6f46ca0
OS
10130 * server.c (handle_query): strcpy() the returned string from paddress()
10131 instead of sprintf().
5c3216e2
OS
10132 * utils.c (paddress): Return phex_nz().
10133
6bd31874
JB
101342010-07-07 Joel Brobecker <brobecker@adacore.com>
10135
10136 * server.c (handle_v_cont): Call mourn_inferior if process
10137 just exited.
10138 (myresume): Likewise.
10139
0fb4aa4b
PA
101402010-07-01 Pedro Alves <pedro@codesourcery.com>
10141
10142 Static tracepoints, and integration with UST.
10143
10144 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10145 * mem-break.c (uninsert_all_breakpoints)
10146 (reinsert_all_breakpoints): New.
10147 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10148 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10149 (gdb_agent_ust_loaded, helper_thread_id)
10150 (gdb_agent_helper_thread_id): New macros.
10151 (struct ipa_sym_addresses): Add addr_ust_loaded,
10152 addr_helper_thread_id, addr_cmd_buf.
10153 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10154 (in_process_agent_loaded_ust): New.
10155 (write_e_ust_not_loaded): New.
10156 (maybe_write_ipa_ust_not_loaded): New.
10157 (struct collect_static_trace_data_action): New.
10158 (enum tracepoint_type) <static_tracepoint>: New.
10159 (struct tracepoint) <handle>: Mention static tracepoints.
10160 (struct static_tracepoint_ctx): New.
10161 (CMD_BUF_SIZE): New.
10162 (add_tracepoint_action): Handle static tracepoint actions.
10163 (unprobe_marker_at): New.
10164 (clear_installed_tracepoints): Handle static tracepoints.
10165 (cmd_qtdp): Handle static tracepoints.
10166 (probe_marker_at): New.
10167 (cmd_qtstart): Handle static tracepoints.
10168 (response_tracepoint): Handle static tracepoints.
10169 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10170 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10171 (get_context_regcache): Handle static tracepoints.
10172 (do_action_at_tracepoint): Handle static tracepoint actions.
10173 (traceframe_find_block_type): Handle static trace data blocks.
10174 (traceframe_read_sdata): New.
10175 (download_tracepoints): Download static tracepoint actions.
10176 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10177 (GDB_PROBE_NAME): New.
10178 (ust_ops): New.
10179 (GET_UST_SYM): New.
10180 (USTF): New.
10181 (dlsym_ust): New.
10182 (ust_marker_to_static_tracepoint): New.
10183 (gdb_probe): New.
10184 (collect_ust_data_at_tracepoint): New.
10185 (gdb_ust_probe): New.
10186 (UNIX_PATH_MAX, SOCK_DIR): New.
10187 (gdb_ust_connect_sync_socket): New.
10188 (resume_thread, stop_thread): New.
10189 (run_inferior_command): New.
10190 (init_named_socket): New.
10191 (gdb_ust_socket_init): New.
10192 (cstr_to_hexstr): New.
10193 (next_st): New.
10194 (first_marker, next_marker): New.
10195 (response_ust_marker): New.
10196 (cmd_qtfstm, cmd_qtsstm): New.
10197 (unprobe_marker_at, probe_marker_at): New.
10198 (cmd_qtstmat, gdb_ust_thread): New.
10199 (gdb_ust_init): New.
10200 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10201 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10202 (ST_REGENTRY): New.
10203 (x86_64_st_collect_regmap): New.
10204 (X86_64_NUM_ST_COLLECT_GREGS): New.
10205 (AMD64_RIP_REGNUM): New.
10206 (supply_static_tracepoint_registers): New.
10207 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10208 (ST_REGENTRY): New.
10209 (i386_st_collect_regmap): New.
10210 (i386_NUM_ST_COLLECT_GREGS): New.
10211 (supply_static_tracepoint_registers): New.
10212 * server.c (handle_query): Handle qXfer:statictrace:read.
10213 <qSupported>: Report support for StaticTracepoints, and
10214 qXfer:statictrace:read features.
10215 * server.h (traceframe_read_sdata)
10216 (supply_static_tracepoint_registers): Declare.
10217 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10218 (unpack_varlen_hex): Include in IPA build.
10219 * Makefile.in (ustlibs, ustinc): New.
10220 (IPA_OBJS): Add remote-utils-ipa.o.
10221 ($(IPA_LIB)): Link -ldl and -lpthread.
10222 (UST_CFLAGS): New.
10223 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10224 * config.in, configure: Regenerate.
10225
9e4344e5
PA
102262010-06-20 Ian Lance Taylor <iant@google.com>
10227 Pedro Alves <pedro@codesourcery.com>
10228
10229 * linux-x86-low.c (always_true): Delete.
10230 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10231 trying to fool the compiler with always_true.
10232
c6beb2cb
PA
102332010-06-20 Pedro Alves <pedro@codesourcery.com>
10234
10235 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10236 conditions in gdbserver.
10237
d2ed6730
UW
102382010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10239
10240 * spu-low.c (spu_read_memory): Wrap around local store limit.
10241 (spu_write_memory): Likewise.
10242
4e29fb54
PA
102432010-06-15 Pedro Alves <pedro@codesourcery.com>
10244
10245 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10246 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10247 LONGEST uses.
10248 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10249 uses.
10250 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10251 uses with LONGEST uses.
10252
6a271cae
PA
102532010-06-14 Stan Shebs <stan@codesourcery.com>
10254 Pedro Alves <pedro@codesourcery.com>
10255
10256 Bytecode compiler.
10257
10258 * linux-x86-low.c: Include limits.h.
10259 (add_insns): New.
10260 (always_true): New.
10261 (EMIT_ASM): New.
10262 (EMIT_ASM32): New.
10263 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10264 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10265 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10266 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10267 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10268 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10269 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10270 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10271 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10272 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10273 (amd64_emit_void_call_2): New.
10274 (amd64_emit_ops): New.
10275 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10276 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10277 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10278 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10279 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10280 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10281 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10282 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10283 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10284 (i386_emit_stack_adjust, i386_emit_int_call_1)
10285 (i386_emit_void_call_2): New.
10286 (i386_emit_ops): New.
10287 (x86_emit_ops): New.
10288 (the_low_target): Install x86_emit_ops.
10289 * server.h (struct emit_ops): New.
10290 (get_raw_reg_func_addr): Declare.
10291 (current_insn_ptr, emit_error): Declare.
10292 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10293 (set_trace_state_variable_value): New defines.
10294 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10295 addr_get_trace_state_variable_value and
10296 addr_set_trace_state_variable_value.
10297 (symbol_list): New fields for get_raw_reg,
10298 get_trace_state_variable_value and set_trace_state_variable_value.
10299 (condfn): New typedef.
10300 (struct tracepoint): New field `compiled_cond'.
10301 (do_action_at_tracepoint): Clear compiled_cond.
10302 (get_trace_state_variable_value, set_trace_state_variable_value):
10303 Export in the IPA.
10304 (condition_true_at_tracepoint): If there's a compiled condition,
10305 run that.
10306 (current_insn_ptr, emit_error): New globals.
10307 (struct bytecode_address): New.
10308 (get_raw_reg_func_addr): New.
10309 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10310 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10311 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10312 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10313 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10314 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10315 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10316 (compile_tracepoint_condition, compile_bytecodes): New.
10317 * target.h (emit_ops): Forward declare.
10318 (struct target_ops): New field emit_ops.
10319 (target_emit_ops): New.
10320 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10321 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10322 * linux-low.c (linux_emit_ops): New.
10323 (linux_target_ops): Install it.
10324 * linux-low.h (struct linux_target_ops): New field emit_ops.
10325
92b72907
UW
103262010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10327
10328 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10329 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10330
fa593d66
PA
103312010-06-01 Pedro Alves <pedro@codesourcery.com>
10332 Stan Shebs <stan@codesourcery.com>
10333
10334 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10335 (all): Depend on $(extra_libraries).
10336 (install-only): Install the IPA.
10337 (IPA_OBJS, IPA_LIB): New.
10338 (clean): Remove the IPA lib.
10339 (IPAGENT_CFLAGS): New.
10340 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10341 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10342 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10343 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10344 * configure.ac: Check for atomic builtins support in the compiler.
10345 (IPA_DEPFILES, extra_libraries): Define.
10346 * configure.srv (ipa_obj): Add description.
10347 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10348 (i[34567]86-*-linux*): Set ipa_obj.
10349 (x86_64-*-linux*): Set ipa_obj.
10350 * linux-low.c (stabilizing_threads): New.
10351 (supports_fast_tracepoints): New.
10352 (linux_detach): Stabilize threads before detaching.
10353 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10354 the lwp is either not stabilizing, or is moving out of a jump pad.
10355 (linux_fast_tracepoint_collecting): New.
10356 (maybe_move_out_of_jump_pad): New.
10357 (enqueue_one_deferred_signal): New.
10358 (dequeue_one_deferred_signal): New.
10359 (linux_wait_for_event_1): If moving out of a jump pad, defer
10360 pending signals to later.
10361 (linux_stabilize_threads): New.
10362 (linux_wait_1): Check if threads need moving out of jump pads, and
10363 do it if so.
10364 (stuck_in_jump_pad_callback): New.
10365 (move_out_of_jump_pad_callback): New.
10366 (lwp_running): New.
10367 (linux_resume_one_lwp): Handle moving out of jump pads.
10368 (linux_set_resume_request): Dequeue deferred signals.
10369 (need_step_over_p): Also step over fast tracepoint jumps.
10370 (start_step_over): Also uninsert fast tracepoint jumps.
10371 (finish_step_over): Also reinsert fast tracepoint jumps.
10372 (linux_install_fast_tracepoint_jump): New.
10373 (linux_target_ops): Install linux_stabilize_threads and
10374 linux_install_fast_tracepoint_jump_pad.
10375 * linux-low.h (linux_target_ops) <get_thread_area,
10376 install_fast_tracepoint_jump_pad>: New fields.
10377 (struct lwp_info) <collecting_fast_tracepoint,
10378 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10379 (linux_get_thread_area): Declare.
10380 * linux-x86-low.c (jump_insn): New.
10381 (x86_get_thread_area): New.
10382 (append_insns): New.
10383 (push_opcode): New.
10384 (amd64_install_fast_tracepoint_jump_pad): New.
10385 (i386_install_fast_tracepoint_jump_pad): New.
10386 (x86_install_fast_tracepoint_jump_pad): New.
10387 (the_low_target): Install x86_get_thread_area and
10388 x86_install_fast_tracepoint_jump_pad.
10389 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10390 (struct fast_tracepoint_jump): New.
10391 (fast_tracepoint_jump_insn): New.
10392 (fast_tracepoint_jump_shadow): New.
10393 (find_fast_tracepoint_jump_at): New.
10394 (fast_tracepoint_jump_here): New.
10395 (delete_fast_tracepoint_jump): New.
10396 (set_fast_tracepoint_jump): New.
10397 (uninsert_fast_tracepoint_jumps_at): New.
10398 (reinsert_fast_tracepoint_jumps_at): New.
10399 (set_breakpoint_at): Use write_inferior_memory.
10400 (uninsert_raw_breakpoint): Use write_inferior_memory.
10401 (check_mem_read): Mask out fast tracepoint jumps.
10402 (check_mem_write): Mask out fast tracepoint jumps.
10403 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10404 (set_fast_tracepoint_jump): Declare.
10405 (delete_fast_tracepoint_jump)
10406 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10407 (reinsert_fast_tracepoint_jumps_at): Declare.
10408 * regcache.c: Don't compile many functions when building the
10409 in-process agent library.
10410 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10411 the register buffer in the heap.
10412 (free_register_cache): If the register buffer isn't owned by the
10413 regcache, don't free it.
10414 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10415 pre-existing register caches.
10416 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10417 type.
10418 (convert_ascii_to_int): : Constify `from' parameter type.
10419 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10420 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10421 the needed buffer in-place.
10422 (relocate_instruction): New.
10423 * server.c (handle_query) <qSymbols>: If the target supports
10424 tracepoints, give it a chance of looking up symbols. Report
10425 support for fast tracepoints.
10426 (handle_status): Stabilize threads.
10427 (process_serial_event): Adjust.
10428 * server.h (struct fast_tracepoint_jump): Forward declare.
10429 (struct process_info) <fast_tracepoint_jumps>: New field.
10430 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10431 (decode_X_packet, decode_M_packet): Adjust.
10432 (relocate_instruction): Declare.
10433 (in_process_agent_loaded): Declare.
10434 (tracepoint_look_up_symbols): Declare.
10435 (struct fast_tpoint_collect_status): Declare.
10436 (fast_tracepoint_collecting): Declare.
10437 (force_unlock_trace_buffer): Declare.
10438 (handle_tracepoint_bkpts): Declare.
10439 (initialize_low_tracepoint)
10440 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10441 * target.h (struct target_ops) <stabilize_threads,
10442 install_fast_tracepoint_jump_pad>: New fields.
10443 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10444 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10445 [HAVE_STDINT_H]: Include stdint.h.
10446 (trace_debug_1): Rename to ...
10447 (trace_vdebug): ... this.
10448 (trace_debug): Rename to ...
10449 (trace_debug_1): ... this. Add `level' parameter.
10450 (trace_debug): New.
10451 (ATTR_USED, ATTR_NOINLINE): New.
10452 (IP_AGENT_EXPORT): New.
10453 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10454 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10455 (about_to_request_buffer_space, trace_buffer_is_full)
10456 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10457 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10458 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10459 (traceframe_write_count, traceframes_created)
10460 (trace_state_variables)
10461 New renaming defines.
10462 (struct ipa_sym_addresses): New.
10463 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10464 (symbol_list): New.
10465 (ipa_sym_addrs): New.
10466 (all_tracepoint_symbols_looked_up): New.
10467 (in_process_agent_loaded): New.
10468 (write_e_ipa_not_loaded): New.
10469 (maybe_write_ipa_not_loaded): New.
10470 (tracepoint_look_up_symbols): New.
10471 (debug_threads) [IN_PROCESS_AGENT]: New.
10472 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10473 (UNKNOWN_SIDE_EFFECTS): New.
10474 (stop_tracing): New.
10475 (flush_trace_buffer): New.
10476 (stop_tracing_bkpt): New.
10477 (flush_trace_buffer_bkpt): New.
10478 (read_inferior_integer): New.
10479 (read_inferior_uinteger): New.
10480 (read_inferior_data_pointer): New.
10481 (write_inferior_data_pointer): New.
10482 (write_inferior_integer): New.
10483 (write_inferior_uinteger): New.
10484 (struct collect_static_trace_data_action): Delete.
10485 (enum tracepoint_type): New.
10486 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10487 <actions_str, step_actions, step_actions_str>: Only include in
10488 GDBserver.
fa593d66
PA
10489 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10490 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10491 (tracepoints): Use IP_AGENT_EXPORT.
10492 (last_tracepoint): Don't include in the IPA.
10493 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10494 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10495 (alloced_trace_state_variables): New.
10496 (trace_state_variables): Use IP_AGENT_EXPORT.
10497 (traceframe_t): Delete unused variable.
10498 (circular_trace_buffer): Don't include in the IPA.
10499 (trace_buffer_start): Delete.
10500 (struct trace_buffer_control): New.
10501 (trace_buffer_free): Delete.
10502 (struct ipa_trace_buffer_control): New.
10503 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10504 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10505 New.
10506 (trace_buffer_ctrl): New.
10507 (TRACE_BUFFER_CTRL_CURR): New.
10508 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10509 Reimplement as macros.
10510 (trace_buffer_wrap): Delete.
10511 (traceframe_write_count, traceframe_read_count)
10512 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10513 (struct tracepoint_hit_ctx) <type>: New field.
10514 (struct fast_tracepoint_ctx): New.
10515 (memory_barrier): New.
10516 (cmpxchg): New.
10517 (record_tracepoint_error): Update atomically in the IPA.
10518 (clear_inferior_trace_buffer): New.
10519 (about_to_request_buffer_space): New.
10520 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10521 updating the same buffer.
10522 (add_tracepoint): Default the tracepoint's type to trap
10523 tracepoint, and orig_size to -1.
10524 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10525 internal variables.
10526 (create_trace_state_variable): New parameter `gdb'. Handle it.
10527 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10528 (cmd_qtdp): Handle fast tracepoints.
10529 (cmd_qtdv): Adjust.
10530 (max_jump_pad_size): New.
10531 (gdb_jump_pad_head): New.
10532 (get_jump_space_head): New.
10533 (claim_jump_space): New.
10534 (sort_tracepoints): New.
10535 (MAX_JUMP_SIZE): New.
10536 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10537 IPA.
10538 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10539 support. Upload fast traceframes, and delete internal IPA
10540 breakpoints.
10541 (stop_tracing_handler): New.
10542 (flush_trace_buffer_handler): New.
10543 (cmd_qtstop): Upload fast tracepoints.
10544 (response_tracepoint): Handle fast tracepoints.
10545 (tracepoint_finished_step): Upload fast traceframes. Set the
10546 tracepoint hit context's tracepoint type.
10547 (handle_tracepoint_bkpts): New.
10548 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10549 type. Add comment about fast tracepoints.
10550 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10551 non-existing action_str field.
10552 (get_context_regcache): Handle fast tracepoints.
10553 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10554 to the regcache.
10555 (fast_tracepoint_from_jump_pad_address): New.
10556 (fast_tracepoint_from_ipa_tpoint_address): New.
10557 (collecting_t): New.
10558 (force_unlock_trace_buffer): New.
10559 (fast_tracepoint_collecting): New.
10560 (collecting): New.
10561 (gdb_collect): New.
10562 (write_inferior_data_ptr): New.
10563 (target_tp_heap): New.
10564 (target_malloc): New.
10565 (download_agent_expr): New.
10566 (UALIGN): New.
10567 (download_tracepoints): New.
10568 (download_trace_state_variables): New.
10569 (upload_fast_traceframes): New.
10570 (IPA_FIRST_TRACEFRAME): New.
10571 (IPA_NEXT_TRACEFRAME_1): New.
10572 (IPA_NEXT_TRACEFRAME): New.
10573 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10574 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10575 (gdb_jump_pad_buffer_end): New.
10576 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10577 (initialize_tracepoint): Adjust.
10578 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10579 buffer. Initialize the low module.
10580 * utils.c (PREFIX, TOOLNAME): New.
10581 (malloc_failure): Use PREFIX.
10582 (error): In the IPA, an error causes an exit.
10583 (fatal, warning): Use PREFIX.
10584 (internal_error): Use TOOLNAME.
10585 (NUMCELLS): Increase to 10.
10586 * configure, config.in: Regenerate.
10587
d149dd1d
PA
105882010-06-01 Pedro Alves <pedro@codesourcery.com>
10589
10590 * server.c (handle_query) <qSupported>: Do two passes over the
10591 qSupported string to avoid nesting strtok.
10592
f6528abd
JK
105932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10594
10595 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10596 (CDEPS): New.
10597 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10598 -Wl,--dynamic-list.
10599 * configure: Regenerate.
10600 * proc-service.list: New.
10601
ca2a87a0
JK
106022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10603
10604 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10605 New comment.
10606
363a6e9f
OS
106072010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10608
10609 * gdbreplay.c (remote_open): Check error return from socket() call by
10610 its equality to -1 not by it being negative.
10611 * remote-utils.c (remote_open): Likewise.
10612
d23b6cb1
PA
106132010-05-23 Pedro Alves <pedro@codesourcery.com>
10614
10615 * config.h: Regenerate.
10616
28d3cf85
MK
106172010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10618
10619 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10620 doesn't provide PTRACE_GET_THREAD_AREA.
10621
fea36a59
MK
106222010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10623
10624 * linux-m68k-low.c: Include <asm/ptrace.h>
10625 (ps_get_thread_area): Implement.
10626
24b066ba
DE
106272010-05-03 Doug Evans <dje@google.com>
10628
10629 * event-loop.c (struct callback_event): New struct.
10630 (callback_list): New global.
10631 (append_callback_event, delete_callback_event): New functions.
10632 (process_callback): New function.
10633 (start_event_loop): Call it.
10634 * remote-utils.c (NOT_SCHEDULED): Define.
10635 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10636 moved out of readchar.
10637 (readchar): Rewrite. Call reschedule before returning.
10638 (reset_readchar): New function.
10639 (remote_close): Call it.
10640 (process_remaining, reschedule): New functions.
10641 * server.h (callback_handler_func): New typedef.
10642 (append_callback_event, delete_callback_event): Declare.
10643
9836d6ea
PA
106442010-05-03 Pedro Alves <pedro@codesourcery.com>
10645
10646 * proc-service.c (ps_pglobal_lookup): Use
10647 thread_db_look_up_one_symbol.
10648 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10649 parameter. Use it instead of all_symbols_looked_up.
10650 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10651 field.
10652 (all_symbols_looked_up): Don't declare.
10653 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10654 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10655 field.
10656 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10657 Set all_symbols_looked_up here.
10658 (thread_db_look_up_one_symbol): New.
10659 (thread_db_get_tls_address): Adjust.
10660 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10661 thread_db object on the heap, and tentatively set it in the
10662 process structure.
10663 (thread_db_init): Don't set all_symbols_looked_up here.
10664 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10665
7984d532
PA
106662010-05-03 Pedro Alves <pedro@codesourcery.com>
10667
10668 * linux-low.c (linux_kill, linux_detach): Adjust.
10669 (status_pending_p_callback): Remove redundant statement. Check
10670 for !TARGET_WAITIKIND_IGNORE, instead of
10671 TARGET_WAITKIND_STOPPED.
10672 (handle_tracepoints): Make sure LWP is locked. Adjust.
10673 (linux_wait_for_event_1): Adjust.
10674 (linux_cancel_breakpoints): New.
10675 (unsuspend_one_lwp): New.
10676 (unsuspend_all_lwps): New.
10677 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10678 (send_sigstop_callback): Change return type to int, add new
10679 `except' parameter and handle it.
10680 (suspend_and_send_sigstop_callback): New.
10681 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10682 pass them down. If SUSPEND, also increment the lwp's suspend
10683 count.
10684 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10685 (need_step_over_p): Don't consider suspended LWPs.
10686 (start_step_over): Adjust.
10687 (proceed_one_lwp): Change return type to int, add new `except'
10688 parameter and handle it.
10689 (unsuspend_and_proceed_one_lwp): New.
10690 (proceed_all_lwps): Use find_inferior instead of
10691 for_each_inferior.
10692 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10693 also decrement the suspend count of LWPs. Pass `except' down,
10694 instead of hacking its suspend count.
10695 (linux_pause_all): Add `freeze' parameter. Adjust.
10696 (linux_unpause_all): New.
10697 (linux_target_ops): Install linux_unpause_all.
10698 * server.c (handle_status): Adjust.
10699 * target.h (struct target_ops): New fields `unpause_all' and
10700 `cancel_breakpoints'. Add new parameter to `pause_all'.
10701 (pause_all): Add new `freeze' parameter.
10702 (unpause_all): New.
10703 (cancel_breakpoints): New.
10704 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10705 cancel breakpoints.
10706 (cmd_qtstart): Pause threads.
10707 (stop_tracing): Pause threads, and cancel breakpoints.
10708 * win32-low.c (win32_target_ops): Adjust.
10709
e471f25b
PA
107102010-05-03 Pedro Alves <pedro@codesourcery.com>
10711
10712 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10713 the inferior right away from here...
10714 (linux_wait_1): ... to here, and adjust to check the thread's
10715 last_resume_kind instead of the lwp's step or stop_expected flags.
10716
1915ef4f
PA
107172010-05-02 Pedro Alves <pedro@codesourcery.com>
10718
10719 * README: Use consistent `GDB' and `GDBserver' spellings.
10720
f9e39928
PA
107212010-05-02 Pedro Alves <pedro@codesourcery.com>
10722
10723 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10724 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10725 (linux_detach_one_lwp): Assume the lwp is stopped.
10726 (any_thread_of): Delete.
10727 (linux_detach): Stop all lwps here. Don't blindly delete all
10728 breakpoints.
10729 (delete_lwp_callback): New.
10730 (linux_mourn): Delete all lwps of the process that is gone.
10731 (linux_wait_1): Don't delete the last lwp of the process here.
10732 * mem-break.h (mark_breakpoints_out): Declare.
10733 * mem-break.c (mark_breakpoints_out): New.
10734 (free_all_breakpoints): Use it.
10735 * server.c (handle_target_event): If the process is gone, mark
10736 breakpoints out.
10737 * thread-db.c (struct thread_db) <create_bp>: New field.
10738 (thread_db_enable_reporting): Fix prototype. Store a thread event
10739 breakpoint reference in the thread_db struct.
10740 (thread_db_load_search): Clear the thread_db object.
10741 (try_thread_db_load_1): Ditto.
10742 (switch_to_process): New.
10743 (disable_thread_event_reporting): Use it.
10744 (remove_thread_event_breakpoints): New.
10745 (thread_db_detach, thread_db_mourn): Use it.
10746
1e7fc18c
PA
107472010-05-01 Pedro Alves <pedro@codesourcery.com>
10748
10749 * linux-low.c (linux_enable_event_reporting): New.
10750 (linux_wait_for_event_1, handle_extended_wait): Use it.
10751
02fc4de7
PA
107522010-04-30 Pedro Alves <pedro@codesourcery.com>
10753
10754 * linux-low.c (linux_kill_one_lwp, linux_kill)
10755 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10756 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10757 SIGSTOP even if the LWP is stopped.
10758 (send_sigstop_callback): New.
10759 (stop_all_lwps): Use send_sigstop_callback instead.
10760 (linux_resume_one_thread): Adjust.
10761 (proceed_one_lwp): Still proceed an LWP that the client has
10762 requested to stop, if we haven't reported it as stopped yet. Make
10763 sure that LWPs the client want stopped, have a pending SIGSTOP.
10764
bc3b5632
DE
107652010-04-26 Doug Evans <dje@google.com>
10766
ae1ada35
DE
10767 * server.c (handle_general_set): Make static.
10768
bc3b5632
DE
10769 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10770 Print received char after testing for error/eof instead of before.
10771 (input_interrupt): Tweak comment.
10772
65730243
DE
107732010-04-23 Doug Evans <dje@google.com>
10774
10775 * server.c (start_inferior): Print inferior argv if --debug.
10776
a8ae7dc0
AR
107772010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10778
10779 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10780 * nto-x86-low.c: Include server.h
10781
1c07cc19
PM
107822010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10783
10784 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10785 be consistent with other sources of this directory.
10786 (init_registers_amd64): Correct name of source file of this function
10787 in the comment.
10788
e0a61e09
PM
107892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10790
10791 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10792 64-bit executables.
10793
54709339
PM
107942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10795
10796 * win32-i386-low.c: Add 64-bit support.
10797 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10798 (init_registers_amd64): Declare.
10799 (mappings): Add 64-bit version of array.
10800 (init_windows_x86): New function.
10801 (the_low_target): Change init_arch field to init_windows_x86.
10802
e8f0053d
PM
108032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10804
10805 * win32-low.c: Adapt to support also 64-bit architecture.
10806 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10807 (get_image_name): Use SIZE_T type for local variable `done'.
10808 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10809 (toolhelp_get_dll_name): Idem.
10810 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10811 Use uintptr_t typecast to avoid warning.
10812 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10813 (handle_exception): Use phex_nz to avoid warning.
10814 (win32_wait): Remove unused local variable `process'.
10815
c481e77e
PM
108162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10817
10818 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10819 `amd64-avx.o'.
10820
12ea4b69
PM
108212010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10822
10823 * configure.ac: Use `ws2_32' library for srv_mingw.
10824 * configure: Regenerate.
10825 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10826 * remote-utils.c: Likewise.
10827
f6d1620c
L
108282010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10829
10830 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10831 if __x86_64__ is defined.
10832
8e642873
PM
108332010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10834
10835 * configure: Regenerate.
10836
711e434b
PM
108372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10838
10839 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10840 * target.h (target_ops): New get_tib_address field.
10841 * win32-low.h (win32_thread_info): Add thread_local_base field.
10842 * win32-low.c (child_add_thread): Add tlb argument.
10843 Set thread_local_base field to TLB.
10844 (get_child_debug_event): Adapt to child_add_thread change.
10845 (win32_get_tib_address): New function.
10846 (win32_target_ops): Set get_tib_address field to
10847 win32_get_tib_address.
10848 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10849
505106cd
PA
108502010-04-12 Pedro Alves <pedro@codesourcery.com>
10851
505106cd
PA
10852 * linux-low.c (linux_mourn): Also remove the process.
10853 * server.c (handle_target_event): Don't remove the process here.
10854 * nto-low.c (nto_mourn): New.
10855 (nto_target_ops): Install it.
10856 * spu-low.c (spu_mourn): New.
10857 (spu_target_ops): Install it.
10858 * win32-low.c (win32_mourn): New.
10859 (win32_target_ops): Install it.
10860
e8470a06
PA
108612010-04-12 Pedro Alves <pedro@codesourcery.com>
10862
10863 * server.h (buffer_xml_printf): Remove redundant `;'.
10864
45ba0d02
PA
108652010-04-12 Pedro Alves <pedro@codesourcery.com>
10866
10867 * regcache.c (set_register_cache): Invalidate regcaches before
10868 changing the register cache layout.
10869 (regcache_invalidate_one): Allow a NULL regcache.
10870 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10871 regcaches before changing the register cache layout or the target
10872 regsets.
10873
59e04013
L
108742010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10875
10876 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10877 variable warning on Linux/x86-64.
10878
8336d594
PA
108792010-04-11 Pedro Alves <pedro@codesourcery.com>
10880
10881 GDBserver disconnected tracing support.
10882
10883 * linux-low.c (linux_remove_process): Delete.
10884 (add_lwp): Don't set last_resume_kind here.
10885 (linux_kill): Use `mourn'.
10886 (linux_detach): Use `thread_db_detach', and `mourn'.
10887 (linux_mourn): New.
10888 (linux_attach_lwp_1): Adjust comment.
10889 (linux_attach): last_resume_kind moved the thread_info; adjust.
10890 (status_pending_p_callback): Adjust.
10891 (linux_wait_for_event_1): Adjust.
10892 (count_events_callback, select_singlestep_lwp_callback)
10893 (select_event_lwp_callback, cancel_breakpoints_callback)
10894 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10895 (proceed_one_lwp): Adjust.
10896 (linux_async): Add debug output.
10897 (linux_thread_stopped): New.
10898 (linux_pause_all): New.
10899 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10900 linux_pause_all.
10901 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10902 (thread_db_free): Delete declaration.
10903 (thread_db_detach, thread_db_mourn): Declare.
10904 * thread-db.c (thread_db_init): Use thread_db_mourn.
10905 (thread_db_free): Delete, split in two.
10906 (disable_thread_event_reporting): New.
10907 (thread_db_detach): New.
10908 (thread_db_mourn): New.
10909
10910 * server.h (struct thread_info) <last_resume_kind>: New field.
10911 <attached>: Add comment.
10912 <gdb_detached>: New field.
10913 (handler_func): Change return type to int.
10914 (handle_serial_event, handle_target_event): Ditto.
10915 (gdb_connected): Declare.
10916 (tracing): Delete.
10917 (disconnected_tracing): Declare.
10918 (stop_tracing): Declare.
10919
10920 * server.c (handle_query) <qSupported>: Report support for
10921 disconnected tracing.
10922 (queue_stop_reply_callback): Account for running threads.
10923 (gdb_wants_thread_stopped): New.
10924 (gdb_wants_all_threads_stopped): New.
10925 (gdb_reattached_process): New.
10926 (handle_status): Clear the `gdb_detached' flag of all processes.
10927 In all-stop, stop all threads.
10928 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10929 (process_serial_event): If the remote connection breaks, or if an
10930 exit was forced with "monitor exit", force an event loop exit.
10931 Handle disconnected tracing on detach.
10932 (handle_serial_event): Adjust.
10933 (handle_target_event): If GDB isn't connected, forward events back
10934 to the inferior, unless the last process exited, in which case,
10935 exit gdbserver. Adjust interface.
10936
10937 * remote-utils.c (remote_open): Don't block in accept. Instead
10938 register an event loop source on the listen socket file
10939 descriptor. Refactor bits into ...
10940 (listen_desc): ... this new global.
10941 (gdb_connected): ... this new function.
10942 (enable_async_notification): ... this new function.
10943 (handle_accept_event): ... this new function.
10944 (remote_close): Clear remote_desc.
10945
10946 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10947
10948 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10949 New fields.
10950 (mourn_inferior): Define.
10951 (target_process_qsupported): Avoid the dangling else problem.
10952 (thread_stopped): Define.
10953 (pause_all): Define.
10954 (target_waitstatus_to_string): Declare.
10955 * target.c (target_waitstatus_to_string): New.
10956
10957 * tracepoint.c (tracing): Make extern.
10958 (disconnected_tracing): New.
10959 (stop_tracing): Make extern. Handle tracing stops due to GDB
10960 disconnecting.
10961 (cmd_qtdisconnected): New.
10962 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10963 (handle_tracepoint_general_set): Handle QTDisconnected.
10964
10965 * event-loop.c (event_handler_func): Change return type to int.
10966 (process_event): Bail out if the event handler wants the event
10967 loop to stop.
10968 (handle_file_event): Ditto.
10969 (start_event_loop): Bail out if the event handler wants the event
10970 loop to stop.
10971
10972 * nto-low.c (nto_target_ops): Adjust.
10973 * spu-low.c (spu_wait): Don't remove the process here.
10974 (spu_target_ops): Adjust.
10975 * win32-low.c (win32_wait): Don't remove the process here.
10976 (win32_target_ops): Adjust.
10977
5d267c4c
PA
109782010-04-11 Pedro Alves <pedro@codesourcery.com>
10979
10980 * regcache.c (realloc_register_cache): Invalidate inferior's
10981 regcache before recreating it.
10982
623ccd72
PA
109832010-04-09 Pedro Alves <pedro@codesourcery.com>
10984
10985 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10986
219f2f23
PA
109872010-04-09 Stan Shebs <stan@codesourcery.com>
10988 Pedro Alves <pedro@codesourcery.com>
10989
10990 * server.h (LONGEST): New.
10991 (struct thread_info) <while_stepping>: New field.
10992 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10993 Declare.
10994 (initialize_tracepoint, handle_tracepoint_general_set)
10995 (handle_tracepoint_query, tracepoint_finished_step)
10996 (tracepoint_was_hit, release_while_stepping_state_list):
10997 (current_traceframe): Declare.
10998 * server.c (handle_general_set): Handle tracepoint packets.
10999 (read_memory): New.
11000 (write_memory): New.
11001 (handle_search_memory_1): Use read_memory.
11002 (handle_query): Report support for conditional tracepoints, trace
11003 state variables, and tracepoint sources. Handle tracepoint
11004 queries.
11005 (main): Initialize the tracepoints module.
11006 (process_serial_event): Handle traceframe reads/writes.
11007
11008 * linux-low.c (handle_tracepoints): New.
11009 (linux_wait_1): Call it.
11010 (linux_resume_one_lwp): Handle while-stepping.
11011 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11012 (linux_target_ops): Install them.
11013 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11014 New field.
11015 * linux-x86-low.c (x86_supports_tracepoints): New.
11016 (the_low_target). Install it.
11017
11018 * mem-break.h (delete_breakpoint): Declare.
11019 * mem-break.c (delete_breakpoint): Make external.
11020
11021 * target.h (struct target_ops): Add `supports_tracepoints',
11022 `read_pc', and `write_pc' fields.
11023 (target_supports_tracepoints): Define.
11024 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11025 (phex_nz): New.
11026
11027 * regcache.h (struct regcache) <registers_owned>: New field.
11028 (init_register_cache, regcache_cpy): Declare.
11029 (regcache_read_pc, regcache_write_pc): Declare.
11030 (register_cache_size): Declare.
11031 (supply_regblock): Declare.
11032 * regcache.c (init_register_cache): New.
11033 (new_register_cache): Use it.
11034 (regcache_cpy): New.
11035 (register_cache_size): New.
11036 (supply_regblock): New.
11037 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11038
219f2f23
PA
11039 * tracepoint.c: New.
11040
11041 * Makefile.in (OBS): Add tracepoint.o.
11042 (tracepoint.o): New rule.
11043
3a13a53b
L
110442010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11045
11046 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11047 (i386-mmx.o): New.
11048 (i386-mmx.c): Likewise.
11049 (i386-mmx-linux.o): Likewise.
11050 (i386-mmx-linux.c): Likewise.
11051
11052 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11053 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11054 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11055 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11056
11057 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11058 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11059 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11060
1570b33e
L
110612010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11062
11063 * Makefile.in (clean): Updated.
11064 (i386-avx.o): New.
11065 (i386-avx.c): Likewise.
11066 (i386-avx-linux.o): Likewise.
11067 (i386-avx-linux.c): Likewise.
11068 (amd64-avx.o): Likewise.
11069 (amd64-avx.c): Likewise.
11070 (amd64-avx-linux.o): Likewise.
11071 (amd64-avx-linux.c): Likewise.
11072
11073 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11074 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11075 (srv_amd64_regobj): Add amd64-avx.o.
11076 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11077 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11078 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11079 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11080 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11081 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11082 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11083
11084 * i387-fp.c: Include "i386-xstate.h".
11085 (i387_xsave): New.
11086 (i387_cache_to_xsave): Likewise.
11087 (i387_xsave_to_cache): Likewise.
11088 (x86_xcr0): Likewise.
11089
11090 * i387-fp.h (i387_cache_to_xsave): Likewise.
11091 (i387_xsave_to_cache): Likewise.
11092 (x86_xcr0): Likewise.
11093
11094 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11095 * linux-crisv32-low.c (target_regsets): Likewise.
11096 * linux-m68k-low.c (target_regsets): Likewise.
11097 * linux-mips-low.c (target_regsets): Likewise.
11098 * linux-ppc-low.c (target_regsets): Likewise.
11099 * linux-s390-low.c (target_regsets): Likewise.
11100 * linux-sh-low.c (target_regsets): Likewise.
11101 * linux-sparc-low.c (target_regsets): Likewise.
11102 * linux-xtensa-low.c (target_regsets): Likewise.
11103
11104 * linux-low.c: Include <sys/uio.h>.
11105 (regsets_fetch_inferior_registers): Support nt_type.
11106 (regsets_store_inferior_registers): Likewise.
11107 (linux_process_qsupported): New.
11108 (linux_target_ops): Add linux_process_qsupported.
11109
11110 * linux-low.h (regset_info): Add nt_type.
11111 (linux_target_ops): Add process_qsupported.
11112
11113 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11114 and <sys/uio.h>.
11115 (init_registers_i386_avx_linux): New.
11116 (init_registers_amd64_avx_linux): Likewise.
11117 (xmltarget_i386_linux_no_xml): Likewise.
11118 (xmltarget_amd64_linux_no_xml): Likewise.
11119 (PTRACE_GETREGSET): Likewise.
11120 (PTRACE_SETREGSET): Likewise.
11121 (x86_fill_xstateregset): Likewise.
11122 (x86_store_xstateregset): Likewise.
11123 (use_xml): Likewise.
11124 (x86_linux_update_xmltarget): Likewise.
11125 (x86_linux_process_qsupported): Likewise.
11126 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11127 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11128 init_registers_i386_linux here. Call
11129 x86_linux_update_xmltarget.
11130 (the_low_target): Add x86_linux_process_qsupported.
11131
11132 * server.c (handle_query): Call target_process_qsupported.
11133
11134 * target.h (target_ops): Add process_qsupported.
11135 (target_process_qsupported): New.
11136
fc7238bb
PA
111372010-04-03 Pedro Alves <pedro@codesourcery.com>
11138
11139 * inferiors.c (add_thread): Set last_status kind to
11140 TARGET_WAITKIND_IGNORE.
11141 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11142 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11143 (linux_wait_1): Move `thread' local definition to block that uses
11144 it. Don't NULL initialize `event_child'.
11145 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11146 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11147 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11148
bdabb078
PA
111492010-04-01 Pedro Alves <pedro@codesourcery.com>
11150
11151 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11152 an extended waitstatus, or by a watchpoint.
11153 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11154 thread was stepping or has been stopped by a watchpoint.
11155
d3bbe7a0
PA
111562010-04-01 Pedro Alves <pedro@codesourcery.com>
11157
11158 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11159 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11160 of another, then delete the previous, and validate all
11161 breakpoints.
11162 (validate_inserted_breakpoint): New.
11163 (delete_disabled_breakpoints): New.
11164 (validate_breakpoints): New.
11165 (check_mem_read): Validate breakpoints before trusting their
11166 shadow. Delete disabled breakpoints.
11167 (check_mem_write): Validate breakpoints before trusting they
11168 should be inserted. Delete disabled breakpoints.
11169 * mem-break.h (validate_breakpoints):
11170 * server.c (handle_query): Validate breakpoints when we see a
11171 qSymbol query.
11172
8b07ae33
PA
111732010-04-01 Pedro Alves <pedro@codesourcery.com>
11174
11175 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11176 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11177 if we could tell there's a GDB breakpoint at stop_pc.
11178 (need_step_over_p): Don't do a step over if we find a GDB
11179 breakpoint at the resume PC.
11180
11181 * mem-break.c (struct raw_breakpoint): New.
11182 (enum bkpt_type): New type `gdb_breakpoint'.
11183 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11184 fields. New field `raw'.
11185 (find_raw_breakpoint_at): New.
11186 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11187 breakpoint instead.
11188 (set_breakpoint_at): Adjust.
11189 (delete_raw_breakpoint): New.
11190 (release_breakpoint): New.
11191 (delete_breakpoint): Rename to...
11192 (delete_breakpoint_1): ... this. Add proc parameter. Use
11193 release_breakpoint. Return ENOENT.
11194 (delete_breakpoint): Reimplement.
11195 (find_breakpoint_at): Delete.
11196 (find_gdb_breakpoint_at): New.
11197 (delete_breakpoint_at): Delete.
11198 (set_gdb_breakpoint_at): New.
11199 (delete_gdb_breakpoint_at): New.
11200 (gdb_breakpoint_here): New.
11201 (set_reinsert_breakpoint): Use release_breakpoint.
11202 (uninsert_breakpoint): Rename to ...
11203 (uninsert_raw_breakpoint): ... this.
11204 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11205 (reinsert_raw_breakpoint): Change parameter type to
11206 raw_breakpoint.
11207 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11208 instead.
11209 (check_breakpoints): Adjust. Use release_breakpoint.
11210 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11211 (breakpoint_inserted_here): Ditto.
11212 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11213 Don't trust the breakpoint's shadow if it is not inserted.
11214 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11215 (delete_all_breakpoints): Adjust.
11216 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11217 use delete_breakpoint_1.
11218
11219 * mem-break.h (breakpoints_supported): Delete declaration.
11220 (set_gdb_breakpoint_at): Declare.
11221 (gdb_breakpoint_here): Declare.
11222 (delete_breakpoint_at): Delete.
11223 (delete_gdb_breakpoint_at): Declare.
11224
11225 * server.h (struct raw_breakpoint): Forward declare.
11226 (struct process_info): New field `raw_breakpoints'.
11227
11228 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11229 breakpoints.
11230
6bf5e0ba
PA
112312010-03-24 Pedro Alves <pedro@codesourcery.com>
11232
11233 * linux-low.c (status_pending_p_callback): Fix comment.
11234 (linux_wait_for_event_1): Move most of the internal breakpoint
11235 handling from here...
11236 (linux_wait_1): ... to here.
11237 (count_events_callback): New.
11238 (select_singlestep_lwp_callback): New.
11239 (select_event_lwp_callback): New.
11240 (cancel_breakpoints_callback): New.
11241 (select_event_lwp): New.
11242 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11243 priority to all LWPs that have had events that should be reported
11244 to the client. Cancel breakpoints when about to reporting the
11245 event to the client, not while stopping lwps. No longer cancel
11246 finished single-steps here.
11247 (cancel_finished_single_step): Delete.
11248 (cancel_finished_single_steps): Delete.
11249
414a389f
PA
112502010-03-24 Pedro Alves <pedro@codesourcery.com>
11251
11252 * mem-break.c (enum bkpt_type): New.
11253 (struct breakpoint): New field `type'.
11254 (set_breakpoint_at): Change return type to struct breakpoint
11255 pointer. Set type to `other_breakpoint' by default.
11256 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11257 in the breakpoint list.
11258 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11259 (reinsert_breakpoint): Rename to ...
11260 (reinsert_raw_breakpoint): ... this.
11261 (reinsert_breakpoints_at): Adjust.
11262 * mem-break.h (struct breakpoint): Declare.
11263 (set_breakpoint_at): Change return type to struct breakpoint
11264 pointer.
11265
2280c721
PA
112662010-03-24 Pedro Alves <pedro@codesourcery.com>
11267
11268 * server.c (handle_query): Assign, not compare.
11269
d50171e4
PA
112702010-03-24 Pedro Alves <pedro@codesourcery.com>
11271
11272 Teach linux gdbserver to step-over-breakpoints.
11273
11274 * linux-low.c (can_hardware_single_step): New.
11275 (supports_breakpoints): New.
11276 (handle_extended_wait): If stopping threads, read the stop pc of
11277 the new cloned LWP.
11278 (get_pc): New.
11279 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11280 low target doesn't support retrieving the PC.
11281 (add_lwp): Set last_resume_kind to resume_continue.
11282 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11283 (linux_attach): Don't clear stop_expected. Set the lwp's
11284 last_resume_kind to resume_stop.
11285 (linux_detach_one_lwp): Don't check for removed breakpoints.
11286 (check_removed_breakpoint): Delete.
11287 (status_pending_p): Rename to ...
11288 (status_pending_p_callback): ... this. Don't check for removed
11289 breakpoints. Don't consider threads that are stopped from GDB's
11290 perspective.
11291 (linux_wait_for_lwp): Always read the stop_pc here.
11292 (cancel_breakpoint): New.
11293 (step_over_bkpt): New global.
11294 (linux_wait_for_event_1): Implement stepping over breakpoints.
11295 (gdb_wants_lwp_stopped): New.
11296 (gdb_wants_all_stopped): New.
11297 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11298 single-step traps here. Store the thread's last reported target
11299 wait status.
11300 (send_sigstop): Don't clear stop_expected. Always set it,
11301 instead.
11302 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11303 (cancel_finished_single_step): New.
11304 (cancel_finished_single_steps): New.
11305 (wait_for_sigstop): Don't cancel finished single-step traps here.
11306 (linux_resume_one_lwp): Don't check for removed breakpoints.
11307 Don't set `step' on non-hardware step archs.
11308 (linux_set_resume_request): Ignore resume_stop requests if already
11309 stopping or stopped. Set the lwp's last_resume_kind.
11310 (resume_status_pending_p): Don't check for removed breakpoints.
11311 (need_step_over_p): New.
11312 (start_step_over): New.
11313 (finish_step_over): New.
11314 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11315 requests. Clear the thread's last reported target waitstatus.
11316 Don't use the `suspended' flag. Don't consider pending breakpoints.
11317 (linux_resume): Start a step-over if necessary.
11318 (proceed_one_lwp): New.
11319 (proceed_all_lwps): New.
11320 (unstop_all_lwps): New.
11321 * linux-low.h (struct lwp_info): Rewrite comment for the
11322 `suspended' flag. Add the `stop_pc' field. Delete the
11323 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11324 Add `'last_resume_kind' and `need_step_over' fields.
11325 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11326 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11327 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11328 (set_raw_breakpoint_at): New.
11329 (set_breakpoint_at): Rewrite to use it.
11330 (reinsert_breakpoint_handler): Delete.
11331 (set_reinsert_breakpoint): New.
11332 (reinsert_breakpoint_by_bp): Delete.
11333 (delete_reinsert_breakpoints): New.
11334 (uninsert_breakpoint): Rewrite.
11335 (uninsert_breakpoints_at): New.
11336 (reinsert_breakpoint): Rewrite.
11337 (reinsert_breakpoints_at): New.
11338 (check_breakpoints): Rewrite.
11339 (breakpoint_here): New.
11340 (breakpoint_inserted_here): New.
11341 (check_mem_read): Adjust.
11342 * mem-break.h (breakpoints_supported, breakpoint_here)
11343 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11344 (reinsert_breakpoint_by_bp): Delete declaration.
11345 (delete_reinsert_breakpoints): Declare.
11346 (reinsert_breakpoint): Delete declaration.
11347 (reinsert_breakpoints_at): Declare.
11348 (uninsert_breakpoint): Delete declaration.
11349 (uninsert_breakpoints_at): Declare.
11350 (check_breakpoints): Adjust prototype.
11351 * server.h: Adjust include order.
11352 (struct thread_info): Declare here. Add a `last_status' field.
11353
30ba68cb
MS
113542010-03-23 Michael Snyder <msnyder@vmware.com>
11355
11356 * server.c (crc32): New function.
11357 (handle_query): Add handling for 'qCRC:' request.
11358
b9a881c2
PA
113592010-03-23 Pedro Alves <pedro@codesourcery.com>
11360
11361 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11362 lwp had been stopped by a watchpoint.
11363
e92d13d5
PA
113642010-03-16 Pedro Alves <pedro@codesourcery.com>
11365
11366 * server.h (internal_error): Declare.
11367 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11368 * utils.c (internal_error): New function.
11369
64daa791
AS
113702010-03-15 Andreas Schwab <schwab@redhat.com>
11371
11372 * configure.srv: Fix typo setting srv_regobj.
11373
f52cd8cd
PA
113742010-03-15 Pedro Alves <pedro@codesourcery.com>
11375
11376 * linux-low.c (fetch_register): Avoid passing a non string literal
11377 format to `error'.
11378 (usr_store_inferior_registers): Ditto.
11379
93ae6fdc
PA
113802010-03-14 Pedro Alves <pedro@codesourcery.com>
11381
11382 * linux-low.c (linux_write_memory): Bail out early if peeking
11383 memory failed.
11384
c3adc08c
PA
113852010-03-14 Pedro Alves <pedro@codesourcery.com>
11386
11387 * linux-low.h (struct lwp_info): New fields
11388 `stopped_by_watchpoint' and `stopped_data_address'.
11389 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11390 here, and cache them in the lwp object.
11391 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11392 directly.
11393 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11394 field.
11395 (linux_stopped_by_watchpoint): Rewrite.
11396 (linux_stopped_data_address): Rewrite.
11397
bce522a2
PA
113982010-03-06 Simo Melenius <simo.melenius@iki.fi>
11399
11400 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11401 switching the current inferior, not before.
11402
90884b2b
L
114032010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11404
11405 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11406 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11407 i386-linux.c and amd64-linux.c.
11408 (reg-i386.o): Removed.
11409 (reg-i386.c): Likewise.
11410 (reg-i386-linux.o): Likewise.
11411 (reg-i386-linux.c): Likewise.
11412 (reg-x86-64.o): Likewise.
11413 (reg-x86-64.c): Likewise.
11414 (reg-x86-64-linux.o): Likewise.
11415 (reg-x86-64-linux.c): Likewise.
11416 (i386.o): New.
11417 (i386.c): Likewise.
11418 (i386-linux.o): Likewise.
11419 (i386-linux.c): Likewise.
11420 (amd64.o): Likewise.
11421 (amd64.c): Likewise.
11422 (amd64-linux.o): Likewise.
11423 (amd64-linux.c): Likewise.
11424
11425 * configure.srv (srv_i386_regobj): New.
11426 (srv_i386_linux_regobj): Likewise.
11427 (srv_amd64_regobj): Likewise.
11428 (srv_amd64_linux_regobj): Likewise.
11429 (srv_i386_32bit_xmlfiles): Likewise.
11430 (srv_i386_64bit_xmlfiles): Likewise.
11431 (srv_i386_xmlfiles): Likewise.
11432 (srv_amd64_xmlfiles): Likewise.
11433 (srv_i386_linux_xmlfiles): Likewise.
11434 (srv_amd64_linux_xmlfiles): Likewise.
11435 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11436 srv_xmlfiles to $srv_i386_xmlfiles.
11437 (i[34567]86-*-mingw32ce*): Likewise.
11438 (i[34567]86-*-mingw*): Likewise.
11439 (i[34567]86-*-nto*): Likewise.
11440 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11441 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11442 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11443 (x86_64-*-linux*): Likewise.
11444
11445 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11446 (init_registers_amd64_linux): New.
11447 (x86_arch_setup): Replace init_registers_x86_64_linux with
11448 init_registers_amd64_linux.
11449
193f13e6
MK
114502010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11451
11452 * configure.ac: Check for libdl. If it is not available link against
11453 static libthread_db.
11454 * configure: Regenerate.
11455
85d721b8
PA
114562010-02-22 Pedro Alves <pedro@codesourcery.com>
11457
11458 PR9605
11459
11460 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11461 handing a read watchpoint.
11462 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11463
6076632b
DE
114642010-02-12 Doug Evans <dje@google.com>
11465
11466 * linux-low.c (linux_supports_tracefork_flag): Document.
11467 (linux_look_up_symbols): Add comment.
11468
3327ccf7
L
114692010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11470
11471 * regcache.c (supply_register): Clear regcache if buf is NULL.
11472
0718675c 114732010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11474 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11475
11476 * inferiors.c (find_inferior): Add function documentation.
11477 (unloaded_dll): Handle the case where the unloaded dll has not
11478 been previously registered in the dll list.
11479
177321bd
DJ
114802010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11481
11482 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11483 (thumb2_breakpoint): New.
11484 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11485
2b009048
DJ
114862010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11487
11488 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11489 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11490 breakpoints.
11491
3be029c7
PA
114922010-01-21 Pedro Alves <pedro@codesourcery.com>
11493
11494 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11495
18f5de3b
JK
114962010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11497
11498 * linux-s390-low.c (s390_collect_ptrace_register)
11499 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11500
3743bb4f
DE
115012010-01-21 Doug Evans <dje@google.com>
11502
14ce3065
DE
11503 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11504 (PTRACE_ARG4_TYPE): New macro.
11505 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11506 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11507 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11508 (usr_store_inferior_registers): Ditto.
11509 (linux_read_memory, linux_write_memory): Ditto.
11510 (linux_test_for_tracefork): Ditto.
11511
3743bb4f
DE
11512 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11513 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11514
8b315be5
PA
115152010-01-21 Pedro Alves <pedro@codesourcery.com>
11516
11517 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11518 target.
11519
85492558
PA
115202010-01-21 Pedro Alves <pedro@codesourcery.com>
11521
11522 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11523 prototype to take a regcache. Adjust.
11524
442ea881
PA
115252010-01-20 Pedro Alves <pedro@codesourcery.com>
11526
11527 * regcache.h (struct thread_info): Forward declare.
11528 (struct regcache): New.
11529 (new_register_cache): Adjust prototype.
11530 (get_thread_regcache): Declare.
11531 (free_register_cache): Adjust prototype.
11532 (registers_to_string, registers_from_string): Ditto.
11533 (supply_register, supply_register_by_name, collect_register)
11534 (collect_register_as_string, collect_register_by_name): Ditto.
11535 * regcache.c (struct inferior_regcache_data): Delete.
11536 (get_regcache): Rename to ...
11537 (get_thread_regcache): ... this. Adjust. Switch inferior before
11538 fetching registers.
11539 (regcache_invalidate_one): Adjust.
11540 (regcache_invalidate): Fix prototype.
11541 (new_register_cache): Return the new register cache.
11542 (free_register_cache): Change prototype.
11543 (realloc_register_cache): Adjust.
11544 (registers_to_string): Change prototype to take a regcache. Adjust.
11545 (registers_from_string): Ditto.
11546 (register_data): Ditto.
11547 (supply_register): Ditto.
11548 (supply_register_by_name): Ditto.
11549 (collect_register): Ditto.
11550 (collect_register_as_string): Ditto.
11551 (collect_register_by_name): Ditto.
11552 * server.c (process_serial_event): Adjust.
11553 * linux-low.h (regset_fill_func, regset_store_func): Change
11554 prototype.
11555 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11556 Change prototype.
11557 * linux-low.c (get_stop_pc): Adjust.
11558 (check_removed_breakpoint): Adjust.
11559 (linux_wait_for_event): Adjust.
11560 (linux_resume_one_lwp): Adjust.
11561 (fetch_register): Add regcache parameter. Adjust.
11562 (usr_store_inferior_registers): Ditto.
11563 (regsets_fetch_inferior_registers): Ditto.
11564 (regsets_store_inferior_registers): Ditto.
11565 (linux_fetch_registers, linux_store_registers): Ditto.
11566 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11567 regcache. Adjust.
43aaf8b6
PA
11568 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11569 Ditto.
442ea881
PA
11570 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11571 prototype to take a regcache.
11572 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11573 * remote-utils.c (convert_ascii_to_int, outreg)
11574 (prepare_resume_reply): Change prototype to take a regcache.
11575 Adjust.
11576 * target.h (struct target_ops) <fetch_registers, store_registers>:
11577 Change prototype to take a regcache.
11578 (fetch_inferior_registers, store_inferior_registers): Change
11579 prototype to take a regcache. Adjust.
11580 * proc-service.c (ps_lgetregs): Adjust.
11581 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11582 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11583 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11584 take a regcache. Adjust.
11585 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11586 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11587 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11588 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11589 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11590 (cris_cannot_fetch_register):
11591 (cris_breakpoint_at): Change prototype to take a regcache.
11592 Adjust.
11593 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11594 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11595 to take a regcache. Adjust.
11596 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11597 Adjust.
11598 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11599 take a regcache. Adjust.
11600 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11601 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11602 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11603 * linux-mips-low.c (mips_get_pc):
11604 (mips_set_pc): Change prototype to take a regcache. Adjust.
11605 (mips_reinsert_addr): Adjust.
11606 (mips_collect_register): Change prototype to take a regcache.
11607 Adjust.
11608 (mips_supply_register):
11609 (mips_collect_register_32bit, mips_supply_register_32bit)
11610 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11611 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11612 * linux-ppc-low.c (ppc_supply_ptrace_register)
11613 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11614 (parse_spufs_run): Adjust.
11615 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11616 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11617 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11618 take a regcache. Adjust.
11619 * linux-s390-low.c (s390_collect_ptrace_register)
11620 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11621 (s390_set_pc): Change prototype to take a regcache. Adjust.
11622 (s390_arch_setup): Adjust.
11623 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11624 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11625 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11626 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11627 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11628 regcache. Adjust.
11629 (sparc_breakpoint_at): Adjust.
11630 * linux-xtensa-low.c (xtensa_fill_gregset):
11631 (xtensa_store_gregset):
11632 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11633 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11634 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11635 prototype to take a regcache. Adjust.
11636 * win32-arm-low.c (arm_fetch_inferior_register)
11637 (arm_store_inferior_register): Change prototype to take a
11638 regcache. Adjust.
11639 * win32-i386-low.c (i386_fetch_inferior_register)
11640 (i386_store_inferior_register): Change prototype to take a
11641 regcache. Adjust.
11642 * win32-low.c (child_fetch_inferior_registers)
11643 (child_store_inferior_registers): Change prototype to take a
11644 regcache. Adjust.
11645 (win32_wait): Adjust.
11646 (win32_fetch_inferior_registers): Change prototype to take a
11647 regcache. Adjust.
11648 (win32_store_inferior_registers): Adjust.
11649 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11650 store_inferior_register>: Change prototype to take a regcache.
11651
60c3d7b0
DE
116522010-01-20 Doug Evans <dje@google.com>
11653
11654 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11655 #ifdef.
11656 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11657 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11658
dc146f7c
VP
116592010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11660
11661 * linux-low.c (linux_core_of_thread): New.
11662 (compare_ints, show_process, list_threads): New.
11663 (linux_qxfer_osdata): Report threads and cores.
11664 (linux_target_op): Register linux_core_of_thread.
11665 * remote-utils.c (prepare_resume_reply): Report the core.
11666 (buffer_xml_printf): Support %d specifier.
11667 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11668 New.
11669 (handle_query): Handle qXfer:threads. Announce availability
11670 thereof.
11671 * target.h (struct target_ops): New field core_of_thread.
11672
7803799a
UW
116732010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11674
11675 * Makefile.in (clean): Remove new generated files.
11676 (reg-s390.o, reg-s390.c): Remove rules.
11677 (reg-s390x.o, reg-s390x.c): Likewise.
11678 (s390-linux32.o, s390-linux32.c): Add rules.
11679 (s390-linux64.o, s390-linux64.c): Likewise.
11680 (s390x-linux64.o, s390x-linux64.c): Likewise.
11681 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11682 * linux-s390-low.c: Include <elf.h>.
11683 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11684 (init_registers_s390): Remove prototype.
11685 (init_registers_s390x): Likewise.
11686 (init_registers_s390_linux32): Add prototype.
11687 (init_registers_s390_linux64): Likewise.
11688 (init_registers_s390x_linux64): Likewise.
11689 (s390_num_regs_3264): New define.
11690 (s390_regmap_3264): New global variable.
11691 (s390_cannot_fetch_register): Remove obsolete check.
11692 (s390_cannot_store_register): Likewise.
11693 (s390_collect_ptrace_register): Handle upper/lower register halves.
11694 (s390_supply_ptrace_register): Likewise.
11695 (s390_fill_gregset): Update to register number changes.
11696 (s390_get_hwcap): New routine.
11697 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11698 Install appropriate regmap and register set.
11699
6e7ffa39
JB
117002010-01-01 Joel Brobecker <brobecker@adacore.com>
11701
11702 * server.c (gdbserver_version): Update copyright year to 2010.
11703 * gdbreplay.c (gdbreplay_version): Likewise.
11704
957f3f49
DE
117052009-12-28 Doug Evans <dje@google.com>
11706
11707 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11708 elf/external.h. Include <elf.h> instead but only if necessary.
11709
ca5c370d
PA
117102009-12-28 Pedro Alves <pedro@codesourcery.com>
11711
11712 * linux-low.c (linux_remove_process): Remove `detaching'
11713 parameter. Don't release/detach from thread_db here.
11714 (linux_kill): Release/detach from thread_db here, ...
11715 (linux_detach): ... and here, before actually detaching.
11716 (linux_wait_1): ... and here, when a process exits.
11717 * thread-db.c (any_thread_of): New.
11718 (thread_db_free): Switch the current inferior to a thread of the
11719 passed in process.
11720
4ee62156
DE
117212009-12-21 Doug Evans <dje@google.com>
11722
d90e6a88
DE
11723 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11724
c5f62d5f
DE
11725 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11726 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11727 warning ifndef __NR_tkill. Move setting of errno there too.
11728 Delete unnecessary resetting of errno after syscall.
11729 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11730
10e86dd7
DE
11731 * configure.ac: Check for dladdr.
11732 * config.in: Regenerate.
11733 * configure: Regenerate.
11734 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11735 (try_thread_db_load): Update.
11736
4ee62156
DE
11737 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11738
00f515da
DE
117392009-12-18 Doug Evans <dje@google.com>
11740
e9464885
DE
11741 * event-loop.c: Include unistd.h if it exists.
11742
07d4f67e
DE
11743 * linux-low.c (my_waitpid): Move definition away from being in
11744 between linux_tracefork_child/linux_test_for_tracefork.
11745
00f515da
DE
11746 * gdb_proc_service.h (psaddr_t): Fix type.
11747 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11748 signature to match glibc.
11749
1de1badb
DE
117502009-12-16 Doug Evans <dje@google.com>
11751
11752 * linux-low.c (linux_read_memory): Fix argument to read.
11753
aeeb81d1
PA
117542009-11-26 Pedro Alves <pedro@codesourcery.com>
11755
11756 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11757 events, don't leave current_inferior pointing at null.
11758
10357975
PA
117592009-11-26 Pedro Alves <pedro@codesourcery.com>
11760
11761 * win32-low.c (LOG): Delete.
11762 (OUTMSG): Output to stderr.
11763 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11764 on compile time LOG macro.
11765 (win32_wait): Fix debug output.
11766
cf6e3471
PA
117672009-11-26 Pedro Alves <pedro@codesourcery.com>
11768
11769 * win32-low.c (win32_add_one_solib): If the dll name is
11770 "ntdll.dll", prepend the system directory to the dll path.
11771
0c85e18e
MK
117722009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11773
11774 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11775
9ac544ce 117762009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11777 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11778
11779 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11780 * configure.ac: Check for __mcoldfire__ and set
11781 gdb_cv_m68k_is_coldfire.
11782 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11783 reg-cf.o and reg-m68k.o.
11784 * configure: Regenerated.
11785
fd7dd3e6
PA
117862009-11-16 Pedro Alves <pedro@codesourcery.com>
11787
11788 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11789 Pass it to thread_db_free.
11790 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11791 proper `detaching' argument to linux_remove_process.
11792 * linux-low.h (thread_db_free): Add `detaching' parameter.
11793 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11794 to thread_db_free.
11795 (thread_db_free): Add `detaching' parameter. Only
11796 call td_ta_clear_event if detaching from process.
11797
75aa492e
MK
117982009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11799
11800 * thread-db.c (thread_db_free): Fix typo.
11801
21e1bee4
PP
118022009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11803
11804 PR gdb/10838
11805 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11806
8838b45e
NS
118072009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11808
11809 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11810 with an i686 compiler.
11811 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11812 needed.
11813 * configure: Rebuilt.
11814
8a35fb51
SL
118152009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11816
11817 PR gdb/10783
11818
11819 * server.c (handle_search_memory_1): Correct read_addr initialization
11820 in loop for searching subsequent chunks.
11821
96f15937
PP
118222009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11823
11824 * configure.ac: New --with-libthread-db option.
11825 * thread-db.c: Allow direct dependence on libthread_db.
11826 (thread_db_free): Adjust.
11827 * config.in: Regenerate.
11828 * configure: Likewise.
889bf7c5 11829
5f7d1694
PP
118302009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11831
11832 PR gdb/10757
11833 * thread-db.c (attach_thread): New function.
11834 (maybe_attach_thread): Return success/failure.
11835 (find_new_threads_callback): Adjust.
889bf7c5
PA
11836 (thread_db_find_new_threads): Loop until no new threads.
11837
88e3b899
PA
118382009-10-13 Pedro Alves <pedro@codesourcery.com>
11839
11840 * proc-service.c (ps_lgetregs): Formatting.
11841
cdbfd419
PP
118422009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11843
11844 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11845 * configure.ac: Adjust.
11846 * linux-low.h (struct process_info_private): Move members to struct
11847 thread_db.
11848 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11849 * linux-low.c (linux_remove_process): Adjust.
11850 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11851 * server.c (handle_query): Move code ...
11852 (handle_monitor_command): ... here. New function.
11853 * target.h (struct target_ops): New member.
11854 * thread-db.c (struct thread_db): New.
11855 (libthread_db_search_path): New variable.
11856 (thread_db_create_event, thread_db_enable_reporting)
11857 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11858 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11859 (try_thread_db_load_1, dladdr_to_soname): New functions.
11860 (try_thread_db_load, thread_db_load_search): New functions.
11861 (thread_db_init): Search for libthread_db.
11862 (thread_db_free): New function.
11863 (thread_db_handle_monitor_command): Likewise.
11864 * config.in: Regenerate.
11865 * configure: Regenerate.
889bf7c5 11866
4168d2d6
UW
118672009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11868
11869 * spu-low.c (spu_kill): Wait for inferior to terminate.
11870 Call clear_inferiors.
11871 (spu_detach): Call clear_inferiors.
11872
81ecdfbb
RW
118732009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11874
11875 * aclocal.m4: Regenerate.
11876 * config.in: Likewise.
11877 * configure: Likewise.
11878
0b9ff2c0
UW
118792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11880
11881 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11882 (parse_spufs_run): New function.
11883 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11884 (ppc_breakpoint_at): Handle SPU breakpoints.
11885
efcbbd14
UW
118862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11887
11888 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11889 (SPUFS_MAGIC): Define.
11890 (spu_enumerate_spu_ids): New function.
11891 (linux_qxfer_spu): New function.
11892 (linux_target_ops): Install linux_qxfer_spu.
11893
f4d9bade
UW
118942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11895
11896 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11897 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11898 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11899 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11900 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11901 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11902 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11903 (init_registers_powerpc_cell32l): Add prototype.
11904 (init_registers_powerpc_cell64l): Likewise.
11905 (ppc_arch_setup): Detect Cell/B.E. architecture.
11906
96e946ca
RW
119072009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11908
11909 * Makefile.in (datarootdir): New variable.
11910
58d6951d
DJ
119112009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11912
11913 * linux-low.c (linux_write_memory): Update debugging output.
11914 * Makefile.in (clean): Add new descriptions.
11915 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11916 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11917 * configure.srv: Add new files for arm*-*-linux*.
11918 * linux-arm-low.c: Add new declarations.
11919 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11920 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11921 (HWCAP_VFPv3D16): New.
11922 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11923 instead of __IWMMXT__.
11924 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11925 (arm_arch_setup): New.
11926 (target_regsets): Remove #ifdef. Add VFP regset.
11927 (the_low_target): Use arm_arch_setup.
11928
12b42a12
DJ
119292009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11930
11931 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11932 the main thread again.
11933
ac8c974e
AR
119342009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11935
11936 Adding Neutrino gdbserver.
11937 * configure: Regenerated.
11938 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11939 * configure.srv (i[34567]86-*-nto*): New target.
11940 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11941 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11942 (nto_comctrl) [__QNX__]: New function.
11943 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11944
4424e0c3 119452009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11946
11947 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11948 srv_tgtobj.
11949
912cf4ba
PA
119502009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11951 Pedro Alves <pedro@codesourcery.com>
11952
11953 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11954 don't support CONTEXT_EXTENDED_REGISTERS.
11955 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11956 (the_low_target): Install them.
11957 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11958 failing with ERROR_PIPE_NOT_CONNECTED.
11959
aa5ca48f
DE
119602009-06-30 Doug Evans <dje@google.com>
11961 Pierre Muller <muller@ics.u-strasbg.fr>
11962
11963 Add h/w watchpoint support to x86-linux, win32-i386.
11964 * Makefile.in (SFILES): Add i386-low.c
11965 (i386_low_h): Define.
11966 (i386-low.o): Add dependencies.
11967 (linux-x86-low.o): Add i386-low.h dependency.
11968 (win32-i386-low.o): Ditto.
11969 * i386-low.c: New file.
11970 * i386-low.h: New file.
11971 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11972 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11973 * linux-low.c (linux_add_process): Initialize arch_private.
11974 (linux_remove_process): Free arch_private.
11975 (add_lwp): Initialize arch_private.
11976 (delete_lwp): Free arch_private.
11977 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11978 provided.
11979 * linux-low.h (process_info_private): New member arch_private.
11980 (lwp_info): New member arch_private.
11981 (linux_target_ops): New members new_process, new_thread,
11982 prepare_to_resume.
11983 (ptid_of): New macro.
11984 * linux-x86-low.c: Include stddef.h, i386-low.h.
11985 (arch_process_info): New struct.
11986 (arch_lwp_info): New struct.
11987 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11988 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11989 (i386_dr_low_get_status): New function.
11990 (x86_insert_point, x86_remove_point): New functions.
11991 (x86_stopped_by_watchpoint): New function.
11992 (x86_stopped_data_address): New function.
11993 (x86_linux_new_process, x86_linux_new_thread): New functions.
11994 (x86_linux_prepare_to_resume): New function.
11995 (the_low_target): Add entries for insert_point, remove_point,
11996 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11997 prepare_to_resume.
11998 * server.c (debug_hw_points): New global.
11999 (monitor_show_help): Document set debug-hw-points.
12000 (handle_query): Process "set debug-hw-points".
12001 * server.h (debug_hw_points): Declare.
12002 (paddress): Declare.
12003 * utils.c (NUMCELLS, CELLSIZE): New macros.
12004 (get_sell, xsnprintf, paddress): New functions.
12005 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12006 remove_point, stopped_by_watchpoint, stopped_data_address.
12007 * win32-i386-low.c: Include i386-low.h.
12008 (debug_reg_state): Replaces dr.
12009 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12010 (i386_dr_low_get_status): New function.
12011 (i386_insert_point, i386_remove_point): New functions.
12012 (i386_stopped_by_watchpoint): New function.
12013 (i386_stopped_data_address): New function.
12014 (i386_initial_stuff): Update.
12015 (get_thread_context,set_thread_context,i386_thread_added): Update.
12016 (the_low_target): Add entries for insert_point,
12017 remove_point, stopped_by_watchpoint, stopped_data_address.
12018 * win32-low.c (win32_insert_watchpoint): New function.
12019 (win32_remove_watchpoint): New function.
12020 (win32_stopped_by_watchpoint): New function.
12021 (win32_stopped_data_address): New function.
12022 (win32_target_ops): Add entries for insert_watchpoint,
12023 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12024 * win32-low.h (win32_target_ops): New members insert_point,
12025 remove_point, stopped_by_watchpoint, stopped_data_address.
12026
d993e290
PA
120272009-06-25 Pedro Alves <pedro@codesourcery.com>
12028
12029 * server.c (process_serial_event): Re-return unsupported, not
12030 error, if the type isn't recognized. Re-allow supporting only
12031 insert or remove packets. Also call require_running for
12032 breakpoints. Add missing break statement to default case. Tidy.
12033 * target.h (struct target_ops): Rename insert_watchpoint to
12034 insert_point, and remove_watchpoint to remove_point.
12035
12036 * linux-low.h (struct linux_target_ops): Likewise.
12037 * linux-low.c (linux_insert_watchpoint): Rename to ...
12038 (linux_insert_point): ... this. Adjust.
12039 (linux_remove_watchpoint): Rename to ...
12040 (linux_remove_point): ... this. Adjust.
12041 (linux_target_ops): Adjust.
12042 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12043 (cris_insert_point): ... this.
12044 (cris_remove_watchpoint): Rename to ...
12045 (cris_remove_point): ... this.
12046 (the_low_target): Adjust.
12047
0f54c268
PM
120482009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12049
12050 * server.c (handle_v_kill): Pass signal_pid to
12051 kill_inferior if multi_process is zero.
12052
c6314022
AR
120532009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12054
12055 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12056 * target.h (target_ops): Comment for *_watchpoint to make it clear
12057 the functions can get types '0' and '1'.
12058
4463ce24
AR
120592009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12060
12061 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12062 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12063 * regcache.c (get_regcache): Likewise.
12064 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12065 * win32-low.c (child_fetch_inferior_registers): Remove check for
12066 regno 0.
12067
cf8fd78b
PA
120682009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12069 Pedro Alves <pedro@codesourcery.com>
12070
12071 * target.h (struct target_ops) <supports_multi_process>: New
12072 callback.
12073 (target_supports_multi_process): New.
12074 * server.c (handle_query): Even if GDB reports support, only
12075 enable multi-process if the target also supports it. Report
12076 multi-process support only if the target backend supports it.
12077 * linux-low.c (linux_supports_multi_process): New function.
12078 (linux_target_ops): Install it as target_supports_multi_process
12079 callback.
12080
47c0c975
DE
120812009-05-24 Doug Evans <dje@google.com>
12082
e09875d4
DE
12083 Global renaming of find_thread_pid to find_thread_ptid.
12084 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12085 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12086 All callers updated.
12087
e27d73f6
DE
12088 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12089 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12090 directly.
12091
47c0c975
DE
12092 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12093 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12094 (linux_resume_one_lwp): Ditto.
12095
2acc282a
DE
120962009-05-23 Doug Evans <dje@google.com>
12097
12098 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12099 from struct inferior_list_entry * to struct lwp_info *.
12100 All callers updated.
12101
9f1036c1
DE
121022009-05-13 Doug Evans <dje@google.com>
12103
12104 * linux-x86-low.c: Don't include assert.h.
12105 (x86_siginfo_fixup): Use fatal, not assert.
12106 (x86_arch_setup): Fix comment.
12107
d0722149
DE
121082009-05-12 Doug Evans <dje@google.com>
12109
12110 Biarch support for i386/amd64 gdbserver.
12111 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12112 Add linux-x86-low.c.
12113 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12114 (linux-x86-low.o): Add.
12115 * linux-x86-64-low.c: Delete.
12116 * linux-i386-low.c: Delete.
12117 * linux-x86-low.c: New file.
12118 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12119 linux-x86-low.o.
12120 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12121 linux-x86-low.o.
12122 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12123 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12124 (linux_child_pid_to_exec_file): New function.
12125 (elf_64_header_p, elf_64_file_p): New functions.
12126 (siginfo_fixup): New function.
12127 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12128 give target a chance to convert layout.
12129 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12130 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12131
fdeb2a12
DE
121322009-05-07 Doug Evans <dje@google.com>
12133
12134 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12135 (regsets_store_inferior_registers): Ditto.
12136
a6dbe5df
PA
121372009-05-06 Pedro Alves <pedro@codesourcery.com>
12138
12139 PR server/10048
12140
12141 * linux-low.c (must_set_ptrace_flags): Delete.
12142 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12143 of the global.
12144 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12145 `lwp->must_set_ptrace_flags' instead.
ba42693b 12146 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12147 (linux_wait_1): ... not here.
12148
5091eb23
DE
121492009-04-30 Doug Evans <dje@google.com>
12150
9f767825
DE
12151 * inferiors.c (started_inferior_callback): New function.
12152 (attached_inferior_callback): New function.
12153 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12154 * server.c (print_started_pid, print_attached_pid): New functions.
12155 (detach_or_kill_for_exit): New function.
12156 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12157 * server.h (have_started_inferiors_p): Declare.
12158 (have_attached_inferiors_p): Declare.
12159
5091eb23
DE
12160 * inferiors.c (remove_process): Fix memory leak, free process.
12161 * linux-low.c (linux_remove_process): New function.
12162 (linux_kill): Call it instead of remove_process.
12163 (linux_detach, linux_wait_1): Ditto.
12164
155c8968
PA
121652009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12166
12167 * configure.srv: Add x86 Windows CE target.
12168
7fe519cb
UW
121692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12170
12171 * inferiors.c (get_thread_process): Make global.
12172 * server.h (get_thread_process): Add prototype.
12173 * thread-db.c (find_one_thread): Use get_thread_process
12174 instead of current_process.
12175 (thread_db_get_tls_address): Do not crash if called when
12176 thread layer is not yet initialized.
12177
5472f405
UW
121782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12179
12180 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12181 * spu-low.c (current_tid): Rename to ...
12182 (current_ptid): ... this.
12183 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12184 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12185 ptid_get_lwp (current_ptid) instead of current_tid.
12186 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12187 instead of current_tid. Use find_process_pid to verify pid
12188 argument is valid. Pass proper argument to remove_process.
12189 (spu_thread_alive): Compare current_ptid instead of current_tid.
12190 (spu_resume): Likewise.
12191
55ac2b99
PA
121922009-04-02 Pedro Alves <pedro@codesourcery.com>
12193
12194 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12195 variable.
12196
95954743
PA
121972009-04-01 Pedro Alves <pedro@codesourcery.com>
12198
12199 Implement the multiprocess extensions, and add linux multiprocess
12200 support.
12201
12202 * server.h (ULONGEST): Declare.
12203 (struct ptid, ptid_t): New.
12204 (minus_one_ptid, null_ptid): Declare.
12205 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12206 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12207 (struct inferior_list_entry): Change `id' type from unsigned from
12208 to ptid_t.
12209 (struct sym_cache, struct breakpoint, struct
12210 process_info_private): Forward declare.
12211 (struct process_info): Declare.
12212 (current_process): Declare.
12213 (all_processes): Declare.
12214 (initialize_inferiors): Declare.
12215 (add_thread): Adjust to use ptid_t.
12216 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12217 (add_process, remove_process, find_thread_pid): Declare.
12218 (find_inferior_id): Adjust to use ptid_t.
12219 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12220 (multi_process): Declare.
12221 (push_event): Adjust to use ptid_t.
12222 (read_ptid, write_ptid): Declare.
12223 (prepare_resume_reply): Adjust to use ptid_t.
12224 (clear_symbol_cache): Declare.
12225 * inferiors.c (all_processes): New.
12226 (null_ptid, minus_one_ptid): New.
12227 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12228 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12229 (add_thread): Change unsigned long to ptid. Remove gdb_id
12230 parameter. Adjust.
12231 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12232 (gdb_id_to_thread): Rename to ...
12233 (find_thread_pid): ... this. Change unsigned long to ptid.
12234 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12235 (loaded_dll, pull_pid_from_list): Adjust.
12236 (add_process, remove_process, find_process_pid)
12237 (get_thread_process, current_process, initialize_inferiors): New.
12238 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12239 (struct target_waitstatus) <related_pid>: Ditto.
12240 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12241 return type to int.
12242 (struct target_ops) <join>: Add `pid' argument.
12243 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12244 (struct target_ops) <wait>: Add `ptid' field. Change return type
12245 to ptid.
12246 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12247 (mywait): Add `ptid' argument. Change return type to ptid_t.
12248 (target_pid_to_str): Declare.
12249 * target.c (set_desired_inferior): Adjust to use ptids.
12250 (mywait): Add new `ptid' argument. Adjust.
12251 (target_pid_to_str): New.
12252 * mem-break.h (free_all_breakpoints): Declare.
12253 * mem-break.c (breakpoints): Delelete.
12254 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12255 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12256 to use per-process breakpoint list.
12257 (free_all_breakpoints): New.
12258 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12259 (symbol_cache, all_symbols_looked_up): Delete.
12260 (hexchars): New.
12261 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12262 read_ptid): New.
12263 (prepare_resume_reply): Change ptid argument's type from unsigned
12264 long to ptid_t. Adjust. Implement W;process and X;process.
12265 (free_sym_cache, clear_symbol_cache): New.
12266 (look_up_one_symbol): Adjust to per-process symbol cache. *
12267 * server.c (cont_thread, general_thread, step_thread): Change type
12268 to ptid_t.
12269 (attached): Delete.
12270 (multi_process): New.
12271 (last_ptid): Change type to ptid_t.
12272 (struct vstop_notif) <ptid>: Change type to ptid_t.
12273 (queue_stop_reply, push_event): Change `ptid' argument's type to
12274 ptid_t.
12275 (discard_queued_stop_replies): Add `pid' argument.
12276 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12277 changes. Don't reference the `attached' global.
12278 (attach_inferior): Adjust to mywait interface changes.
12279 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12280 features. Handle and report "multiprocess+". Handle
12281 "qAttached:PID".
12282 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12283 changes.
12284 (handle_v_kill): New.
12285 (handle_v_stopped): Adjust to use target_pid_to_str.
12286 (handle_v_requests): Allow multiple attaches and runs when
12287 multiprocess extensions are in effect. Handle "vKill".
12288 (myresume): Adjust to use ptids.
12289 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12290 (handle_status): Adjust to discard_queued_stop_replies interface
12291 change.
12292 (first_thread_of, kill_inferior_callback)
12293 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12294 (main): Call initialize_inferiors. Adjust to use ptids, killing
12295 and detaching from all inferiors. Handle multiprocess packet
12296 variants.
12297 * linux-low.h: Include gdb_proc_service.h.
12298 (struct process_info_private): New.
12299 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12300 <lwpid_of>: Use ptid_get_lwp.
12301 (get_lwp_thread): Adjust.
12302 (struct lwp_info): Add `dead' member.
12303 (find_lwp_pid): Declare.
12304 * linux-low.c (thread_db_active): Delete.
12305 (new_inferior): Adjust comment.
12306 (inferior_pid): Delete.
12307 (linux_add_process): New.
12308 (handle_extended_wait): Adjust.
12309 (add_lwp): Change unsigned long to ptid.
12310 (linux_create_inferior): Add process to processes table. Adjust
12311 to use ptids. Don't set new_inferior here.
12312 (linux_attach_lwp): Rename to ...
12313 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12314 it. Adjust to use ptids.
12315 (linux_attach_lwp): New.
12316 (linux_attach): Add process to processes table. Don't set
12317 new_inferior here.
12318 (struct counter): New.
12319 (second_thread_of_pid_p, last_thread_of_process_p): New.
12320 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12321 multiple processes.
12322 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12323 processes. Remove process from process table.
12324 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12325 to multiple processes.
12326 (any_thread_of): New.
12327 (linux_detach): Add `pid' argument, and handle it. Remove process
12328 from processes table.
12329 (linux_join): Add `pid' argument. Handle it.
12330 (linux_thread_alive): Change unsighed long argument to ptid_t.
12331 Consider dead lwps as not being alive.
12332 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12333 threads we're not interested in.
12334 (same_lwp, find_lwp_pid): New.
12335 (linux_wait_for_lwp): Change `pid' argument's type from int to
12336 ptid_t. Adjust.
12337 (linux_wait_for_event): Rename to ...
12338 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12339 from int to ptid_t. Adjust.
12340 (linux_wait_for_event): New.
12341 (linux_wait_1): Add `ptid' argument. Change return type to
12342 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12343 that exit from the process table.
12344 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12345 Adjust.
12346 (mark_lwp_dead): New.
12347 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12348 stopping all threads, mark its main lwp as dead.
12349 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12350 ptids.
12351 (fetch_register, usr_store_inferior_registers)
12352 (regsets_fetch_inferior_registers)
12353 (regsets_store_inferior_registers, linux_read_memory)
12354 (linux_write_memory): Inline `inferior_pid'.
12355 (linux_look_up_symbols): Adjust to use per-process
12356 `thread_db_active'.
12357 (linux_request_interrupt): Adjust to use ptids.
12358 (linux_read_auxv): Inline `inferior_pid'.
12359 (initialize_low): Don't reference thread_db_active.
12360 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12361 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12362 (ps_getpid): Return the pid of the current inferior.
12363 * thread-db.c (proc_handle, thread_agent): Delete.
12364 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12365 per-process data.
12366 (find_one_thread): Change argument type to ptid_t. Adjust to
12367 per-process data.
12368 (maybe_attach_thread): Adjust to per-process data and ptids.
12369 (thread_db_find_new_threads): Ditto.
12370 (thread_db_init): Ditto.
12371 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12372 processes table. Adjust to use ptids.
12373 (spu_kill, spu_detach): Adjust interface. Remove process from
12374 processes table.
12375 (spu_join, spu_thread_alive): Adjust interface.
12376 (spu_wait): Adjust interface. Remove process from processes
12377 table. Adjust to use ptids.
12378 * win32-low.c (current_inferior_tid): Delete.
12379 (current_inferior_ptid): New.
12380 (debug_event_ptid): New.
12381 (thread_rec): Take a ptid. Adjust.
12382 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12383 (child_delete_thread): Ditto.
12384 (do_initial_child_stuff): Add `attached' argument. Add process to
12385 processes table.
12386 (child_fetch_inferior_registers, child_store_inferior_registers):
12387 Adjust.
12388 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12389 (win32_attach): Pass 1 to do_initial_child_stuff.
12390 (win32_kill): Adjust interface. Remove process from processes
12391 table.
12392 (win32_detach): Ditto.
12393 (win32_join): Adjust interface.
12394 (win32_thread_alive): Take a ptid.
12395 (win32_resume): Adjust to use ptids.
12396 (get_child_debug_event): Ditto.
12397 (win32_wait): Adjust interface. Remove exiting process from
12398 processes table.
12399
bd99dc85
PA
124002009-04-01 Pedro Alves <pedro@codesourcery.com>
12401
12402 Non-stop mode support.
12403
12404 * server.h (non_stop): Declare.
12405 (gdb_client_data, handler_func): Declare.
12406 (delete_file_handler, add_file_handler, start_event_loop):
12407 Declare.
12408 (handle_serial_event, handle_target_event, push_event)
12409 (putpkt_notif): Declare.
12410 * target.h (enum resume_kind): New.
12411 (struct thread_resume): Replace `step' field by `kind' field.
12412 (TARGET_WNOHANG): Define.
12413 (struct target_ops) <wait>: Add `options' argument.
12414 <supports_non_stop, async, start_non_stop>: New fields.
12415 (target_supports_non_stop, target_async): New.
12416 (start_non_stop): Declare.
12417 (mywait): Add `options' argument.
12418 * target.c (mywait): Add `options' argument. Print child exit
12419 notifications here.
12420 (start_non_stop): New.
12421 * server.c (non_stop, own_buf, mem_buf): New globals.
12422 (struct vstop_notif): New.
12423 (notif_queue): New global.
12424 (queue_stop_reply, push_event, discard_queued_stop_replies)
12425 (send_next_stop_reply): New.
12426 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12427 interface changes.
12428 (attach_inferior): In non-stop mode, don't wait for the target
12429 here.
12430 (handle_general_set): Handle QNonStop.
12431 (handle_query): When handling qC, return the current general
12432 thread, instead of the first thread of the list.
12433 (handle_query): If the backend supports non-stop mode, include
12434 QNonStop+ in the qSupported query response.
12435 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12436 and non-stop mode.
12437 (handle_v_attach, handle_v_run): Handle non-stop mode.
12438 (handle_v_stopped): New.
12439 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12440 (myresume): Adjust to use resume_kind. Handle non-stop.
12441 (queue_stop_reply_callback): New.
12442 (handle_status): Handle non-stop mode.
12443 (main): Clear non_stop flag on reconnection. Use the event-loop.
12444 Refactor serial protocol handling from here ...
12445 (process_serial_event): ... to this new function. When GDB
12446 selects any thread, select one here. In non-stop mode, wait until
12447 GDB acks all pending events before exiting.
12448 (handle_serial_event, handle_target_event): New.
12449 * remote-utils.c (remote_open): Install remote_desc in the event
12450 loop.
12451 (remote_close): Remove remote_desc from the event loop.
12452 (putpkt_binary): Rename to...
12453 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12454 (putpkt_binary): New as wrapper around putpkt_binary_1.
12455 (putpkt_notif): New.
12456 (prepare_resume_reply): In non-stop mode, don't change the
12457 general_thread.
12458 * event-loop.c: New.
12459 * Makefile.in (OBJ): Add event-loop.o.
12460 (event-loop.o): New rule.
12461
12462 * linux-low.h (pid_of): Moved here.
12463 (lwpid_of): New.
12464 (get_lwp_thread): Use lwpid_of.
12465 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12466 * linux-low.c (pid_of): Delete.
12467 (inferior_pid): Use lwpid_of.
12468 (linux_event_pipe): New.
12469 (target_is_async_p): New.
12470 (delete_lwp): New.
12471 (handle_extended_wait): Use lwpid_of.
12472 (add_lwp): Don't set lwpid field.
12473 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12474 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12475 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12476 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12477 first. Adjust to linux_wait_for_event interface changes. Use
12478 lwpid_of.
12479 (linux_detach): Don't delete the main lwp here.
12480 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12481 (status_pending_p): Don't consider explicitly suspended lwps.
12482 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12483 pointer. Add OPTIONS argument. Change return type to int. Use
12484 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12485 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12486 pointer. Add status pointer argument. Return a pid instead of a
12487 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12488 changes. In non-stop mode, don't switch to a random thread.
12489 (linux_wait): Rename to...
12490 (linux_wait_1): ... this. Add target_options argument, and handle
12491 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12492 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12493 clean exit and signal exit code. Don't stop all threads in
12494 non-stop mode. In all-stop mode, only stop all threads when
12495 reporting a stop to GDB. Handle explicit thread stop requests.
12496 (async_file_flush, async_file_mark): New.
12497 (linux_wait): New.
12498 (send_sigstop): Use lwpid_of.
12499 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12500 interface changes. In non-stop mode, don't switch to a random
12501 thread.
12502 (linux_resume_one_lwp): Use lwpid_of.
12503 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12504 (linux_resume_one_thread): ... this. Handle resume_stop. In
12505 non-stop mode, don't look for pending flag in all threads.
12506 (resume_status_pending_p): Don't consider explicitly suspended
12507 threads.
12508 (my_waitpid): Reimplement. Emulate __WALL.
12509 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12510 Use lwpid_of.
12511 (sigchld_handler, linux_supports_non_stop, linux_async)
12512 (linux_start_non_stop): New.
12513 (linux_target_ops): Register linux_supports_non_stop, linux_async
12514 and linux_start_non_stop.
12515 (initialize_low): Install SIGCHLD handler.
12516 * thread-db.c (thread_db_create_event, find_one_thread)
12517 (thread_db_get_tls_address): Use lwpid_of.
12518 * win32-low.c (win32_detach): Adjust to use resume_kind.
12519 (win32_wait): Add `options' argument.
12520 * spu-low.c (spu_resume): Adjust to use resume_kind.
12521 (spu_wait): Add `options' argument.
12522
5b1c542e
PA
125232009-04-01 Pedro Alves <pedro@codesourcery.com>
12524
12525 Decouple target code from remote protocol.
12526
12527 * target.h (enum target_waitkind): New.
12528 (struct target_waitstatus): New.
12529 (struct target_ops) <wait>: Return an unsigned long. Take a
12530 target_waitstatus pointer instead of a char pointer.
12531 (mywait): Likewise.
12532 * target.c (mywait): Change prototype to return an unsigned long.
12533 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12534 * server.h (thread_from_wait, old_thread_from_wait): Delete
12535 declarations.
12536 (prepare_resume_reply): Change prototype to take a
12537 target_waitstatus.
12538 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12539 (last_status, last_ptid): New.
12540 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12541 pid instead of a signal.
12542 (attach_inferior): Remove "status" and "signal" parameters.
12543 Adjust.
12544 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12545 not as an address.
12546 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12547 (handle_v_requests, myresume): Remove "status" and "signal"
12548 parameters. Adjust.
12549 (handle_status): New.
12550 (main): Delete local `status'. Adjust.
12551 * remote-utils.c: Include target.h.
12552 (prepare_resume_reply): Change prototype to take a
12553 target_waitstatus. Adjust.
12554
12555 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12556 interface.
12557 * spu-low.c (spu_wait): Adjust.
12558 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12559 Delete.
12560 (win32_wait): Adjust.
12561
2bd7c093
PA
125622009-04-01 Pedro Alves <pedro@codesourcery.com>
12563
12564 * target.h (struct thread_resume): Delete leave_stopped member.
12565 (struct target_ops): Add a `n' argument to the `resume' callback.
12566 * server.c (start_inferior): Adjust.
12567 (handle_v_cont, myresume): Adjust.
12568 * linux-low.c (check_removed_breakpoint): Adjust to resume
12569 interface change, and to removed leave_stopped field.
12570 (resume_ptr): Delete.
12571 (struct thread_resume_array): New.
12572 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12573 resume interface change.
12574 (linux_continue_one_thread, linux_queue_one_thread)
12575 (resume_status_pending_p): Check if the resume field is NULL
12576 instead of checking the leave_stopped member.
12577 (linux_resume): Adjust to the target resume interface change.
12578 * spu-low.c (spu_resume): Adjust to the target resume interface
12579 change.
12580 * win32-low.c (win32_detach, win32_resume): Ditto.
12581
c35fafde
PA
125822009-04-01 Pedro Alves <pedro@codesourcery.com>
12583
12584 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12585 flag.
12586 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12587 pending.
12588 (linux_continue_one_thread): Only preserve the stepping flag if
12589 there's a pending breakpoint.
12590
0a59d50b
PA
125912009-03-31 Pedro Alves <pedro@codesourcery.com>
12592
12593 * server.c (main): After the inferior having exited, call
12594 remote_close before exiting gdbserver.
12595
f04c6d38
TJB
125962009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12597
12598 Fix size of FPSCR in Power 7 processors.
12599 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12600 (PPC_FEATURE_HAS_DFP): New #define.
12601 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12602 size of the FPSCR.
12603
78e5cee6
PA
126042009-03-23 Pedro Alves <pedro@codesourcery.com>
12605
12606 * server.c (handle_query) Whitespace and formatting.
12607
1b3f6016
PA
126082009-03-22 Pedro Alves <pedro@codesourcery.com>
12609
12610 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12611 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12612 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12613 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12614 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12615 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12616 Makefile.in, configure.ac: Fix whitespace throughout.
12617 * configure: Regenerate.
12618
a07b2135
PA
126192009-03-22 Pedro Alves <pedro@codesourcery.com>
12620
12621 * inferiors.c (find_inferior): Make it safe for the callback
12622 function to delete the currently iterated inferior.
12623
67cc2626
PA
126242009-03-22 Pedro Alves <pedro@codesourcery.com>
12625
12626 * Makefile.in (linuw_low_h): Move higher.
12627 (thread-db.o): Depend on $(linux_low_h).
12628
54a0b537
PA
126292009-03-17 Pedro Alves <pedro@codesourcery.com>
12630
12631 Rename "process" to "lwp" throughout.
12632
12633 * linux-low.c (all_processes): Rename to...
12634 (all_lwps): ... this.
12635 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12636 (add_process): Rename to ...
12637 (add_lwp): ... this. Adjust.
12638 (linux_create_inferior): Adjust.
12639 (linux_attach_lwp): Adjust.
12640 (linux_attach): Adjust.
12641 (linux_kill_one_process): Rename to ...
12642 (linux_kill_one_lwp): ... this. Adjust.
12643 (linux_kill): Adjust.
12644 (linux_detach_one_process): Rename to ...
12645 (linux_detach_one_lwp): ... this. Adjust.
12646 (linux_detach): Adjust.
12647 (check_removed_breakpoint): Adjust.
12648 (status_pending_p): Adjust.
12649 (linux_wait_for_process): Rename to ...
12650 (linux_wait_for_lwp): ... this. Adjust.
12651 (linux_wait_for_event): Adjust.
12652 (send_sigstop): Adjust.
12653 (wait_for_sigstop): Adjust.
12654 (stop_all_processes): Rename to ...
12655 (stop_all_lwps): ... this.
12656 (linux_resume_one_process): Rename to ...
12657 (linux_resume_one_lwp): ... this. Adjust.
12658 (linux_set_resume_request, linux_continue_one_thread)
12659 (linux_queue_one_thread, resume_status_pending_p)
12660 (usr_store_inferior_registers, regsets_store_inferior_registers)
12661 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12662 Adjust.
12663 * linux-low.h (get_process): Rename to ...
12664 (get_lwp): ... this. Adjust.
12665 (get_thread_process): Rename to ...
12666 (get_thread_lwp): ... this. Adjust.
12667 (get_process_thread): Rename to ...
12668 (get_lwp_thread): ... this. Adjust.
12669 (struct process_info): Rename to ...
12670 (struct lwp_info): ... this.
12671 (all_processes): Rename to ...
12672 (all_lwps): ... this.
12673 * proc-service.c (ps_lgetregs): Adjust.
12674 * thread-db.c (thread_db_create_event, find_one_thread)
12675 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12676
0b16c5cf
PA
126772009-03-14 Pedro Alves <pedro@codesourcery.com>
12678
12679 * server.c (handle_query): Handle "qAttached".
12680
32de4b9d
NS
126812009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12682
12683 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12684 GPLv3, update license URL.
12685
2aecd87f
DE
126862009-03-01 Doug Evans <dje@google.com>
12687
93efd302 12688 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12689 (server_h): Add gdb_signals.h.
12690 (signals.o): Update.
12691 * server.h (target_signal_from_host,target_signal_to_host_p)
12692 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12693
86b1f9c5
PM
126942009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12695
12696 * remote-utils.c (getpkt): Also generate remote-debug
12697 information if noack_mode is set.
12698
4aa995e1
PA
126992009-02-06 Pedro Alves <pedro@codesourcery.com>
12700
12701 * server.c (handle_query): Report qXfer:siginfo:read and
12702 qXfer:siginfo:write as supported and handle them.
12703 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12704 * linux-low.c (linux_xfer_siginfo): New.
12705 (linux_target_ops): Set it.
12706
62709adf
PA
127072009-01-26 Pedro Alves <pedro@codesourcery.com>
12708
12709 * server.c (gdbserver_usage): Mention --remote-debug.
12710 (main): Accept '--remote-debug' switch.
12711
aef93bd7
DE
127122009-01-18 Doug Evans <dje@google.com>
12713
12714 * regcache.c (new_register_cache): No need to check result of xcalloc.
12715 * server.c (handle_search_memory): Back out calls to xmalloc,
12716 result is checked and error is returned to user upon failure.
12717 (handle_query): Ditto. Add more checks for result of malloc.
12718 (handle_v_cont): Check result of malloc, report error back to
12719 user upon failure.
12720 (handle_v_run): Ditto. Call freeargv.
12721 * server.h (freeargv): Declare.
12722 * utils.c (freeargv): New fn.
12723
54363045
DE
127242009-01-15 Doug Evans <dje@google.com>
12725
f626972c
DE
12726 * gdbreplay.c (perror_with_name): Make arg const char *.
12727 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12728 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12729 * utils.c (perror_with_name): Make arg const char *.
54363045 12730
18aae699
PA
127312009-01-14 Pedro Alves <pedro@codesourcery.com>
12732
12733 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12734 when handling a EXIT_PROCESS_DEBUG_EVENT.
12735
ff703abe
JB
127362009-01-06 Joel Brobecker <brobecker@adacore.com>
12737
12738 * gdbreplay.c (gdbreplay_version): Update copyright year.
12739 * server.c (gdbserver_version): Likewise.
12740
f21cc1a2 127412009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12742
12743 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12744 (handle_extended_wait): Improve comment.
0e21c1ec 12745
bca929d3
DE
127462008-12-13 Doug Evans <dje@google.com>
12747
12748 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12749 * server.h (ATTR_MALLOC): New macro.
12750 (xmalloc,xcalloc,xstrdup): Declare.
12751 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12752 * inferiors.c: Ditto.
12753 * linux-low.c: Ditto.
12754 * mem-break.c: Ditto.
12755 * regcache.c: Ditto.
12756 * remote-utils.c: Ditto.
12757 * server.c: Ditto.
12758 * target.c: Ditto.
12759 * win32-low.c: Ditto.
12760
97438e3f
DE
127612008-12-12 Doug Evans <dje@google.com>
12762
896c7fbb
DE
12763 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12764 in debugging printf.
12765
97438e3f
DE
12766 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12767
e3b886f8
DE
127682008-12-09 Doug Evans <dje@google.com>
12769
12770 * linux-low.h (struct process_info): Delete member tid, unused.
12771 * thread-db.c (find_one_thread): Update.
12772 (maybe_attach_thread): Update.
12773
07e059b5
VP
127742008-12-02 Pedro Alves <pedro@codesourcery.com>
12775
889bf7c5
PA
12776 * target.h (struct target_ops): Add qxfer_osdata member.
12777 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12778 and dirent.h.
12779 (linux_qxfer_osdata): New functions.
12780 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12781 callback.
12782 * server.c (handle_query): Handle "qXfer:osdata:read:".
12783 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12784 (buffer_xml_printf): New functions.
12785 * server.h (struct buffer): New.
12786 (buffer_grow_str, buffer_grow_str0): New macros.
12787 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12788 (buffer_xml_printf): Declare.
07e059b5 12789
4cab47ab
DE
127902008-11-24 Doug Evans <dje@google.com>
12791
12792 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12793
f142445f
DJ
127942008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12795
12796 * server.c (handle_v_run): Always use the supplied argument list.
12797
d0107bb6 127982008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12799
d0107bb6
BW
12800 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12801 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12802
2c4ad781
TJB
128032008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12804
12805 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12806 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12807 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12808 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12809 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12810 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12811 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12812 XML target descriptions.
12813 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12814 when inferior is running on an ISA 2.05 or later processor. Add
12815 special case to return offset for full 64-bit slot of FPSCR when
12816 in 32-bits.
12817
dfb64f85
DJ
128182008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12819
12820 * Makefile.in (SFILES, clean): Added sparc64 files.
12821 (reg-sparc64.o, reg-sparc64.c): New.
12822 * configure.srv (sparc*-*-linux*): New configuration.
12823 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12824 syscall arguments for SPARC.
12825 (regsets_store_inferior_registers): Likewise.
12826 * linux-sparc-low.c: New file.
12827
66b6e1dd
DE
128282008-10-21 Doug Evans <dje@google.com>
12829
12830 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12831 (READLINE_DIR,READLINE_DEP): Delete.
12832 (INTERNAL_CFLAGS): Update.
12833 (LINTFLAGS): Update.
12834
9b710a42
PA
128352008-10-10 Pedro Alves <pedro@codesourcery.com>
12836
12837 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12838 whole argv from the last run, not just argv[0].
12839
5822d809
PA
128402008-09-08 Pedro Alves <pedro@codesourcery.com>
12841
12842 * regcache.c (new_register_cache): Return NULL if the register
12843 cache size isn't known yet.
12844 (free_register_cache): Avoid dereferencing a NULL regcache.
12845
74aac56f
DJ
128462008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12847
12848 * configure.srv: Merge MIPS and MIPS64.
12849
400b20f5
MR
128502008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12851
12852 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12853
677c5bb1
LM
128542008-08-18 Luis Machado <luisgpm@br.ibm.com>
12855
12856 * Makefile.in: Add required vsx dependencies.
12857
12858 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12859 Declare init_registers_powerpc_vsx32l.
12860 Declare init_registers_powerpc_vsx64l.
12861 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12862 (ppc_arch_setup): Check for VSX in hwcap.
12863 (ppc_fill_vsxregset): New function.
12864 (ppc_store_vsxregset): New function.
12865 Add new VSX entry in regset_info target_regsets.
12866
12867 * configure.srv: Add new VSX dependencies.
12868
a6f3e723
SL
128692008-08-12 Pedro Alves <pedro@codesourcery.com>
12870
12871 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12872 (remote_open): Set or clear transport_is_reliable.
12873 (putpkt_binary): Don't expect acks in noack mode.
12874 (getpkt): Don't send ack/nac in noack mode.
12875 * server.c (handle_general_set): Handle QStartNoAckMode.
12876 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12877 qSupported.
12878 (main): Reset noack_mode on every connection.
12879 * server.h (noack_mode): Declare.
12880
a417dc56
RW
128812008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12882
12883 * Makefile.in (GDBREPLAY_OBS): New variable.
12884 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12885
3221518c
UW
128862008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12887 Daniel Jacobowitz <dan@codesourcery.com>
12888
12889 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12890 (usr_store_inferior_registers): Likewise.
12891 (regsets_store_inferior_registers): Likewise.
12892
ec56be1b
PA
128932008-07-31 Rolf Jansen <rj@surtec.com>
12894 Pedro Alves <pedro@codesourcery.com>
12895
12896 * configure.ac: Check for memmem declaration.
12897 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12898 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12899 (disable_packet_qfThreadInfo): Unconditionally compile.
12900 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12901 * configure, config.in: Regenerate.
12902
2fe5e3ff
DE
129032008-07-28 Doug Kwan <dougkwan@google.com>
12904
12905 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12906 (linux_write_memory): Remove declaration of errno.
12907
836acd6d
UW
129082008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12909
12910 * linux-low.c (handle_extended_wait): Do not use "status"
12911 variable uninitialized.
12912
aeba519e
PA
129132008-07-07 Pedro Alves <pedro@codesourcery.com>
12914
12915 * server.c (handle_v_attach): Inhibit reporting dll changes.
12916
db42f210
PA
129172008-06-27 Pedro Alves <pedro@codesourcery.com>
12918
12919 * remote-utils.c (prepare_resume_reply): If requested, don't
12920 output "thread:TID" in the T stop reply.
12921
12922 * server.c (disable_packet_vCont, disable_packet_Tthread)
12923 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12924 (handle_query): If requested, disable support for qC, qfThreadInfo
12925 and qsThreadInfo.
12926 (handle_v_requests): If requested, disable support for vCont.
12927 (gdbserver_show_disableable): New.
12928 (main): Handle --disable-packet and --disable-packet=LIST.
12929
12930 * server.h (disable_packet_vCont, disable_packet_Tthread)
12931 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12932
8e4c5421
CD
129332008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12934
12935 * server.c (gdbserver_usage): Mention --version.
12936
6e23a804
DJ
129372008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12938
12939 * Makefile.in (gdbreplay.o): New rule.
12940
90aa6a40
JM
129412008-06-06 Joseph Myers <joseph@codesourcery.com>
12942
12943 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12944 message, not gdbserver.
12945
c16158bc 129462008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12947 Nathan Sidwell <nathan@codesourcery.com>
12948 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12949
12950 * acinclude.m4: Include ../../config/acx.m4.
12951 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12952 * configure, config.in: Regenerate.
12953 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12954 * server.c (gdbserver_version): Print PKGVERSION.
12955 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12956 (main): Adjust gdbserver_usage calls.
12957 * gdbreplay.c (version, host_name): Add declarations.
12958 (gdbreplay_version, gdbreplay_usage): New.
12959 (main): Accept --version and --help options.
12960
aeb75bf5
DJ
129612008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12964 (arm_breakpoint_at): Handle Thumb.
12965 (the_low_target): Add comment.
12966
76b233dd
UW
129672008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12968
12969 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12970
08388c79
DE
129712008-05-09 Doug Evans <dje@google.com>
12972
a3c83fae
DE
12973 * server.h (decode_search_memory_packet): Declare.
12974 * remote-utils.c (decode_search_memory_packet): New fn.
12975 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12976 (handle_search_memory): New fn.
12977 (handle_query): Process qSearch:memory packets.
12978
bb9c3d36
UW
129792008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12980
12981 * regcache.c (registers_length): Remove.
12982 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12983 full register packet.
12984 * regcache.h (registers_length): Remove prototype.
12985 * server.h (PBUFSIZ): Define to 16384.
12986
7284e1be
UW
129872008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12988
12989 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12990 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12991 powerpc-64l.o, and powerpc-altivec64l.o.
12992 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12993 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12994 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12995 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12996 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12997 to srv_xmlfiles.
12998
12999 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13000 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13001 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13002 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13003 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13004 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13005 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13006 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13007 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13008 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13009 (clean): Update.
13010
13011 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13012 (init_registers_powerpc_32l): ... this new prototype.
13013 (init_registers_powerpc_32): Remove, replace by ...
13014 (init_registers_powerpc_altivec32l): ... this new prototype.
13015 (init_registers_powerpc_e500): Remove, replace by ...
13016 (init_registers_powerpc_e500l): ... this new prototype.
13017 (init_registers_ppc64): Remove, replace by ...
13018 (init_registers_powerpc_64l): ... this new prototype.
13019 (init_registers_powerpc_64): Remove, replace by ...
13020 (init_registers_powerpc_altivec64l): ... this new prototype.
13021 (ppc_num_regs): Set to 73.
13022 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13023 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13024 (ppc_cannot_store_register): Handle orig_r3 and trap.
13025 (ppc_arch_setup): Update init_registers_... calls.
13026 (ppc_fill_gregset): Handle orig_r3 and trap.
13027
13028 * inferiors.c (clear_inferiors): Reset current_inferior.
13029
fdc59709
PB
130302008-04-23 Paolo Bonzini <bonzini@gnu.org>
13031
889bf7c5
PA
13032 * acinclude.m4: Add override.m4.
13033 * configure: Regenerate.
fdc59709 13034
c9b2f845
UW
130352008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13036
13037 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13038 initial call to init_register_ppc64.
13039
550512b8
UW
130402008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13041
43aaf8b6
PA
13042 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13043 single powerpc*-*-linux* case.
550512b8
UW
13044 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13045
b6430ec3
UW
130462008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13047
13048 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13049 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13050 from reg_xmlfiles.
13051 * linux-ppc-low.c: Include <elf.h>.
13052 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13053 (ppc_hwcap): New global variable.
13054 (ppc_regmap): Remove __SPE__ #ifdef sections.
13055 (ppc_regmap_e500): New global variable.
13056 (ppc_cannot_store_register): Update __SPE__ special case.
13057 (ppc_get_hwcap): New function.
13058 (ppc_arch_setup): Use it to determine whether inferior supports
13059 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13060 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13061 Do not access registers if target does not support AltiVec.
13062 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13063 Do not access registers if target does not support SPE.
13064 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13065
52fa2412
UW
130662008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13067
13068 * linux-low.c (disabled_regsets, num_regsets): New.
13069 (use_regsets_p): Delete.
13070 (linux_wait_for_process): Clear disabled_regsets.
13071 (regsets_fetch_inferior_registers): Check and set it.
13072 (regsets_store_inferior_registers): Likewise.
13073 (linux_fetch_registers, linux_store_registers): Do not use
13074 use_regsets_p.
13075 (initialize_low): Allocate disabled_regsets.
13076
e28b3332
DJ
130772008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13078
13079 * Makefile.in (LIBOBJS): New.
13080 (OBS): Use LIBOBJS.
13081 (memmem.o): New rule.
13082 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13083 * configure: Regenerated.
13084
4536995d
UW
130852008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13086
13087 * server.c (handle_query): Never return "unsupported" for
13088 qXfer:features:read queries.
13089
221c031f
UW
130902008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13091
13092 * server.c (get_features_xml): Fix inverted condition.
13093 (handle_query): Always support qXfer:feature:read.
13094
ccd213ac
DJ
130952008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13096
13097 * server.c (wrapper_argv): New.
13098 (start_inferior): Handle wrapper_argv. If set, expect an extra
13099 trap.
13100 (gdbserver_usage): Document --wrapper.
13101 (main): Parse --wrapper.
13102
6fe305f7
UW
131032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13104
13105 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13106 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13107 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13108 (ppc_set_pc): Likewise.
13109 (ppc_arch_setup): New function.
13110 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13111 of collect_register.
889bf7c5 13112 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13113
5b0a002e
UW
131142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13115
13116 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13117 instead of linux-ppc64-low.o.
13118 * linux-ppc64-low.c: Remove file.
13119 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13120 (linux-ppc64-low.o): Remove rule.
13121
13122 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13123 (init_registers_powerpc_64): Likewise.
13124 (ppc_regmap): Conditionally define depending on __powerpc64__.
13125 (ppc_cannot_store_register): Do not special-case "fpscr" when
13126 compiled on __powerpc64__.
13127 (ppc_collect_ptrace_register): New function.
13128 (ppc_supply_ptrace_register): New function.
13129 (ppc_breakpoint): Change type to "unsigned int".
13130 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13131 (the_low_target): Conditionally provide initializers for the
889bf7c5 13132 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13133 collect_ptrace_register and supply_ptrace_register members.
13134
9b4b61c8
UW
131352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13136
13137 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13138 * server.c (gdbserver_xmltarget): Define.
13139 (get_features_xml): Use it to replace "target.xml" and arch_string.
13140
13141 * configure.srv: Remove srv_xmltarget. Add XML files that were
13142 mentioned there to srv_xmlfiles instead. Remove conditional tests
13143 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13144 srv_xmlfiles and srv_regobj to include all possible choices.
13145 * configure.ac (srv_xmltarget): Remove.
13146 (srv_xmlfiles): Do not add "target.xml".
13147 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13148 checks for supplementary target information.
13149 * configure: Regenerate.
13150 * Makefile.in (XML_TARGET): Remove.
13151 (target.xml): Remove rule.
13152 (clean): Do not clean up target.xml.
13153 (.PRECIOUS): Do not mention target.xml.
13154
13155 * target.h (struct target_ops): Remove arch_string member.
13156 * linux-low.c (linux_arch_string): Remove.
13157 (linux_target_ops): Remove arch_string initializer.
13158 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13159 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13160 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13161 * spu-low.c (spu_arch_string): Remove.
13162 (spu_target_ops): Remove arch_string initializer.
13163 * win32-low.c (win32_arch_string): Remove.
13164 (win32_target_ops): Remove arch_string initializer.
13165 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13166 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13167 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13168
ee1a7ae4
UW
131692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13170
13171 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13172 by collect_ptrace_register and supply_ptrace_register hooks.
13173 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13174 instead of checking for the_low_target.left_pad_xfer.
13175 (usr_store_inferior_registers): Use collect_ptrace_register callback
13176 instead of checking for the_low_target.left_pad_xfer.
13177
13178 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13179 (s390_supply_ptrace_register): Likewise.
13180 (s390_fill_gregset): Call s390_collect_ptrace_register.
13181 (the_low_target): Update.
13182
13183 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13184 (ppc_supply_ptrace_register): Likewise.
13185 (the_low_target): Update.
13186
13187 * linux-i386-low.c (the_low_target): Update.
13188 * linux-x86-64-low.c (the_low_target): Update.
13189
d61ddec4
UW
131902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13191
13192 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13193 reg-s390.o and reg-s390x.o.
13194
13195 * linux-low.c (new_inferior): New global variable.
13196 (linux_create_inferior, linux_attach): Set it.
13197 (linux_wait_for_process): Call the_low_target.arch_setup after the
13198 target has stopped for the first time.
13199 (initialize_low): Do not call the_low_target.arch_setup.
13200
13201 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13202 (s390_set_pc): Likewise.
13203 (s390_arch_setup): New function.
13204 (the_low_target): Use s390_arch_setup as arch_setup routine.
13205
13206 * regcache.c (realloc_register_cache): New function.
13207 (set_register_cache): Call it for each existing regcache.
13208
d05b4ac3
UW
132092008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13210
13211 * server.h (init_registers): Remove prototype.
13212
13213 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13214 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13215 instead of init_registers ().
13216 * linux-arm-low.c (init_registers_arm): Add prototype.
13217 (init_registers_arm_with_iwmmxt): Likewise.
13218 (the_low_target): Add initializer for arch_setup field.
13219 * linux-cris-low.c (init_registers_cris): Add prototype.
13220 (the_low_target): Add initializer for arch_setup field.
13221 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13222 (the_low_target): Add initializer for arch_setup field.
13223 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13224 (the_low_target): Add initializer for arch_setup field.
13225 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13226 (the_low_target): Add initializer for arch_setup field.
13227 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13228 (the_low_target): Add initializer for arch_setup field.
13229 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13230 (the_low_target): Add initializer for arch_setup field.
13231 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13232 (init_registers_mips64_linux): Likewise.
13233 (the_low_target): Add initializer for arch_setup field.
13234 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13235 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13236 (the_low_target): Add initializer for arch_setup field.
13237 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13238 (init_registers_powerpc_64): Likewise.
13239 (the_low_target): Add initializer for arch_setup field.
13240 * linux-s390-low.c (init_registers_s390): Add prototype.
13241 (init_registers_s390x): Likewise.
13242 (the_low_target): Add initializer for arch_setup field.
13243 * linux-sh-low.c (init_registers_sh): Add prototype.
13244 (the_low_target): Add initializer for arch_setup field.
13245 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13246 (the_low_target): Add initializer for arch_setup field.
13247 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13248 (the_low_target): Add initializer for arch_setup field.
13249
13250 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13251 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13252 instead of init_registers ().
13253 * win32-arm-low.c (init_registers_arm): Add prototype.
13254 (the_low_target): Add initializer for arch_setup field.
13255 * win32-i386-low.c (init_registers_i386): Add prototype.
13256 (the_low_target): Add initializer for arch_setup field.
13257
13258 * spu-low.c (init_registers_spu): Add prototype.
13259 (initialize_low): Call initialie_registers_spu () instead of
13260 initialize_registers ().
13261
fd96d250
PA
132622008-02-19 Pedro Alves <pedro@codesourcery.com>
13263
13264 * server.c (handle_v_requests): When handling the vRun and vAttach
13265 packets, if already debugging a process, don't kill it. Return an
13266 error instead.
13267
d41b6bb4
DJ
132682008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13269
13270 * server.c (handle_query): Correct length check.
13271
5ac588cf
PA
132722008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13273
13274 * win32-low.c (do_initial_child_stuff): Add process handle
13275 parameter. Set current_process_handle and current_process_id from the
13276 parameters. Clear globals.
13277 (win32_create_inferior): Don't set current_process_handle and
13278 current_process_id here. Instead pass them on the call to
13279 do_initial_child_stuff.
13280 (win32_attach): Likewise.
13281 (win32_clear_inferiors): New.
13282 (win32_kill): Don't close the current process handle or the
13283 current thread handle here. Instead call win32_clear_inferiors.
13284 (win32_detach): Don't open a new handle to the process. Call
13285 win32_clear_inferiors.
13286 (win32_join): Don't rely on current_process_handle; open a new
13287 handle using the process id.
13288 (win32_wait): Call win32_clear_inferiors when the inferior process
13289 has exited.
13290
ecd7ecbc
DJ
132912008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13292
13293 * server.c (monitor_show_help): Add "exit".
13294
1525d545
MG
132952008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13296
ecd7ecbc 13297 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13298 (clean): Add reg-xtensa.c.
13299 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13300 * configure.srv (xtensa*-*-linux*) New target.
13301 * linux-xtensa-low.c: New.
13302 * xtensa-xtregs.c: New.
1525d545 13303
59a016f0
PA
133042008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13305
13306 * hostio.c: Don't include errno.h.
13307 (errno_to_fileio_errno): Move to hostio-errno.
13308 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13309 error number outputting to the target->hostio_last_error callback.
13310 (hostio_packet_error): Use FILEIO_EINVAL directly.
13311 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13312 calls to hostio_error.
13313 * hostio-errno.c: New.
13314 * server.h (hostio_last_error_from_errno): Declare.
13315 * target.h (target_ops): Add hostio_last_error member.
13316 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13317 as hostio_last_error handler.
889bf7c5 13318 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13319 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13320 (wince_hostio_last_error): New functions.
13321 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13322 as hostio_last_error handler.
13323 (win32_target_ops) [!_WIN32_WCE]: Register
13324 hostio_last_error_from_errno as hostio_last_error handler.
13325 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13326 (hostio-errno.o): New rule.
13327 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13328 * configure.srv (srv_hostio_err_objs): New variable. Default to
13329 hostio-errno.o.
13330 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13331 * configure: Regenerate.
13332
2d717e4f
DJ
133332008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13334
13335 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13336 (linux_kill, linux_detach): Clean up the process list.
13337 * remote-utils.c (remote_open): Improve port number parsing.
13338 (putpkt_binary, input_interrupt): Only send interrupts if the target
13339 is running.
13340 * server.c (extended_protocol): Make static.
13341 (attached): Define earlier.
13342 (exit_requested, response_needed, program_argv): New variables.
13343 (target_running): New.
13344 (start_inferior): Clear attached here.
13345 (attach_inferior): Set attached here.
13346 (require_running): Define.
13347 (handle_query): Use require_running and target_running. Implement
13348 "monitor exit".
13349 (handle_v_attach, handle_v_run): New.
13350 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13351 (gdbserver_usage): Update.
13352 (main): Redo argument parsing. Handle --debug and --multi. Handle
13353 --attach along with other options or after the port. Save
13354 program_argv. Support no initial program. Resynchronize
13355 communication with GDB after an error. Handle "monitor exit".
13356 Use require_running and target_running. Always allow the extended
13357 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13358 restart in extended mode.
13359 * README: Refer to the GDB manual. Update --attach usage.
13360
7407e2de
AS
133612007-12-20 Andreas Schwab <schwab@suse.de>
13362
13363 * linux-low.c (STACK_SIZE): Define.
13364 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13365 (linux_test_for_tracefork): Likewise.
13366
b65d95c5
DJ
133672007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13368
13369 * linux-low.c (linux_wait_for_event): Update messages. Do not
13370 reinsert auto-delete breakpoints.
13371 * mem-break.c (struct breakpoint): Change return type of handler to
13372 int.
13373 (set_breakpoint_at): Update handler type.
13374 (reinsert_breakpoint_handler): Return 1 instead of calling
13375 delete_breakpoint.
13376 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13377 setting a new one.
13378 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13379 * mem-break.h (set_breakpoint_at): Update handler type.
13380 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13381 * win32-low.c (auto_delete_breakpoint): New.
13382 (get_child_debug_event): Use it.
13383
4e799345
DJ
133842007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13385
13386 * configure.ac: Check for pread and pwrite.
13387 * hostio.c (handle_pread): Fall back to lseek and read.
13388 (handle_pwrite): Fall back to lseek and write.
13389 * config.in, configure: Regenerated.
13390
27524b67
DJ
133912007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13392
13393 * server.c (myresume): Add own_buf argument.
13394 (main): Update calls.
13395
a20d5e98
DJ
133962007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13397
13398 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13399 * remote-utils.c (remote_open): Do not call disable_async_io.
13400 (block_async_io): Delete.
13401 (unblock_async_io): Make static.
13402 (initialize_async_io): New.
13403 * server.c (handle_v_cont): Handle async I/O here.
13404 (myresume): Likewise. Move other common resume tasks here...
13405 (main): ... from here. Call initialize_async_io. Disable async
13406 I/O before the main loop.
13407 * server.h (initialize_async_io): Declare.
13408 (block_async_io, unblock_async_io): Delete prototypes.
13409 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13410
b79d787e
DJ
134112007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13412
13413 * remote-utils.c (readchar): Allow binary data in received messages.
13414
d97903b2
PA
134152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13416
13417 * win32-low.c (attaching): New global.
13418 (win32_create_inferior): Clear the `attaching' global.
13419 (win32_attach): Set the `attaching' global.
13420 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13421 attaching. Only set a breakpoint at the entry point if not
13422 attaching.
13423
311de423
PA
134242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13425
13426 * server.c (main): Don't report dll events on the initial
13427 connection on attaches.
13428
6c2d16d2
PA
134292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13430
13431 * server.c (main): Relax numerical bases supported for the pid of
13432 the --attach command line argument.
13433
5ca906e6
PA
134342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13435
13436 * win32-low.c (win32_attach): Call OpenProcess before
13437 DebugActiveProcess, not after. Add last error output to error
13438 call.
13439
9c6c8194
PA
134402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13441
13442 * win32-low.c (win32_get_thread_context)
13443 (win32_set_thread_context): New functions.
13444 (thread_rec): Use win32_get_thread_context.
13445 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13446 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13447 field.
13448
4d5d1aaa
PA
134492007-12-03 Leo Zayas
13450 Pedro Alves <pedro_alves@portugalmail.pt>
13451
13452 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13453 global variables.
13454 (child_add_thread): Minor cleanup.
13455 (child_continue): Resume artificially suspended threads before
13456 calling ContinueDebugEvent.
13457 (suspend_one_thread): New.
13458 (fake_breakpoint_event): New.
13459 (get_child_debug_event): Change return type to int. Check here if
13460 gdb sent an interrupt request. If a soft interrupt was requested,
13461 fake a breakpoint event. Return 0 if there is no event to handle,
13462 and 1 otherwise.
13463 (win32_wait): Don't check here if gdb sent an interrupt request.
13464 Ensure there is a valid event to handle.
13465 (win32_request_interrupt): Add soft interruption method as last
13466 resort.
13467
c436e841
PA
134682007-12-03 Leo Zayas
13469 Pedro Alves <pedro_alves@portugalmail.pt>
13470
13471 * win32-low.h (win32_thread_info): Add descriptions to the
13472 structure members. Replace `suspend_count' counter by a
13473 `suspended' flag.
13474 * win32-low.c (thread_rec): Update condition of when to get the
13475 context from the inferior. Rely on ContextFlags being set if it
13476 has already been retrieved. Only suspend the inferior thread if
13477 we haven't already. Warn if that fails.
13478 (continue_one_thread): s/suspend_count/suspended/. Only call
13479 ResumeThread once. Warn if that fails.
13480
e7b5fa67
PA
134812007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13482
13483 * win32-low.c (win32_wait): Don't read from the inferior when it
13484 has already exited.
13485
a385171d
PA
134862007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13487
13488 * Makefile.in (win32_low_h): New variable.
13489 (win32-low.o): Add dependency on $(win32_low_h).
13490 (win32-arm-low.o, win32-i386-low.o): New rules.
13491
f80c84b3
DJ
134922007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13493
13494 * hostio.c: Correct copyright year.
13495
a6b151f1
DJ
134962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * Makefile.in (OBS): Add hostio.o.
13499 (hostio.o): New rule.
13500 * server.h (handle_vFile): Declare.
13501 * hostio.c: New file.
13502 * server.c (handle_v_requests): Take packet_len and new_packet_len
13503 for binary packets. Call handle_vFile.
13504 (main): Update call to handle_v_requests.
13505
f9387fc3
DJ
135062007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13507
13508 * linux-low.c: Include <sched.h>.
13509
51c2684e
DJ
135102007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13511
13512 * linux-low.c (linux_tracefork_grandchild): New.
13513 (linux_tracefork_child): Use clone.
13514 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13515
75f83163
JB
135162007-10-31 Joel Brobecker <brobecker@adacore.com>
13517
13518 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13519
da5898ce
DJ
135202007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13521
13522 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13523
24a09b5f
DJ
135242007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * inferiors.c (change_inferior_id): Delete.
13527 (add_pid_to_list, pull_pid_from_list): New.
13528 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13529 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13530 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13531 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13532 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13533 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13534 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13535 (using_threads): Always set to 1.
13536 (handle_extended_wait): New.
13537 (add_process): Do not set TID.
13538 (linux_create_inferior): Set must_set_ptrace_flags.
13539 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13540 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13541 (linux_thread_alive): Rename TID argument to LWPID.
13542 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13543 (linux_wait_for_event): Do not use TID or check using_threads. Update
13544 call to dead_thread_notify. Call handle_extended_wait.
13545 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13546 (send_sigstop): Delete sigstop_sent.
13547 (wait_for_sigstop): Avoid TID.
13548 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13549 (linux_test_for_tracefork): New.
13550 (linux_lookup_signals): Use thread_db_active and
13551 linux_supports_tracefork_flag.
13552 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13553 * linux-low.h (get_process_thread): Avoid TID.
13554 (struct process_ifo): Move thread_known and tid to the end. Remove
13555 sigstop_sent.
13556 (linux_attach_lwp, thread_db_init): Update prototypes.
13557 * server.h (change_inferior_id): Delete prototype.
13558 (add_pid_to_list, pull_pid_from_list): New prototypes.
13559 * thread-db.c (thread_db_use_events): New.
13560 (find_first_thread): Rename to...
13561 (find_one_thread): ...this. Update callers and messages. Do not
13562 call fatal. Check thread_db_use_events. Do not call
13563 change_inferior_id or new_thread_notify.
13564 (maybe_attach_thread): Update. Do not call new_thread_notify.
13565 (thread_db_init): Set thread_db_use_events. Check use_events.
13566 * utils.c (fatal, warning): Correct message prefix.
13567
30ed0a8f
DJ
135682007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13569
13570 * Makefile.in (clean): Remove new files.
13571 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13572 (powerpc-64.o, powerpc-64.c): New rules.
13573 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13574 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13575 with SPE.
13576 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13577 SPE targets.
13578 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13579 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13580 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13581 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13582 (target_regsets): Add AltiVec and SPE register sets.
13583 * configure.ac: Check for AltiVec and SPE.
13584 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13585 (ppc_fill_vrregset, ppc_store_vrregset): New.
13586 (target_regsets): Add AltiVec register set.
13587 * configure: Regenerated.
13588
fd462a61
DJ
135892007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * linux-low.c (O_LARGEFILE): Define.
13592 (linux_read_memory): Use /proc/PID/mem.
13593 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13594 * configure, config.in: Regenerated.
13595
69f223ed
DJ
135962007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13597
13598 * linux-low.c (linux_wait_for_event): Do not pass signals while
13599 single-stepping.
13600
aec18585
PA
136012007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13602
13603 * win32-low.c (create_process): New.
13604 (win32_create_inferior): Use create_process instead of
13605 CreateProcess. If create_process failed retry appending an ".exe"
13606 suffix. Store the GetLastError result immediatelly after
13607 create_process calls and use it on the call to error.
13608
34d86ddd
PA
136092007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13610
13611 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13612
5a0e3bd0
JB
136132007-08-23 Joel Brobecker <brobecker@adacore.com>
13614
13615 * configure.ac: Switch license to GPLv3.
13616
f88c79e6
MS
136172007-08-01 Michael Snyder <msnyder@access-company.com>
13618
13619 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13620
6b3d9b83
PA
136212007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13622
13623 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13624 typedef.
13625 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13626 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13627 CloseToolhelp32Snapshot.
13628 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13629 CloseToolhelp32Snapshot.
13630
c588c53c
MS
136312007-07-27 Michael Snyder <michael.snyder@access-company.com>
13632
13633 * server.c (main): Check for inferior exit before main loop.
13634
aa0403d9
PA
136352007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13636
13637 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13638 instead of on tmp_desc.
13639
255e7678
DJ
136402007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13641 Daniel Jacobowitz <dan@codesourcery.com>
13642
13643 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13644 (add_thread): Minor cleanups.
13645 (clear_inferiors): Move lower in the file. Clear the DLL
13646 list.
13647 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13648 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13649 (xml_escape_text): New.
13650 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13651 for qSupported.
13652 (handle_v_cont): Report errors.
13653 (gdbserver_version): Update.
13654 (main): Correct size of own_buf. Do not report initial DLL events.
13655 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13656 (unloaded_dll, xml_escape_text): New.
13657 * win32-low.c (enum target_waitkind): Update comments.
13658 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13659 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13660 (win32_EnumProcessModules, win32_GetModuleInformation)
13661 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13662 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13663 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13664 (win32_Module32First, win32_Module32Next, load_toolhelp)
13665 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13666 (get_child_debug_event): Handle DLL events.
13667 (win32_wait): Likewise.
13668
0d37add9
DJ
136692007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13670
13671 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13672 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13673
45e2715e
PA
136742007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13675
13676 * win32-low.c (handle_output_debug_string): Ignore event if not
13677 waiting.
13678
c5674cf1
PA
136792007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13680
13681 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13682
2bbe3cc1
DJ
136832007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13684
13685 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13686
ae13219e
DJ
136872007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13688
13689 * inferiors.c (change_inferior_id): Add comment.
13690 * linux-low.c (check_removed_breakpoint): Add an early
13691 prototype. Improve debug output.
13692 (linux_attach): Doc update.
13693 (linux_detach_one_process, linux_detach): Clean up before releasing
13694 each process.
13695 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13696 * linux-low.h (struct process_info): Doc improvement.
13697 * mem-break.c (delete_all_breakpoints): New.
13698 * mem-break.h (delete_all_breakpoints): New prototype.
13699 * thread-db.c (find_first_thread): New.
13700 (thread_db_create_event): Call it instead of
13701 thread_db_find_new_threads. Clean up unused variables.
13702 (maybe_attach_thread): Remove first thread handling.
13703 (thread_db_find_new_threads): Use find_first_thread.
13704 (thread_db_get_tls_address): Likewise.
13705
4105de34
DJ
137062007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13707
13708 * thread-db.c (thread_db_find_new_threads): Add prototype.
13709 (thread_db_create_event): Check for the main thread before adding
13710 a new thread.
13711 (maybe_attach_thread): Only enable event reporting if TID == 0.
13712 (thread_db_get_tls_address): Check for new threads.
13713
2b876972
DJ
137142007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13715
13716 * linux-low.c (linux_create_inferior): Try execv before execvp.
13717 * spu-low.c (spu_create_inferior): Likewise.
13718
7a245884
DJ
137192007-06-13 Mike Frysinger <vapier@gentoo.org>
13720
13721 * linux-low.c (linux_create_inferior): Change execv to execvp.
13722 * spu-low.c (spu_create_inferior): Likewies.
13723
117ce543
DJ
137242007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13725
13726 * Makefile.in (clean): Clean new files instead of deleted ones.
13727 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13728 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13729 rules.
13730 * configure.srv: Specify XML files and new regformats for MIPS and
13731 MIPS64 GNU/Linux.
13732 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13733 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13734 an entry for the restart register.
13735 (mips_cannot_fetch_register, mips_cannot_store_register)
13736 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13737 register names to match the XML descriptions.
13738 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13739 restart register instead of $0.
13740
0e7f50da
UW
137412007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13742 Markus Deuling <deuling@de.ibm.com>
13743
13744 * remote-utils.c (decode_xfer_write): New function.
13745 * server.h (decode_xfer_write): Add prototype.
13746 * server.c (handle_query): Add PACKET_LEN argument. Support
13747 qXfer:spu:read and qXfer:spu:write packets.
13748 (main): Pass packet_len to handle_query.
13749 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13750 * target.h (target_ops): Add qxfer_spu.
13751
374c1d38
UW
137522007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13753
13754 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13755 accessing non-seekable spufs files.
13756
bb63802a
UW
137572007-05-16 Markus Deuling <deuling@de.ibm.com>
13758
889bf7c5 13759 * server.c (handle_query): Add reply for qC packet.
bb63802a 13760
7390519e
PA
137612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13762 Leo Zayas <lerele@champenstudios@com>
13763
13764 * server.h (check_remote_input_interrupt_request): New function.
13765 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13766 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13767 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13768 (check_remote_input_interrupt_request): New function.
13769 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13770 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13771 winapi_GenerateConsoleCtrlEvent): New typedefs.
13772 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13773 to 250 ms.
13774 (win32_wait): Check for remote interrupt request
13775 with check_remote_input_interrupt_request.
13776 (win32_request_interrupt): New function.
13777 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13778
34b34921
PA
137792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13780
13781 * win32-low.c (debug_registers_changed,
13782 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13783 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13784 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13785 (thread_rec): Get context using the low target.
13786 (child_add_thread): Call thread_added on the low target,
13787 which does the same thing.
13788 (regptr): Delete.
13789 (do_initial_child_stuff): Remove debug registers references.
13790 Set context using the low target. Resume threads after
13791 setting the contexts.
13792 (child_continue): Remove dead variable. Remove debug
13793 registers references.
13794 (child_fetch_inferior_registers): Go through the low target.
13795 (do_child_store_inferior_registers): Remove.
13796 (child_store_inferior_registers): Go through the low target.
13797 (win32_resume): Remove debug registers references.
13798 Set context using the low target.
13799 (handle_exception): Change return type to void. Don't record
13800 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13801 first chance exception.
889bf7c5 13802 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13803 goto loop. Always return after waiting for debug event.
13804 (win32_wait): Convert to switch statement. Handle spurious
13805 events.
13806
13807 * win32-i386-low.c (debug_registers_changed,
13808 debug_registers_used): New.
13809 (initial_stuff): Rename to ...
13810 (i386_initial_stuff): ... this. Clear debug registers
13811 state variables.
13812 (store_debug_registers): Delete.
13813 (i386_get_thread_context): New.
13814 (load_debug_registers): Delete.
13815 (i386_set_thread_context): New.
13816 (i386_thread_added): New.
13817 (single_step): Rename to ...
13818 (i386_single_step): ... this.
13819 (do_fetch_inferior_registers): Rename to ...
13820 (i386_fetch_inferior_register): ... this.
13821 (i386_store_inferior_register): New.
13822 (the_low_target): Adapt to new interface.
13823
13824 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13825 (arm_get_thread_context): New.
13826 (arm_set_thread_context): New.
13827 (regptr): New.
13828 (do_fetch_inferior_registers): Rename to ...
13829 (arm_fetch_inferior_register): ... this.
13830 (arm_store_inferior_register): New.
13831 (arm_wince_breakpoint): Reimplement as unsigned long.
13832 (arm_wince_breakpoint_len): Define.
13833 (the_low_target): Adapt to new interface.
13834
13835 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13836 load_debug_registers. Add get_thread_context, set_thread_context,
13837 thread_added and store_inferior_register. Rename
13838 fetch_inferior_registers to fetch_inferior_register.
13839 (regptr): Remove declaration.
13840
dd6953e1
PA
138412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13842
13843 * linux-low.c (linux_detach): Change return type to int. Return 0.
13844 * spu-low.c (spu_detach): Likewise.
13845
444d6139
PA
138462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13847
13848 * target.h (target_ops): Change return type of detach to int.
13849 Add join.
13850 (join_inferior): New.
13851 * server.c (main): Don't skip detach support on mingw32.
13852 If the inferior doesn't support detaching return error.
13853 Call join_inferior instead of using waitpid.
13854 * linux-low.c (linux_join): New.
13855 (linux_target_op): Add linux_join.
13856 * spu-low.c (spu_join): New.
13857 (spu_target_ops): Add spu_join.
13858 * win32-low.c (win32_detach): Adapt to new interface.
13859 Reopen current_process_handle before detaching. Issue a child
13860 resume before detaching.
13861 (win32_join): New.
13862 (win32_target_op): Add win32_join.
13863
1d5315fe
PA
138642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13865
13866 * win32-low.c (win32-attach): Fix return value.
13867 * target.h (target_ops): Describe ATTACH return values.
13868
bf914831
PA
138692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13870
13871 * win32-low.c (GETPROCADDRESS): Define.
13872 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13873 (winapi_DebugSetProcessKillOnExit): Likewise.
13874 (win32_create_inferior): Force usage of ansi CreateProcessA.
13875 (win32_attach): Use GETPROCADDRESS.
13876 (win32_detach): Likewise.
13877
f72f3e60
PA
138782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13879
13880 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13881
ed50f18f
PA
138822007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13883
13884 * win32-low.c: Commit leftover changes from 2007-03-29.
13885
0c2ead7e
DJ
138862007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13887
13888 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13889 fields short instead of int. Add explicit padding.
13890 (i387_cache_to_fsave): Remove unnecessary casts.
13891 (i387_fsave_to_cache): Doc fix.
13892 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13893
73725ff3
DJ
138942007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13895
13896 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13897 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13898
d99f33d8
PA
138992007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13900
13901 * configure.srv (arm*-*-mingw32ce*): Move near the other
13902 arm targets.
13903
68070c10
PA
139042007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13905
2482afc6 13906 * configure.ac: Add errno checking.
68070c10
PA
13907 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13908 sys/file.h and malloc.h.
13909 (AC_CHECK_DECLS): Add perror.
13910 (srv_mingwce): Handle.
2482afc6 13911 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13912 win32-i386-low.o to srv_tgtobj.
13913 (i[34567]86-*-mingw*): Likewise.
13914 (arm*-*-mingw32ce*): Add case.
13915 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13916 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13917 [__MINGW32CE__] (strerror): New function.
13918 [__MINGW32CE__] (errno): Define to GetLastError.
13919 [__MINGW32CE__] (COUNTOF): New macro.
13920 (remote_open): Remove extra close call.
13921 * mem-break.c (delete_breakpoint_at): New function.
13922 * mem-break.h (delete_breakpoint_at): Declare.
13923 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13924 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13925 [USE_WIN32API] (read, write): Add char* casts.
13926 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13927 * server.h: Include wincecompat.h on Windows CE.
13928 [HAVE_ERRNO_H]: Check.
13929 (perror): Declare if not declared.
13930 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13931 (perror_with_name): Remove errno declaration.
13932 * wincecompat.h: New.
13933 * wincecompat.c: New.
13934 * win32-low.h: New.
13935 * win32-arm-low.c: New.
13936 * win32-i386-low.c: New.
13937 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13938 (OUTMSG2): Make it safe.
13939 (_T): New macro.
13940 (COUNTOF): New macro.
13941 (NUM_REGS): Get it from the low target.
13942 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13943 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13944 (thread_rec): Let low target handle debug registers.
13945 (child_add_thread): Likewise.
13946 (child_init_thread_list): Likewise.
13947 (continue_one_thread): Likewise.
13948 (regptr): New.
13949 (do_child_fetch_inferior_registers): Move to ...
13950 * win32-i386-low.c: ... here, and rename to ...
13951 (do_fetch_inferior_registers): ... this.
889bf7c5 13952 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13953 Go through the low target.
13954 (do_child_store_inferior_registers): Use regptr.
13955 (strwinerror): New function.
13956 (win32_create_inferior): Handle Windows CE.
13957 Use strwinerror instead of strerror on Windows error
13958 codes. Add program to the error output.
13959 Don't close the main thread handle on Windows CE.
13960 (win32_attach): Use coredll.dll on Windows CE.
13961 (win32_kill): Close current process and current
13962 thread handles.
13963 (win32_detach): Use coredll.dll on Windows CE.
13964 (win32_resume): Let low target handle debug registers, and
13965 step request.
13966 (handle_exception): Add/Remove initial breakpoint. Avoid
13967 non-existant WSTOPSIG on Windows CE.
13968 (win32_read_inferior_memory): Cast to remove warning.
13969 (win32_arch_string): Go through the low target.
13970 (initialize_low): Call set_breakpoint_data with the low
13971 target's breakpoint.
13972 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13973 FOP_REGNUM, mappings): Move to ...
13974 * win32-i386-low.c: ... here.
13975 * win32-low.c (win32_thread_info): Move to ...
13976 * win32-low.h: ... here.
13977 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13978 win32-arm-low.c and wincecompat.c.
13979 (all:): Add $EXEEXT.
13980 (install-only:): Likewise.
13981 (gdbserver:): Likewise.
13982 (gdbreplay:): Likewise.
13983 * config.in: Regenerate.
13984 * configure: Regenerate.
13985
41093d81
PA
139862007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13987
13988 * win32-low.c: Rename typedef thread_info to
13989 win32_thread_info throughout.
13990
544afa54
PA
139912007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13992
13993 * win32-i386-low.c: Rename to ...
13994 * win32-low.c: ... this.
13995 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13996 * Makefile.in: Likewise.
13997
bce7165d
PA
139982007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13999
14000 * remote-utils.c (monitor_output): Constify msg parameter.
14001 * server.h (monitor_output): Likewise.
14002 * win32-i386-low.c (handle_output_debug_string): New.
14003 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14004 handle_output_debug_string.
14005 (get_child_debug_event): Likewise.
14006
506c7aa0
DJ
140072007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14008
14009 * server.c (main): Correct strtoul check.
14010
42c81e2a
DJ
140112007-03-27 Jon Ringle <jon@ringle.org>
14012
14013 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14014
9453113a
DJ
140152007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14016
14017 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14018
64a69107
DJ
140192007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14020
14021 * terminal.h: Check HAVE_SGTTY_H.
14022
140232007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14024
14025 * remote-utils.c (remote_open): Print out the assigned port number.
14026
c74d0ad8
DJ
140272007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14028
14029 * remote-utils.c (monitor_output): New function.
14030 * server.c (debug_threads): Define here.
14031 (monitor_show_help): New function.
14032 (handle_query): Handle qRcmd.
14033 (main): Do not handle 'd' packet.
14034 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14035 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14036 of debug_threads.
14037
de7c3b4a
PA
140382007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14039
14040 * Makefile.in (EXEEXT): New.
14041 (clean): Use $(EXEEXT).
14042
ef57601b
PA
140432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14044
14045 * target.h (target_ops): Rename send_signal to request_interrupt,
14046 and remove enum target_signal parameter.
14047 * linux-low.c (linux_request_interrupt): Rename from
14048 linux_send_signal, and always send SIGINT.
14049 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14050 and always send SIGINT.
14051 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14052 of send_signal.
14053 (input_interrupt): Likewise.
14054
820f2bda
PA
140552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14056
14057 * server.c (get_features_xml): Check if target implemented
14058 arch_string.
14059 * win32-i386-low.c (win32_arch_string): New.
14060 (win32_target_ops): Add win32_arch_string as arch_string member.
14061
ab39bf24
UW
140622007-02-22 Markus Deuling <deuling@de.ibm.com>
14063
14064 * spu-low.c (spu_arch_string): New.
14065 (spu_target_ops): Add spu_arch_string.
14066
61ff6e04
DJ
140672007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14068
14069 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14070 * configure.ac: Do not check for terminal.h.
14071 * configure, config.in: Regenerated.
14072
fb1e4ffc
DJ
140732007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14074
14075 * Makefile.in (OBS): Add $(XML_BUILTIN).
14076 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14077 (clean): Update.
14078 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14079 (arm-with-iwmmxt.c): New.
14080 * config.in, configure: Regenerate.
14081 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14082 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14083 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14084 (arm*-*-linux*): Add iWMMXt and regset support.
14085 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14086 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14087 (arm_store_wmmxregset, target_regsets): New.
14088 * server.c (get_features_xml): Take annex argument. Check builtin
14089 XML documents.
14090 (handle_query): Handle multiple annexes.
14091
0f48aa01
DJ
140922007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14093
14094 * remote-utils.c [USE_WIN32API] (read, write): Define.
14095 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14096 write.
14097
23181151
DJ
140982007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14099
14100 * linux-i386-low.c (the_low_target): Set arch_string.
14101 * linux-x86-64-low.c (the_low_target): Likewise.
14102 * linux-low.c (linux_arch_string): New.
14103 (linux_target_ops): Add it.
14104 * linux-low.h (struct linux_target_ops): Add arch_string.
14105 * server.c (write_qxfer_response): Use const void * for DATA.
14106 (get_features_xml): New.
14107 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14108 * target.h (struct target_ops): Add arch_string method.
14109
9d606399
DJ
141102007-01-03 Denis Pilat <denis.pilat@st.com>
14111 Daniel Jacobowitz <dan@codesourcery.com>
14112
14113 * linux-low.c (linux_kill): Handle being called with no threads.
14114 * win32-i386-low.c (win32_kill): Likewise.
14115 (get_child_debug_event): Clear current_process_handle.
14116
141172006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14118 Daniel Jacobowitz <dan@codesourcery.com>
14119
14120 * remote-utils.c (remote_open): Check the type of specified
14121 serial port devices before opening them.
14122 * server.c (main): Kill the inferior if an error occurs during
14123 the first remote_open.
14124
a5e13d24
DJ
141252006-12-05 Markus Deuling <deuling@de.ibm.com>
14126
14127 * README: Update supported targets.
14128
186947f7
DJ
141292006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14130
14131 * Makefile.in (clean): Remove reg-mips64.c.
14132 (reg-mips64.c, reg-mips64.o): New rules.
14133 * configure.srv: Handle mips64. Include regset support for mips.
14134 * linux-mips-low.c (union mips_register): New.
14135 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14136 (mips_breakpoint, mips_breakpoint_at): Use int.
14137 (mips_collect_register, mips_supply_register)
14138 (mips_collect_register_32bit, mips_supply_register_32bit)
14139 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14140 (mips_store_fpregset, target_regsets): New.
14141 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14142
a13e2c95
UW
141432006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14144
14145 * configure.srv: Add target "spu*-*-*".
14146 * Makefile.in (clean): Remove reg-spu.c.
14147 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14148 * spu-low.c: New file.
14149
cb7283db
DJ
141502006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14151
14152 * configure.ac: Correct td_thr_tls_get_addr test.
14153 * configure: Regenerated.
14154
89be2091
DJ
141552006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14156
14157 * linux-low.c (linux_wait_for_event): Reformat. Use the
14158 pass_signals array.
14159 * remote-utils.c (decode_address_to_semicolon): New.
14160 * server.c (pass_signals, handle_general_set): New.
14161 (handle_query): Mention QPassSignals for qSupported.
14162 (main): Call handle_general_set.
14163 * server.h (pass_signals, decode_address_to_semicolon): New.
14164
000ef4f0
DJ
141652006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * server.c (handle_query): Correct error handling for read_auxv.
14168
b7149293
UW
141692005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14170
14171 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14172 and srv_linux_thread_db to yes.
14173 * linux-s390-low.c (s390_fill_gregset): New function.
14174 (target_regsets): Define data structure.
14175
dae5f5cf
DJ
141762006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14179 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14180 * config.in, configure: Regenerated.
14181 * inferiors.c (gdb_id_to_thread): New function.
14182 (gdb_id_to_thread_id): Use it.
14183 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14184 * linux-low.h (struct process_info): Add th member.
14185 (thread_db_get_tls_address): New prototype.
14186 * remote-utils.c (decode_address): Make non-static.
14187 * server.c (handle_query): Handle qGetTLSAddr.
14188 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14189 * target.h (struct target_ops): Add get_tls_address.
14190 * thread-db.c (maybe_attach_thread): Save the thread handle.
14191 (thread_db_get_tls_address): New.
14192
32ca6d61
DJ
141932006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14194
14195 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14196 (linux_resume_one_process): Take a siginfo_t *. Update all
14197 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14198 (struct pending_signals): Add a siginfo_t.
14199 (linux_wait_for_process): Always set last_status.
14200 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14201 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14202 * linux-low.h (struct process_info): Add last_status.
14203
5ffff7c1
DJ
142042006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14205
14206 * remote-utils.c (try_rle): New function.
14207 (putpkt_binary): Use it.
14208
8695c747
DJ
142092006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14210
14211 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14212 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14213 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14214 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14215 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14216 point registers.
14217
290fadea
RS
142182006-08-08 Richard Sandiford <richard@codesourcery.com>
14219
14220 * server.c (terminal_fd): New variable.
14221 (old_foreground_pgrp): Likewise.
14222 (restore_old_foreground_pgrp): New function.
14223 (start_inferior): Record the terminal file descriptor in terminal_fd
14224 and its original foreground group in old_foreground_pgrp. Register
14225 restore_old_foreground_pgrp with atexit().
14226
9f2e1e63
DJ
142272006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14228
14229 * server.c (handle_query): Correct qPart to qXfer.
14230
b80864fb
DJ
142312006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14232
14233 * configure.ac: Check for more headers which are missing on
14234 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14235 * configure.srv: Add Cygwin and mingw32.
14236 * remote-utils.c: Don't include headers unconditionally which
14237 are missing on mingw32. Include <winsock.h> for mingw32.
14238 (remote_open): Adjust for mingw32 support. Flush
14239 standard error after writing to it.
14240 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14241 (unblock_async_io, enable_async_io, disable_async_io)
14242 (readchar, getpkt): Update for Winsock support.
14243 (prepare_resume_reply): Expect a protocol signal number.
14244 * server.c: Disable <sys/wait.h> on mingw32.
14245 (start_inferior): Adjust for mingw32 support. Flush
14246 standard error after writing to it.
14247 (attach_inferior): Likewise. Use protocol signal
14248 numbers.
14249 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14250 and names.
14251 * win32-i386-low.c: New file.
14252 * Makefile.in (XM_CLIBS): Set.
14253 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14254 (win32-i386-low.o): New dependency rule.
14255 * linux-low.c (linux_wait): Use target signal numbers.
14256 * target.h (struct target_ops): Doc fix.
14257 * server.h (target_signal_to_name): New prototype.
14258 * gdbreplay.c: Don't include headers unconditionally which
14259 are missing on mingw32. Include <winsock.h> for mingw32.
14260 (remote_close, remote_open): Adjust for Winsock support.
14261 * configure, config.in: Regenerated.
14262
0876f84a
DJ
142632006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14264
14265 * server.c (decode_xfer_read, write_qxfer_response): New.
14266 (handle_query): Take a packet length argument. Handle
14267 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14268 the qSupported response.
14269 (main): Update call to handle_query.
14270
01f9e8fa
DJ
142712006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14274 (putpkt_binary): Renamed from putpkt and adjusted for binary
14275 data.
14276 (putpkt): New wrapper for putpkt_binary.
14277 (readchar): Don't mask off the high bit.
14278 (decode_X_packet): New function.
14279 * server.c (main): Call putpkt_binary if a handler sets the packet
14280 length. Save the length of the incoming packet. Handle 'X'.
14281 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14282
be2a5f71
DJ
142832006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14284
14285 * server.c (handle_query): Handle qSupported.
14286
ea025f5f
DJ
142872006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * remote-utils.c (all_symbols_looked_up): New variable.
14290 (look_up_one_symbol): Check it.
14291 * server.h (look_up_one_symbol): New declaration.
14292 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14293
9308fc88
DJ
142942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14295
14296 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14297 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14298 (PTRACE_GET_THREAD_AREA): Define.
14299 (ps_get_thread_area): New function.
14300
52fb6437
NS
143012006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14302
14303 * configure.srv (m68k*-*-uclinux*): New target.
14304 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14305 (linux_resume_one_process): Remove extraneous cast.
14306 (linux_read_offsets): New.
14307 (linux_target_op): Add linux_read_offsets on mmuless systems.
14308 * server.c (handle_query): Add qOffsets logic.
14309 * target.h (struct target_ops): Add read_offsets.
14310
21b0f40c
DJ
143112006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14312
14313 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14314 (PTRACE_GET_THREAD_AREA): Define.
14315 (ps_get_thread_area): New function.
14316 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14317 (linux-x86-64-low.o): Update.
14318
0050a760
DJ
143192006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * configure.ac: Remove checks for prfpregset_t.
14322 * gdb_proc_service.h: New file.
14323 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14324 new "gdb_proc_service.h".
14325 * proc-service.c: Likewise.
14326 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14327 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14328 * Makefile.in (gdb_proc_service_h): Updated.
14329 * configure, config.in: Regenerated.
14330
b92a518e
DJ
143312006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * remote-utils.c (prepare_resume_reply): Move declaration
14334 of gdb_id_from_wait to the top of the block.
14335
545587ee
DJ
143362006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * linux-low.c (regsets_store_inferior_registers): Read the regset
14339 from the target before filling it.
14340
9db87ebd
DJ
143412006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * server.c (attach_inferior): Return SIGTRAP for a successful
14344 attach.
14345
dd24457d
DJ
143462006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14347
14348 * Makefile.in (OBS): Add version.o.
14349 (STAGESTUFF): Delete.
14350 (version.o): Add dependencies.
14351 (version.c): Replace rule.
14352 (clean): Remove version.c.
14353 * server.c (gdbserver_version): New.
14354 (gdbserver_usage): Use printf.
14355 (main): Handle --version and --help.
14356 * server.h (version, host_name): Add declarations.
14357
6f0f660e
EZ
143582005-12-23 Eli Zaretskii <eliz@gnu.org>
14359
889bf7c5
PA
14360 * linux-arm-low.c:
14361 * linux-arm-low.c:
14362 * inferiors.c:
14363 * i387-fp.h:
14364 * i387-fp.c:
14365 * gdbreplay.c:
14366 * regcache.c:
14367 * proc-service.c:
14368 * mem-break.h:
14369 * mem-break.c:
14370 * linux-x86-64-low.c:
14371 * linux-sh-low.c:
14372 * linux-s390-low.c:
14373 * linux-ppc64-low.c:
14374 * linux-ppc-low.c:
14375 * linux-mips-low.c:
14376 * linux-m68k-low.c:
14377 * linux-m32r-low.c:
14378 * linux-low.h:
14379 * linux-low.c:
14380 * linux-ia64-low.c:
14381 * linux-i386-low.c:
14382 * linux-crisv32-low.c:
14383 * thread-db.c:
14384 * terminal.h:
14385 * target.h:
14386 * target.c:
14387 * server.h:
14388 * server.c:
14389 * remote-utils.c:
14390 * regcache.h:
14391 * utils.c:
14392 * Makefile.in:
14393 * configure.ac:
6f0f660e
EZ
14394 * gdbserver.1: Add (C) after Copyright. Update the FSF
14395 address.
14396
9d1fb177
DJ
143972005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14400 (arm_breakpoint_at): Recognize both breakpoints.
14401 (the_low_target): Use the correct breakpoint instruction.
14402
011a70c2
DJ
144032005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14404
14405 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14406 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14407 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14408 (the_low_target): Update.
14409
7fb85e41
AS
144102005-10-25 Andreas Schwab <schwab@suse.de>
14411
14412 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14413
14414 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14415 (ia64_num_regs): Reduce to 462.
14416
3db0444b
DJ
144172005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14418
14419 * acinclude.m4: Correct quoting.
14420 * aclocal.m4: Regenerated.
14421
14422 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14423 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14424 (thread_db_init): Call thread_db_err_str.
14425 * configure.ac: Check for TD_VERSION.
14426 * config.in, configure: Regenerated.
14427
bee0189a
DJ
144282005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14429
14430 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14431
e9d25b98
DJ
144322005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14433
14434 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14435 is not available. Define HAVE_PTRACE_GETREGS if it is.
14436 * config.in, configure: Regenerated.
14437 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14438 * linux-i386-low.c, linux-m68k-low.c: Update to use
14439 HAVE_PTRACE_GETREGS.
14440 * linux-low.c (regsets_fetch_inferior_registers)
14441 (regsets_store_inferior_registers): Only return 0 if we processed
14442 GENERAL_REGS.
14443 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14444 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14445
a06660f7
DJ
144462005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14447
14448 * inferiors.c (struct thread_info): Add gdb_id.
14449 (add_thread): Add gdb_id argument.
14450 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14451 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14452 calls to add_thread.
14453 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14454 * server.c (handle_query): Use thread_to_gdb_id.
14455 (handle_v_cont, main): Use gdb_id_to_thread_id.
14456 * server.h (add_thread): Update prototype.
14457 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14458 prototypes.
14459
5a1f5858
DJ
144602005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14461
14462 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14463 left-padded registers.
14464 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14465 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14466
e122f1f5
SE
144672005-07-01 Steve Ellcey <sje@cup.hp.com>
14468
14469 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14470 * configure: Regenerate.
14471 * config.in: Regenerate.
14472 * server.h (NEED_DECLARATION_STRERROR):
14473 Replace with !HAVE_DECL_STRERROR.
14474
d592fa2f
DJ
144752005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * linux-low.c (linux_wait, linux_send_signal): Don't test
14478 an unsigned long variable for > 0 if it could be MAX_ULONG.
14479 * server.c (myresume): Likewise.
14480 * target.c (set_desired_inferior): Likewise.
14481
ccbd4912
MK
144822005-06-13 Mark Kettenis <kettenis@gnu.org>
14483
14484 * configure.ac: Simplify and improve check for socklen_t.
14485 * configure, config.in: Regenerate.
14486
f450004a
DJ
144872005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14488
14489 * acconfig.h: Remove.
14490 * configure.ac: Add a test for socklen_t. Use three-argument
14491 AC_DEFINE throughout.
14492 * config.in: Regenerated using autoheader 2.59.
14493 * configure: Regenerated.
14494
14495 * gdbreplay.c (socklen_t): Provide a default.
14496 (remote_open): Use socklen_t.
14497 * remote-utils.c (socklen_t): Provide a default.
14498 (remote_open): Use socklen_t.
14499 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14500 unsigned char.
14501
14502 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14503 char for buffers.
14504 * linux-low.c (linux_read_memory, linux_write_memory)
14505 (linux_read_auxv): Likewise.
14506 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14507 (check_mem_write): Likewise.
14508 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14509 Likewise.
14510 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14511 (registers_from_string, register_data): Likewise.
14512 * server.c (handle_query, main): Likewise.
14513 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14514 (decode_M_packet): Likewise.
14515 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14516 * target.h (struct target_ops): Update read_memory, write_memory,
14517 and read_auxv.
14518 (read_inferior_memory, write_inferior_memory): Update.
14519 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14520 to unsigned char *.
14521 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14522 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14523 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14524 linux-s390-low.c, linux-sh-low.c: Update for changes in
14525 read_inferior_memory and the_low_target->breakpoint.
14526
eee84df1
DJ
145272005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14528
14529 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14530 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14531 * configure.srv: Add powerpc64-*-linux*.
14532 * linux-ppc64-low.c: New file.
14533
45b134e5
OF
145342005-05-23 Orjan Friberg <orjanf@axis.com>
14535
14536 * linux-cris-low.c: New file with support for CRIS.
14537 * linux-crisv32-low.c: Ditto for CRISv32.
14538 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14539 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14540 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14541 reg-crisv32.o, and reg-crisv32.c to make rules.
14542 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14543 recognized targets.
14544
48d93c75
UW
145452005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14546
14547 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14548 of sizeof (PTRACE_XFER_TYPE).
14549 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14550
e013ee27
OF
145512005-05-12 Orjan Friberg <orjanf@axis.com>
14552
889bf7c5 14553 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14554 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14555 pointers for hardware watchpoint support.
14556 * linux-low.h (struct linux_target_ops): Ditto.
14557 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14558 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14559 to linux_target_ops.
14560 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14561 reply packet.
14562 * server.c (main): Recognize 'Z' and 'z' packets.
14563
b0ded00b
UW
145642005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14565
14566 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14567 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14568 (the_low_target): Add new members.
14569
8643e2ad
DJ
145702005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14571
14572 * proc-service.c (ps_lgetregs): Search all_processes instead of
14573 all_threads.
14574
fc620387
DJ
145752005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14576
14577 * server.c (start_inferior): Change return type to int.
14578 (attach_inferior): Change sigptr to int *.
14579 (handle_v_cont, handle_v_requests): Change signal to int *.
14580 (main): Change signal to int.
14581
145822005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14583
14584 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14585 * configure.srv: Add m32r*-*-linux*.
14586 * linux-m32r-low.c: New file.
14587
e0e76420
DJ
145882005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14589
14590 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14591
a1928bad
DJ
145922005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14593
14594 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14595 Take unsigned long arguments for PIDs.
14596 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14597 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14598 (wait_for_sigstop, linux_resume_one_process)
14599 (regsets_fetch_inferior_registers, linux_send_signal)
14600 (linux_read_auxv): Likewise. Update the types of variables holding
14601 PIDs. Update format string specifiers.
14602 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14603 * remote-utils.c (prepare_resume_reply): Likewise.
14604 * server.c (cont_thread, general_thread, step_thread)
14605 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14606 unsigned long.
14607 (handle_query): Update format specifiers.
14608 (handle_v_cont, main): Use strtoul for thread IDs.
14609 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14610 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14611 (general_thread, step_thread, thread_from_wait)
14612 (old_thread_from_wait): Update.
14613 * target.h (struct thread_resume): Use unsigned long for THREAD.
14614 (struct target_ops): Use unsigned long for arguments to attach and
14615 thread_alive.
14616
dcdb98d2
DJ
146172005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14618
14619 * acinclude.m4: Include bfd/bfd.m4 directly.
14620 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14621 <agriffis@toolchain.org>.
14622 * aclocal.m4, configure: Regenerated.
14623
bec39cab
AC
146242005-01-07 Andrew Cagney <cagney@gnu.org>
14625
14626 * configure.ac: Rename configure.in, require autoconf 2.59.
14627 * configure: Re-generate.
14628
434c4c77
DJ
146292004-12-08 Daniel Jacobowitz <dan@debian.org>
14630
14631 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14632 LIBS when finished.
14633 * aclocal.m4: Regenerated.
14634 * configure: Regenerated.
14635
db1d3e1b
AS
146362004-11-21 Andreas Schwab <schwab@suse.de>
14637
14638 * linux-m68k-low.c (m68k_num_gregs): Define.
14639 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14640 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14641 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14642 (m68k_breakpoint_at): New. Add to the_low_target.
14643
14644 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14645 srv_linux_thread_db to yes.
14646
43360365
JB
146472004-10-20 Joel Brobecker <brobecker@gnat.com>
14648
14649 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14650 (ARCH_SET_FS): Likewise.
14651 (ARCH_GET_FS): Likewise.
14652 (ARCH_GET_GS): Likewise.
14653
fd500816
DJ
146542004-10-16 Daniel Jacobowitz <dan@debian.org>
14655
14656 * linux-i386-low.c (ps_get_thread_area): New.
14657 * linux-x86-64-low.c (ps_get_thread_area): New.
14658 * linux-low.c: Include <sys/syscall.h>.
14659 (linux_kill_one_process): Don't kill the first thread here.
14660 (linux_kill): Kill the first thread here.
14661 (kill_lwp): New function.
14662 (send_sigstop, linux_send_signal): Use it.
14663 * proc-service.c: Clean up #ifdefs.
14664 (fpregset_info): Delete.
14665 (ps_lgetregs): Update and enable implementation.
14666 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14667 implementations.
14668 * remote-utils.c (struct sym_cache, symbol_cache): New.
14669 (input_interrupt): Print a clearer message.
14670 (async_io_enabled): New variable.
14671 (enable_async_io, disable_async_io): Use it. Update comments.
14672 (look_up_one_symbol): Use the symbol cache.
14673 * thread-db.c (thread_db_look_up_symbols): New function.
14674 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14675
f6de3c42
DJ
146762004-10-16 Daniel Jacobowitz <dan@debian.org>
14677
14678 * configure.in: Test for -rdynamic.
14679 * configure: Regenerated.
14680 * Makefile (INTERNAL_LDFLAGS): New.
14681 (gdbserver, gdbreplay): Use it.
14682
2c0fc042
AC
146832004-09-02 Andrew Cagney <cagney@gnu.org>
14684
14685 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14686
075b3282
DJ
146872004-03-23 Daniel Jacobowitz <drow@mvista.com>
14688
14689 * linux-low.c (linux_wait): Clear all_processes list also.
14690
fa6a77dc
DJ
146912004-03-12 Daniel Jacobowitz <drow@mvista.com>
14692
14693 * linux-low.c: Include <errno.h>. Remove extern declaration of
14694 errno.
14695
6d782a97
DJ
146962004-03-12 Daniel Jacobowitz <drow@mvista.com>
14697
14698 * gdbreplay.c, server.h, utils.c: Update copyright years.
14699
3a7fb99b
DJ
147002004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14701
14702 * server.c (main): Print child status or termination signal from
14703 variable 'signal', not 'sig'.
14704
c3e735a6
DJ
147052004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14706
14707 * linux-low.c (linux_read_memory): Change return type to
14708 int. Check for and return error from ptrace().
14709 * target.c (read_inferior_memory): Change return type to int. Pass
14710 back return status from the_target->read_memory().
14711 * target.h (struct target_ops): Adapt *read_memory() prototype.
14712 Update comment.
14713 (read_inferior_memory): Adapt prototype.
14714 * server.c (main): Return an error packet if
14715 read_inferior_memory() returns an error.
14716
a59d1c82
DJ
147172004-03-04 Daniel Jacobowitz <drow@mvista.com>
14718
14719 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14720 Unify with other clean targets.
14721
dc3f8883
DJ
147222004-02-29 Daniel Jacobowitz <drow@mvista.com>
14723
14724 * server.c (handle_v_cont): Call set_desired_inferior.
14725
89a208da
DJ
147262004-02-29 Daniel Jacobowitz <drow@mvista.com>
14727
14728 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14729
62ea82f5
DJ
147302004-02-29 Daniel Jacobowitz <drow@mvista.com>
14731
14732 * linux-low.c (linux_wait): Unblock async I/O.
14733 (linux_resume): Block and enable async I/O.
14734 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14735 * server.h (block_async_io, unblock_async_io): Add prototypes.
14736
6910d122
DJ
147372004-02-29 Daniel Jacobowitz <drow@mvista.com>
14738
14739 * remote-utils.c (remote_open): Print a status notice after
14740 opening a TCP port.
14741 * server.c (attach_inferior): Print a status notice after
14742 attaching.
14743
147442004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14745
14746 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14747
c89dc5d4
DJ
147482004-02-26 Daniel Jacobowitz <drow@mvista.com>
14749
14750 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14751 error packet.
14752 * server.c, target.h: Update copyright years.
14753
4b8dad4a
RM
147542004-02-25 Roland McGrath <roland@redhat.com>
14755
14756 * target.h (struct target_ops): New member `read_auxv'.
14757 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14758 * linux-low.c (linux_read_auxv): New function.
14759 (linux_target_ops): Initialize `read_auxv' member to that.
14760
d7446758
JB
147612004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14762
14763 Committed by Jim Blandy <jimb@redhat.com>.
14764
14765 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14766 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14767 instead of GPR_SIZE to distiguish s390 and s390x targets.
14768
5544ad89
DJ
147692004-01-31 Daniel Jacobowitz <drow@mvista.com>
14770
14771 * linux-low.c: Update copyright year.
14772 (check_removed_breakpoint): Clear pending_is_breakpoint.
14773 (linux_set_resume_request, linux_queue_one_thread)
14774 (resume_status_pending_p): New functions.
14775 (linux_continue_one_thread): Use process->resume.
14776 (linux_resume): Only resume threads if there are no pending events.
14777 * linux-low.h (struct process_info): Add resume request
14778 pointer.
14779
2a68b70e
DJ
147802004-01-30 Daniel Jacobowitz <drow@mvista.com>
14781
14782 * regcache.c (new_register_cache): Clear the allocated register
14783 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14784
64386c31
DJ
147852003-10-13 Daniel Jacobowitz <drow@mvista.com>
14786
14787 * linux-low.c (linux_resume): Take a struct thread_resume *
14788 argument.
14789 (linux_wait): Update call.
14790 (resume_ptr): New static variable.
14791 (linux_continue_one_thread): Renamed from
14792 linux_continue_one_process. Use resume_ptr.
14793 (linux_resume): Use linux_continue_one_thread.
14794 * server.c (handle_v_cont, handle_v_requests): New functions.
14795 (myresume): New function.
14796 (main): Handle 'v' case.
14797 * target.h (struct thread_resume): New type.
14798 (struct target_ops): Change argument of "resume" to struct
14799 thread_resume *.
14800 (myresume): Delete macro.
14801
c938e9b0
L
148022003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14803
14804 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14805 (uninstall): Support DESTDIR.
14806
7f313d07
BC
14807Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14808
14809 * configure.srv: Add xscale*linux copy of arm*linux entry.
14810
3b2fc2ea
DJ
148112003-07-24 Daniel Jacobowitz <drow@mvista.com>
14812
14813 * linux-arm-low.c (arm_reinsert_addr): New function.
14814 (the_low_target): Add arm_reinsert_addr.
14815
1c0a559e
MK
148162003-07-08 Mark Kettenis <kettenis@gnu.org>
14817
14818 * mem-break.c: Remove whitespace at end of file.
14819
43d5792c
DJ
148202003-06-28 Daniel Jacobowitz <drow@mvista.com>
14821
14822 * configure.in: Check whether we need to prototype strerror.
14823 * server.h: Optionally prototype strerror.
14824 * gdbreplay.c (perror_with_name): Use strerror.
14825 * linux-low.c (linux_attach_lwp): Use strerror.
14826 * utils.c (perror_with_name): Use strerror.
14827 * config.in, configure: Regenerated.
14828
c8a86edf
DJ
148292003-06-28 Daniel Jacobowitz <drow@mvista.com>
14830
14831 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14832 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14833
73d37363
DJ
148342003-06-20 Daniel Jacobowitz <drow@mvista.com>
14835
14836 * Makefile.in (SFILES): Update.
14837 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14838 low-sun3.c: Remove files.
14839
6ad8ae5c
DJ
148402003-06-17 Daniel Jacobowitz <drow@mvista.com>
14841
14842 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14843 (linux_detach_one_process, linux_detach): New functions.
14844 (linux_target_ops): Add linux_detach.
14845 * server.c (main): Handle 'D' packet.
14846 * target.h (struct target_ops): Add "detach" member.
14847 (detach_inferior): Define.
14848
1581182a
MK
148492003-06-13 Mark Kettenis <kettenis@gnu.org>
14850
14851 From Kelley Cook <kelleycook@wideopenwest.com>:
14852 * configure.srv: Accept i[34567]86 variants.
14853
e5379b03
DJ
148542003-06-05 Daniel Jacobowitz <drow@mvista.com>
14855
14856 * linux-low.c (linux_wait_for_event): Correct comment typos.
14857 (linux_resume_one_process): Call check_removed_breakpoint.
14858 (linux_send_signal): New function.
14859 (linux_target_ops): Add linux_send_signal.
14860 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14861 of kill.
14862 * target.h (struct target_ops): Add send_signal.
14863
2ff29de4
JB
148642003-05-29 Jim Blandy <jimb@redhat.com>
14865
14866 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14867 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14868 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14869 away part of the register's value.
14870
254787d4
DJ
148712003-03-26 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14874 (linux_wait_for_event, linux_init_signals): Likewise.
14875
94e10508
DJ
148762003-03-17 Daniel Jacobowitz <drow@mvista.com>
14877
14878 * configure.in: Check for stdlib.h.
14879 * configure: Regenerated.
14880 * config.in: Regenerated.
14881
4c0711e0
DJ
148822003-01-04 Andreas Schwab <schwab@suse.de>
14883
14884 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14885
ef66e766
AC
148862003-01-02 Andrew Cagney <ac131313@redhat.com>
14887
14888 * Makefile.in: Remove obsolete code.
14889
a1358604
DJ
148902002-11-20 Daniel Jacobowitz <drow@mvista.com>
14891
14892 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14893 defined(PT_FPR0_HI).
14894
23ce3b1c
DJ
148952002-11-17 Stuart Hughes <seh@zee2.com>
14896
14897 * linux-arm-low.c (arm_num_regs): Increase.
14898 (arm_regmap): Include status register.
14899
149002002-11-17 Daniel Jacobowitz <drow@mvista.com>
14901
14902 * linux-low.c (register_addr): Remove incorrect -1 check.
14903
a9fa9f7d
DJ
149042002-08-29 Daniel Jacobowitz <drow@mvista.com>
14905
14906 * linux-low.c (linux_create_inferior): Call setpgid. Return
14907 the new PID.
14908 (unstopped_p, linux_signal_pid): Remove.
14909 (linux_target_ops): Remove linux_signal_pid.
14910 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14911 global instead of target method.
14912 * target.h (struct target_ops): Remove signal_pid. Update comment
14913 for create_inferior.
14914 * server.c (signal_pid): New variable.
14915 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14916 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14917 (attach_inferior): Set signal_pid.
14918
17574093
DJ
149192002-08-23 Daniel Jacobowitz <drow@mvista.com>
14920
14921 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14922
149232002-08-20 Jim Blandy <jimb@redhat.com>
14924
14925 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14926 default for this.
14927
149282002-08-01 Andrew Cagney <cagney@redhat.com>
14929
14930 * Makefile.in: Make chill references obsolete.
14931
149322002-07-24 Kevin Buettner <kevinb@redhat.com>
14933
14934 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14935 * configure: Regenerate.
14936 * config.in: Regenerate.
14937
149382002-07-09 David O'Brien <obrien@FreeBSD.org>
14939
14940 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14941 (perror_with_name, remote_close, remote_open, expect, play): Static.
14942
149432002-07-04 Michal Ludvig <mludvig@suse.cz>
14944
4b8dad4a 14945 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14946 byte offsets instead of an array of indexes.
14947 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14948
149492002-06-13 Daniel Jacobowitz <drow@mvista.com>
14950
14951 * regcache.c: Add comment.
14952
149532002-06-11 Daniel Jacobowitz <drow@mvista.com>
14954
14955 * thread-db.c: New file.
14956 * proc-service.c: New file.
14957 * acinclude.m4: New file.
14958 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14959 proc-service.o, and thread-db.o.
14960 (linux-low.o): Add USE_THREAD_DB.
14961 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14962 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14963 * aclocal.m4: Regenerated.
14964 * config.in: Regenerated.
14965 * configure: Regenerated.
14966 * configure.in: Check for proc_service.h, sys/procfs.h,
14967 thread_db.h, and linux/elf.h headrs.
14968 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14969 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14970 Check for -lthread_db and thread support.
14971 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14972 PowerPC, and SuperH.
14973 * i387-fp.c: Constify arguments.
14974 * i387-fp.h: Likewise.
14975 * inferiors.c: (struct thread_info): Renamed from
14976 `struct inferior_info'. Remove PID member. Use generic inferior
14977 list header. All uses updated.
14978 (inferiors, signal_pid): Removed.
14979 (all_threads): New variable.
14980 (get_thread): Define.
14981 (add_inferior_to_list): New function.
14982 (for_each_inferior): New function.
14983 (change_inferior_id): New function.
14984 (add_inferior): Removed.
14985 (remove_inferior): New function.
14986 (add_thread): New function.
14987 (free_one_thread): New function.
14988 (remove_thread): New function.
14989 (clear_inferiors): Use for_each_inferior and free_one_thread.
14990 (find_inferior): New function.
14991 (find_inferior_id): New function.
14992 (inferior_target_data): Update argument type.
14993 (set_inferior_target_data): Likewise.
14994 (inferior_regcache_data): Likewise.
14995 (set_inferior_regcache_data): Likewise.
14996 * linux-low.c (linux_bp_reinsert): Remove.
14997 (all_processes, stopping_threads, using_thrads)
14998 (struct pending_signals, debug_threads, pid_of): New.
14999 (inferior_pid): Replace with macro.
15000 (struct inferior_linux_data): Remove.
15001 (get_stop_pc, add_process): New functions.
15002 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15003 Use add_process and add_thread.
15004 (linux_attach_lwp): New function, based on old linux_attach. Use
15005 add_process and add_thread. Set stop_expected for new threads.
15006 (linux_attach): New function.
15007 (linux_kill_one_process): New function.
15008 (linux_kill): Kill all LWPs.
15009 (linux_thread_alive): Use find_inferior_id.
15010 (check_removed_breakpoints, status_pending_p): New functions.
15011 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15012 Update. Use WNOHANG. Wait for cloned processes also. Update process
15013 struct for the found process.
15014 (linux_wait_for_event): New function.
15015 (linux_wait): Use it. Support LWPs.
15016 (send_sigstop, wait_for_sigstop, stop_all_processes)
15017 (linux_resume_one_process, linux_continue_one_process): New functions.
15018 (linux_resume): Support LWPs.
15019 (REGISTER_RAW_SIZE): Remove.
15020 (fetch_register): Use register_size instead. Call supply_register.
15021 (usr_store_inferior_registers): Likewise. Call collect_register.
15022 Fix recursive case.
15023 (regsets_fetch_inferior_registers): Improve error message.
15024 (regsets_store_inferior_registers): Add debugging.
15025 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15026 (unstopped_p, linux_signal_pid): New functions.
15027 (linux_target_ops): Add linux_signal_pid.
15028 (linux_init_signals): New function.
15029 (initialize_low): Call it. Initialize using_threads.
15030 * regcache.c (inferior_regcache_data): Add valid
15031 flag.
15032 (get_regcache): Fetch registers lazily. Add fetch argument
15033 and update all callers.
15034 (regcache_invalidate_one, regcache_invalidate): New
15035 functions.
15036 (new_register_cache): Renamed from create_register_cache.
15037 Return the new regcache.
15038 (free_register_cache): Change argument to a void *.
15039 (registers_to_string, registers_from_string): Call get_regcache
15040 with fetch flag set.
15041 (register_data): Make static. Pass fetch flag to get_regcache.
15042 (supply_register): Call get_regcache with fetch flag clear.
15043 (collect_register): Call get_regcache with fetch flag set.
15044 (collect_register_as_string): New function.
15045 * regcache.h: Update.
15046 * remote-utils.c (putpkt): Flush after debug output and use
15047 stderr.
15048 Handle input interrupts while waiting for an ACK.
15049 (input_interrupt): Use signal_pid method.
15050 (getpkt): Flush after debug output and use stderr.
15051 (outreg): Use collect_register_as_string.
15052 (new_thread_notify, dead_thread_notify): New functions.
15053 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15054 and general_thread.
15055 (look_up_one_symbol): Flush after debug output.
15056 * server.c (step_thread, server_waiting): New variables.
15057 (start_inferior): Don't use signal_pid. Update call to mywait.
15058 (attach_inferior): Update call to mywait.
15059 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15060 (main): Don't fetch/store registers explicitly. Use
15061 set_desired_inferior. Support proposed ``Hs'' packet. Update
15062 calls to mywait.
15063 * server.h: Update.
15064 (struct inferior_list, struct_inferior_list_entry): New.
15065 * target.c (set_desired_inferior): New.
15066 (write_inferior_memory): Constify.
15067 (mywait): New function.
15068 * target.h: Update.
15069 (struct target_ops): New signal_pid method.
15070 (mywait): Removed macro, added prototype.
15071
15072 * linux-low.h (regset_func): Removed.
15073 (regset_fill_func, regset_store_func): New.
15074 (enum regset_type): New.
15075 (struct regset_info): Add type field. Use new operation types.
15076 (struct linux_target_ops): stop_pc renamed to get_pc.
15077 Add decr_pc_after_break and breakpoint_at.
15078 (get_process, get_thread_proess, get_process_thread)
15079 (strut process_info, all_processes, linux_attach_lwp)
15080 (thread_db_init): New.
15081
15082 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15083 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15084 (the_low_target): Add new members.
15085 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15086 (i386_store_fpxregset): Constify.
15087 (target_regsets): Add new kind identifier.
15088 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15089 (i386_set_pc): Add debugging.
15090 (i386_breakpoint_at): New function.
15091 (the_low_target): Add new members.
15092 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15093 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15094 (mips_breakpoint_at): New.
15095 (the_low_target): Add new members.
15096 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15097 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15098 (the_low_target): Add new members.
15099 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15100 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15101 (the_low_target): Add new members.
15102 * linux-x86-64-low.c (target_regsets): Add new kind
15103 identifier.
15104
151052002-05-15 Daniel Jacobowitz <drow@mvista.com>
15106
15107 From Martin Pool <mbp@samba.org>:
15108 * server.c (gdbserver_usage): New function.
15109 (main): Call it.
15110
151112002-05-14 Daniel Jacobowitz <drow@mvista.com>
15112
15113 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15114 stop_at -> stop_pc.
15115
151162002-05-04 Andrew Cagney <ac131313@redhat.com>
15117
15118 * Makefile.in: Remove obsolete code.
15119
151202002-04-24 Michal Ludvig <mludvig@suse.cz>
15121
15122 * linux-low.c (regsets_fetch_inferior_registers),
15123 (regsets_store_inferior_registers): Removed cast to int from
15124 ptrace() calls.
15125 * regcache.h: Added declaration of struct inferior_info.
15126
151272002-04-20 Daniel Jacobowitz <drow@mvista.com>
15128
15129 * inferiors.c (struct inferior_info): Add regcache_data.
15130 (add_inferior): Call create_register_cache.
15131 (clear_inferiors): Call free_register_cache.
15132 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15133 * regcache.c (struct inferior_regcache_data): New.
15134 (registers): Remove.
15135 (get_regcache): New function.
15136 (create_register_cache, free_register_cache): New functions.
15137 (set_register_cache): Don't initialize the register cache here.
15138 (registers_to_string, registers_from_string, register_data): Call
15139 get_regcache.
15140 * regcache.h: Add prototypes.
15141 * server.h: Likewise.
15142
151432002-04-20 Daniel Jacobowitz <drow@mvista.com>
15144
15145 * mem-break.c: New file.
15146 * mem-break.h: New file.
15147 * Makefile.in: Add mem-break.o rule; update server.h
15148 dependencies.
15149 * inferiors.c (struct inferior_info): Add target_data
15150 member.
15151 (clear_inferiors): Free target_data member if set.
15152 (inferior_target_data, set_inferior_target_data): New functions.
15153 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15154 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15155 * linux-low.c (linux_bp_reinsert): New variable.
15156 (struct inferior_linux_data): New.
15157 (linux_create_inferior): Use set_inferior_target_data.
15158 (linux_attach): Likewise. Call add_inferior.
15159 (linux_wait_for_one_inferior): New function.
15160 (linux_wait): Call it.
15161 (linux_write_memory): Add const.
15162 (initialize_low): Call set_breakpoint_data.
15163 * linux-low.h (struct linux_target_ops): Add breakpoint
15164 handling members.
15165 * server.c (attach_inferior): Remove extra add_inferior
15166 call.
15167 * server.h: Include mem-break.h. Update inferior.c
15168 prototypes.
15169 * target.c (read_inferior_memory)
15170 (write_inferior_memory): New functions.
15171 * target.h (read_inferior_memory)
15172 (write_inferior_memory): Change macros to prototypes.
15173 (struct target_ops): Update comments. Add const to write_memory
15174 definition.
15175
151762002-04-11 Daniel Jacobowitz <drow@mvista.com>
15177
15178 * linux-low.c (usr_store_inferior_registers): Support
15179 registers which are allowed to fail to store.
15180 * linux-low.h (linux_target_ops): Likewise.
15181 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15182 (ppc_cannot_store_register): FPSCR may not be storable.
15183
151842002-04-09 Daniel Jacobowitz <drow@mvista.com>
15185
15186 * server.h: Include <string.h> if HAVE_STRING_H.
15187 * ChangeLog: Correct paths in last ChangeLog entry.
15188
151892002-04-09 Daniel Jacobowitz <drow@mvista.com>
15190
15191 * linux-low.h: Remove obsolete prototypes.
15192 (struct linux_target_ops): New.
15193 (extern the_low_target): New.
15194 * linux-low.c (num_regs, regmap): Remove declarations.
15195 (register_addr): Use the_low_target explicitly.
15196 (fetch_register): Likewise.
15197 (usr_fetch_inferior_registers): Likewise.
15198 (usr_store_inferior_registers): Likewise.
15199 * linux-arm-low.c (num_regs): Remove.
15200 (arm_num_regs): Define.
15201 (arm_regmap): Renamed from regmap, made static.
15202 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15203 made static.
15204 (arm_cannot_store_register): Renamed from cannot_store_register,
15205 made static.
15206 (the_low_target): New.
15207 * linux-i386-low.c (num_regs): Remove.
15208 (i386_num_regs): Define.
15209 (i386_regmap): Renamed from regmap, made static.
15210 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15211 made static.
15212 (i386_cannot_store_register): Renamed from cannot_store_register,
15213 made static.
15214 (the_low_target): New.
15215 * linux-ia64-low.c (num_regs): Remove.
15216 (ia64_num_regs): Define.
15217 (ia64_regmap): Renamed from regmap, made static.
15218 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15219 made static.
15220 (ia64_cannot_store_register): Renamed from cannot_store_register,
15221 made static.
15222 (the_low_target): New.
15223 * linux-m68k-low.c (num_regs): Remove.
15224 (m68k_num_regs): Define.
15225 (m68k_regmap): Renamed from regmap, made static.
15226 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15227 made static.
15228 (m68k_cannot_store_register): Renamed from cannot_store_register,
15229 made static.
15230 (the_low_target): New.
15231 * linux-mips-low.c (num_regs): Remove.
15232 (mips_num_regs): Define.
15233 (mips_regmap): Renamed from regmap, made static.
15234 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15235 made static.
15236 (mips_cannot_store_register): Renamed from cannot_store_register,
15237 made static.
15238 (the_low_target): New.
15239 * linux-ppc-low.c (num_regs): Remove.
15240 (ppc_num_regs): Define.
15241 (ppc_regmap): Renamed from regmap, made static.
15242 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15243 made static.
15244 (ppc_cannot_store_register): Renamed from cannot_store_register,
15245 made static.
15246 (the_low_target): New.
15247 * linux-s390-low.c (num_regs): Remove.
15248 (s390_num_regs): Define.
15249 (s390_regmap): Renamed from regmap, made static.
15250 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15251 made static.
15252 (s390_cannot_store_register): Renamed from cannot_store_register,
15253 made static.
15254 (the_low_target): New.
15255 * linux-sh-low.c (num_regs): Remove.
15256 (sh_num_regs): Define.
15257 (sh_regmap): Renamed from regmap, made static.
15258 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15259 made static.
15260 (sh_cannot_store_register): Renamed from cannot_store_register,
15261 made static.
15262 (the_low_target): New.
15263 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15264 (the_low_target): New.
15265
152662002-04-09 Daniel Jacobowitz <drow@mvista.com>
15267
15268 * Makefile.in: Add stamp-h target.
15269 * configure.in: Create stamp-h.
15270 * configure: Regenerated.
15271
152722002-04-09 Daniel Jacobowitz <drow@mvista.com>
15273
15274 * inferiors.c: New file.
15275 * target.c: New file.
15276 * target.h: New file.
15277 * Makefile.in: Add target.o and inferiors.o. Update
15278 dependencies.
15279 * linux-low.c (inferior_pid): New static variable,
15280 moved from server.c.
15281 (linux_create_inferior): Renamed from create_inferior.
15282 Call add_inferior. Return 0 on success instead of a PID.
15283 (linux_attach): Renamed from myattach.
15284 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15285 (linux_thread_alive): Renamed from mythread_alive.
15286 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15287 child dies.
15288 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15289 (regsets_store_inferior_registers): Correct error message.
15290 Add missing ``return 0''.
15291 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15292 (linux_store_registers): Renamed from store_inferior_registers.
15293 (linux_read_memory): Renamed from read_inferior_memory.
15294 (linux_write_memory): Renamed from write_inferior_memory.
15295 (linux_target_ops): New structure.
15296 (initialize_low): Call set_target_ops ().
15297 * remote-utils.c (unhexify): New function.
15298 (hexify): New function.
15299 (input_interrupt): Send signals to ``signal_pid''.
15300 * server.c (inferior_pid): Remove.
15301 (start_inferior): Update create_inferior call.
15302 (attach_inferior): Call add_inferior.
15303 (handle_query): New function.
15304 (main): Call handle_query for `q' packets.
15305 * server.h: Include "target.h". Remove obsolete prototypes.
15306 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15307
153082002-04-09 Daniel Jacobowitz <drow@mvista.com>
15309
15310 * Makefile.in: Add WARN_CFLAGS. Update configury
15311 dependencies.
15312 * configure.in: Check for <string.h>
15313 * configure: Regenerate.
15314 * config.in: Regenerate.
15315 * gdbreplay.c: Include needed system headers.
15316 (remote_open): Remove strchr prototype.
15317 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15318 * regcache.c (supply_register): Change buf argument to const void *.
15319 (supply_register_by_name): Likewise.
15320 (collect_register): Change buf argument to void *.
15321 (collect_register_by_name): Likewise.
15322 * regcache.h: Add missing prototypes.
15323 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15324 * server.c (handle_query): New function.
15325 (attached): New static variable, moved out of main.
15326 (main): Quiet longjmp clobber warnings.
15327 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15328 * utils.c (error): Remove NORETURN.
15329 (fatal): Likewise.
This page took 1.848288 seconds and 4 git commands to generate.