Convert the rest x86 target descriptions
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
22916b07
YQ
12017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv (srv_i386_regobj): Remove.
4 (srv_amd64_regobj): Remove.
5 (srv_regobj): Set it to "" for x86 non-linux targets.
6 * linux-x86-tdesc.c (i386_linux_read_description):
7 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
8 (init_registers_i386): Remove the declaration.
9 (tdesc_i386): Remove the declaration.
10 (lynx_i386_arch_setup): Call i386_create_target_description.
11 * nto-x86-low.c: Likewise.
12 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
13 [!__x86_64__]: include arch/i386.h.
14 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
15
38602d55
YQ
162017-09-05 Yao Qi <yao.qi@linaro.org>
17
18 * configure.srv (srv_amd64_linux_xmlfiles): Remove
19 i386/amd64-XXX-linux from it.
20
44b886ff
YQ
212017-09-05 Yao Qi <yao.qi@linaro.org>
22
23 * configure.srv: Empty srv_amd64_linux_regobj if $development is
24 false.
25 (ipa_amd64_linux_regobj): Remove.
26 (ipa_x32_linux_regobj): Remove.
27
b4570e4b
YQ
282017-09-05 Yao Qi <yao.qi@linaro.org>
29
30 * Makefile.in (arch-amd64.o): New rule.
31 * configure.srv: Append arch-amd64.o.
32 * linux-amd64-ipa.c: Include common/x86-xstate.h.
33 (get_ipa_tdesc): Call amd64_linux_read_description.
34 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
35 and init_registers_amd64_XXX.
36 * linux-x86-low.c (x86_linux_read_description): Call
37 amd64_linux_read_description.
38 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
39 (initialize_low_arch): Don't call init_registers_x32_XXX and
40 init_registers_amd64_XXX.
41 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
42 and tdesc_amd64_XXX.
43 [__x86_64__] (amd64_tdesc_test): New function.
44 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
45 and init_registers_amd64_XXX.
46 * linux-x86-tdesc.c: Include arch/amd64.h.
47 (xcr0_to_tdesc_idx): New function.
48 (i386_linux_read_description): New function.
49 (amd64_get_ipa_tdesc_idx): New function.
50 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
51 (amd64_get_ipa_tdesc): Declare.
52
d1f28ea2
YQ
532017-09-05 Yao Qi <yao.qi@linaro.org>
54
55 * configure.srv (srv_i386_linux_xmlfiles): Remove
56 i386/i386-XXX-linux.xml from it.
57
25a93583
YQ
582017-09-05 Yao Qi <yao.qi@linaro.org>
59
60 * configure.srv: Set srv_i386_linux_regobj empty if $development
61 is false.
62 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
63 initialize_low_tdesc.
64 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
65 with #if initialize_low_tdesc.
66 * linux-x86-tdesc-selftest.c: New file.
67 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
68
5f035c07
YQ
692017-09-05 Yao Qi <yao.qi@linaro.org>
70
71 * Makefile.in (arch-i386.o): New rule.
72 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
73 (x86_64-*-linux*): Likewise.
74 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
75 include arch/i386.h.
76 (i386_linux_read_description): Remove code and call
77 i386_create_target_description.
78 * tdesc.c (allocate_target_description): New function.
79 * tdesc.h (set_tdesc_architecture): Remove declaration.
80 (set_tdesc_osabi): Likewise.
81
0abe8a89
YQ
822017-09-05 Yao Qi <yao.qi@linaro.org>
83
84 * linux-x86-tdesc.c: Don't include <inttypes.h>.
85 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
86 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
87 .xmltarget.
88 * server.c (get_features_xml): Call tdesc_get_features_xml.
89 * tdesc.c (set_tdesc_architecture): New function.
90 (set_tdesc_osabi): New function.
91 (tdesc_get_features_xml): New function.
92 (tdesc_create_feature): Add an argument.
93 * tdesc.h (struct target_desc) <features>: New field.
94 <arch, osabi>: New field.
95 (~target_desc): xfree features, arch, and osabi.
96 (target_desc::oerator==): Don't compare .xmltarget.
97 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
98 (set_tdesc_osabi): Likewise.
99 (tdesc_get_features_xml): Likewise.
100
0a188386
YQ
1012017-09-05 Yao Qi <yao.qi@linaro.org>
102
103 * linux-x86-tdesc.c: Include selftest.h.
104 (i386_tdesc_test): New function.
105 (initialize_low_tdesc): Call selftests::register_test.
106 * tdesc.h: Include regdef.h.
107 (target_desc): Override operator == and !=.
108
f49ff000
YQ
1092017-09-05 Yao Qi <yao.qi@linaro.org>
110
111 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
112 (ipa_obj): Likewise.
113 * linux-i386-ipa.c: Include common/x86-xstate.h
114 (get_ipa_tdesc): Call i386_linux_read_description.
115 (initialize_low_tracepoint): Don't call init_registers_XXX
116 functions, call initialize_low_tdesc instead.
117 * linux-x86-low.c (x86_linux_read_description): Call
118 i386_linux_read_description.
119 (initialize_low_arch): Don't call init_registers_i386_XXX
120 functions, call initialize_low_tdesc.
121 * linux-x86-tdesc.c: New file.
122 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
123 (i386_get_ipa_tdesc_idx): Declare.
124 (i386_get_ipa_tdesc): Declare.
125 (initialize_low_tdesc): Declare.
126
2b68ef2f
YQ
1272017-09-05 Yao Qi <yao.qi@linaro.org>
128
129 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
130 instead of 0.
131
f7000548
YQ
1322017-09-05 Yao Qi <yao.qi@linaro.org>
133
134 * Makefile.in (IPA_OBJS): Add vec-ipa.o
135 * regcache.c (get_thread_regcache): Use VEC_length.
136 (init_register_cache): Likewise.
137 (regcache_cpy): Likewise.
138 (registers_to_string): Iterate reg_defs via VEC_iterate.
139 (find_regno): Likewise.
140 (find_register_by_number): Use VEC_index.
141 (register_size): Call find_register_by_number.
142 (register_data): Call find_register_by_number.
143 (supply_regblock): Use VEC_length.
144 (regcache_raw_read_unsigned): Likewise.
145 * tdesc.c (init_target_desc): Iterate reg_defs via
146 VEC_iterate.
147 (default_description): Update initializer.
148 (copy_target_description): Don't update field num_registers.
149 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
150 <num_registers>: Remove.
151
50a421ac
SM
1522017-09-04 Simon Marchi <simon.marchi@ericsson.com>
153
154 * Makefile.in (.SECONDARY): Define target.
155
23fdd69e
SM
1562017-09-03 Simon Marchi <simon.marchi@ericsson.com>
157
158 * linux-low.c (linux_wait_1): Adjust.
159 * server.c (queue_stop_reply_callback): Adjust.
160
0a2dde4a
SDJ
1612017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
162
163 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
164 QEnvironmentUnset and QEnvironmentReset packets.
165 (handle_query): Inform remote that QEnvironmentHexEncoded,
166 QEnvironmentUnset and QEnvironmentReset are supported.
167
6afd337d
SM
1682017-08-25 Simon Marchi <simon.marchi@ericsson.com>
169
170 * inferiors.h (inferior_target_data): Rename to ...
171 (thread_target_data): ... this.
172 (inferior_regcache_data): Rename to ...
173 (thread_regcache_data): ... this.
174 (set_inferior_regcache_data): Rename to ...
175 (set_thread_regcache_data): ... this.
176 * inferiors.c (inferior_target_data): Rename to ...
177 (thread_target_data): ... this.
178 (inferior_regcache_data): Rename to ...
179 (thread_regcache_data): ... this.
180 (set_inferior_regcache_data): Rename to ...
181 (set_thread_regcache_data): ... this.
182 (free_one_thread): Update.
183 * linux-low.h (get_thread_lwp): Update.
184 * regcache.c (get_thread_regcache): Update.
185 (regcache_invalidate_thread): Update.
186 (free_register_cache_thread): Update.
187 * win32-i386-low.c (update_debug_registers_callback): Update.
188 (win32_get_current_dr): Update.
189 * win32-low.c (thread_rec): Update.
190 (delete_thread_info): Update.
191 (continue_one_thread): Update.
192 (suspend_one_thread): Update.
193
a160cc46
SM
1942017-08-24 Simon Marchi <simon.marchi@ericsson.com>
195
196 * inferiors.c (set_inferior_target_data): Remove.
197 * inferiors.h (set_inferior_target_data): Remove.
198
6d580b63
YQ
1992017-08-18 Yao Qi <yao.qi@linaro.org>
200
201 * Makefile.in (OBS): Add selftest.o.
202 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
203 * configure, config.in: Re-generated.
204 * server.c: Include common/sefltest.h.
205 (captured_main): Handle option --selftest.
206
f5a29eb0
YQ
2072017-08-09 Yao Qi <yao.qi@linaro.org>
208
209 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
210 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
211 i386-avx-mpx.o and i386-mmx.o.
212 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
213 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
214 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
215 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
216 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
217 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
218 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
219 i386/amd64-avx-mpx.xml.
220
57757c2f
YQ
2212017-08-09 Yao Qi <yao.qi@linaro.org>
222
223 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
224 and x32-avx-avx512.o.
225 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
226 i386/x32-avx-avx512.xml.
227
229d26fc
SM
2282017-07-26 Simon Marchi <simon.marchi@ericsson.com>
229
230 * tracepoint.h (enum class fast_tpoint_collect_result): New
231 enumeration.
232 (fast_tracepoint_collecting): Change return type to
233 fast_tpoint_collect_result.
234 * tracepoint.c (fast_tracepoint_collecting): Likewise.
235 * linux-low.h: Include tracepoint.h.
236 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
237 fast_tpoint_collect_result.
238 * linux-low.c (handle_tracepoints): Adjust.
239 (linux_fast_tracepoint_collecting): Change return type to
240 fast_tpoint_collect_result.
241 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
242 linux_wait_1, stuck_in_jump_pad_callback,
243 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
244 proceed_one_lwp): Adjust to type change.
245
2e1e43e1
YQ
2462017-07-10 Yao Qi <yao.qi@linaro.org>
247
248 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
249
adc764e7
YQ
2502017-06-29 Yao Qi <yao.qi@linaro.org>
251
252 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
253 Remove.
254 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
255
a206891a
SM
2562017-06-20 Simon Marchi <simon.marchi@ericsson.com>
257
258 * Makefile.in (IPA_OBJS): Sort and format one item per line.
259
9a6c7d9c
SDJ
2602017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
261
262 * linux-low.c (linux_create_inferior): Adjust code to access the
263 environment information via 'gdb_environ' class.
264 * lynx-low.c (lynx_create_inferior): Likewise.
265 * server.c (our_environ): Make it an instance of 'gdb_environ'.
266 (get_environ): Return a pointer to 'our_environ'.
267 (captured_main): Initialize 'our_environ'.
268 * server.h (get_environ): Adjust prototype.
269 * spu-low.c (spu_create_inferior): Adjust code to access the
270 environment information via 'gdb_environ' class.
271
ae3e2ccf
SM
2722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
273
274 * linux-low.c (linux_read_memory, linux_write_memory): Remove
275 usage of "register" keyword.
276
3e019bdc
SM
2772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
278
279 * configure: Re-generate.
280
8465943a
SM
2812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
282
283 * configure: Re-generate.
284
cf0dd6f0
SM
2852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
286
287 * Makefile.in (COMPILE.pre): Add "-x c++".
288
9845682b
SDJ
2892017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
290
291 * fork-child.c: Conditionally include <signal.h>.
292
aefd8b33
SDJ
2932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
294
295 * server.c (handle_general_set): Handle new packet
296 "QStartupWithShell".
297 (handle_query): Add "QStartupWithShell" to the list of supported
298 packets.
299 (gdbserver_usage): Add help text explaining the
300 new "--startup-with-shell" and "--no-startup-with-shell" CLI
301 options.
302 (captured_main): Recognize and act upon the presence of the new
303 CLI options.
304
2090129c
SDJ
3052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
306 Pedro Alves <palves@redhat.com>
307
308 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
309 * configure: Regenerate.
310 * configure.srv (srv_linux_obj): Add "fork-child.o" and
311 "fork-inferior.o".
312 (i[34567]86-*-lynxos*): Likewise.
313 (spu*-*-*): Likewise.
314 * fork-child.c: New file.
315 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
316 and "environ.h".
317 (linux_ptrace_fun): New function.
318 (linux_create_inferior): Adjust function prototype to reflect
319 change on "target.h". Adjust function code to use
320 "fork_inferior".
321 (linux_request_interrupt): Delete "signal_pid".
322 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
323 (lynx_ptrace_fun): New function.
324 (lynx_create_inferior): Adjust function prototype to reflect
325 change on "target.h". Adjust function code to use
326 "fork_inferior".
327 * nto-low.c (nto_create_inferior): Adjust function prototype and
328 code to reflect change on "target.h". Update comments.
329 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
330 "common-terminal.h" and "environ.h".
331 (terminal_fd): Moved to fork-child.c.
332 (old_foreground_pgrp): Likewise.
333 (restore_old_foreground_pgrp): Likewise.
334 (last_status): Make it global.
335 (last_ptid): Likewise.
336 (our_environ): New variable.
337 (startup_with_shell): Likewise.
338 (program_name): Likewise.
339 (program_argv): Rename to...
340 (program_args): ...this.
341 (wrapper_argv): New variable.
342 (start_inferior): Delete function.
343 (get_exec_wrapper): New function.
344 (get_exec_file): Likewise.
345 (get_environ): Likewise.
346 (prefork_hook): Likewise.
347 (post_fork_inferior): Likewise.
348 (postfork_hook): Likewise.
349 (postfork_child_hook): Likewise.
350 (handle_v_run): Update code to deal with arguments coming from the
351 remote host. Update calls from "start_inferior" to
352 "create_inferior".
353 (captured_main): Likewise. Initialize environment variable. Call
354 "have_job_control".
355 * server.h (post_fork_inferior): New prototype.
356 (get_environ): Likewise.
357 (last_status): Declare.
358 (last_ptid): Likewise.
359 (signal_pid): Likewise.
360 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
361 (spu_ptrace_fun): New function.
362 (spu_create_inferior): Adjust function prototype to reflect change
363 on "target.h". Adjust function code to use "fork_inferior".
364 * target.c (target_terminal_init): New function.
365 (target_terminal_inferior): Likewise.
366 (target_terminal_ours): Likewise.
367 * target.h: Include <vector>.
368 (struct target_ops) <create_inferior>: Update prototype.
369 (create_inferior): Update macro.
370 * utils.c (gdb_flush_out_err): New function.
371 * win32-low.c (win32_create_inferior): Adjust function prototype
372 and code to reflect change on "target.h".
373
043a4934
SDJ
3742017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
375
376 * inferiors.c (switch_to_thread): New function.
377
15652511
SDJ
3782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
379
380 * Makefile.in (SFILE): Add "common/job-control.c".
381 (OBS): Add "job-control.o".
382
21ea5acd
SDJ
3832017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
384
385 * Makefile: Remove "@host_makefile_frag@".
386
e13cb306
PA
3872017-05-05 Pedro Alves <palves@redhat.com>
388
389 * configure: Regenerate.
390
c94fee56
SDJ
3912017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * configure: Regenerate.
394
a0ff9e1a
SM
3952017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
396
397 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
398 software_single_step change of return type to
399 std::vector<CORE_ADDR>.
400 * linux-low.c (install_software_single_step_breakpoints):
401 Likewise.
402 * linux-low.h (install_software_single_step_breakpoints):
403 Likewise.
404
be628ab8
SDJ
4052017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
406
407 * remote-utils.c: Include "gdb_termios.h" instead of
408 "terminal.h".
409 * terminal.h: Delete file.
410
7c5ded6a
SDJ
4112017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
412
413 * server.c: Include <vector>.
414 <program_argv, wrapper_argv>: Convert to std::vector.
415 (start_inferior): Rewrite function to use C++.
416 (handle_v_run): Likewise. Update code that calculates the argv
417 based on the vRun packet; use C++.
418 (captured_main): Likewise.
419
436252de
SM
4202017-04-06 Simon Marchi <simon.marchi@ericsson.com>
421
422 * server.c (handle_v_cont): Initialize thread_resume::thread
423 with null_ptid.
424
9bf2a700
PA
4252017-04-05 Pedro Alves <palves@redhat.com>
426
427 * configure: Regenerate.
428
a121b7c1
PA
4292017-04-05 Pedro Alves <palves@redhat.com>
430
431 * gdbreplay.c (sync_error): Constify.
432 * linux-x86-low.c (push_opcode): Constify.
433
21c8a587
PA
4342017-04-05 Pedro Alves <palves@redhat.com>
435
436 * win32-low.c (get_child_debug_event)
437 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
438 Report TARGET_WAITKIND_SPURIOUS instead.
439
fb32b4f7
PA
4402017-04-05 Pedro Alves <palves@redhat.com>
441
442 * remote-utils.c (remote_prepare, remote_open): Constify.
443 * remote-utils.h (remote_prepare, remote_open): Constify.
444 * server.c (captured_main): Constify 'port' handling.
445
65dd1e59
SM
4462017-04-04 Simon Marchi <simon.marchi@ericsson.com>
447
448 * Makefile.in (clean): Clear .deps.
449
8fa5b777
SM
4502017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
451
452 * .gitignore: Remove generated files, replace with wildcard.
453 * (clean): Replace removal of generated files with wildcard.
454 (version.c): Replace with...
455 (version-generated.c): ...this.
456 (xml-builtin.c): Replace with...
457 (xml-builtin-generated.c): ...this.
458 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
459 (%.c: *regformats*): Replace with...
460 (%-generated.c: *regformats*): ...this.
461
a12e714b
MF
4622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
463
464 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
465 (xtensa_fill_gregset): Call collect_register_by_name for
466 threadptr register.
467 (xtensa_store_gregset): Call supply_register_by_name for
468 threadptr register.
469
1a09b50a
MF
4702017-03-27 Max Filippov <jcmvbkbc@gmail.com>
471
472 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
473 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
474 (xtensa_store_gregset): Call supply_register for all registers in
475 a0_regnum..a0_regnum + C0_NREGS range.
476
1a01e7c6
SM
4772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
478
479 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
480 (ax-ipa.o: ax.c): Remove.
481 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
482 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
483 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
484 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
485 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
486
36bc18a8
SM
4872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
490 (print-utils-ipa.o: ../common/print-utils.c): Remove.
491 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
492 (errors-ipa.o: ../common/errors.c): Remove.
493 (format-ipa.o: ../common/format.c): Remove.
494 (common-utils-ipa.o: ../common/common-utils.c): Remove.
495
a8ebe3d5
SM
4962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
497
498 * Makefile.in (%-ipa.o: %.c): New rule.
499 (tracepoint-ipa.o: tracepoint.c): Remove.
500 (utils-ipa.o: utils.c): Remove.
501 (remote-utils-ipa.o: remote-utils.c): Remove.
502 (regcache-ipa.o: regcache.c): Remove.
503 (i386-linux-ipa.o: i386-linux.c): Remove.
504 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
505 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
506 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
507 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
508 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
509 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
510 (amd64-linux-ipa.o: amd64-linux.c): Remove.
511 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
512 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
513 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
514 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
515 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
516 (aarch64-ipa.o: aarch64.c): Remove.
517 (s390-linux32-ipa.o: s390-linux32.c): Remove.
518 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
519 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
520 (s390-linux64-ipa.o: s390-linux64.c): Remove.
521 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
522 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
523 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
524 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
525 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
526 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
527 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
528 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
529 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
530 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
531 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
532 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
533 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
534 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
535 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
536 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
537 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
538 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
539 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
540 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
541 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
542 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
543 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
544 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
545 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
546 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
547 (tdesc-ipa.o: tdesc.c): Remove.
548 (x32-linux-ipa.o: x32-linux.c): Remove.
549 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
550 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
551
50cfacb7
SM
5522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
553
554 * Makefile.in (%.o: ../arch/%.c): New rule.
555 (arm.o: ../arch/arm.c): Remove.
556 (arm-linux.o: ../arch/arm-linux.c): Remove.
557 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
558 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
559
c5a22423
SM
5602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
561
562 * Makefile.in (%.o: ../nat/%.c): New rule.
563 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
564 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
565 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
566 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
567 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
568 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
569 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
570 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
571 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
572 (linux-personality.o: ../nat/linux-personality.c): Remove.
573 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
574 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
575 (x86-linux.o: ../nat/x86-linux.c): Remove.
576 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
577 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
578
6bda016b
SM
5792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
580
581 * Makefile.in (%.o: ../common/%.c): New rule.
582 (signals.o: ../common/signals.c): Remove.
583 (print-utils.o: ../common/print-utils.c): Remove.
584 (rsp-low.o: ../common/rsp-low.c): Remove.
585 (common-utils.o: ../common/common-utils.c): Remove.
586 (posix-strerror.o: ../common/posix-strerror.c): Remove.
587 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
588 (vec.o: ../common/vec.c): Remove.
589 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
590 (xml-utils.o: ../common/xml-utils.c): Remove.
591 (ptid.o: ../common/ptid.c): Remove.
592 (buffer.o: ../common/buffer.c): Remove.
593 (format.o: ../common/format.c): Remove.
594 (filestuff.o: ../common/filestuff.c): Remove.
595 (agent.o: ../common/agent.c): Remove.
596 (errors.o: ../common/errors.c): Remove.
597 (environ.o: ../common/environ.c): Remove.
598 (common-debug.o: ../common/common-debug.c): Remove.
599 (cleanups.o: ../common/cleanups.c): Remove.
600 (common-exceptions.o: ../common/common-exceptions.c): Remove.
601 (fileio.o: ../common/fileio.c): Remove.
602 (common-regcache.o: ../common/common-regcache.c): Remove.
603 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
604 (new-op.o: ../common/new-op.c): Remove.
605 (btrace-common.o: ../common/btrace-common.c): Remove.
606
21122961
SM
6072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
608
609 * Makefile.in (%.o: ../target/%.c): New rule.
610 (waitstatus.o: ../target/waitstatus.c): Remove.
611
c362e621
SM
6122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * Makefile.in
615 (%.c: ../regformats/%.dat,
616 (%.c: ../regformats/arm/%.dat,
617 (%.c: ../regformats/i386/%.dat,
618 (%.c: ../regformats/rs6000/%.dat): New rules.
619 (aarch64.c): Remove.
620 (reg-arm.c): Remove.
621 (arm-with-iwmmxt.c): Remove.
622 (arm-with-vfpv2.c): Remove.
623 (arm-with-vfpv3.c): Remove.
624 (arm-with-neon.c): Remove.
625 (reg-bfin.c): Remove.
626 (reg-cris.c): Remove.
627 (reg-crisv32.c): Remove.
628 (i386.c): Remove.
629 (i386-linux.c): Remove.
630 (i386-avx.c): Remove.
631 (i386-avx-linux.c): Remove.
632 (i386-avx-avx512.c): Remove.
633 (i386-avx-avx512-linux.c): Remove.
634 (i386-mpx.c): Remove.
635 (i386-mpx-linux.c): Remove.
636 (i386-avx-mpx-avx512-pku.c): Remove.
637 (i386-avx-mpx-avx512-pku-linux.c): Remove.
638 (i386-avx-mpx.c): Remove.
639 (i386-avx-mpx-linux.c): Remove.
640 (i386-mmx.c): Remove.
641 (i386-mmx-linux.c): Remove.
642 (reg-ia64.c): Remove.
643 (reg-m32r.c): Remove.
644 (reg-m68k.c): Remove.
645 (reg-cf.c): Remove.
646 (mips-linux.c): Remove.
647 (mips-dsp-linux.c): Remove.
648 (mips64-linux.c): Remove.
649 (mips64-dsp-linux.c): Remove.
650 (nios2-linux.c): Remove.
651 (powerpc-32.c): Remove.
652 (powerpc-32l.c): Remove.
653 (powerpc-altivec32l.c): Remove.
654 (powerpc-cell32l.c): Remove.
655 (powerpc-vsx32l.c): Remove.
656 (powerpc-isa205-32l.c): Remove.
657 (powerpc-isa205-altivec32l.c): Remove.
658 (powerpc-isa205-vsx32l.c): Remove.
659 (powerpc-e500l.c): Remove.
660 (powerpc-64l.c): Remove.
661 (powerpc-altivec64l.c): Remove.
662 (powerpc-cell64l.c): Remove.
663 (powerpc-vsx64l.c): Remove.
664 (powerpc-isa205-64l.c): Remove.
665 (powerpc-isa205-altivec64l.c): Remove.
666 (powerpc-isa205-vsx64l.c): Remove.
667 (s390-linux32.c): Remove.
668 (s390-linux32v1.c): Remove.
669 (s390-linux32v2.c): Remove.
670 (s390-linux64.c): Remove.
671 (s390-linux64v1.c): Remove.
672 (s390-linux64v2.c): Remove.
673 (s390-te-linux64.c): Remove.
674 (s390-vx-linux64.c): Remove.
675 (s390-tevx-linux64.c): Remove.
676 (s390x-linux64.c): Remove.
677 (s390x-linux64v1.c): Remove.
678 (s390x-linux64v2.c): Remove.
679 (s390x-te-linux64.c): Remove.
680 (s390x-vx-linux64.c): Remove.
681 (s390x-tevx-linux64.c): Remove.
682 (tic6x-c64xp-linux.c): Remove.
683 (tic6x-c64x-linux.c): Remove.
684 (tic6x-c62x-linux.c): Remove.
685 (reg-sh.c): Remove.
686 (reg-sparc64.c): Remove.
687 (reg-spu.c): Remove.
688 (amd64.c): Remove.
689 (amd64-linux.c): Remove.
690 (amd64-avx.c): Remove.
691 (amd64-avx-linux.c): Remove.
692 (amd64-avx-avx512.c): Remove.
693 (amd64-avx-avx512-linux.c): Remove.
694 (amd64-mpx.c): Remove.
695 (amd64-mpx-linux.c): Remove.
696 (amd64-avx-mpx-avx512-pku.c): Remove.
697 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
698 (amd64-avx-mpx.c): Remove.
699 (amd64-avx-mpx-linux.c): Remove.
700 (x32.c): Remove.
701 (x32-linux.c): Remove.
702 (x32-avx.c): Remove.
703 (x32-avx-linux.c): Remove.
704 (x32-avx-avx512.c): Remove.
705 (x32-avx-avx512-linux.c): Remove.
706 (reg-xtensa.c): Remove.
707 (reg-tilegx.c): Remove.
708 (reg-tilegx32.c): Remove.
709
1672e0d9
SDJ
7102017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
711
712 * Makefile.in (SFILES): Add "common/environ.c".
713 (OBJS): Add "common/environ.h".
714
239b6d10
WT
7152017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
716
717 * configure.ac: Check if the fs_base and gs_base members of
718 `struct user_regs_struct' exist.
719 * config.in: Regenerated.
720 * configure: Likewise.
721
694b382c
AT
7222017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
723
724 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
725 target_read_memory.
726 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
727 (get_next_pcs_syscall_next_pc): Likewise.
728
7dc53023
LM
7292016-12-23 Luis Machado <lgustavo@codesourcery.com>
730
731 * win32-i386-low.c: Fix incorrect reference to a couple source files.
732 * nto-x86-low.c: Likewise.
733
ad02e4fe
SM
7342016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
735
736 * Makefile.in: Include disable-implicit-rules.mk.
737
dcb07cfa
PA
7382016-11-23 Pedro Alves <palves@redhat.com>
739
740 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
741 (debug_vprintf): Use std::chrono::steady_clock instead of
742 gettimeofday. Use '.' instead of ':'.
743 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
744 (get_timestamp): Use std::chrono::steady_clock instead of
745 gettimeofday.
746
8629c02c
SM
7472016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
748
749 * Makefile.in: Fix whitespace formatting.
750
b593ecca
SM
7512016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
752
753 * Makefile.in (SFILES, OBS): Flatten list and order
754 alphabetically.
755
9986ba08
PA
7562016-11-23 Pedro Alves <palves@redhat.com>
757
758 * event-loop.c (handle_file_event): Use warning.
759 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
760 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
761 Use warning.
762
4eefa7bc
PA
7632016-11-23 Pedro Alves <palves@redhat.com>
764
765 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
766 output.
767 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
768 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
769 debug_printf and debug_flush for debug output.
770 * server.c (handle_general_set): Likewise.
771 * thread-db.c (try_thread_db_load): Use debug_printf for debug
772 output.
773
5443506e
SM
7742016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
775
776 * Makefile.in (.c.o): Replace rule with ...
777 (%.o: %.c): ... this one.
778
3b165252
SM
7792016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
780
781 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
782 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
783 make.
784 * configure.ac: Remove checks for the make program.
785 * configure: Re-generate.
786
0bcda685
PA
7872016-10-28 Pedro Alves <palves@redhat.com>
788
789 * Makefile.in (CXX_DIALECT): Get from configure.
790 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
791 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
792 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
793 * config.in: Regenerate.
794 * configure: Regenerate.
795
c3805894
YQ
7962016-10-27 Yao Qi <yao.qi@linaro.org>
797
798 * linux-low.c (linux_supports_range_stepping): Return true if
799 can_software_single_step return true.
800
89342618
YQ
8012016-10-27 Yao Qi <yao.qi@linaro.org>
802
803 * inferiors.c (find_inferior_in_random): New function.
804 * inferiors.h (find_inferior_in_random): Declare.
805 * linux-low.c (linux_wait_for_event_filtered): Call
806 find_inferior_in_random instead of find_inferior.
807
e3652c84
YQ
8082016-10-27 Yao Qi <yao.qi@linaro.org>
809
810 * linux-low.c (linux_wait_1): If single-step breakpoints are
811 inserted, remove them.
812
5a04c4cf
PA
8132016-10-26 Pedro Alves <palves@redhat.com>
814
815 * linux-low.c (handle_extended_wait): Link parent/child fork
816 threads.
817 (linux_wait_1): Unlink them.
818 (linux_set_resume_request): Ignore resume requests for
819 already-resumed and unhandled fork child threads.
820 * linux-low.h (struct lwp_info) <fork_relative>: New field.
821 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
822 New functions.
823 (handle_v_requests) <vCont>: Don't call require_running.
824 * server.h (in_queued_stop_replies): New declaration.
825
cb93dc7f
YQ
8262016-10-24 Yao Qi <yao.qi@linaro.org>
827
828 PR server/20733
829 * linux-aarch64-low.c (append_insns): Cast the return value to
830 'uint32_t *'.
831
a1078bea
YQ
8322016-10-10 Yao Qi <yao.qi@linaro.org>
833
834 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
835
1fb77080
SDJ
8362016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
837
838 * target.c (target_supports_multi_process): New function, moved
839 from...
840 * target.h (target_supports_multi_process): ... here. Remove
841 macro.
842
39b5a3b9
TT
8432016-10-05 Tom Tromey <tom@tromey.com>
844
845 PR remote/20655:
846 * tracepoint.c (handle_tracepoint_bkpts): Check
847 ipa_error_tracepoint, not ipa_stopping_tracepoint.
848
c1d0b70a
YQ
8492016-10-05 Yao Qi <yao.qi@linaro.org>
850
851 * configure.srv: Update the path of arm-*.xml files.
852
0a69eedb
YQ
8532016-10-05 Terry Guo <terry.guo@arm.com>
854 Yao Qi <yao.qi@linaro.org>
855
856 * Makefile.in: Adjust the path of rules.
857 * configure.srv: Update the path of xml files.
858 * regformats/arm-with-iwmmxt.dat: Regenerated.
859 * regformats/arm-with-neon.dat: Likewise.
860 * regformats/arm-with-vfpv2.dat: Likewise.
861 * regformats/arm-with-vfpv3.dat Likewise.
862
17e16485
YQ
8632016-09-30 Yao Qi <yao.qi@linaro.org>
864
865 PR gdbserver/20627
866 * target.c (target_stop_and_wait): Don't call
867 target_continue_no_signal, use resume_stop instead.
868
edeeb602
YQ
8692016-09-26 Yao Qi <yao.qi@linaro.org>
870
871 * linux-low.c (linux_wait_1): Call debug_exit.
872
503b1c39
PA
8732016-09-23 Pedro Alves <palves@redhat.com>
874
875 * Makefile.in (SFILES): Add common/new-op.c.
876 (OBS): Add common/new-op.o.
877 (new-op.o): New rule.
878
74172ecf
SM
8792016-09-21 Simon Marchi <simon.marchi@ericsson.com>
880
881 * .gitinore: Ignore more files.
882
fc6cda2e
YQ
8832016-09-21 Yao Qi <yao.qi@linaro.org>
884
885 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
886 23.
887
bc1e6c81
SDJ
8882016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
889
890 * server.c (start_inferior): Call target_mourn_inferior instead of
891 mourn_inferior; pass ptid_t argument to it.
892 (resume): Likewise.
893 (handle_target_event): Likewise.
894 * target.c (target_mourn_inferior): New function.
895 * target.h (mourn_inferior): Delete macro.
896
0e00e962
AA
8972016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
898
899 * linux-low.c (lwp_is_stepping): New function.
900
1d8cb77d
CL
9012016-09-06 Carl Love <cel@us.ibm.com>
902
903 * server.c (start_inferior): Fixed comment, requested comment change
904 didn't get updated correctly. Removed reference to ptrace () call as
905 it is only true on Linux systems.
906
7313bced
CL
9072016-09-06 Carl Love <cel@us.ibm.com>
908
909 * server.c (start_inferior): Do not call
910 function target_post_create_inferior () if the
911 inferior process has already exited.
912
cf6de44d
PA
9132016-09-05 Pedro Alves <palves@redhat.com>
914
915 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
916 (COMPILE.pre, CC_LD): Use CXX directly.
917 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
918 * acinclude.m4: Don't include build-with-cxx.m4.
919 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
920 * configure: Regenerate.
921
c1da6748
AT
9222016-09-02 Akash Trehan <akash.trehan123@gmail.com>
923
924 PR gdb/19495
925 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
926 call writing data to own_buf.
927
f2b9e3df
SDJ
9282016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
929
930 * target.c (mywait): Call target_wait instead of
931 the_target->wait.
932 (target_wait): New function.
933
049a8570
SDJ
9342016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
935
936 * server.c (start_inferior): New variable 'ptid'. Replace calls
937 to the_target->resume by target_continue{,_no_signal}, depending
938 on the case.
939 * target.c (target_stop_and_wait): Call target_continue_no_signal
940 instead of the_target->resume.
941 (target_continue): New function.
942
3aa5cfa0
AT
9432016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
944
945 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
946
754653a7
AZ
9472016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
948
949 PR server/20491
950 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
951 ps_prochandle.
952 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
953 * linux-arm-low.c (ps_get_thread_area): Likewise.
954 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
955 * linux-m68k-low.c (ps_get_thread_area): Likewise.
956 * linux-mips-low.c (ps_get_thread_area): Likewise.
957 * linux-nios2-low.c (ps_get_thread_area): Likewise.
958 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
959 * linux-x86-low.c (ps_get_thread_area): Likewise.
960 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
961
ed036b40
PA
9622016-08-19 Pedro Alves <palves@redhat.com>
963
964 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
965
c8ef42ee
PA
9662016-08-19 Pedro Alves <palves@redhat.com>
967
968 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
969 comment. Use memcpy instead of casting through unsigned long.
970
9c235a72
PA
9712016-08-19 Pedro Alves <palves@redhat.com>
972
973 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
974 allocating around 0x80000000.
975
201506da
PA
9762016-08-19 Pedro Alves <palves@redhat.com>
977
978 PR gdb/20415
979 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
980 (x32-avx512-linux-ipa.o): New rules.
981 * configure.ac (x86_64-*-linux*): New x32 check.
982 * configure.srv (ipa_x32_linux_regobj): New.
983 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
984 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
985 descriptions.
986 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
987 descriptions.
988 * configure: Regenerate.
989
f348d89a
PA
9902016-08-09 Pedro Alves <palves@redhat.com>
991
992 PR gdb/18653
993 * Makefile.in (OBS): Add signals-state-save-restore.o.
994 (signals-state-save-restore.o): New rule.
995 * config.in: Regenerate.
996 * configure: Regenerate.
997 * linux-low.c: Include "signals-state-save-restore.h".
998 (linux_create_inferior): Call
999 restore_original_signals_state.
1000 * server.c: Include "dispositions-save-restore.h".
1001 (captured_main): Call save_original_signals_state.
1002
1baf5149
PA
10032016-08-05 Pedro Alves <palves@redhat.com>
1004
1005 * configure: Regenerate.
1006
fcd4a73d
YQ
10072016-08-04 Yao Qi <yao.qi@linaro.org>
1008
1009 * linux-low.c (regsets_fetch_inferior_registers): Check
1010 errno is ESRCH or not.
1011
979659d0
YQ
10122016-08-02 Yao Qi <yao.qi@linaro.org>
1013
1014 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1015 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1016 (thread_db_load_search): Update.
1017 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1018 td_ta_set_event and td_ta_event_getmsg.
1019
6598661d
PA
10202016-07-26 Pedro Alves <palves@redhat.com>
1021
1022 PR server/20414
1023 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1024 of unsigned long for 64-bit registers and use uint32_t instead of
1025 unsigned int for 32-bit registers.
1026
9cf12d57
PA
10272016-07-26 Pedro Alves <palves@redhat.com>
1028
1029 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1030 to 'ptrace'.
1031
305450ed
TT
10322016-07-21 Tom Tromey <tom@tromey.com>
1033
1034 * configure: Rebuild.
1035
2583da7c
YQ
10362016-07-21 Yao Qi <yao.qi@linaro.org>
1037
1038 * mem-break.c (find_gdb_breakpoint): Cast bp to
1039 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1040
21536b36
YQ
10412016-07-21 Yao Qi <yao.qi@linaro.org>
1042
1043 * server.c (handle_v_requests): Support s and S actions
1044 if target_supports_software_single_step return true.
1045
8901d193
YQ
10462016-07-21 Yao Qi <yao.qi@linaro.org>
1047
1048 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1049 is resume_step, call maybe_hw_step.
1050 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1051 and unstop them.
1052 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1053 breakpoints or not.
1054 (proceed_one_lwp): If resume request is resume_step, install
1055 reinsert breakpoints and call maybe_hw_step.
1056
0e9a339e
YQ
10572016-07-21 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-low.c (proceed_one_lwp): Declare.
1060 (linux_resume_one_thread): Remove local variable 'step'.
1061 Lift code enqueue signal. Call proceed_one_lwp instead of
1062 linux_resume_one_lwp.
1063
4281b351
YQ
10642016-07-21 Yao Qi <yao.qi@linaro.org>
1065
1066 * linux-low.c (linux_resume_one_thread): Call
1067 enqueue_pending_signal.
1068
984a2c04
YQ
10692016-07-21 Yao Qi <yao.qi@linaro.org>
1070
1071 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1072 * inferiors.c (do_restore_current_thread_cleanup): New function.
1073 (make_cleanup_restore_current_thread): Likewise.
1074 * linux-low.c (install_software_single_step_breakpoints): Call
1075 make_cleanup_restore_current_thread. Switch current_thread to
1076 thread.
1077
bec903c9
YQ
10782016-07-21 Yao Qi <yao.qi@linaro.org>
1079
1080 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1081 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1082 (clone_one_breakpoint): Likewise.
1083 (delete_reinsert_breakpoints): Change parameter to thread.
1084 Callers updated.
1085 (has_reinsert_breakpoints): Likewise.
1086 (uninsert_reinsert_breakpoints): Likewise.
1087 (reinsert_reinsert_breakpoints): Likewise.
1088 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1089 (delete_reinsert_breakpoints): Likewise.
1090 (reinsert_reinsert_breakpoints): Likewise.
1091 (uninsert_reinsert_breakpoints): Likewise.
1092 (has_reinsert_breakpoints): Likewise.
1093
63c40ec7
YQ
10942016-07-21 Yao Qi <yao.qi@linaro.org>
1095
1096 * inferiors.c (get_thread_process): Make parameter const.
1097 * inferiors.h (get_thread_process): Update declaration.
1098 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1099 Add new parameters child_thread and parent_thread. Callers
1100 updated.
1101 * mem-break.h (clone_all_breakpoints): Update declaration.
1102
9aa76cd0
YQ
11032016-07-21 Yao Qi <yao.qi@linaro.org>
1104
1105 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1106 <command_list, handler>: Remove.
1107 (struct gdb_breakpoint): New.
1108 (struct other_breakpoint): New.
1109 (struct reinsert_breakpoint): New.
1110 (is_gdb_breakpoint): New function.
1111 (any_persistent_commands): Update command_list if
1112 is_gdb_breakpoint returns true.
1113 (set_breakpoint): Create breakpoints according to their types.
1114 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1115 (set_gdb_breakpoint_1): Likewise.
1116 (set_gdb_breakpoint): Likewise.
1117 (clear_breakpoint_conditions): Change parameter type to
1118 'struct gdb_breakpoint *'.
1119 (clear_breakpoint_commands): Likewise.
1120 (clear_breakpoint_conditions_and_commands): Likewise.
1121 (add_condition_to_breakpoint): Likewise.
1122 (add_breakpoint_condition): Likewise.
1123 (add_commands_to_breakpoint): Likewise.
1124 (check_breakpoints): Check other_breakpoint.
1125 (clone_one_breakpoint): Clone breakpopint according to its type.
1126 * mem-break.h (struct gdb_breakpoint): Declare.
1127 (set_gdb_breakpoint): Update declaration.
1128 (clear_breakpoint_conditions_and_commands): Likewise.
1129 (add_breakpoint_condition): Likewise.
1130 (add_breakpoint_commands): Likewise.
1131 * server.c (process_point_options): Change parameter type to
1132 'struct gdb_breakpoint *'.
1133
811f8301
YQ
11342016-07-21 Yao Qi <yao.qi@linaro.org>
1135
1136 * mem-break.c (set_breakpoint_at): Rename it to ...
1137 (set_breakpoint_type_at): ... it.
1138 (set_breakpoint_at): Call set_breakpoint_type_at.
1139 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1140 * mem-break.h (set_breakpoint_at): Update comments.
1141
b1c51e36
CLT
11422016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1143
1144 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1145 to buf parameter.
1146 (nios2_store_gregset): Likewise.
1147
ced2dffb
PA
11482016-07-01 Pedro Alves <palves@redhat.com>
1149 Antoine Tremblay <antoine.tremblay@ericsson.com>
1150
1151 * linux-low.c: Change interface to take the target lwp_info
1152 pointer directly and return void. Handle detaching from a zombie
1153 thread.
1154 (linux_detach_lwp_callback): New function.
1155 (linux_detach): Detach from the leader thread after detaching from
1156 the clone threads.
1157
2ac09a5b
YQ
11582016-06-28 Yao Qi <yao.qi@linaro.org>
1159
1160 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1161 for variable new_offset.
1162 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1163 (aarch64_ftrace_insn_reloc_cb): Likewise.
1164 (aarch64_ftrace_insn_reloc_tb): Likewise.
1165 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1166 PRIx64 instead of PRIx32.
1167
79e7fd4f
YQ
11682016-06-28 Yao Qi <yao.qi@linaro.org>
1169
1170 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1171 (the_low_target): Install arm_get_syscall_trapinfo.
1172
061fc021
YQ
11732016-06-28 Yao Qi <yao.qi@linaro.org>
1174
1175 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1176 function.
1177 (the_low_target): Install aarch64_get_syscall_trapinfo.
1178
4cc32bec
YQ
11792016-06-28 Yao Qi <yao.qi@linaro.org>
1180
1181 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1182 Callers updated.
1183 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1184 Remove parameter sysno.
1185 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1186 sysret.
1187
782c1122
AA
11882016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1189
1190 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1191 (s390_emit_ne_goto): Likewise.
1192 (s390_emit_lt_goto): Likewise.
1193 (s390_emit_le_goto): Likewise.
1194 (s390_emit_gt_goto): Likewise.
1195 (s390_emit_ge_goto): Likewise.
1196 (s390x_emit_eq_goto): Likewise.
1197 (s390x_emit_ne_goto): Likewise.
1198 (s390x_emit_lt_goto): Likewise.
1199 (s390x_emit_le_goto): Likewise.
1200 (s390x_emit_gt_goto): Likewise.
1201 (s390x_emit_ge_goto): Likewise.
1202 (s390_emit_ops_impl): Mark variable static.
1203 (s390x_emit_ops): Likewise.
1204
2e7b624b
YQ
12052016-06-17 Yao Qi <yao.qi@linaro.org>
1206
1207 * linux-low.c (handle_extended_wait): Call
1208 uninsert_reinsert_breakpoints for the parent process. Remove
1209 reinsert breakpoints from the child process. Reinsert them to
1210 the parent process when vfork is done.
1211 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1212 (reinsert_reinsert_breakpoints): New function.
1213 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1214 (reinsert_reinsert_breakpoints): Declare.
1215
8a81c5d7
YQ
12162016-06-17 Yao Qi <yao.qi@linaro.org>
1217
1218 * linux-low.c (handle_extended_wait): If the parent is doing
1219 step-over, remove the reinsert breakpoints from the forked child.
1220
f50bf8e5
YQ
12212016-06-17 Yao Qi <yao.qi@linaro.org>
1222
1223 * linux-low.c (unsuspend_all_lwps): Declare.
1224 (linux_low_filter_event): If thread exited, call finish_step_over.
1225 If step-over is finished, unsuspend other threads.
1226
8376a3cb
YQ
12272016-06-17 Yao Qi <yao.qi@linaro.org>
1228
1229 * linux-low.c (linux_resume_one_lwp_throw): Assert
1230 has_reinsert_breakpoints returns false.
1231 * mem-break.c (delete_disabled_breakpoints): Assert
1232 bp type isn't reinsert_breakpoint.
1233
f79b145d
YQ
12342016-06-17 Yao Qi <yao.qi@linaro.org>
1235
1236 * linux-low.c (maybe_hw_step): New function.
1237 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1238 (finish_step_over): Switch current_thread to lwp temporarily,
1239 and assert has_reinsert_breakpoints returns true.
1240 (proceed_one_lwp): Call maybe_hw_step.
1241 * mem-break.c (has_reinsert_breakpoints): New function.
1242 * mem-break.h (has_reinsert_breakpoints): Declare.
1243
0ae534d2
JT
12442016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1245
1246 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1247
fcdad592
YQ
12482016-05-17 Yao Qi <yao.qi@linaro.org>
1249
1250 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1251 instead of find_inferior.
1252
9e784964
YQ
12532016-05-05 Yao Qi <yao.qi@linaro.org>
1254
1255 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1256 Initialize res to zero.
1257
cf2ebb6e
YQ
12582016-05-05 Yao Qi <yao.qi@linaro.org>
1259
1260 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1261 to uint32_t.
1262
c1aebf87
UW
12632016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1264
1265 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1266 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1267 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1268
35fd2deb 12692016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1270 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1271
1272 * tracepoint.c (write_inferior_int8): New function.
1273 (cmd_qtenable_disable): Write enable flag using
1274 write_inferior_int8.
1275
484b3c32
YQ
12762016-04-25 Yao Qi <yao.qi@linaro.org>
1277
1278 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1279 (need_step_over_p): Return zero if the LWP has pending signals
1280 can be delivered on software single step target.
1281
85ba7d86
YQ
12822016-04-25 Yao Qi <yao.qi@linaro.org>
1283
1284 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1285 return instead of error.
1286
3539aa13
YQ
12872016-04-22 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1290 to 23.
1291
5b061e98
YQ
12922016-04-22 Yao Qi <yao.qi@linaro.org>
1293
1294 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1295 signal when stepping over breakpoint with software single
1296 step.
1297
3451269c
PA
12982016-04-21 Pedro Alves <palves@redhat.com>
1299
1300 * linux-s390-low.c (s390_collect_ptrace_register)
1301 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1302 add casts.
1303 (s390_check_regset): Use void * instead of gdb_byte *.
1304
a2358508
PA
13052016-04-20 Pedro Alves <palves@redhat.com>
1306
1307 * configure: Renegerate.
1308
6885166d
YQ
13092016-04-20 Yao Qi <yao.qi@linaro.org>
1310
1311 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1312 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1313 number 16.
1314 (arm_store_gregset): Likewise.
1315
2b863f51
WT
13162016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1317
1318 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1319 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1320 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1321 (amd64-avx-mpx-linux.c): New rules.
1322 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1323 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1324 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1325 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1326 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1327 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1328 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1329 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1330 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1331 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1332 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1333 * linux-x86-low.c (x86_linux_read_description): Add case for
1334 X86_XSTATE_AVX_MPX_MASK.
1335 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1336 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1337 init_registers_i386_avx_mpx_linux.
1338 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1339 (initialize_low_tracepoint): Call
1340 init_registers_i386_avx_mpx_linux.
1341 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1342 (initialize_low_tracepoint): Call
1343 init_registers_amd64_avx_mpx_linux.
1344 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1345 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1346 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1347 declarations.
1348
9b30624b
PA
13492016-04-18 Pedro Alves <palves@redhat.com>
1350
1351 * configure: Regenerate.
1352
45e3745e
AT
13532016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1354
1355 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1356 (aarch64_emit_sub): Likewise.
1357
2afc13ff
PA
13582016-04-12 Pedro Alves <palves@redhat.com>
1359
1360 * utils.c (prepare_to_throw_exception): Delete.
1361
6e774b13
SM
13622016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1365
4dca19f8
MK
13662016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1367
1368 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1369
d0a9981f
MK
13702016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1371
1372 * linux-aarch64-ipa.c: Add <elf.h> include.
1373 * linux-ppc-ipa.c: Add <elf.h> include.
1374 * linux-s390-ipa.c: Add <elf.h> include.
1375
252db07e
MK
13762016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1377
1378 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1379 (get_raw_reg_ptr): Likewise.
1380 (get_trace_state_variable_value_ptr): Likewise.
1381 (set_trace_state_variable_value_ptr): Likewise.
1382 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1383 char *.
1384
14e2b6d9
MK
13852016-03-31 Wei-cheng Wang <cole945@gmail.com>
1386 Marcin Kościelnicki <koriakin@0x04.net>
1387
1388 PR/17221
1389 * linux-ppc-low.c (emit_insns): New function.
1390 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1391 (ppc_emit_prologue): New function.
1392 (ppc_emit_epilogue): New function.
1393 (ppc_emit_add): New function.
1394 (ppc_emit_sub): New function.
1395 (ppc_emit_mul): New function.
1396 (ppc_emit_lsh): New function.
1397 (ppc_emit_rsh_signed): New function.
1398 (ppc_emit_rsh_unsigned): New function.
1399 (ppc_emit_ext): New function.
1400 (ppc_emit_zero_ext): New function.
1401 (ppc_emit_log_not): New function.
1402 (ppc_emit_bit_and): New function.
1403 (ppc_emit_bit_or): New function.
1404 (ppc_emit_bit_xor): New function.
1405 (ppc_emit_bit_not): New function.
1406 (ppc_emit_equal): New function.
1407 (ppc_emit_less_signed): New function.
1408 (ppc_emit_less_unsigned): New function.
1409 (ppc_emit_ref): New function.
1410 (ppc_emit_const): New function.
1411 (ppc_emit_reg): New function.
1412 (ppc_emit_pop): New function.
1413 (ppc_emit_stack_flush): New function.
1414 (ppc_emit_swap): New function.
1415 (ppc_emit_stack_adjust): New function.
1416 (ppc_emit_call): New function.
1417 (ppc_emit_int_call_1): New function.
1418 (ppc_emit_void_call_2): New function.
1419 (ppc_emit_if_goto): New function.
1420 (ppc_emit_goto): New function.
1421 (ppc_emit_eq_goto): New function.
1422 (ppc_emit_ne_goto): New function.
1423 (ppc_emit_lt_goto): New function.
1424 (ppc_emit_le_goto): New function.
1425 (ppc_emit_gt_goto): New function.
1426 (ppc_emit_ge_goto): New function.
1427 (ppc_write_goto_address): New function.
1428 (ppc_emit_ops_impl): New static variable.
1429 (ppc64v1_emit_prologue): New function.
1430 (ppc64v2_emit_prologue): New function.
1431 (ppc64_emit_epilogue): New function.
1432 (ppc64_emit_add): New function.
1433 (ppc64_emit_sub): New function.
1434 (ppc64_emit_mul): New function.
1435 (ppc64_emit_lsh): New function.
1436 (ppc64_emit_rsh_signed): New function.
1437 (ppc64_emit_rsh_unsigned): New function.
1438 (ppc64_emit_ext): New function.
1439 (ppc64_emit_zero_ext): New function.
1440 (ppc64_emit_log_not): New function.
1441 (ppc64_emit_bit_and): New function.
1442 (ppc64_emit_bit_or): New function.
1443 (ppc64_emit_bit_xor): New function.
1444 (ppc64_emit_bit_not): New function.
1445 (ppc64_emit_equal): New function.
1446 (ppc64_emit_less_signed): New function.
1447 (ppc64_emit_less_unsigned): New function.
1448 (ppc64_emit_ref): New function.
1449 (ppc64_emit_const): New function.
1450 (ppc64v1_emit_reg): New function.
1451 (ppc64v2_emit_reg): New function.
1452 (ppc64_emit_pop): New function.
1453 (ppc64_emit_stack_flush): New function.
1454 (ppc64_emit_swap): New function.
1455 (ppc64v1_emit_call): New function.
1456 (ppc64v2_emit_call): New function.
1457 (ppc64v1_emit_int_call_1): New function.
1458 (ppc64v2_emit_int_call_1): New function.
1459 (ppc64v1_emit_void_call_2): New function.
1460 (ppc64v2_emit_void_call_2): New function.
1461 (ppc64_emit_if_goto): New function.
1462 (ppc64_emit_eq_goto): New function.
1463 (ppc64_emit_ne_goto): New function.
1464 (ppc64_emit_lt_goto): New function.
1465 (ppc64_emit_le_goto): New function.
1466 (ppc64_emit_gt_goto): New function.
1467 (ppc64_emit_ge_goto): New function.
1468 (ppc64v1_emit_ops_impl): New static variable.
1469 (ppc64v2_emit_ops_impl): New static variable.
1470 (ppc_emit_ops): New function.
1471 (linux_low_target): Wire in ppc_emit_ops.
1472
a2174ba4
MK
14732016-03-31 Wei-cheng Wang <cole945@gmail.com>
1474 Marcin Kościelnicki <koriakin@0x04.net>
1475
1476 PR/17221
1477 * Makefile.in: Add powerpc-*-ipa.o
1478 * configure.srv: Add ipa_obj for powerpc*-linux.
1479 * linux-ppc-ipa.c: New file.
1480 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1481 includes.
1482 (PPC_FIELD): New macro.
1483 (PPC_SEXT): New macro.
1484 (PPC_OP6): New macro.
1485 (PPC_BO): New macro.
1486 (PPC_LI): New macro.
1487 (PPC_BD): New macro.
1488 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1489 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1490 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1491 (ppc_get_thread_area): New function.
1492 (is_elfv2_inferior): New function.
1493 (gen_ds_form): New function.
1494 (GEN_STD): New macro.
1495 (GEN_STDU): New macro.
1496 (GEN_LD): New macro.
1497 (GEN_LDU): New macro.
1498 (gen_d_form): New function.
1499 (GEN_ADDI): New macro.
1500 (GEN_ADDIS): New macro.
1501 (GEN_LI): New macro.
1502 (GEN_LIS): New macro.
1503 (GEN_ORI): New macro.
1504 (GEN_ORIS): New macro.
1505 (GEN_LWZ): New macro.
1506 (GEN_STW): New macro.
1507 (GEN_STWU): New macro.
1508 (gen_xfx_form): New function.
1509 (GEN_MFSPR): New macro.
1510 (GEN_MTSPR): New macro.
1511 (GEN_MFCR): New macro.
1512 (GEN_MTCR): New macro.
1513 (GEN_SYNC): New macro.
1514 (GEN_LWSYNC): New macro.
1515 (gen_x_form): New function.
1516 (GEN_OR): New macro.
1517 (GEN_MR): New macro.
1518 (GEN_LWARX): New macro.
1519 (GEN_STWCX): New macro.
1520 (GEN_CMPW): New macro.
1521 (gen_md_form): New function.
1522 (GEN_RLDICL): New macro.
1523 (GEN_RLDICR): New macro.
1524 (gen_i_form): New function.
1525 (GEN_B): New macro.
1526 (GEN_BL): New macro.
1527 (gen_b_form): New function.
1528 (GEN_BNE): New macro.
1529 (GEN_LOAD): New macro.
1530 (GEN_STORE): New macro.
1531 (gen_limm): New function.
1532 (gen_atomic_xchg): New function.
1533 (gen_call): New function.
1534 (ppc_relocate_instruction): New function.
1535 (ppc_install_fast_tracepoint_jump_pad): New function.
1536 (ppc_get_min_fast_tracepoint_insn_len): New function.
1537 (ppc_get_ipa_tdesc_idx): New function.
1538 (the_low_target): Wire in the new functions.
1539 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1540 tdescs.
1541 * linux-ppc-tdesc.h: New file.
1542
a13c4696
MK
15432016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1544
1545 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1546 (alloc_jump_pad_buffer): New function.
1547 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1548 (alloc_jump_pad_buffer): New function.
1549 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1550 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1551 (alloc_jump_pad_buffer): New function.
1552 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1553 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1554 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1555 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1556
1cda1512
MK
15572016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1558
1559 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1560 * linux-amd64-ipa.c: Likewise.
1561 * linux-i386-ipa.c: Likewise.
1562 * linux-s390-ipa.c: Likewise.
1563 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1564 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1565 set_trace_state_variable_value_ptr.
1566 (struct ipa_sym_addresses): Likewise.
1567 (symbol_list): Likewise.
1568 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1569 accessing gdb_collect directly.
1570 (gdb_collect_ptr_type): New typedef.
1571 (get_raw_reg_ptr_type): New typedef.
1572 (get_trace_state_variable_value_ptr_type): New typedef.
1573 (set_trace_state_variable_value_ptr_type): New typedef.
1574 (gdb_collect_ptr): New global.
1575 (get_raw_reg_ptr): New global.
1576 (get_trace_state_variable_value_ptr): New global.
1577 (set_trace_state_variable_value_ptr): New global.
1578 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1579 accessing get_raw_reg directly.
1580 (get_get_tsv_func_addr): Likewise for
1581 get_trace_state_variable_value_ptr.
1582 (get_set_tsv_func_addr): Likewise for
1583 set_trace_state_variable_value_ptr.
1584 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1585
72fb5488
SM
15862016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1587
1588 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1589
28170b88
MK
15902016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1591
1592 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1593 packets.
1594 (relocate_instruction): Remove own_buf.
1595 * server.c (own_buf): Make global.
1596 (handle_v_requests): Make global.
1597 * server.h (own_buf): New declaration.
1598 (handle_v_requests): New prototype.
1599
f39e8743
MK
16002016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1601
1602 PR 18377
1603 * linux-s390-low.c (add_insns): New function.
1604 (s390_emit_prologue): New function.
1605 (s390_emit_epilogue): New function.
1606 (s390_emit_add): New function.
1607 (s390_emit_sub): New function.
1608 (s390_emit_mul): New function.
1609 (s390_emit_lsh): New function.
1610 (s390_emit_rsh_signed): New function.
1611 (s390_emit_rsh_unsigned): New function.
1612 (s390_emit_ext): New function.
1613 (s390_emit_log_not): New function.
1614 (s390_emit_bit_and): New function.
1615 (s390_emit_bit_or): New function.
1616 (s390_emit_bit_xor): New function.
1617 (s390_emit_bit_not): New function.
1618 (s390_emit_equal): New function.
1619 (s390_emit_less_signed): New function.
1620 (s390_emit_less_unsigned): New function.
1621 (s390_emit_ref): New function.
1622 (s390_emit_if_goto): New function.
1623 (s390_emit_goto): New function.
1624 (s390_write_goto_address): New function.
1625 (s390_emit_litpool): New function.
1626 (s390_emit_const): New function.
1627 (s390_emit_call): New function.
1628 (s390_emit_reg): New function.
1629 (s390_emit_pop): New function.
1630 (s390_emit_stack_flush): New function.
1631 (s390_emit_zero_ext): New function.
1632 (s390_emit_swap): New function.
1633 (s390_emit_stack_adjust): New function.
1634 (s390_emit_set_r2): New function.
1635 (s390_emit_int_call_1): New function.
1636 (s390_emit_void_call_2): New function.
1637 (s390_emit_eq_goto): New function.
1638 (s390_emit_ne_goto): New function.
1639 (s390_emit_lt_goto): New function.
1640 (s390_emit_le_goto): New function.
1641 (s390_emit_gt_goto): New function.
1642 (s390_emit_ge_goto): New function.
1643 (s390x_emit_prologue): New function.
1644 (s390x_emit_epilogue): New function.
1645 (s390x_emit_add): New function.
1646 (s390x_emit_sub): New function.
1647 (s390x_emit_mul): New function.
1648 (s390x_emit_lsh): New function.
1649 (s390x_emit_rsh_signed): New function.
1650 (s390x_emit_rsh_unsigned): New function.
1651 (s390x_emit_ext): New function.
1652 (s390x_emit_log_not): New function.
1653 (s390x_emit_bit_and): New function.
1654 (s390x_emit_bit_or): New function.
1655 (s390x_emit_bit_xor): New function.
1656 (s390x_emit_bit_not): New function.
1657 (s390x_emit_equal): New function.
1658 (s390x_emit_less_signed): New function.
1659 (s390x_emit_less_unsigned): New function.
1660 (s390x_emit_ref): New function.
1661 (s390x_emit_if_goto): New function.
1662 (s390x_emit_const): New function.
1663 (s390x_emit_call): New function.
1664 (s390x_emit_reg): New function.
1665 (s390x_emit_pop): New function.
1666 (s390x_emit_stack_flush): New function.
1667 (s390x_emit_zero_ext): New function.
1668 (s390x_emit_swap): New function.
1669 (s390x_emit_stack_adjust): New function.
1670 (s390x_emit_int_call_1): New function.
1671 (s390x_emit_void_call_2): New function.
1672 (s390x_emit_eq_goto): New function.
1673 (s390x_emit_ne_goto): New function.
1674 (s390x_emit_lt_goto): New function.
1675 (s390x_emit_le_goto): New function.
1676 (s390x_emit_gt_goto): New function.
1677 (s390x_emit_ge_goto): New function.
1678 (s390_emit_ops): New function.
1679 (struct linux_target_ops): Fill in emit_ops hook.
1680
abd9baf9
MK
16812016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1682
1683 PR 18377
1684 * Makefile.in: Add s390 IPA files.
1685 * configure.srv: Build IPA for s390.
1686 * linux-s390-ipa.c: New file.
1687 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1688 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1689 (tdesc_s390_linux32): Likewise.
1690 (init_registers_s390_linux32v1): Likewise.
1691 (tdesc_s390_linux32v1): Likewise.
1692 (init_registers_s390_linux32v2): Likewise.
1693 (tdesc_s390_linux32v2): Likewise.
1694 (init_registers_s390_linux64): Likewise.
1695 (tdesc_s390_linux64): Likewise.
1696 (init_registers_s390_linux64v1): Likewise.
1697 (tdesc_s390_linux64v1): Likewise.
1698 (init_registers_s390_linux64v2): Likewise.
1699 (tdesc_s390_linux64v2): Likewise.
1700 (init_registers_s390_te_linux64): Likewise.
1701 (tdesc_s390_te_linux64): Likewise.
1702 (init_registers_s390_vx_linux64): Likewise.
1703 (tdesc_s390_vx_linux64): Likewise.
1704 (init_registers_s390_tevx_linux64): Likewise.
1705 (tdesc_s390_tevx_linux64): Likewise.
1706 (init_registers_s390x_linux64): Likewise.
1707 (tdesc_s390x_linux64): Likewise.
1708 (init_registers_s390x_linux64v1): Likewise.
1709 (tdesc_s390x_linux64v1): Likewise.
1710 (init_registers_s390x_linux64v2): Likewise.
1711 (tdesc_s390x_linux64v2): Likewise.
1712 (init_registers_s390x_te_linux64): Likewise.
1713 (tdesc_s390x_te_linux64): Likewise.
1714 (init_registers_s390x_vx_linux64): Likewise.
1715 (tdesc_s390x_vx_linux64): Likewise.
1716 (init_registers_s390x_tevx_linux64): Likewise.
1717 (tdesc_s390x_tevx_linux64): Likewise.
1718 (have_hwcap_s390_vx): New static variable.
1719 (s390_arch_setup): Fill have_hwcap_s390_vx.
1720 (s390_get_thread_area): New function.
1721 (s390_ft_entry_gpr_esa): New const.
1722 (s390_ft_entry_gpr_zarch): New const.
1723 (s390_ft_entry_misc): New const.
1724 (s390_ft_entry_fr): New const.
1725 (s390_ft_entry_vr): New const.
1726 (s390_ft_main_31): New const.
1727 (s390_ft_main_64): New const.
1728 (s390_ft_exit_fr): New const.
1729 (s390_ft_exit_vr): New const.
1730 (s390_ft_exit_misc): New const.
1731 (s390_ft_exit_gpr_esa): New const.
1732 (s390_ft_exit_gpr_zarch): New const.
1733 (append_insns): New function.
1734 (s390_relocate_instruction): New function.
1735 (s390_install_fast_tracepoint_jump_pad): New function.
1736 (s390_get_min_fast_tracepoint_insn_len): New function.
1737 (s390_get_ipa_tdesc_idx): New function.
1738 (struct linux_target_ops): Wire in the above functions.
1739 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1740 * linux-s390-tdesc.h: New file.
1741
a4105d04
MK
17422016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1743
1744 * linux-s390-low.c (s390_supports_tracepoints): New function.
1745 (struct linux_target_ops): Fill supports_tracepoints hook.
1746
35ac8b3e
YQ
17472016-03-18 Yao Qi <yao.qi@linaro.org>
1748
1749 * linux-low.c (lwp_signal_can_be_delivered): New function.
1750 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1751
94610ec4
YQ
17522016-03-18 Yao Qi <yao.qi@linaro.org>
1753
1754 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1755 0 if signal is enqueued. Remove 'signal' from one debugging
1756 message. Move one debugging message to some lines below.
1757 Remove code setting 'signal' to 0.
1758
80aea927
YQ
17592016-03-18 Yao Qi <yao.qi@linaro.org>
1760
1761 * linux-low.c (linux_low_filter_event): Remove redundant
1762 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1763
b04fd3be
MK
17642016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1765
1766 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1767 (struct linux_target_ops): Wire in the above.
1768
c40c8d4b
YQ
17692016-03-03 Yao Qi <yao.qi@linaro.org>
1770
1771 * linux-low.c: Update comments to start_step_over.
1772
0f8288ae
YQ
17732016-03-03 Yao Qi <yao.qi@linaro.org>
1774
1775 PR server/19736
1776 * linux-low.c (handle_extended_wait): Set child suspended
1777 if event_lwp->bp_reinsert isn't zero.
1778
fdbd04a8
YQ
17792016-03-02 Yao Qi <yao.qi@linaro.org>
1780
1781 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1782 enqueue_pending_signal.
1783
6896a8fa
MK
17842016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1785
1786 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1787 is actually loaded.
1788
ab503087
MK
17892016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1790
1791 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1792 (s390_regmap_3264) [!__s390x__]: New global.
1793 (s390_collect_ptrace_register): Skip map entries containing -1.
1794 (s390_supply_ptrace_register): Ditto.
1795 (s390_fill_gprs_high): New function.
1796 (s390_store_gprs_high): New function.
1797 (s390_regsets): Add NT_S390_HIGH_GPRS.
1798 (s390_get_hwcap): Enable on 31-bit.
1799 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1800 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1801 Detect NT_S390_HIGH_GPRS.
1802 (s390_usrregs_info_3264): Enable on 31-bit.
1803 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1804 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1805
ae91f625
MK
18062016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1807
1808 PR gdb/13808
1809 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1810 * configure.srv: Ditto.
1811 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1812 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1813 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1814 (init_registers_amd64_linux): Remove prototype.
1815 (tdesc_amd64_linux): Remove declaration.
1816 (get_ipa_tdesc): New function.
1817 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1818 initialize remaining tdescs.
1819 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1820 (init_registers_i386_linux): Remove prototype.
1821 (tdesc_i386_linux): Remove declaration.
1822 (get_ipa_tdesc): New function.
1823 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1824 initialize remaining tdescs.
1825 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1826 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1827 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1828 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1829 (x86_get_ipa_tdesc_idx): New function.
1830 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1831 * linux-x86-tdesc.h: New file.
1832 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1833 (target_get_ipa_tdesc_idx): New macro.
1834 * tracepoint.c (ipa_tdesc_idx): New macro.
1835 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1836 (symbol_list): Add ipa_tdesc_idx.
1837 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1838 (ipa_tdesc): Remove.
1839 (ipa_tdesc_idx): New variable.
1840 (get_context_regcache): Use get_ipa_tdesc.
1841 (gdb_collect): Ditto.
1842 (gdb_probe): Ditto.
1843 * tracepoint.h (get_ipa_tdesc): New prototype.
1844 (ipa_tdesc): Remove.
1845
e7ad2f14
PA
18462016-02-24 Pedro Alves <palves@redhat.com>
1847
1848 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1849 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1850 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1851 Factor out common code between the USE_SIGTRAP_SIGINFO and
1852 !USE_SIGTRAP_SIGINFO blocks.
1853 (linux_low_filter_event): Call save_stop_reason instead of
1854 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1855 Update comments.
1856 (linux_wait_1): Update comments.
1857
657f9cde
WW
18582016-02-24 Wei-cheng Wang <cole945@gmail.com>
1859
1860 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1861 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1862 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1863 ppc_insert_point, ppc_remove_point.
1864
b00b61e1
MK
18652016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1866
1867 * linux-s390-low.c (s390_supports_z_point_type): New function.
1868 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1869
553cb527
YQ
18702016-02-16 Yao Qi <yao.qi@linaro.org>
1871
1872 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1873 PC. Get pc from regcache_read_pc.
1874
a5652c21
YQ
18752016-02-12 Yao Qi <yao.qi@linaro.org>
1876
1877 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1878 or linux_get_pc_32bit.
1879 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1880
ed443b61
YQ
18812016-02-12 Yao Qi <yao.qi@linaro.org>
1882
1883 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1884 arm_linux_get_next_pcs_fixup.
1885
020ecd38
MK
18862016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1887
1888 * tracepoint.c (x_tracepoint_action_download): Change
1889 write_inferior_data_ptr to write_inferior_data_pointer.
1890 (cmd_qtstart): Likewise.
1891 (write_inferior_data_ptr): Remove.
1892 (download_agent_expr): Change write_inferior_data_ptr to
1893 write_inferior_data_pointer.
1894 (download_tracepoint_1): Likewise.
1895 (download_tracepoint): Likewise.
1896 (download_trace_state_variables): Likewise.
1897
7cae9051
WW
18982016-02-11 Wei-cheng Wang <cole945@gmail.com>
1899 Marcin Kościelnicki <koriakin@0x04.net>
1900
1901 * tracepoint.c (struct tracepoint_action_ops): Remove.
1902 (struct tracepoint_action): Remove ops.
1903 (m_tracepoint_action_download, r_tracepoint_action_download)
1904 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1905 size and offset accordingly.
1906 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1907 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1908 (tracepoint_action_send, tracepoint_action_download): New functions.
1909 Helpers for trace action handlers.
1910 (add_tracepoint_action): Remove setup actions ops.
1911 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1912
9f6a71b4
YQ
19132016-02-10 Yao Qi <yao.qi@linaro.org>
1914
1915 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1916
1e94266c
SM
19172016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1918
1919 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1920 to AC_OUTPUT.
1921 * configure: Regenerate.
1922
8adce034
SM
19232016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1926 void * to gdb_byte *.
1927 * linux-low.c (siginfo_fixup): Likewise.
1928 (linux_xfer_siginfo): Likewise.
1929 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1930 Likewise.
1931 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1932
93813b37
WT
19332016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1934
1935 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1936 to srv_tgtobj.
1937 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1938 to srv_tgtobj.
1939 * linux-x86-low.c [__x86_64__]: Include
1940 "nat/amd64-linux-siginfo.h".
1941 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1942 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1943 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1944 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1945 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1946 (cpt_si_fd, si_timerid, si_overrun): Move from
1947 nat/amd64-linux-siginfo.c.
1948 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1949
8424cc97
SM
19502016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1951
1952 * server.c (skip_to_semicolon): Remove.
1953 (process_point_options): Use strchrnul instead of
1954 skip_to_semicolon.
1955
4d18591b
YQ
19562016-01-26 Yao Qi <yao.qi@linaro.org>
1957
1958 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1959 * linux-low.c (install_software_single_step_breakpoints): Don't
1960 call regcache_read_pc.
1961 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1962 argument pc.
1963
d8020970
YQ
19642016-01-26 Yao Qi <yao.qi@linaro.org>
1965
1966 * linux-low.c (install_software_single_step_breakpoints): Call
1967 regcache_read_pc instead of get_pc.
1968
8b207339
YQ
19692016-01-26 Yao Qi <yao.qi@linaro.org>
1970
1971 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1972 (unblock_async_io): Rename to ...
1973 (block_unblock_async_io): ... it. New function.
1974 (enable_async_io): Don't install SIGIO handler. Unblock it
1975 instead.
1976 (disable_async_io): Don't ignore SIGIO. Block it instead.
1977 (initialize_async_io): Install SIGIO handler. Don't call
1978 unblock_async_io.
1979
18879fef
YQ
19802016-01-26 Yao Qi <yao.qi@linaro.org>
1981
1982 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1983 first character is '\003', call *the_target->request_interrupt.
1984
a0f8e08a
YQ
19852016-01-25 Yao Qi <yao.qi@linaro.org>
1986
1987 * remote-utils.c (new_thread_notify): Remove.
1988 (dead_thread_notify): Likewise.
1989 * remote-utils.h (new_thread_notify): Remove declaration.
1990 (dead_thread_notify): Likewise.
1991
cc5fd9ab
MK
19922016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1993
1994 * gdb.trace/pending.exp: Fix expected message on continue.
1995
99e8eb11
MK
19962016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1997
1998 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1999 it works properly on big-endian machines where sizeof (CORE_ADDR)
2000 != sizeof (void *).
2001
a994041d
PA
20022016-01-21 Pedro Alves <palves@redhat.com>
2003
2004 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2005 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2006 * configure: Regenerate.
2007
f7a6a40d
YQ
20082016-01-21 Yao Qi <yao.qi@linaro.org>
2009
2010 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2011 is_thumb and set it according to CPSR saved on the stack.
2012 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2013 arm_sigreturn_next_pc.
2014
6f69e520
YQ
20152016-01-18 Yao Qi <yao.qi@linaro.org>
2016
2017 * linux-low.c (linux_set_pc_64bit): New function.
2018 (linux_get_pc_64bit): New function.
2019 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2020 Declare.
2021 * linux-sparc-low.c (debug_threads): Remove declaration.
2022 (sparc_get_pc): Remove.
2023 (the_low_target): Use linux_get_pc_64bit instead of
2024 sparc_get_pc.
2025 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2026 (the_low_target): Use linux_get_pc_64bit and
2027 linux_set_pc_64bit.
2028
276d4552
YQ
20292016-01-18 Yao Qi <yao.qi@linaro.org>
2030
2031 * linux-arm-low.c (debug_threads): Remove declaration.
2032 (arm_get_pc, arm_set_pc): Remove.
2033 (the_low_target): Use linux_get_pc_32bit and
2034 linux_set_pc_32bit.
2035 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2036 (the_low_target): Use linux_get_pc_32bit and
2037 linux_set_pc_32bit.
2038 * linux-cris-low.c (debug_threads): Remove declaration.
2039 (cris_get_pc, cris_set_pc,): Remove.
2040 (the_low_target): Use linux_get_pc_32bit and
2041 linux_set_pc_32bit.
2042 * linux-crisv32-low.c (debug_threads): Remove declaration.
2043 (cris_get_pc, cris_set_pc): Remove.
2044 (the_low_target): Use linux_get_pc_32bit and
2045 linux_set_pc_32bit.
2046 * linux-low.c: Include inttypes.h.
2047 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2048 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2049 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2050 (the_low_target): Use linux_get_pc_32bit and
2051 linux_set_pc_32bit.
2052 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2053 (the_low_target): Use linux_get_pc_32bit and
2054 linux_set_pc_32bit.
2055 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2056 (the_low_target): Use linux_get_pc_32bit and
2057 linux_set_pc_32bit.
2058 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2059 (the_low_target): Use linux_get_pc_32bit and
2060 linux_set_pc_32bit.
2061 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2062 (the_low_target): Use linux_get_pc_32bit and
2063 linux_set_pc_32bit.
2064
eb0edac8
GB
20652016-01-18 Gary Benson <gbenson@redhat.com>
2066
2067 * configure.ac (AC_FUNC_FORK): New check.
2068 * config.in: Regenerate.
2069 * configure: Likewise.
2070
1b451dda
YQ
20712016-01-14 Yao Qi <yao.qi@linaro.org>
2072
2073 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2074 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2075 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2076 arm_get_next_pcs_ctor.
2077
82075af2
JS
20782016-01-12 Josh Stone <jistone@redhat.com>
2079 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2080
2081 * inferiors.h: Include "gdb_vecs.h".
2082 (struct process_info): Add syscalls_to_catch.
2083 * inferiors.c (remove_process): Free syscalls_to_catch.
2084 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2085 syscall_return stops.
2086 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2087 * server.c (handle_general_set): Handle QCatchSyscalls.
2088 (handle_query): Report support for QCatchSyscalls.
2089 * target.h (struct target_ops): Add supports_catch_syscall.
2090 (target_supports_catch_syscall): New macro.
2091 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2092 (struct lwp_info): Add syscall_state.
2093 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2094 Maintain syscall_state and syscalls_to_catch across exec.
2095 (get_syscall_trapinfo): New function, proxy to the_low_target.
2096 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2097 (linux_low_filter_event): Toggle syscall_state entry/return for
2098 syscall traps, and set it ignored for all others.
2099 (gdb_catching_syscalls_p): New function.
2100 (gdb_catch_this_syscall_p): New function.
2101 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2102 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2103 (linux_supports_catch_syscall): New function.
2104 (linux_target_ops): Install it.
2105 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2106 (the_low_target): Install it.
2107
8f13a3ce
MF
21082016-01-12 Mike Frysinger <vapier@gentoo.org>
2109
2110 * acinclude.m4: Include new ../warning.m4 file.
2111 * configure: Regenerated.
2112 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2113
5b3da067
MF
21142016-01-12 Mike Frysinger <vapier@gentoo.org>
2115
2116 * ax.c (is_goto_target): Mark static.
2117 * linux-low.c (register_addr): Likewise.
2118 (linux_fetch_registers, linux_store_registers): Likewise.
2119 * mem-break.c (any_persistent_commands): Fix old prototype.
2120 (add_commands_to_breakpoint): Mark static.
2121 * regcache.c (find_register_by_name): Delete unused func.
2122 * remote-utils.c (hex_or_minus_one): Mark static.
2123 * server.c (monitor_show_help): Mark static.
2124 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2125 handle_v_requests): Likewise.
2126
bc504a31
PA
21272016-01-12 Pedro Alves <palves@redhat.com>
2128
2129 Remove use of the registered trademark symbol throughout.
2130
5a0dd67a
YQ
21312016-01-08 Yao Qi <yao.qi@linaro.org>
2132
2133 * remote-utils.c (getpkt): If c is '\003', call target hook
2134 request_interrupt.
2135
b2ca446f
YQ
21362016-01-06 Yao Qi <yao.qi@linaro.org>
2137
2138 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2139 linux-aarch32-low.c.
2140 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2141 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2142 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2143 (thumb2_breakpoint): Declare.
2144 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2145 linux-aarch32-low.h.
2146 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2147 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2148 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2149
edd88788
JB
21502016-01-01 Joel Brobecker <brobecker@adacore.com>
2151
2152 * gdbreplay.c (gdbreplay_version): Change copyright year in
2153 version message.
2154 * server.c (gdbserver_version): Likewise.
2155
65da7f14
PP
21562015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2157
2158 * server.c (crc32_table): Delete.
2159 (crc32): Use libiberty's xcrc32 function.
2160
4abd5ed2
JB
21612015-12-22 Joel Brobecker <brobecker@adacore.com>
2162
2163 * lynx-low.c (lynx_delete_thread_callback): New function.
2164 (lynx_mourn): Properly delete our process and all of its
2165 threads. Remove call to clear_inferiors.
2166
0e50fe5c
JB
21672015-12-22 Joel Brobecker <brobecker@adacore.com>
2168
2169 * target.c (thread_search_callback): Add check that
2170 the thread_stopped target callback is not NULL before
2171 calling it.
2172
35adc03f
YQ
21732015-12-21 Yao Qi <yao.qi@linaro.org>
2174
2175 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2176 arm breakpoint.
2177
bd2b2909
AT
21782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2179
2180 * server.c (handle_query): Call target_supports_software_single_step.
2181
7fe5e27e
AT
21822015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2183
2184 * linux-low.c (single_step): New function.
2185 (linux_resume_one_lwp_throw): Call single_step.
2186 (start_step_over): Likewise.
2187
d9311bfa
AT
21882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2189
2190 * Makefile.in (SFILES): Append arch/arm-linux.c,
2191 arch/arm-get-next-pcs.c.
2192 (arm-linux.o): New rule.
2193 (arm-get-next-pcs.o): New rule.
2194 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2195 arm-linux.o.
2196 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2197 to linux-aarch32-low.c.
2198 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2199 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2200 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2201 (thumb2_breakpoint_len): Likewise.
2202 (arm_is_thumb_mode): Make non-static.
2203 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2204 from linux-aarch32-low.c.
2205 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2206 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2207 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2208 (thumb2_breakpoint_len): Likewise.
2209 (arm_is_thumb_mode): New declaration.
2210 * linux-arm-low.c: Include arch/arm-linux.h
2211 aarch/arm-get-next-pcs.h, sys/syscall.h.
2212 (get_next_pcs_ops): New struct.
2213 (get_next_pcs_addr_bits_remove): New function.
2214 (get_next_pcs_is_thumb): New function.
2215 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2216 (arm_sigreturn_next_pc): Likewise.
2217 (get_next_pcs_syscall_next_pc): Likewise.
2218 (arm_gdbserver_get_next_pcs): Likewise.
2219 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2220 Initialize.
2221 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2222 * server.h: Include gdb_vecs.h.
2223
68ce2059
AT
22242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2225
2226 * Makefile.in (SFILES): Append common/common-regcache.c.
2227 (OBS): Append common-regcache.o.
2228 (common-regcache.o): New rule.
2229 * regcache.c (init_register_cache): Initialize cache to
2230 REG_UNAVAILABLE.
2231 (regcache_raw_read_unsigned): New function.
2232 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2233 register_status enum.
2234
fa5308bd
AT
22352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2236
2237 * linux-aarch64-low.c (the_low_targets): Rename
2238 breakpoint_reinsert_addr to get_next_pcs.
2239 * linux-arm-low.c (the_low_targets): Likewise.
2240 * linux-bfin-low.c (the_low_targets): Likewise.
2241 * linux-cris-low.c (the_low_targets): Likewise.
2242 * linux-crisv32-low.c (the_low_targets): Likewise.
2243 * linux-low.c (can_software_single_step): Likewise.
2244 (install_software_single_step_breakpoints): New function.
2245 (start_step_over): Use install_software_single_step_breakpoints.
2246 * linux-low.h: New CORE_ADDR vector.
2247 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2248 get_next_pcs.
2249 * linux-mips-low.c (the_low_targets): Likewise.
2250 * linux-nios2-low.c (the_low_targets): Likewise.
2251 * linux-sparc-low.c (the_low_targets): Likewise.
2252
4a6ed09b
PA
22532015-12-17 Pedro Alves <palves@redhat.com>
2254
2255 * linux-low.c (linux_kill_one_lwp): Remove references to
2256 LinuxThreads.
2257 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2258 to 'kill'.
2259 (linux_init_signals): Delete.
2260 (initialize_low): Adjust.
2261 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2262
7544db95
PA
22632015-12-16 Pedro Alves <palves@redhat.com>
2264
2265 * configure.ac (compiler warning flags): When testing a
2266 -Wno-foo option, check whether -Wfoo works instead.
2267 * configure: Regenerate.
2268
8020350c
DB
22692015-12-11 Don Breazeal <donb@codesourcery.com>
2270
2271 * server.c (process_serial_event): Don't exit from gdbserver
2272 in remote mode if there are still active inferiors.
2273
db91f502
YQ
22742015-12-11 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2277 arm_breakpoint_at if the process is 32-bit.
2278
b37a6290
YQ
22792015-12-11 Yao Qi <yao.qi@linaro.org>
2280
2281 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2282 arm breakpoint.
2283
17b1509a
YQ
22842015-12-07 Yao Qi <yao.qi@linaro.org>
2285
2286 * configure.srv: Append arm.o to srv_tgtobj for
2287 aarch64*-*-linux* target.
2288 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2289 from linux-arm-low.c.
2290 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2291 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2292 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2293 (thumb2_breakpoint_len): Likewise.
2294 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2295 (arm_breakpoint_kinds): Likewise.
2296 (arm_breakpoint_kind_from_pc): Likewise.
2297 (arm_sw_breakpoint_from_kind): Likewise.
2298 (arm_breakpoint_kind_from_current_state): Likewise.
2299 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2300 (arm_sw_breakpoint_from_kind): Declare.
2301 (arm_breakpoint_kind_from_current_state): Declare.
2302 (arm_breakpoint_at): Declare.
2303 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2304 arm_sw_breakpoint_from_kind if process is 32-bit.
2305 (aarch64_breakpoint_kind_from_pc): New function.
2306 (aarch64_breakpoint_kind_from_current_state): New function.
2307 (the_low_target): Initialize fields breakpoint_kind_from_pc
2308 and breakpoint_kind_from_current_state.
2309 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2310 linux-aarch32-low.c.
2311 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2312 (arm_breakpoint, arm_breakpoint_len): Likewise.
2313 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2314 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2315 (arm_is_thumb_mode): Likewise.
2316 (arm_breakpoint_at): Likewise.
2317 (arm_breakpoint_kind_from_pc): Likewise.
2318 (arm_sw_breakpoint_from_kind): Likewise.
2319 (arm_breakpoint_kind_from_current_state): Likewise.
2320
2321 Revert:
2322 2015-08-04 Yao Qi <yao.qi@linaro.org>
2323
2324 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2325 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2326 * server.c (extended_protocol): Remove "static".
2327 * server.h (extended_protocol): Declare it.
2328
ece66d65
JS
23292015-12-04 Josh Stone <jistone@redhat.com>
2330
2331 * target.h (struct target_ops) <arch_setup>: Rename to ...
2332 (struct target_ops) <post_create_inferior>: ... this.
2333 (target_arch_setup): Rename to ...
2334 (target_post_create_inferior): ... this, calling post_create_inferior.
2335 * server.c (start_inferior): Update target_arch_setup calls to
2336 target_post_create_inferior.
2337 * linux-low.c (linux_low_ptrace_options): Forward declare.
2338 (linux_arch_setup): Update its comment for general use.
2339 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2340 (struct linux_target_ops): Use linux_post_create_inferior.
2341 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2342 to post_create_inferior.
2343 * nto-low.c (struct nto_target_ops): Likewise.
2344 * spu-low.c (struct spu_target_ops): Likewise.
2345 * win32-low.c (struct win32_target_ops): Likewise.
2346
e58c48b4
AT
23472015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2348
2349 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2350
fbec8956
AT
23512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2352
2353 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2354 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2355 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2356 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2357 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2358 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2359 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2360 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2361 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2362 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2363 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2364 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2365
9b4c5f87
AT
23662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2367
2368 * linux-low.c (linux_look_up_symbols): Don't call
2369 linux_supports_traceclone.
2370 * linux-low.h (thread_db_init): Remove use_events argument.
2371 * thread-db.c (thread_db_use_event): Remove global variable.
2372 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2373 (struct thread_db) <td_create_bp>: Remove field.
2374 (thread_db_create_event): Remove function.
2375 (thread_db_enable_reporting): Likewise.
2376 (find_one_thread): Don't check for thread_db_use_events.
2377 (attach_thread): Likewise.
2378 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2379 (try_thread_db_load_1): Don't check for thread_db_use_events.
2380 (thread_db_init): Remove use_events argument and thread events
2381 handling.
2382 (remove_thread_event_breakpoints): Remove function.
2383 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2384
7d00775e
AT
23852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2386
2387 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2388 New function.
2389 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2390 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2391 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2392 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2393 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2394 Initialize.
2395 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2396 New function.
2397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2398 * linux-low.c (can_hardware_single_step): Use
2399 supports_hardware_single_step.
2400 (can_software_single_step): New function.
2401 (start_step_over): Call can_software_single_step.
2402 (linux_supports_hardware_single_step): New function.
2403 (struct target_ops) <supports_software_single_step>: Initialize.
2404 * linux-low.h (struct linux_target_ops)
2405 <supports_hardware_single_step>: Initialize.
2406 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2407 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2408 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2409 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2410 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2411 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2412 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2413 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2414 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2415 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2416 Initialize.
2417 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2418 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2419 Initialize.
2420 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2421 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2422 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2423 New function.
2424 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2425 * target.h (struct target_ops): <supports_software_single_step>:
2426 New field.
2427 (target_supports_software_single_step): New macro.
2428
2d97cd35
AT
24292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2430
2431 * linux-low.c (linux_wait_1): Fix pc advance condition.
2432 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2433 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2434
769ef81f
AT
24352015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2436
2437 * linux-arm-low.c (arm_is_thumb_mode): New function.
2438 (arm_breakpoint_at): Use arm_is_thumb_mode.
2439 (arm_breakpoint_kind_from_current_state): New function.
2440 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2441 Initialize.
2442 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2443 (linux_breakpoint_kind_from_current_state): New function.
2444 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2445 * linux-low.h (struct linux_target_ops)
2446 <breakpoint_kind_from_current_state>: New field.
2447 * target.h (struct target_ops): Likewise.
2448 (target_breakpoint_kind_from_current_state): New macro.
2449
1bebeeca
PA
24502015-11-30 Pedro Alves <palves@redhat.com>
2451
2452 * linux-low.c (linux_resume): Wake up the event loop before
2453 returning.
2454
a67a9fae
PA
24552015-11-30 Pedro Alves <palves@redhat.com>
2456
2457 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2458 check.
2459 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2460 to -1.
2461 * target.c (struct thread_search): New structure.
2462 (thread_search_callback): New function.
2463 (prev_general_thread): New global.
2464 (prepare_to_access_memory, done_accessing_memory): New functions.
2465 * target.h (prepare_to_access_memory, done_accessing_memory):
2466 Replace macros with function declarations.
2467
f2faf941
PA
24682015-11-30 Pedro Alves <palves@redhat.com>
2469
2470 PR 14618
2471 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2472 report TARGET_WAITKIND_NO_RESUMED.
2473 * remote-utils.c (prepare_resume_reply): Handle
2474 TARGET_WAITKIND_NO_RESUMED.
2475 * server.c (report_no_resumed): New global.
2476 (handle_query) <qSupported>: Handle "no-resumed+". Report
2477 "no-resumed+" support.
2478 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2479 return error if the client doesn't support no-resumed events.
2480 (push_stop_notification): New function.
2481 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2482 events if the client supports them.
2483
a681f9c9
PA
24842015-11-30 Pedro Alves <palves@redhat.com>
2485
2486 * linux-low.c (thread_still_has_status_pending_p): Don't check
2487 vCont;t here.
2488 (lwp_resumed): New function.
2489 (status_pending_p_callback): Return early if the LWP is not
2490 supposed to be resumed.
2491
65706a29
PA
24922015-11-30 Pedro Alves <palves@redhat.com>
2493
2494 * linux-low.c (handle_extended_wait): Assert that the LWP's
2495 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2496 thread create events, leave the new child's status pending.
2497 (linux_low_filter_event): If GDB wants to hear about thread exit
2498 events, leave the LWP marked dead and don't delete it.
2499 (linux_wait_for_event_filtered): Don't check for thread exit.
2500 (filter_exit_event): New function.
2501 (linux_wait_1): Use it, when returning an exit event.
2502 (linux_resume_one_lwp_throw): Assert that the LWP's
2503 waitstatus is TARGET_WAITKIND_IGNORE.
2504 * remote-utils.c (prepare_resume_reply): Handle
2505 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2506 * server.c (report_thread_events): New global.
2507 (handle_general_set): Handle QThreadEvents.
2508 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2509 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2510 TARGET_WAITKIND_THREAD_EXITED.
2511 * server.h (report_thread_events): Declare.
2512
56cf4bed
PA
25132015-11-30 Pedro Alves <palves@redhat.com>
2514
2515 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2516 the thread's last_resume_kind was resume_stop.
2517
500c1d85
PA
25182015-11-30 Pedro Alves <palves@redhat.com>
2519
2520 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2521 before returning.
2522
de979965
PA
25232015-11-30 Pedro Alves <palves@redhat.com>
2524
2525 * server.c (handle_v_requests): Handle vCtrlC.
2526
34c65914
PA
25272015-11-30 Pedro Alves <palves@redhat.com>
2528
2529 * gdbthread.h (find_any_thread_of_pid): Declare.
2530 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2531 functions.
2532 * server.c (handle_query): If current_thread is NULL, look for
2533 another thread of the selected process.
2534
79efa585 25352015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2536 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2537
2538 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2539 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2540 name in reply.
2541 * target.h (struct target_ops) <thread_name>: New field.
2542 (target_thread_name): New macro.
2543
80d82c19
JB
25442015-11-23 Joel Brobecker <brobecker@adacore.com>
2545
2546 * regcache.h (regcache_invalidate_pid): Add declaration.
2547 * regcache.c (regcache_invalidate_pid): New function, extracted
2548 from regcache_invalidate.
2549 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2550 Add trivial documentation comment.
2551 * lynx-low.c: Use regcache_invalidate_pid instead of
2552 regcache_invalidate.
2553
64da5dd5
JB
25542015-11-23 Joel Brobecker <brobecker@adacore.com>
2555
2556 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2557 and Elf64_auxv_t if the target is Android.
2558
37ce4055
DE
25592015-11-22 Doug Evans <xdje42@gmail.com>
2560
2561 * target.h: #include <sys/types.h>.
2562
06e03fff
PA
25632015-11-19 Pedro Alves <palves@redhat.com>
2564
2565 * linux-low.c (linux_process_qsupported): Change prototype.
2566 Adjust.
2567 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2568 Change prototype.
2569 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2570 and adjust to loop over all features.
2571 * server.c (handle_query) <qSupported>: Adjust to call
2572 target_process_qsupported once, passing it a vector of unprocessed
2573 features.
2574 * target.h (struct target_ops) <process_qsupported>: Change
2575 prototype.
2576 (target_process_qsupported): Adjust.
2577
9a084706
PA
25782015-11-19 Pedro Alves <palves@redhat.com>
2579
2580 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2581 mode.
2582 * configure: Regenerate.
2583
dad44a1f
PA
25842015-11-19 Pedro Alves <palves@redhat.com>
2585
2586 * configure: Regenerate.
2587
231c0592
YQ
25882015-11-19 Yao Qi <yao.qi@linaro.org>
2589
2590 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2591 type to uint32_t.
2592
6c1c9a8b
YQ
25932015-11-19 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2596 (struct aarch64_operand): Move enum out.
2597
9caa3311
YQ
25982015-11-19 Yao Qi <yao.qi@linaro.org>
2599
2600 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2601 struct user_fpsimd_state *.
2602 (aarch64_store_fpregset): Likewise.
2603
6a69a054
YQ
26042015-11-19 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2607 struct user_pt_regs *.
2608 (aarch64_store_gregset): Likewise.
2609
1798301e
PA
26102015-11-18 Pedro Alves <palves@redhat.com>
2611
2612 * Makefile.in (all_object_files): Add $IPA_OBJS.
2613
ce7715e2
PA
26142015-11-17 Pedro Alves <palves@redhat.com>
2615
2616 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2617 GDB_SIGNAL_0 and gdb_signal_to_string.
2618
c0879059
PA
26192015-11-17 Pedro Alves <palves@redhat.com>
2620
2621 * win32-low.c (handle_output_debug_string): Remove parameter.
2622 (win32_kill): Remove our_status local and adjust call to
2623 handle_output_debug_string.
2624 (get_child_debug_event): Adjust call to
2625 handle_output_debug_string.
2626
1996e237
SM
26272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2628
2629 * linux-mips-low.c (mips_fill_gregset): Add cast.
2630 (mips_store_gregset): Likewise.
2631 (mips_fill_fpregset): Likewise.
2632 (mips_store_fpregset): Likewise.
2633
cbec665b
SM
26342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2635
2636 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2637 priv.
2638
eb3e3c67
SM
26392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2640
2641 * linux-mips-low.c (mips_linux_new_thread): Change type of
2642 watch_type to enum target_hw_bp_type.
2643
171de4b8
SM
26442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2645
2646 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2647 Change return type to arm_hwbp_type.
2648
04248ead
SM
26492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2650
2651 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2652 (arm_store_gregset): Likewise.
2653 * linux-arm-low.c (arm_get_hwcap): Likewise.
2654 (arm_read_description): Likewise.
2655
04b3479c
SM
26562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2657
2658 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2659
2bc84e8a
SM
26602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2661
2662 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2663 (ppc_fill_vsxregset): Likewise.
2664 (ppc_store_vsxregset): Likewise.
2665 (ppc_fill_vrregset): Likewise.
2666 (ppc_store_vrregset): Likewise.
2667 (ppc_fill_evrregset): Likewise.
2668 (ppc_store_evrregset): Likewise.
2669
e6c5bb05
SM
26702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2671
2672 * linux-ppc-low.c (ppc_usrregs_info): Remove
2673 forward-declaration.
2674 (ppc_arch_setup): Move lower in file.
2675
7ea45d72
SM
26762015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2677
2678 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2679 (ps_pdwrite): Likewise.
2680
69291610
HW
26812015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2682
2683 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2684 to after assert checks.
2685
b42945fd
SM
26862015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2687
2688 * proc-service.c (ps_pdread): Add/adjust casts.
2689 (ps_pdwrite): Add/adjust casts.
2690
d6f85c84
SM
26912015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2692
2693 * server.c (handle_search_memory_1): Cast return value of
2694 memmem.
2695
f98cd059
SM
26962015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2697
2698 * server.c (write_qxfer_response): Change type of data to
2699 gdb_byte *.
2700
d2412fa5
PA
27012015-10-29 Pedro Alves <palves@redhat.com>
2702
2703 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2704
c17414a2
PA
27052015-10-29 Pedro Alves <palves@redhat.com>
2706
2707 * tracepoint.c (clear_installed_tracepoints): Add casts.
2708
e053fbc4
PA
27092015-10-29 Pedro Alves <palves@redhat.com>
2710
2711 * server.c (handle_v_cont, process_serial_event): Add enum
2712 gdb_signal casts to signal parsing code.
2713
add67df8
PA
27142015-10-29 Pedro Alves <palves@redhat.com>
2715
2716 * linux-low.h (NULL_REGSET): Define.
2717 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2718 * linux-arm-low.c (arm_regsets): Likewise.
2719 * linux-crisv32-low.c (cris_regsets): Likewise.
2720 * linux-m68k-low.c (m68k_regsets): Likewise.
2721 * linux-mips-low.c (mips_regsets): Likewise.
2722 * linux-nios2-low.c (nios2_regsets): Likewise.
2723 * linux-ppc-low.c (ppc_regsets): Likewise.
2724 * linux-s390-low.c (s390_regsets): Likewise.
2725 * linux-sh-low.c (sh_regsets): Likewise.
2726 * linux-sparc-low.c (sparc_regsets): Likewise.
2727 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2728 * linux-tile-low.c (tile_regsets): Likewise.
2729 * linux-x86-low.c (x86_regsets): Likewise.
2730 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2731
50bc912a
PA
27322015-10-29 Pedro Alves <palves@redhat.com>
2733
2734 * linux-low.h (NULL_REGSET): Define.
2735 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2736 * linux-arm-low.c (arm_regsets): Likewise.
2737 * linux-crisv32-low.c (cris_regsets): Likewise.
2738 * linux-m68k-low.c (m68k_regsets): Likewise.
2739 * linux-mips-low.c (mips_regsets): Likewise.
2740 * linux-nios2-low.c (nios2_regsets): Likewise.
2741 * linux-ppc-low.c (ppc_regsets): Likewise.
2742 * linux-s390-low.c (s390_regsets): Likewise.
2743 * linux-sh-low.c (sh_regsets): Likewise.
2744 * linux-sparc-low.c (sparc_regsets): Likewise.
2745 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2746 * linux-tile-low.c (tile_regsets): Likewise.
2747 * linux-x86-low.c (x86_regsets): Likewise.
2748 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2749
682b2546
DE
27502015-10-26 Doug Evans <dje@google.com>
2751
2752 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2753
963843d4
DE
27542015-10-26 Doug Evans <dje@google.com>
2755
2756 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2757
d41401ac
DE
27582015-10-26 Doug Evans <dje@google.com>
2759
2760 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2761 for debug_printf.
2762 (attach_thread, find_new_threads_callback): Ditto.
2763
3db28855
AT
27642015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2765
2766 * mem-break.h (set_breakpoint_data): Remove.
2767
fb78e89c
AT
27682015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2769
2770 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2771 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2772 (initialize_low): Remove set_breakpoint_data call.
2773 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2774 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2775 (initialize_low): Remove set_breakpoint_data call.
2776 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2777 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2778 (initialize_low): Remove set_breakpoint_data call.
2779
2e6ee069
AT
27802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2781
2782 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2783 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2784 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2785 * target.h (target_breakpoint_kind_from_pc): New macro.
2786
1652a986
AT
27872015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2788
2789 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2790 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2791 the default breakpoint kind.
2792
abeead09
AT
27932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2794
2795 * linux-arm-low.c (arm_supports_z_point_type): Add software
2796 breakpoint support.
2797
b0b4b501
AT
27982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2799
2800 * linux-arm-low.c: Refactor breakpoint definitions.
2801 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2802 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2803
8689682c
AT
28042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2805
2806 * Makefile.in: Add arm.c/o.
2807 * configure.srv: Likewise.
2808 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2809 (arm_breakpoint_kind_from_pc): New function.
2810 (arm_sw_breakpoint_from_kind): Return proper kind.
2811 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2812
27165294
AT
28132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2814
2815 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2816 removal.
2817 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2818 (struct raw_breakpoint) <size>: Remove.
2819 (struct raw_breakpoint) <kind>: Add.
2820 (bp_size): New function.
2821 (bp_opcode): Likewise.
2822 (find_raw_breakpoint_at): Adjust for kind.
2823 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2824 (remove_memory_breakpoint): Adjust for kind call bp_size.
2825 (set_raw_breakpoint_at): Adjust for kind.
2826 (set_breakpoint): Likewise.
2827 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2828 (delete_raw_breakpoint): Adjust for kind.
2829 (delete_breakpoint): Likewise.
2830 (find_gdb_breakpoint): Likewise.
2831 (set_gdb_breakpoint_1): Likewise.
2832 (set_gdb_breakpoint): Likewise.
2833 (delete_gdb_breakpoint_1): Likewise.
2834 (delete_gdb_breakpoint): Likewise.
2835 (uninsert_raw_breakpoint): Likewise.
2836 (reinsert_raw_breakpoint): Likewise.
2837 (set_breakpoint_data): Remove.
2838 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2839 (check_mem_read): Adjust for kind call bp_size.
2840 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2841 (clone_one_breakpoint): Adjust for kind.
2842 * mem-break.h (set_gdb_breakpoint): Likewise.
2843 (delete_gdb_breakpoint): Likewise.
2844 * server.c (process_serial_event): Likewise.
2845
dd373349
AT
28462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2847
2848 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2849 (struct linux_target_ops) <breakpoint>: Remove.
2850 (struct linux_target_ops) <breakpoint_len>: Remove.
2851 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2852 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2853 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2854 (arm_sw_breakpoint_from_kind): New function.
2855 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2856 (struct linux_target_ops) <breakpoint>: Remove.
2857 (struct linux_target_ops) <breakpoint_len>: Remove.
2858 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2859 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2860 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2861 (struct linux_target_ops) <breakpoint>: Remove.
2862 (struct linux_target_ops) <breakpoint_len>: Remove.
2863 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2865 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2871 and sw_breakpoint_from_kind to increment the pc.
2872 (linux_breakpoint_kind_from_pc): New function.
2873 (linux_sw_breakpoint_from_kind): New function.
2874 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2875 (initialize_low): Call breakpoint_kind_from_pc and
2876 sw_breakpoint_from_kind to replace breakpoint_data/len.
2877 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2878 New field.
2879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2880 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2911 (struct linux_target_ops) <breakpoint>: Remove.
2912 (struct linux_target_ops) <breakpoint_len>: Remove.
2913 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2914 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2915 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2916 (struct linux_target_ops) <breakpoint>: Remove.
2917 (struct linux_target_ops) <breakpoint_len>: Remove.
2918 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2919 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2920 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2921 (struct linux_target_ops) <breakpoint>: Remove.
2922 (struct linux_target_ops) <breakpoint_len>: Remove.
2923 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2925 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2926 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2927 (struct linux_target_ops) <breakpoint>: Remove.
2928 (struct linux_target_ops) <breakpoint_len>: Remove.
2929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2931 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2932 (struct linux_target_ops) <breakpoint>: Remove.
2933 (struct linux_target_ops) <breakpoint_len>: Remove.
2934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2936
4cd98a19
AT
29372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2938
2939 * linux-cris-low.c (cris_get_pc): Remove void arg.
2940
774ee6d2
AR
29412015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2942
2943 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2944 variable name.
2945
833dcd29
AR
29462015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2947
2948 * inferiors.c (thread_pid_matches_callback): New function.
2949 (find_thread_process): New function.
2950 (remove_thread): Reset current_thread.
2951 (remove_process): Assert threads have been removed first.
2952
8d689ee5
YQ
29532015-10-15 Yao Qi <yao.qi@linaro.org>
2954
2955 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2956 if it is 3.
2957 (aarch64_remove_point): Likewise.
2958 * regcache.c (regcache_register_size): New function.
2959
1c2e1515
YQ
29602015-10-12 Yao Qi <yao.qi@linaro.org>
2961
2962 * linux-aarch64-low.c: Update all callers as emit_load_store
2963 is renamed to aarch64_emit_load_store.
2964
e1c587c3
YQ
29652015-10-12 Yao Qi <yao.qi@linaro.org>
2966
2967 * linux-aarch64-low.c: Update all callers of function renaming
2968 from emit_insn to aarch64_emit_insn.
2969
b6542f81
YQ
29702015-10-12 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2973 arch/aarch64-insn.h.
2974 (struct aarch64_memory_operand): Likewise.
2975 (ENCODE): Likewise.
2976 (emit_insn): Move to arch/aarch64-insn.c.
2977 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2978 (emit_load_store): Move to arch/aarch64-insn.c.
2979 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2980 (can_encode_int32): Remove.
2981
246994ce
YQ
29822015-10-12 Yao Qi <yao.qi@linaro.org>
2983
2984 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2985 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2986 (aarch64_relocate_instruction): Likewise.
2987 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2988 (struct aarch64_insn_visitor): Likewise.
2989
0badd99f
YQ
29902015-10-12 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2993 (struct aarch64_insn_visitor): New.
2994 (struct aarch64_insn_relocation_data): New.
2995 (aarch64_ftrace_insn_reloc_b): New function.
2996 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2997 (aarch64_ftrace_insn_reloc_cb): Likewise.
2998 (aarch64_ftrace_insn_reloc_tb): Likewise.
2999 (aarch64_ftrace_insn_reloc_adr): Likewise.
3000 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3001 (aarch64_ftrace_insn_reloc_others): Likewise.
3002 (visitor): New.
3003 (aarch64_relocate_instruction): Use visitor.
3004
dfaffe9d
YQ
30052015-10-12 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3008 int. Add argument buf.
3009 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3010 aarch64_relocate_instruction.
3011
70b439f0
YQ
30122015-10-12 Yao Qi <yao.qi@linaro.org>
3013
3014 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3015 argument insn. Remove local variable insn. Don't call
3016 target_read_uint32.
3017 (aarch64_install_fast_tracepoint_jump_pad): Call
3018 target_read_uint32.
3019
7781c06f
YQ
30202015-09-30 Yao Qi <yao.qi@linaro.org>
3021
3022 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3023 (emit_load_store_pair): Likewise.
3024
9a3c8263
SM
30252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3026
3027 * dll.c (match_dll): Add cast(s).
3028 (unloaded_dll): Likewise.
3029 * linux-low.c (second_thread_of_pid_p): Likewise.
3030 (delete_lwp_callback): Likewise.
3031 (count_events_callback): Likewise.
3032 (select_event_lwp_callback): Likewise.
3033 (linux_set_resume_request): Likewise.
3034 * server.c (accumulate_file_name_length): Likewise.
3035 (emit_dll_description): Likewise.
3036 (handle_qxfer_threads_worker): Likewise.
3037 (visit_actioned_threads): Likewise.
3038 * thread-db.c (any_thread_of): Likewise.
3039 * tracepoint.c (same_process_p): Likewise.
3040 (match_blocktype): Likewise.
3041 (build_traceframe_info_xml): Likewise.
3042
224c3ddb
SM
30432015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3044
3045 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3046 assignment.
3047 (gdb_unparse_agent_expr): Likewise.
3048 * hostio.c (require_data): Likewise.
3049 (handle_pread): Likewise.
3050 * linux-low.c (disable_regset): Likewise.
3051 (fetch_register): Likewise.
3052 (store_register): Likewise.
3053 (get_dynamic): Likewise.
3054 (linux_qxfer_libraries_svr4): Likewise.
3055 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3056 (set_fast_tracepoint_jump): Likewise.
3057 (uninsert_fast_tracepoint_jumps_at): Likewise.
3058 (reinsert_fast_tracepoint_jumps_at): Likewise.
3059 (validate_inserted_breakpoint): Likewise.
3060 (clone_agent_expr): Likewise.
3061 * regcache.c (init_register_cache): Likewise.
3062 * remote-utils.c (putpkt_binary_1): Likewise.
3063 (decode_M_packet): Likewise.
3064 (decode_X_packet): Likewise.
3065 (look_up_one_symbol): Likewise.
3066 (relocate_instruction): Likewise.
3067 (monitor_output): Likewise.
3068 * server.c (handle_search_memory): Likewise.
3069 (handle_qxfer_exec_file): Likewise.
3070 (handle_qxfer_libraries): Likewise.
3071 (handle_qxfer): Likewise.
3072 (handle_query): Likewise.
3073 (handle_v_cont): Likewise.
3074 (handle_v_run): Likewise.
3075 (captured_main): Likewise.
3076 * target.c (write_inferior_memory): Likewise.
3077 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3078 * tracepoint.c (init_trace_buffer): Likewise.
3079 (add_tracepoint_action): Likewise.
3080 (add_traceframe): Likewise.
3081 (add_traceframe_block): Likewise.
3082 (cmd_qtdpsrc): Likewise.
3083 (cmd_qtdv): Likewise.
3084 (cmd_qtstatus): Likewise.
3085 (response_source): Likewise.
3086 (response_tsv): Likewise.
3087 (cmd_qtnotes): Likewise.
3088 (gdb_collect): Likewise.
3089 (initialize_tracepoint): Likewise.
3090
afbe19f8
PL
30912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3092
3093 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3094 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3095 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3096 <NOP>: New.
3097 (enum aarch64_condition_codes): New enum.
3098 (w0): New static global.
3099 (fp): Likewise.
3100 (lr): Likewise.
3101 (struct aarch64_memory_operand) <type>: New
3102 MEMORY_OPERAND_POSTINDEX type.
3103 (postindex_memory_operand): New helper function.
3104 (emit_ret): New function.
3105 (emit_load_store_pair): New function, factored out of emit_stp
3106 with support for MEMORY_OPERAND_POSTINDEX.
3107 (emit_stp): Rewrite using emit_load_store_pair.
3108 (emit_ldp): New function.
3109 (emit_load_store): Likewise.
3110 (emit_ldr): Mention post-index instruction in comment.
3111 (emit_ldrh): New function.
3112 (emit_ldrb): New function.
3113 (emit_ldrsw): Mention post-index instruction in comment.
3114 (emit_str): Likewise.
3115 (emit_subs): New function.
3116 (emit_cmp): Likewise.
3117 (emit_and): Likewise.
3118 (emit_orr): Likewise.
3119 (emit_orn): Likewise.
3120 (emit_eor): Likewise.
3121 (emit_mvn): Likewise.
3122 (emit_lslv): Likewise.
3123 (emit_lsrv): Likewise.
3124 (emit_asrv): Likewise.
3125 (emit_mul): Likewise.
3126 (emit_sbfm): Likewise.
3127 (emit_sbfx): Likewise.
3128 (emit_ubfm): Likewise.
3129 (emit_ubfx): Likewise.
3130 (emit_csinc): Likewise.
3131 (emit_cset): Likewise.
3132 (emit_nop): Likewise.
3133 (emit_ops_insns): New helper function.
3134 (emit_pop): Likewise.
3135 (emit_push): Likewise.
3136 (aarch64_emit_prologue): New function.
3137 (aarch64_emit_epilogue): Likewise.
3138 (aarch64_emit_add): Likewise.
3139 (aarch64_emit_sub): Likewise.
3140 (aarch64_emit_mul): Likewise.
3141 (aarch64_emit_lsh): Likewise.
3142 (aarch64_emit_rsh_signed): Likewise.
3143 (aarch64_emit_rsh_unsigned): Likewise.
3144 (aarch64_emit_ext): Likewise.
3145 (aarch64_emit_log_not): Likewise.
3146 (aarch64_emit_bit_and): Likewise.
3147 (aarch64_emit_bit_or): Likewise.
3148 (aarch64_emit_bit_xor): Likewise.
3149 (aarch64_emit_bit_not): Likewise.
3150 (aarch64_emit_equal): Likewise.
3151 (aarch64_emit_less_signed): Likewise.
3152 (aarch64_emit_less_unsigned): Likewise.
3153 (aarch64_emit_ref): Likewise.
3154 (aarch64_emit_if_goto): Likewise.
3155 (aarch64_emit_goto): Likewise.
3156 (aarch64_write_goto_address): Likewise.
3157 (aarch64_emit_const): Likewise.
3158 (aarch64_emit_call): Likewise.
3159 (aarch64_emit_reg): Likewise.
3160 (aarch64_emit_pop): Likewise.
3161 (aarch64_emit_stack_flush): Likewise.
3162 (aarch64_emit_zero_ext): Likewise.
3163 (aarch64_emit_swap): Likewise.
3164 (aarch64_emit_stack_adjust): Likewise.
3165 (aarch64_emit_int_call_1): Likewise.
3166 (aarch64_emit_void_call_2): Likewise.
3167 (aarch64_emit_eq_goto): Likewise.
3168 (aarch64_emit_ne_goto): Likewise.
3169 (aarch64_emit_lt_goto): Likewise.
3170 (aarch64_emit_le_goto): Likewise.
3171 (aarch64_emit_gt_goto): Likewise.
3172 (aarch64_emit_ge_got): Likewise.
3173 (aarch64_emit_ops_impl): New static global variable.
3174 (aarch64_emit_ops): New target function, return
3175 &aarch64_emit_ops_impl.
3176 (struct linux_target_ops): Install it.
3177
bb903df0
PL
31782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3179
3180 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3181 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3182 aarch64-ipa.o.
3183 * linux-aarch64-ipa.c: New file.
3184 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3185 and endian.h.
3186 (aarch64_get_thread_area): New target method.
3187 (extract_signed_bitfield): New helper function.
3188 (aarch64_decode_ldr_literal): New function.
3189 (enum aarch64_opcodes): New enum.
3190 (struct aarch64_register): New struct.
3191 (struct aarch64_operand): New struct.
3192 (x0): New static global.
3193 (x1): Likewise.
3194 (x2): Likewise.
3195 (x3): Likewise.
3196 (x4): Likewise.
3197 (w2): Likewise.
3198 (ip0): Likewise.
3199 (sp): Likewise.
3200 (xzr): Likewise.
3201 (aarch64_register): New helper function.
3202 (register_operand): Likewise.
3203 (immediate_operand): Likewise.
3204 (struct aarch64_memory_operand): New struct.
3205 (offset_memory_operand): New helper function.
3206 (preindex_memory_operand): Likewise.
3207 (enum aarch64_system_control_registers): New enum.
3208 (ENCODE): New macro.
3209 (emit_insn): New helper function.
3210 (emit_b): New function.
3211 (emit_bcond): Likewise.
3212 (emit_cb): Likewise.
3213 (emit_tb): Likewise.
3214 (emit_blr): Likewise.
3215 (emit_stp): Likewise.
3216 (emit_ldp_q_offset): Likewise.
3217 (emit_stp_q_offset): Likewise.
3218 (emit_load_store): Likewise.
3219 (emit_ldr): Likewise.
3220 (emit_ldrsw): Likewise.
3221 (emit_str): Likewise.
3222 (emit_ldaxr): Likewise.
3223 (emit_stxr): Likewise.
3224 (emit_stlr): Likewise.
3225 (emit_data_processing_reg): Likewise.
3226 (emit_data_processing): Likewise.
3227 (emit_add): Likewise.
3228 (emit_sub): Likewise.
3229 (emit_mov): Likewise.
3230 (emit_movk): Likewise.
3231 (emit_mov_addr): Likewise.
3232 (emit_mrs): Likewise.
3233 (emit_msr): Likewise.
3234 (emit_sevl): Likewise.
3235 (emit_wfe): Likewise.
3236 (append_insns): Likewise.
3237 (can_encode_int32_in): New helper function.
3238 (aarch64_relocate_instruction): New function.
3239 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3240 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3241 (struct linux_target_ops): Install aarch64_get_thread_area,
3242 aarch64_install_fast_tracepoint_jump_pad and
3243 aarch64_get_min_fast_tracepoint_insn_len.
3244
787749ea
PL
32452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3246
3247 * Makefile.in (aarch64-insn.o): New rule.
3248 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3249
9812b2e6
YQ
32502015-09-21 Yao Qi <yao.qi@linaro.org>
3251
3252 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3253
18fe412b
YQ
32542015-09-21 Yao Qi <yao.qi@linaro.org>
3255
3256 * tracepoint.c (max_jump_pad_size): Remove.
3257
a0cc84cd
YQ
32582015-09-18 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-aarch64-low.c: Don't include sys/uio.h.
3261 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3262
d78908cf
WW
32632015-09-16 Wei-cheng Wang <cole945@gmail.com>
3264
3265 * tracepoint.c (eval_result_type): Change prototype.
3266 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3267
d57e0d50
PA
32682015-09-15 Pedro Alves <palves@redhat.com>
3269
3270 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3271 Check whether to report exec events instead of checking whether
3272 multiprocess is enabled.
3273
5a676acc
PA
32742015-09-15 Pedro Alves <palves@redhat.com>
3275
3276 PR remote/18965
3277 * remote-utils.c (prepare_resume_reply): Merge
3278 TARGET_WAITKIND_VFORK_DONE switch case with the
3279 TARGET_WAITKIND_FORKED case.
3280
7c5d0fad
YQ
32812015-09-15 Yao Qi <yao.qi@linaro.org>
3282
3283 * server.c (handle_query): Check string comparison using
3284 "else if" instead of "if".
3285
750ce8d1
YQ
32862015-09-15 Yao Qi <yao.qi@linaro.org>
3287
3288 * server.c (vCont_supported): New global variable.
3289 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3290 matches. Append ";vContSupported+" to own_buf.
3291 (handle_v_requests): Append ";s;S" to own_buf if target supports
3292 hardware single step or vCont_supported is false.
3293 (capture_main): Set vCont_supported to zero.
3294
70b90b91
YQ
32952015-09-15 Yao Qi <yao.qi@linaro.org>
3296
3297 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3298 it to ...
3299 (linux_supports_hardware_single_step): ... New function.
3300 (linux_target_ops): Update.
3301 * lynx-low.c (lynx_target_ops): Set field
3302 supports_hardware_single_step to target_can_do_hardware_single_step.
3303 * nto-low.c (nto_target_ops): Likewise.
3304 * spu-low.c (spu_target_ops): Likewise.
3305 * win32-low.c (win32_target_ops): Likewise.
3306 * target.c (target_can_do_hardware_single_step): New function.
3307 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3308 Remove. <supports_hardware_single_step>: New field.
3309 (target_supports_conditional_breakpoints): Remove.
3310 (target_supports_hardware_single_step): New macro.
3311 (target_can_do_hardware_single_step): Declare.
3312 * server.c (handle_query): Use target_supports_hardware_single_step
3313 instead of target_supports_conditional_breakpoints.
3314
ade90bde
YQ
33152015-09-15 Yao Qi <yao.qi@linaro.org>
3316
3317 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3318 function.
3319 (struct linux_target_ops the_low_target): Install
3320 aarch64_linux_siginfo_fixup.
3321
94585166
DB
33222015-09-11 Don Breazeal <donb@codesourcery.com>
3323 Luis Machado <lgustavo@codesourcery.com>
3324
3325 * linux-low.c (linux_mourn): Static declaration.
3326 (linux_arch_setup): Move in front of
3327 handle_extended_wait.
3328 (linux_arch_setup_thread): New function.
3329 (handle_extended_wait): Handle exec events. Call
3330 linux_arch_setup_thread. Make event_lwp argument a
3331 pointer-to-a-pointer.
3332 (check_zombie_leaders): Do not check stopped threads.
3333 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3334 (linux_low_filter_event): Add lwp and thread for exec'ing
3335 non-leader thread if leader thread has been deleted.
3336 Refactor code into linux_arch_setup_thread and call it.
3337 Pass child lwp pointer by reference to handle_extended_wait.
3338 (linux_wait_for_event_filtered): Update comment.
3339 (linux_wait_1): Prevent clobbering exec event status.
3340 (linux_supports_exec_events): New function.
3341 (linux_target_ops) <supports_exec_events>: Initialize new member.
3342 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3343 new member.
3344 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3345 * server.c (report_exec_events): New global variable.
3346 (handle_query): Handle qSupported query for exec-events feature.
3347 (captured_main): Initialize report_exec_events.
3348 * server.h (report_exec_events): Declare new global variable.
3349 * target.h (struct target_ops) <supports_exec_events>: New
3350 member.
3351 (target_supports_exec_events): New macro.
3352 * win32-low.c (win32_target_ops) <supports_exec_events>:
3353 Initialize new member.
3354
0568462b
MM
33552015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3356
3357 * linux-low.c (linux_low_enable_btrace): Remove.
3358 (linux_target_ops): Replace linux_low_enable_btrace with
3359 linux_enable_btrace.
3360
39edd165
YQ
33612015-09-03 Yao Qi <yao.qi@linaro.org>
3362
3363 * linux-aarch64-low.c (aarch64_insert_point): Call
3364 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3365 returns true.
3366
1db33b5a
UW
33672015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3368
3369 * linux-low.c (check_stopped_by_breakpoint): Use
3370 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3371
ab290430
PA
33722015-08-27 Pedro Alves <palves@redhat.com>
3373
3374 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3375
8d749320
SM
33762015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3377
6711b7f8
SM
3378 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3379 the XNEW-family equivalent.
8d749320
SM
3380 (compile_bytecodes): Likewise.
3381 * dll.c (loaded_dll): Likewise.
3382 * event-loop.c (append_callback_event): Likewise.
3383 (create_file_handler): Likewise.
3384 (create_file_event): Likewise.
3385 * hostio.c (handle_open): Likewise.
3386 * inferiors.c (add_thread): Likewise.
3387 (add_process): Likewise.
3388 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3389 * linux-arm-low.c (arm_new_process): Likewise.
3390 (arm_new_thread): Likewise.
3391 * linux-low.c (add_to_pid_list): Likewise.
3392 (linux_add_process): Likewise.
3393 (handle_extended_wait): Likewise.
3394 (add_lwp): Likewise.
3395 (enqueue_one_deferred_signal): Likewise.
3396 (enqueue_pending_signal): Likewise.
3397 (linux_resume_one_lwp_throw): Likewise.
3398 (linux_resume_one_thread): Likewise.
3399 (linux_read_memory): Likewise.
3400 (linux_write_memory): Likewise.
3401 * linux-mips-low.c (mips_linux_new_process): Likewise.
3402 (mips_linux_new_thread): Likewise.
3403 (mips_add_watchpoint): Likewise.
3404 * linux-x86-low.c (initialize_low_arch): Likewise.
3405 * lynx-low.c (lynx_add_process): Likewise.
3406 * mem-break.c (set_raw_breakpoint_at): Likewise.
3407 (set_breakpoint): Likewise.
3408 (add_condition_to_breakpoint): Likewise.
3409 (add_commands_to_breakpoint): Likewise.
3410 (clone_agent_expr): Likewise.
3411 (clone_one_breakpoint): Likewise.
3412 * regcache.c (new_register_cache): Likewise.
3413 * remote-utils.c (look_up_one_symbol): Likewise.
3414 * server.c (queue_stop_reply): Likewise.
3415 (start_inferior): Likewise.
3416 (queue_stop_reply_callback): Likewise.
3417 (handle_target_event): Likewise.
3418 * spu-low.c (fetch_ppc_memory): Likewise.
3419 (store_ppc_memory): Likewise.
3420 * target.c (set_target_ops): Likewise.
3421 * thread-db.c (thread_db_load_search): Likewise.
3422 (try_thread_db_load_1): Likewise.
3423 * tracepoint.c (add_tracepoint): Likewise.
3424 (add_tracepoint_action): Likewise.
3425 (create_trace_state_variable): Likewise.
3426 (cmd_qtdpsrc): Likewise.
3427 (cmd_qtro): Likewise.
3428 (add_while_stepping_state): Likewise.
3429 * win32-low.c (child_add_thread): Likewise.
3430 (get_image_name): Likewise.
3431
ed8b7b42
YQ
34322015-08-25 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3435
db3cb7cb
YQ
34362015-08-25 Yao Qi <yao.qi@linaro.org>
3437
3438 * Makefile.in (aarch64-linux.o): New rule.
3439 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3440 srv_tgtobj.
3441 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3442 (aarch64_init_debug_reg_state): Make it extern.
3443 (aarch64_linux_prepare_to_resume): Remove.
3444
f6011a1c
YQ
34452015-08-25 Yao Qi <yao.qi@linaro.org>
3446
3447 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3448 lwp_arch_private_info and ptid_of_lwp.
3449
88e2cf7e
YQ
34502015-08-25 Yao Qi <yao.qi@linaro.org>
3451
3452 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3453 Find proc_info by find_process_pid. All callers updated.
3454
5e35436e
YQ
34552015-08-25 Yao Qi <yao.qi@linaro.org>
3456
3457 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3458 Remove.
3459 (debug_reg_change_callback): Remove.
3460 (aarch64_notify_debug_reg_change): Remove.
3461
4a8a7965
YQ
34622015-08-25 Yao Qi <yao.qi@linaro.org>
3463
3464 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3465 Call current_lwp_ptid.
3466
32a271ee
YQ
34672015-08-25 Yao Qi <yao.qi@linaro.org>
3468
3469 * linux-aarch64-low.c (debug_reg_change_callback): Use
3470 debug_printf.
3471
0d51c8d7
YQ
34722015-08-25 Yao Qi <yao.qi@linaro.org>
3473
3474 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3475
31a43dd5
YQ
34762015-08-25 Yao Qi <yao.qi@linaro.org>
3477
3478 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3479
8ee52567
YQ
34802015-08-25 Yao Qi <yao.qi@linaro.org>
3481
3482 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3483 the code.
3484
ff3f0f45
YQ
34852015-08-25 Yao Qi <yao.qi@linaro.org>
3486
3487 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3488 Remove.
3489 (debug_reg_change_callback): Remove argument entry and add argument
3490 lwp. Remove local variable thread. Don't print thread id in the
3491 debugging output. Don't check whether pid of thread equals to pid.
3492 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3493 iterate_over_lwps instead find_inferior.
3494
3d40fbb5
PA
34952015-08-24 Pedro Alves <palves@redhat.com>
3496
3497 * inferiors.c (get_first_process): New function.
3498 * inferiors.h (get_first_process): New declaration.
3499 * remote-utils.c (read_ptid): Default to the first process in the
3500 list, instead of to the current thread's process.
3501
438e1e42
PA
35022015-08-24 Pedro Alves <palves@redhat.com>
3503
3504 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3505 * event-loop.c: Likewise.
3506 * remote-utils.c: Likewise.
3507 * tracepoint.c: Likewise.
3508
a8c6d4fc
PA
35092015-08-24 Pedro Alves <palves@redhat.com>
3510
3511 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3512 ptid_get_lwp.
3513
99b0bb12
PA
35142015-08-21 Pedro Alves <palves@redhat.com>
3515
3516 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3517 instead of literal 1.
3518
f8904751
PA
35192015-08-21 Pedro Alves <palves@redhat.com>
3520
3521 * tdesc.c (default_description): Explicitly zero-initialize.
3522
465a859e
PA
35232015-08-21 Pedro Alves <palves@redhat.com>
3524
3525 PR gdb/18749
3526 * inferiors.c (remove_thread): Discard any pending stop reply for
3527 this thread.
3528 * server.c (remove_all_on_match_pid): Rename to ...
3529 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3530 instead of a pid.
3531 (discard_queued_stop_replies): Change parameter to a ptid. Now
3532 extern.
3533 (handle_v_kill, kill_inferior_callback, captured_main)
3534 (process_serial_event): Adjust.
3535 * server.h (discard_queued_stop_replies): Declare.
3536
f0db101d
PA
35372015-08-21 Pedro Alves <palves@redhat.com>
3538
3539 * linux-low.c (wait_for_sigstop): Always switch to no thread
3540 selected if the previously current thread dies.
3541 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3542 process instead of the current thread's.
3543 * remote-utils.c (input_interrupt): Don't check if there's no
3544 current thread.
3545 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3546 current thread to the general thread fails, error out.
3547 (handle_qxfer_auxv, handle_qxfer_libraries)
3548 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3549 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3550 (handle_query): Check if there's a thread selected instead of
3551 checking whether there's any thread in the thread list.
3552 (handle_qxfer_threads, handle_qxfer_btrace)
3553 (handle_qxfer_btrace_conf): Don't error out early if there's no
3554 thread in the thread list.
3555 (handle_v_cont, myresume): Don't set the current thread to the
3556 continue thread.
3557 (process_serial_event) <Hg handling>: Also set thread_id if the
3558 previous general thread is still alive.
3559 (process_serial_event) <g/G handling>: If setting the current
3560 thread to the general thread fails, error out.
3561 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3562 thread's lwp instead of the current thread's.
3563 * target.c (set_desired_thread): If the desired thread was not
3564 found, leave the current thread pointing to NULL. Return an int
3565 (boolean) indicating success.
3566 * target.h (set_desired_thread): Change return type to int.
3567
40045d91
MF
35682015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3569
3570 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3571 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3572 #includes.
3573 (ps_get_thread_area): New function.
3574
45face3b
GB
35752015-08-19 Gary Benson <gbenson@redhat.com>
3576
3577 * hostio.c (handle_pread): Do not attempt to read more data
3578 than hostio_reply_with_data can fit in a packet.
3579
16d5f642
JB
35802015-08-18 Joel Brobecker <brobecker@adacore.com>
3581
3582 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3583
a738da3a
MF
35842015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3585
3586 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3587
33ebda9d
PA
35882015-08-06 Pedro Alves <palves@redhat.com>
3589
3590 * tracepoint.c (expr_eval_result): Now an int.
3591
a44892be
PA
35922015-08-06 Pedro Alves <palves@redhat.com>
3593
3594 * gdbthread.h (struct regcache): Forward declare.
3595 (struct thread_info) <regcache_data>: Now a struct regcache
3596 pointer.
3597 * inferiors.c (inferior_regcache_data)
3598 (set_inferior_regcache_data): Now work with struct regcache
3599 pointers.
3600 * inferiors.h (struct regcache): Forward declare.
3601 (inferior_regcache_data, set_inferior_regcache_data): Now work
3602 with struct regcache pointers.
3603 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3604 (free_register_cache_thread): Remove struct regcache pointer
3605 casts.
3606
608a1e46
PA
36072015-08-06 Pedro Alves <palves@redhat.com>
3608
3609 * server.c (captured_main): On error, print the exception message
3610 to stderr, and if run_once is set, throw a quit.
3611
f0ce0d3a
PA
36122015-08-06 Pedro Alves <palves@redhat.com>
3613
3614 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3615 the current thread.
3616
bf47e248
PA
36172015-08-06 Pedro Alves <palves@redhat.com>
3618
3619 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3620 reading beyond the passed in buffer length.
3621
b6b9ffcc
PL
36222015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3623
3624 * tracepoint.c (symbol_list) <required>: Remove.
3625
863d01bd
PA
36262015-08-06 Pedro Alves <palves@redhat.com>
3627
3628 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3629 count if stopping and suspending threads.
3630 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3631 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3632 (linux_detach): Complete an ongoing step-over.
3633 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3634 throughout.
3635 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3636 (linux_wait_1): If passing a signal to the inferior after
3637 finishing a step-over, unsuspend and re-resume all lwps. If we
3638 see a single-step event but the thread should be continuing, don't
3639 pass the trap to gdb.
3640 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3641 internal_error instead of gdb_assert.
3642 (enqueue_pending_signal): New function.
3643 (check_ptrace_stopped_lwp_gone): Add debug output.
3644 (start_step_over): Use internal_error instead of gdb_assert.
3645 (complete_ongoing_step_over): New function.
3646 (linux_resume_one_thread): Don't resume a suspended thread.
3647 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3648 it stepping.
3649
00db26fa
PA
36502015-08-06 Pedro Alves <palves@redhat.com>
3651
3652 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3653 (linux_thread_alive): Use lwp_is_marked_dead.
3654 (extended_event_reported): Delete.
3655 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3656 instead of extended_event_reported.
3657 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3658 as well.
3659 (lwp_is_marked_dead): New function.
3660 (lwp_running): Use lwp_is_marked_dead.
3661 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3662 comment.
3663
ad071a30
PA
36642015-08-06 Pedro Alves <palves@redhat.com>
3665
3666 * linux-low.c (linux_wait_1): Move fork event output out of the
3667 !report_to_gdb check. Pass event_child->waitstatus to
3668 target_waitstatus_to_string instead of ourstatus.
3669
524b57e6
YQ
36702015-08-04 Yao Qi <yao.qi@linaro.org>
3671
3672 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3673 if current_thread is 32 bit.
3674
6085d6f6
YQ
36752015-08-04 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3678 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3679 * server.c (extended_protocol): Remove "static".
3680 * server.h (extended_protocol): Declare it.
3681
8a7e4587
YQ
36822015-08-04 Yao Qi <yao.qi@linaro.org>
3683
3684 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3685 both aarch64 and aarch32.
3686 (aarch64_set_pc): Likewise.
3687
3b53ae99
YQ
36882015-08-04 Yao Qi <yao.qi@linaro.org>
3689
3690 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3691 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3692 arm-with-neon.xml to srv_xmlfiles.
3693 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3694 (is_64bit_tdesc): New function.
3695 (aarch64_linux_read_description): New function.
3696 (aarch64_arch_setup): Call aarch64_linux_read_description.
3697 (regs_info): Rename to regs_info_aarch64.
3698 (aarch64_regs_info): Return right regs_info.
3699 (initialize_low_arch): Call initialize_low_arch_aarch32.
3700
bd9e6534
YQ
37012015-08-04 Yao Qi <yao.qi@linaro.org>
3702
3703 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3704 * linux-aarch32-low.c: New file.
3705 * linux-aarch32-low.h: New file.
3706 * linux-arm-low.c (arm_fill_gregset): Move it to
3707 linux-aarch32-low.c.
3708 (arm_store_gregset): Likewise.
3709 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3710 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3711 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3712 (regs_info): Rename to regs_info_arm.
3713 (arm_regs_info): Return regs_info_aarch32 if
3714 have_ptrace_getregset is 1 and target description is
3715 arm_with_neon or arm_with_vfpv3.
3716 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3717 Call initialize_low_arch_aarch32 instead.
3718
ded48a5e
YQ
37192015-08-04 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3722 * linux-low.c: ... here.
3723 * linux-low.h (have_ptrace_getregset): Declare it.
3724
96e9210f
PA
37252015-08-04 Pedro Alves <palves@redhat.com>
3726
3727 * thread-db.c (struct thread_db): Use new typedefs.
3728 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3729 CHK calls.
3730 (disable_thread_event_reporting): Cast result of dlsym to
3731 destination function pointer type.
3732 (thread_db_mourn): Use td_ta_delete_ftype.
3733
af60a1ef
SL
37342015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3735
3736 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3737 arch variant.
3738 (CDX_BREAKPOINT): Define for R2.
3739 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3740 (the_low_target): Add comments.
3741
e8b41681
YQ
37422015-07-30 Yao Qi <yao.qi@linaro.org>
3743
3744 * linux-arm-low.c (arm_hwcap): Remove it.
3745 (arm_read_description): New local variable arm_hwcap. Don't
3746 set arm_hwcap to zero.
3747
89abb039
YQ
37482015-07-30 Yao Qi <yao.qi@linaro.org>
3749
3750 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3751 Use regcache->tdesc instead.
3752 (arm_store_wmmxregset): Likewise.
3753 (arm_fill_vfpregset): Likewise.
3754 (arm_store_vfpregset): Likewise.
3755
deca266c
YQ
37562015-07-30 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-arm-low.c: Include arch/arm.h.
3759 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3760 (arm_store_gregset): Likewise.
3761
aa58a496
SM
37622015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3763
3764 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3765 ptrace's 4th parameter.
3766
50904b25
YQ
37672015-07-27 Yao Qi <yao.qi@linaro.org>
3768
3769 * configure.srv (case aarch64*-*-linux*): Don't set
3770 srv_linux_usrregs.
3771
5826e159
PA
37722015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3773
3774 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3775 sys/ptrace.h.
3776 * linux-arm-low.c: Likewise.
3777 * linux-cris-low.c: Likewise.
3778 * linux-crisv32-low.c: Likewise.
3779 * linux-low.c: Likewise.
3780 * linux-m68k-low.c: Likewise.
3781 * linux-mips-low.c: Likewise.
3782 * linux-nios2-low.c: Likewise.
3783 * linux-s390-low.c: Likewise.
3784 * linux-sparc-low.c: Likewise.
3785 * linux-tic6x-low.c: Likewise.
3786 * linux-tile-low.c: Likewise.
3787 * linux-x86-low.c: Likewise.
3788
54019719
PA
37892015-07-24 Pedro Alves <palves@redhat.com>
3790
3791 * config.in: Regenerate.
3792 * configure: Regenerate.
3793
eb7aa561
PA
37942015-07-24 Pedro Alves <palves@redhat.com>
3795
3796 * acinclude.m4: Include ../ptrace.m4.
3797 * configure.ac: Call GDB_AC_PTRACE.
3798 * config.in, configure: Regenerate.
3799
55d7b841
YQ
38002015-07-24 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-low.c (linux_create_inferior): Remove setting to
3803 proc->priv->new_inferior.
3804 (linux_attach): Likewise.
3805 (linux_low_filter_event): Likewise.
3806 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3807
c06cbd92
YQ
38082015-07-24 Yao Qi <yao.qi@linaro.org>
3809
3810 * linux-low.c (linux_arch_setup): New function.
3811 (linux_low_filter_event): If proc->tdesc is NULL and
3812 proc->attached is true, call the_low_target.arch_setup.
3813 Otherwise, keep status pending, and return.
3814 (linux_resume_one_lwp_throw): Don't call get_pc if
3815 thread->while_stepping isn't NULL. Don't call
3816 get_thread_regcache if proc->tdesc is NULL.
3817 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3818 (linux_target_ops): Install arch_setup.
3819 * server.c (start_inferior): Call the_target->arch_setup.
3820 * target.h (struct target_ops) <arch_setup>: New field.
3821 (target_arch_setup): New marco.
3822 * lynx-low.c (lynx_target_ops): Update.
3823 * nto-low.c (nto_target_ops): Update.
3824 * spu-low.c (spu_target_ops): Update.
3825 * win32-low.c (win32_target_ops): Update.
3826
5ae3ebba
YQ
38272015-07-24 Yao Qi <yao.qi@linaro.org>
3828
3829 * linux-low.c (linux_add_process): Don't set
3830 proc->priv->new_inferior.
3831 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3832 (linux_attach): Likewise.
3833
eb97750b
YQ
38342015-07-24 Yao Qi <yao.qi@linaro.org>
3835
3836 * server.c (start_inferior): Code refactor.
3837
51aee833
YQ
38382015-07-24 Yao Qi <yao.qi@linaro.org>
3839
3840 * server.c (process_serial_event): Set general_thread.
3841
af1b22f3
YQ
38422015-07-21 Yao Qi <yao.qi@linaro.org>
3843
3844 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3845 aarch64_linux_get_debug_reg_capacity.
3846
554717a3
YQ
38472015-07-17 Yao Qi <yao.qi@linaro.org>
3848
3849 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3850 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3851 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3852 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3853 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3854 (AARCH64_HWP_ALIGNMENT): Likewise.
3855 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3856 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3857 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3858 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3859 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3860 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3861 (struct aarch64_debug_reg_state): Likewise.
3862 (struct arch_lwp_info): Likewise.
3863 (aarch64_align_watchpoint): Likewise.
3864 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3865 (aarch64_watchpoint_length): Likewise.
3866 (aarch64_point_encode_ctrl_reg): Likewise
3867 (aarch64_point_is_aligned): Likewise.
3868 (aarch64_align_watchpoint): Likewise.
3869 (aarch64_linux_set_debug_regs):
3870 (aarch64_dr_state_insert_one_point): Likewise.
3871 (aarch64_dr_state_remove_one_point): Likewise.
3872 (aarch64_handle_breakpoint): Likewise.
3873 (aarch64_handle_aligned_watchpoint): Likewise.
3874 (aarch64_handle_unaligned_watchpoint): Likewise.
3875 (aarch64_handle_watchpoint): Likewise.
3876
c67ca4de
YQ
38772015-07-17 Yao Qi <yao.qi@linaro.org>
3878
3879 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3880 and don't aarch64_get_debug_reg_state. All callers update.
3881 (aarch64_handle_aligned_watchpoint): Likewise.
3882 (aarch64_handle_unaligned_watchpoint): Likewise.
3883 (aarch64_handle_watchpoint): Likewise.
3884 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3885 (aarch64_remove_point): Likewise.
3886
25abf979
YQ
38872015-07-17 Yao Qi <yao.qi@linaro.org>
3888
3889 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3890 debug_printf.
3891 (aarch64_handle_unaligned_watchpoint): Likewise.
3892
db1ff28b
JK
38932015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3894
3895 Revert the previous 3 commits:
3896 Move gdb_regex* to common/
3897 Move linux_find_memory_regions_full & co.
3898 gdbserver build-id attribute generator
3899
700ca40f
JK
39002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3901 Jan Kratochvil <jan.kratochvil@redhat.com>
3902
3903 gdbserver build-id attribute generator.
3904 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3905 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3906 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3907 (find_phdr): New.
3908 (get_dynamic): Use find_pdhr to traverse program headers.
3909 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3910 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3911 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3912 (get_hex_build_id): New.
3913 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3914 to reply XML document.
3915
9904185c
JK
39162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3917 Jan Kratochvil <jan.kratochvil@redhat.com>
3918
3919 * target.c: Include target/target-utils.h and fcntl.h.
3920 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3921 (target_fileio_read_stralloc): New functions.
3922
6e5b4429
JK
39232015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3924
3925 * Makefile.in (OBS): Add gdb_regex.o.
3926 (gdb_regex.o): New.
3927 * config.in: Rebuilt.
3928 * configure: Rebuilt.
3929
ddc98fbf
JK
39302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3931 Jan Kratochvil <jan.kratochvil@redhat.com>
3932
3933 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3934 * Makefile.in (OBS): Add target-utils.o.
3935 (linux-maps.o, target-utils.o): New.
3936 * configure.srv (srv_linux_obj): Add linux-maps.o.
3937
e57bb7a0
PL
39382015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3939
3940 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3941 function, return 1.
3942 (the_low_target): Install it.
3943
586b02a9
PA
39442015-07-14 Pedro Alves <palves@redhat.com>
3945
3946 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3947 Instead, ignore ECHILD, and throw an error for other errnos.
3948
58c1b36c
PA
39492015-07-10 Pedro Alves <palves@redhat.com>
3950
3951 * event-loop.c (struct callback_event) <data>: Change type to
3952 gdb_client_data instance instead of gdb_client_data pointer.
3953 (append_callback_event): Adjust.
3954
421530db
PL
39552015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3956
3957 * linux-aarch64-low.c: Add comments for each linux_target_ops
3958 method. Remove comments already covered in target_ops and
3959 linux_target_ops definitions.
3960 (the_low_target): Add comments for each unimplemented method.
3961
c2d65f38
YQ
39622015-07-09 Yao Qi <yao.qi@linaro.org>
3963
3964 * linux-aarch64-low.c (aarch64_regmap): Remove.
3965 (aarch64_usrregs_info): Remove.
3966 (regs_info): Set field usrregs to NULL.
3967
b20a6524
MM
39682015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3969
3970 * linux-low.c: Include "rsp-low.h"
3971 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3972 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3973 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3974 (handle_btrace_enable_pt): New.
3975 (handle_btrace_general_set): Support "pt".
3976 (handle_btrace_conf_general_set): Support "pt:size".
3977
96c97461
PL
39782015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3979
3980 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3981 Z_PACKET_SW_BP.
3982
37d66942
PL
39832015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3984
3985 * linux-aarch64-low.c: Remove comment about endianness.
3986 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3987 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3988 memcmp.
3989
dc06243f
GB
39902015-06-24 Gary Benson <gbenson@redhat.com>
3991
3992 * linux-i386-ipa.c (stdint.h): Do not include.
3993 * lynx-i386-low.c (stdint.h): Likewise.
3994 * lynx-ppc-low.c (stdint.h): Likewise.
3995 * mem-break.c (stdint.h): Likewise.
3996 * thread-db.c (stdint.h): Likewise.
3997 * tracepoint.c (stdint.h): Likewise.
3998 * win32-low.c (stdint.h): Likewise.
3999
124e13d9
SM
40002015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4001
4002 * server.c (write_qxfer_response): Update call to
4003 remote_escape_output.
4004
909c2cda
JK
40052015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4006 Jan Kratochvil <jan.kratochvil@redhat.com>
4007
4008 Merge multiple hex conversions.
4009 * gdbreplay.c (tohex): Rename to 'fromhex'.
4010 (logchar): Use fromhex.
4011
24c05f46
JK
40122015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4013
4014 * server.c (handle_qxfer_libraries): Set `version' attribute for
4015 <library-list>.
4016
14d2069a
GB
40172015-06-10 Gary Benson <gbenson@redhat.com>
4018
4019 * target.h (struct target_ops) <multifs_open>: New field.
4020 <multifs_unlink>: Likewise.
4021 <multifs_readlink>: Likewise.
4022 * linux-low.c (nat/linux-namespaces.h): New include.
4023 (linux_target_ops): Initialize the_target->multifs_open,
4024 the_target->multifs_unlink and the_target->multifs_readlink.
4025 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4026 * hostio.c (hostio_fs_pid): New static variable.
4027 (hostio_handle_new_gdb_connection): New function.
4028 (handle_setfs): Likewise.
4029 (handle_open): Use the_target->multifs_open as appropriate.
4030 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4031 (handle_readlink): Use the_target->multifs_readlink as
4032 appropriate.
4033 (handle_vFile): Handle vFile:setfs packets.
4034 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4035 after target_handle_new_gdb_connection.
4036
4b8b5e72
GB
40372015-06-10 Gary Benson <gbenson@redhat.com>
4038
4039 * configure.ac (AC_CHECK_FUNCS): Add setns.
4040 * config.in: Regenerate.
4041 * configure: Likewise.
4042 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4043 (linux-namespaces.o): New rule.
4044 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4045
3ac2e371
GB
40462015-06-09 Gary Benson <gbenson@redhat.com>
4047
4048 * hostio.c (handle_open): Process mode argument with
4049 fileio_to_host_mode.
4050
ca9b78ce
YQ
40512015-06-01 Yao Qi <yao.qi@linaro.org>
4052
4053 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4054 * linux-x86-low.c: Likewise.
4055
bfacd19d
DB
40562015-05-28 Don Breazeal <donb@codesourcery.com>
4057
4058 * linux-low.c (handle_extended_wait): Initialize
4059 thread_info.last_resume_kind for new fork children.
4060
452003ef
PA
40612015-05-15 Pedro Alves <palves@redhat.com>
4062
4063 * target.h (target_handle_new_gdb_connection): Rewrite using if
4064 wrapped in do/while.
4065
1041a03c
JB
40662015-05-14 Joel Brobecker <brobecker@adacore.com>
4067
4068 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4069 * configure, config.in: Regenerate.
4070 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4071 Declare typedef.
4072
c269dbdb
DB
40732015-05-12 Don Breazeal <donb@codesourcery.com>
4074
4075 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4076 PTRACE_EVENT_VFORK_DONE.
4077 (linux_low_ptrace_options, extended_event_reported): Add vfork
4078 events.
4079 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4080 and "vforkdone" for RSP 'T' Stop Reply Packet.
4081 * server.h (report_vfork_events): Declare
4082 global variable.
4083
3a8a0396
DB
40842015-05-12 Don Breazeal <donb@codesourcery.com>
4085
4086 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4087 (the_low_target) <new_fork>: Initialize new member.
4088 * linux-arm-low.c (arm_new_fork): New function.
4089 (the_low_target) <new_fork>: Initialize new member.
4090 * linux-low.c (handle_extended_wait): Call new target function
4091 new_fork.
4092 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4093 * linux-mips-low.c (mips_add_watchpoint): New function
4094 extracted from mips_insert_point.
4095 (the_low_target) <new_fork>: Initialize new member.
4096 (mips_linux_new_fork): New function.
4097 (mips_insert_point): Call mips_add_watchpoint.
4098 * linux-x86-low.c (x86_linux_new_fork): New function.
4099 (the_low_target) <new_fork>: Initialize new member.
4100
de0d863e
DB
41012015-05-12 Don Breazeal <donb@codesourcery.com>
4102
4103 * linux-low.c (handle_extended_wait): Implement return value,
4104 rename argument 'event_child' to 'event_lwp', handle
4105 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4106 (linux_low_ptrace_options): New function.
4107 (linux_low_filter_event): Call linux_low_ptrace_options,
4108 use different argument fo linux_enable_event_reporting,
4109 use return value from handle_extended_wait.
4110 (extended_event_reported): New function.
4111 (linux_wait_1): Call extended_event_reported and set
4112 status to report fork events.
4113 (linux_write_memory): Add pid to debug message.
4114 (reset_lwp_ptrace_options_callback): New function.
4115 (linux_handle_new_gdb_connection): New function.
4116 (linux_target_ops): Initialize new structure member.
4117 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4118 * lynx-low.c: Initialize new structure member.
4119 * remote-utils.c (prepare_resume_reply): Implement stop reason
4120 "fork" for "T" stop message.
4121 * server.c (handle_query): Call handle_new_gdb_connection.
4122 * server.h (report_fork_events): Declare global flag.
4123 * target.h (struct target_ops) <handle_new_gdb_connection>:
4124 New member.
4125 (target_handle_new_gdb_connection): New macro.
4126 * win32-low.c: Initialize new structure member.
4127
ddcbc397
DB
41282015-05-12 Don Breazeal <donb@codesourcery.com>
4129
4130 * mem-break.c (APPEND_TO_LIST): Define macro.
4131 (clone_agent_expr): New function.
4132 (clone_one_breakpoint): New function.
4133 (clone_all_breakpoints): New function.
4134 * mem-break.h: Declare new functions.
4135
89245bc0
DB
41362015-05-12 Don Breazeal <donb@codesourcery.com>
4137
4138 * linux-low.c (linux_supports_fork_events): New function.
4139 (linux_supports_vfork_events): New function.
4140 (linux_target_ops): Initialize new structure members.
4141 (initialize_low): Call linux_check_ptrace_features.
4142 * lynx-low.c (lynx_target_ops): Initialize new structure
4143 members.
4144 * server.c (report_fork_events, report_vfork_events):
4145 New global flags.
4146 (handle_query): Add new features to qSupported packet and
4147 response.
4148 (captured_main): Initialize new global variables.
4149 * target.h (struct target_ops) <supports_fork_events>:
4150 New member.
4151 <supports_vfork_events>: New member.
4152 (target_supports_fork_events): New macro.
4153 (target_supports_vfork_events): New macro.
4154 * win32-low.c (win32_target_ops): Initialize new structure
4155 members.
4156
835205d0
GB
41572015-05-12 Gary Benson <gbenson@redhat.com>
4158
4159 * server.c (handle_qxfer_exec_file): Use current process
4160 if annex is empty.
4161
21e94bd9
SL
41622015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4163
4164 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4165 Remove HAVE_PTRACE_GETREGS conditionals.
4166 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4167 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4168
45614f15
YQ
41692015-05-08 Yao Qi <yao.qi@linaro.org>
4170
4171 * linux-low.c (linux_supports_conditional_breakpoints): New
4172 function.
4173 (linux_target_ops): Install new target method.
4174 * lynx-low.c (lynx_target_ops): Install NULL hook for
4175 supports_conditional_breakpoints.
4176 * nto-low.c (nto_target_ops): Likewise.
4177 * spu-low.c (spu_target_ops): Likewise.
4178 * win32-low.c (win32_target_ops): Likewise.
4179 * server.c (handle_query): Check
4180 target_supports_conditional_breakpoints.
4181 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4182 New field.
4183 (target_supports_conditional_breakpoints): New macro.
4184
80ad801e
PA
41852015-05-06 Pedro Alves <palves@redhat.com>
4186
4187 PR server/18081
4188 * server.c (start_inferior): If the process exits, mourn it.
4189
819843c7
GB
41902015-04-21 Gary Benson <gbenson@redhat.com>
4191
4192 * hostio.c (fileio_open_flags_to_host): Factored out to
4193 fileio_to_host_openflags in common/fileio.c. Single use
4194 updated.
4195
a2d5a9d7
MF
41962015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4197
4198 * linux-xtensa-low.c (xtensa_fill_gregset)
4199 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4200 XCHAL_HAVE_LOOP.
4201
deb44829
MF
42022015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4203
4204 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4205 (regs_info): Replace usrregs pointer with NULL.
4206
e57f1de3
GB
42072015-04-17 Gary Benson <gbenson@redhat.com>
4208
4209 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4210 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4211 * server.c (handle_qxfer_exec_file): New function.
4212 (qxfer_packets): Add exec-file entry.
4213 (handle_query): Report qXfer:exec-file:read as supported packet.
4214
62828379
RN
42152015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4216
4217 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4218
b88bb450
GB
42192015-04-09 Gary Benson <gbenson@redhat.com>
4220
4221 * hostio-errno.c (errno_to_fileio_error): Remove function.
4222 Update caller to use remote_fileio_to_fio_error.
4223
c8f4bfdd
YQ
42242015-04-09 Yao Qi <yao.qi@linaro.org>
4225
4226 * linux-low.c (linux_insert_point): Call
4227 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4228 (linux_remove_point): Call remove_memory_breakpoint if type is
4229 raw_bkpt_type_sw.
4230 * linux-x86-low.c (x86_insert_point): Don't call
4231 insert_memory_breakpoint.
4232 (x86_remove_point): Don't call remove_memory_breakpoint.
4233
41f98f02
PA
42342015-04-01 Pedro Alves <palves@redhat.com>
4235 Cleber Rosa <crosa@redhat.com>
4236
4237 * server.c (gdbserver_usage): Reorganize and extend the usage
4238 message.
4239
2bf6fb9d
PA
42402015-03-24 Pedro Alves <palves@redhat.com>
4241
4242 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4243 output. Also dump TRAP_TRACE.
4244 (linux_low_filter_event): In debug output, distinguish a
4245 resume_stop SIGSTOP from a delayed SIGSTOP.
4246
369f6daa
GB
42472015-03-24 Gary Benson <gbenson@redhat.com>
4248
4249 * linux-x86-low.c (x86_linux_new_thread): Moved to
4250 nat/x86-linux.c.
4251 (x86_linux_prepare_to_resume): Likewise.
4252
8e5d4070
GB
42532015-03-24 Gary Benson <gbenson@redhat.com>
4254
4255 * Makefile.in (x86-linux-dregs.o): New rule.
4256 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4257 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4258 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4259 (x86_linux_dr_get): Likewise.
4260 (x86_linux_dr_set): Likewise.
4261 (update_debug_registers_callback): Likewise.
4262 (x86_linux_dr_set_addr): Likewise.
4263 (x86_linux_dr_get_addr): Likewise.
4264 (x86_linux_dr_set_control): Likewise.
4265 (x86_linux_dr_get_control): Likewise.
4266 (x86_linux_dr_get_status): Likewise.
4267 (x86_linux_update_debug_registers): Likewise.
4268
2b95d440
GB
42692015-03-24 Gary Benson <gbenson@redhat.com>
4270
4271 * linux-x86-low.c (x86_linux_update_debug_registers):
4272 New function, factored out from...
4273 (x86_linux_prepare_to_resume): ...this.
4274
14b0bc68
GB
42752015-03-24 Gary Benson <gbenson@redhat.com>
4276
4277 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4278 (x86_linux_dr_set): Likewise.
4279 (update_debug_registers_callback): Likewise.
4280 (x86_linux_dr_set_addr): Likewise.
4281 (x86_linux_dr_get_addr): Likewise.
4282 (x86_linux_dr_set_control): Likewise.
4283 (x86_linux_dr_get_control): Likewise.
4284 (x86_linux_dr_get_status): Likewise.
4285 (x86_linux_prepare_to_resume): Likewise.
4286
5dfe6ca8
GB
42872015-03-24 Gary Benson <gbenson@redhat.com>
4288
4289 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4290 Use perror_with_name. Pass string through gettext.
4291 (x86_linux_dr_set): Likewise.
4292
d33472ad
GB
42932015-03-24 Gary Benson <gbenson@redhat.com>
4294
4295 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4296 (x86_linux_dr_set_addr): ...this.
4297 (x86_dr_low_get_addr): Rename to...
4298 (x86_linux_dr_get_addr): ...this.
4299 (x86_dr_low_set_control): Rename to...
4300 (x86_linux_dr_set_control): ...this.
4301 (x86_dr_low_get_control): Rename to...
4302 (x86_linux_dr_get_control): ...this.
4303 (x86_dr_low_get_status): Rename to...
4304 (x86_linux_dr_get_status): ...this.
4305 (x86_dr_low): Update with new function names.
4306
4b134ca1
GB
43072015-03-24 Gary Benson <gbenson@redhat.com>
4308
4309 * Makefile.in (x86-linux.o): New rule.
4310 * configure.srv: Add x86-linux.o to relevant targets.
4311 * linux-low.c (lwp_set_arch_private_info): New function.
4312 (lwp_arch_private_info): Likewise.
4313 * linux-x86-low.c: Include nat/x86-linux.h.
4314 (arch_lwp_info): Removed structure.
4315 (update_debug_registers_callback):
4316 Use lwp_set_debug_registers_changed.
4317 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4318 and lwp_set_debug_registers_changed.
4319 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4320
34c703da
GB
43212015-03-24 Gary Benson <gbenson@redhat.com>
4322
4323 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4324 * linux-arm-low.c (arm_new_thread): Likewise.
4325 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4326 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4327 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4328 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4329
cff068da
GB
43302015-03-24 Gary Benson <gbenson@redhat.com>
4331
4332 * linux-low.c (ptid_of_lwp): New function.
4333 (lwp_is_stopped): Likewise.
4334 (lwp_stop_reason): Likewise.
4335 * linux-x86-low.c (update_debug_registers_callback):
4336 Use lwp_is_stopped.
4337 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4338 lwp_stop_reason.
4339
b2f7c7e8
GB
43402015-03-24 Gary Benson <gbenson@redhat.com>
4341
4342 * linux-low.h (linux_stop_lwp): Remove declaration.
4343
6d4ee8c6
GB
43442015-03-24 Gary Benson <gbenson@redhat.com>
4345
4346 * linux-low.h: Include nat/linux-nat.h.
4347 * linux-low.c (iterate_over_lwps_args): New structure.
4348 (iterate_over_lwps_filter): New function.
4349 (iterate_over_lwps): Likewise.
4350 * linux-x86-low.c (update_debug_registers_callback):
4351 Update signature to what iterate_over_lwps expects.
4352 Remove PID check that iterate_over_lwps now performs.
4353 (x86_dr_low_set_addr): Use iterate_over_lwps.
4354 (x86_dr_low_set_control): Likewise.
4355
70a0bb6b
GB
43562015-03-24 Gary Benson <gbenson@redhat.com>
4357
4358 * linux-x86-low.c (x86_debug_reg_state): New function.
4359 (x86_linux_prepare_to_resume): Use the above.
4360
7b669087
GB
43612015-03-24 Gary Benson <gbenson@redhat.com>
4362
4363 * linux-low.c (current_lwp_ptid): New function.
4364 * linux-x86-low.c: Include nat/linux-nat.h.
4365 (x86_dr_low_get_addr): Use current_lwp_ptid.
4366 (x86_dr_low_get_control): Likewise.
4367 (x86_dr_low_get_status): Likewise.
4368
eef49a3d
PA
43692015-03-20 Pedro Alves <palves@redhat.com>
4370
4371 * tracepoint.c (cmd_qtstatus): Make "str" const.
4372
b2333d22
PA
43732015-03-20 Pedro Alves <palves@redhat.com>
4374
4375 * server.c (handle_general_set): Make "req_str" const.
4376
23f238d3
PA
43772015-03-19 Pedro Alves <palves@redhat.com>
4378
4379 * linux-low.c (linux_resume_one_lwp): Rename to ...
4380 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4381 instead call perror_with_name.
4382 (check_ptrace_stopped_lwp_gone): New function.
4383 (linux_resume_one_lwp): Reimplement as wrapper around
4384 linux_resume_one_lwp_throw that swallows errors if the LWP is
4385 gone.
4386
91baf43f
PA
43872015-03-19 Pedro Alves <palves@redhat.com>
4388
4389 * linux-low.c (count_events_callback, select_event_lwp_callback):
4390 No longer check whether the thread has resume_stop as last resume
4391 kind.
4392
8bf3b159
PA
43932015-03-19 Pedro Alves <palves@redhat.com>
4394
4395 * linux-low.c (count_events_callback, select_event_lwp_callback):
4396 Use the lwp's status_pending_p field, not the thread's.
4397
b90fc188
PA
43982015-03-19 Pedro Alves <palves@redhat.com>
4399
4400 * linux-low.c (select_event_lwp_callback): Update comments to
4401 no longer mention SIGTRAP.
4402
464b0089
GB
44032015-03-18 Gary Benson <gbenson@redhat.com>
4404
4405 * server.c (handle_query): Do not report vFile:fstat as supported.
4406
aa9e327f
GB
44072015-03-11 Gary Benson <gbenson@redhat.com>
4408
4409 * hostio.c (sys/types.h): New include.
4410 (sys/stat.h): Likewise.
4411 (common-remote-fileio.h): Likewise.
4412 (handle_fstat): New function.
4413 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4414
791c0056
GB
44152015-03-11 Gary Benson <gbenson@redhat.com>
4416
4417 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4418 struct stat.st_blocks and struct stat.st_blksize.
4419 * configure: Regenerate.
4420 * config.in: Likewise.
4421 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4422 (OBS): Add common-remote-fileio.o.
4423 (common-remote-fileio.o): New rule.
4424
9a9df970
PA
44252015-03-09 Pedro Alves <palves@redhat.com>
4426
4427 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4428 'struct sockaddr' pointer in 'accept' call.
4429
9eb1356e
PA
44302015-03-09 Pedro Alves <palves@redhat.com>
4431
4432 Revert:
4433 2015-03-07 Pedro Alves <palves@redhat.com>
4434 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4435 or <winsock2.h> here. Instead include "gdb_socket.h".
4436 (remote_open): Use union gdb_sockaddr_u.
4437 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4438 or <winsock2.h> here. Instead include "gdb_socket.h".
4439 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4440 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4441 or <sys/un.h>.
4442 (init_named_socket, gdb_agent_helper_thread): Use union
4443 gdb_sockaddr_u.
4444
aac331e4
PA
44452015-03-07 Pedro Alves <palves@redhat.com>
4446
4447 * configure.ac (build_warnings): Move
4448 -Wdeclaration-after-statement to the C-specific set.
4449 * configure: Regenerate.
4450
366c75fc
PA
44512015-03-07 Pedro Alves <palves@redhat.com>
4452
4453 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4454 or <winsock2.h> here. Instead include "gdb_socket.h".
4455 (remote_open): Use union gdb_sockaddr_u.
4456 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4457 or <winsock2.h> here. Instead include "gdb_socket.h".
4458 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4459 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4460 or <sys/un.h>.
4461 (init_named_socket, gdb_agent_helper_thread): Use union
4462 gdb_sockaddr_u.
4463
492d29ea
PA
44642015-03-07 Pedro Alves <palves@redhat.com>
4465
4466 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4467 instead.
4468
60a191ed
YQ
44692015-03-06 Yao Qi <yao.qi@linaro.org>
4470
4471 * linux-aarch64-low.c (aarch64_insert_point): Use
4472 show_debug_regs as a boolean.
4473 (aarch64_remove_point): Likewise.
4474
f5771b1d
PA
44752015-03-05 Pedro Alves <palves@redhat.com>
4476
4477 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4478 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4479 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4480 * nto-low.c (nto_target_ops): Likewise.
4481 * spu-low.c (spu_target_ops): Likewise.
4482 * win32-low.c (win32_target_ops): Likewise.
4483
3e572f71
PA
44842015-03-04 Pedro Alves <palves@redhat.com>
4485
72f4393d 4486 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4487 Decide whether a breakpoint triggered based on the SIGTRAP's
4488 siginfo.si_code.
72f4393d
L
4489 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4490 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4491 (linux_low_filter_event): Check for breakpoints before checking
4492 watchpoints.
4493 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4494 siginfo.si_code.
72f4393d
L
4495 (linux_stopped_by_sw_breakpoint)
4496 (linux_supports_stopped_by_sw_breakpoint)
4497 (linux_stopped_by_hw_breakpoint)
4498 (linux_supports_stopped_by_hw_breakpoint): New functions.
4499 (linux_target_ops): Install new target methods.
3e572f71 4500
1ec68e26
PA
45012015-03-04 Pedro Alves <palves@redhat.com>
4502
4503 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4504 * server.c (swbreak_feature, hwbreak_feature): New globals.
4505 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4506 (captured_main): Clear swbreak_feature and hwbreak_feature.
4507 * server.h (swbreak_feature, hwbreak_feature): Declare.
4508 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4509 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4510 supports_stopped_by_hw_breakpoint>: New fields.
4511 (target_supports_stopped_by_sw_breakpoint)
4512 (target_stopped_by_sw_breakpoint)
4513 (target_supports_stopped_by_hw_breakpoint)
4514 (target_stopped_by_hw_breakpoint): Declare.
4515
15c66dd6
PA
45162015-03-04 Pedro Alves <palves@redhat.com>
4517
4518 enum lwp_stop_reason -> enum target_stop_reason
4519 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4520 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4521 (linux_wait_1, stuck_in_jump_pad_callback)
4522 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4523 (linux_stopped_by_watchpoint):
4524 * linux-low.h (enum lwp_stop_reason): Delete.
4525 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4526 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4527
98fc70d6
YQ
45282015-03-04 Yao Qi <yao.qi@linaro.org>
4529
4530 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4531
dd2ac174
GB
45322015-03-03 Gary Benson <gbenson@redhat.com>
4533
4534 * hostio.c (handle_vFile): Fix prefix lengths.
4535
d68e53f4
MM
45362015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4537
4538 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4539 ptr_bits.
4540
bf2d68ab
AA
45412015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4542
4543 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4544 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4545 (clean): Add "rm -f" for above C files.
4546 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4547 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4548 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4549 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4550 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4551 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4552 (init_registers_s390x_vx_linux64)
4553 (init_registers_s390x_tevx_linux64)
4554 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4555 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4556 declarations.
4557 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4558 (s390_store_vxrs_high): New functions.
4559 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4560 NT_S390_VXRS_HIGH.
4561 (s390_arch_setup): Add logic for selecting one of the new target
4562 descriptions. Activate the new vector regsets if applicable.
4563 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4564 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4565 and init_registers_s390x_tevx_linux64.
4566
c966a859
PA
45672015-03-01 Pedro Alves <palves@redhat.com>
4568
4569 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4570 parameter.
4571
4180215b
PA
45722015-02-27 Pedro Alves <palves@redhat.com>
4573
4574 * linux-x86-low.c (u_debugreg_offset): New function.
4575 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4576
749bab01
PA
45772015-02-27 Pedro Alves <palves@redhat.com>
4578
4579 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4580 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4581 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4582 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4583 (ps_lsetfpregs, ps_getpid)
4584 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4585 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4586 (ps_lsetxregs, ps_plog): Declare.
4587
3c14e5a3
PA
45882015-02-27 Pedro Alves <palves@redhat.com>
4589
4590 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4591 IP_AGENT_EXPORT_FUNC.
4592 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4593 IP_AGENT_EXPORT_FUNC.
4594 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4595 (IP_AGENT_EXPORT): Delete.
4596 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4597 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4598 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4599 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4600 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4601 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4602 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4603 (traceframe_read_count, traceframe_write_count)
4604 (traceframes_created, trace_state_variables, get_raw_reg)
4605 (get_trace_state_variable_value, set_trace_state_variable_value)
4606 (ust_loaded, helper_thread_id, cmd_buf): Use
4607 IPA_SYM_EXPORTED_NAME.
4608 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4609 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4610 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4611 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4612 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4613 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4614 EXTERN_C_PUSH/EXTERN_C_POP.
4615 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4616 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4617 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4618 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4619 (traceframe_write_count, traceframe_read_count)
4620 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4621 (about_to_request_buffer_space, get_trace_state_variable_value)
4622 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4623 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4624 EXTERN_C_PUSH/EXTERN_C_POP.
4625 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4626 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4627 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4628 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4629 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4630 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4631 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4632 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4633 Define.
4634 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4635 (IP_AGENT_EXPORT_VAR_DECL): Define.
4636 (tracing): Declare.
4637 (gdb_agent_get_raw_reg): Declare.
4638
fe978cb0
PA
46392015-02-27 Tom Tromey <tromey@redhat.com>
4640 Pedro Alves <palves@redhat.com>
4641
4642 Rename symbols whose names are reserved C++ keywords throughout.
4643
3bc3d82a
PA
46442015-02-27 Pedro Alves <palves@redhat.com>
4645
4646 * Makefile.in (COMPILER): New, get it from autoconf.
4647 (CXX): Get from autoconf instead.
4648 (COMPILE.pre): Use COMPILER.
4649 (CC-LD): Rename to ...
4650 (CC_LD): ... this. Use COMPILER.
4651 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4652 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4653 * acinclude.m4: Include build-with-cxx.m4.
4654 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4655 Disable -Werror by default if building in C++ mode.
4656 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4657 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4658 the C++ compiler. Save/restore CXXFLAGS too.
4659 * configure: Regenerate.
4660
07697489
PA
46612015-02-27 Pedro Alves <palves@redhat.com>
4662
4663 * acinclude.m4: Include libiberty.m4.
4664 * configure.ac: Call libiberty_INIT.
4665 * config.in, configure: Regenerate.
4666
9beb7c4e
PA
46672015-02-26 Pedro Alves <palves@redhat.com>
4668
4669 * linux-low.c (linux_wait_1): When incrementing the PC past a
4670 program breakpoint always use the_low_target.breakpoint_len as
4671 increment, rather than the maximum between that and
4672 the_low_target.decr_pc_after_break.
4673
8090aef2
PA
46742015-02-23 Pedro Alves <palves@redhat.com>
4675
4676 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4677 thread was doing a step-over; always adjust the PC if
4678 we stepped over a permanent breakpoint.
4679 (linux_wait_1): If we stepped over breakpoint that was on top of a
4680 permanent breakpoint, manually advance the PC past it.
4681
bc9540e8
PA
46822015-02-23 Pedro Alves <palves@redhat.com>
4683
4684 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4685 modes.
4686 (x86_fill_gregset, x86_store_gregset): Use it when handling
4687 $orig_eax.
4688
2db9a427
PA
46892015-02-20 Pedro Alves <palves@redhat.com>
4690
4691 * thread-db.c: Include "nat/linux-procfs.h".
4692 (thread_db_init): Skip listing new threads if the kernel supports
4693 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4694
afa8d396
PA
46952015-02-20 Pedro Alves <palves@redhat.com>
4696
4697 * linux-low.c (status_pending_p_callback): Use ptid_match.
4698
c9587f88
AT
46992015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4700
4701 PR breakpoints/16812
4702 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4703 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4704 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4705
b05ec7a5
AT
47062015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4707
4708 PR breakpoints/15956
4709 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4710
d33501a5
MM
47112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4712
4713 * linux-low.c (linux_low_btrace_conf): Print size.
4714 * server.c (handle_btrace_conf_general_set): New.
4715 (hanle_general_set): Call handle_btrace_conf_general_set.
4716 (handle_query): Report Qbtrace-conf:bts:size as supported.
4717
f4abbc16
MM
47182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4719
4720 * linux-low.c (linux_low_enable_btrace): Update parameters.
4721 (linux_low_btrace_conf): New.
4722 (linux_target_ops)<to_btrace_conf>: Initialize.
4723 * server.c (current_btrace_conf): New.
4724 (handle_btrace_enable): Rename to ...
4725 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4726 to target_enable_btrace. Update comment. Update users.
4727 (handle_qxfer_btrace_conf): New.
4728 (qxfer_packets): Add btrace-conf entry.
4729 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4730 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4731 (target_ops)<read_btrace_conf>: New.
4732 (target_enable_btrace): Update parameters.
4733 (target_read_btrace_conf): New.
4734
043c3577
MM
47352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4736
4737 * server.c (handle_btrace_general_set): Remove call to
4738 target_supports_btrace.
4739 (supported_btrace_packets): New.
4740 (handle_query): Call supported_btrace_packets.
4741 * target.h: include btrace-common.h.
4742 (btrace_target_info): Removed.
4743 (supports_btrace, target_supports_btrace): Update parameters.
4744
734b0e4b
MM
47452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4746
4747 * Makefile.in (SFILES): Add common/btrace-common.c.
4748 (OBS): Add common/btrace-common.o.
4749 (btrace-common.o): Add build rules.
4750 * linux-low: Include btrace-common.h.
4751 (linux_low_read_btrace): Use struct btrace_data. Call
4752 btrace_data_init and btrace_data_fini.
4753
d6c146e9
PA
47542015-02-06 Pedro Alves <palves@redhat.com>
4755
4756 * thread-db.c (find_new_threads_callback): Add debug output.
4757
20ba1ce6
PA
47582015-02-04 Pedro Alves <palves@redhat.com>
4759
4760 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4761 (resume_stopped_resumed_lwps): New function.
4762 (linux_wait_for_event_filtered): Use it.
4763
8cc73a39
SDJ
47642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4765
4766 * Makefile.in (SFILES): Add linux-personality.c.
4767 (linux-personality.o): New rule.
4768 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4769 list of objects to be built.
4770 * linux-low.c: Include nat/linux-personality.h.
4771 (linux_create_inferior): Remove code to disable address space
4772 randomization (moved to ../nat/linux-personality.c). Create
4773 cleanup to disable address space randomization.
4774
fb23d554
SDJ
47752015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4776
4777 * Makefile.in (posix-strerror.o): New rule.
4778 (mingw-strerror.o): Likewise.
4779 * configure: Regenerated.
4780 * configure.ac: Source file ../common/common.host. Initialize new
4781 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4782
cdf43629
YQ
47832015-01-14 Yao Qi <yao@codesourcery.com>
4784
4785 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4786 (ppc-linux.o): New rule.
4787 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4788 * configure.ac: AC_CHECK_FUNCS(getauxval).
4789 * config.in: Re-generated.
4790 * configure: Re-generated.
4791 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4792 ppc64_64bit_inferior_p
4793
514c5338
YQ
47942015-01-14 Yao Qi <yao@codesourcery.com>
4795
4796 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4797 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4798 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4799 (PT_ORIG_R3, PT_TRAP): Likewise.
4800 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4801 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4802 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4803
3368c1e5
JB
48042015-01-10 Joel Brobecker <brobecker@adacore.com>
4805
4806 * i387-fp.c (i387_cache_to_xsave): In look over
4807 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4808 zmmh_low_space field by use of zmmh_high_space.
4809
582511be
PA
48102015-01-09 Pedro Alves <palves@redhat.com>
4811
4812 * linux-low.c (step_over_bkpt): Move higher up in the file.
4813 (handle_extended_wait): Don't store the stop_pc here.
4814 (get_stop_pc): Adjust comments and rename to ...
4815 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4816 stopped for a software breakpoint or hardware breakpoint.
4817 (thread_still_has_status_pending_p): New function.
4818 (status_pending_p_callback): Use
4819 thread_still_has_status_pending_p. If the event is no longer
4820 interesting, resume the LWP.
4821 (handle_tracepoints): Add assert.
4822 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4823 (wstatus_maybe_breakpoint): New function.
4824 (cancel_breakpoint): Delete function.
4825 (check_stopped_by_watchpoint): New function, factored out from
4826 linux_low_filter_event.
4827 (lp_status_maybe_breakpoint): Delete function.
4828 (linux_low_filter_event): Remove filter_ptid argument.
4829 Leave thread group exits pending here. Store the LWP's stop PC.
4830 Always leave events pending.
4831 (linux_wait_for_event_filtered): Pull all events out of the
4832 kernel, and leave them all pending.
4833 (count_events_callback, select_event_lwp_callback): Consider all
4834 events.
4835 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4836 (select_event_lwp): Only give preference to the stepping LWP in
4837 all-stop mode. Adjust comments.
4838 (ignore_event): New function.
4839 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4840 references to cancel_breakpoints. Adjust to renames. Also give
4841 equal priority to all LWPs that have had events in non-stop mode.
4842 If reporting a software breakpoint event, unadjust the LWP's PC.
4843 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4844 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4845 Adjust.
4846 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4847 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4848 (linux_stopped_by_watchpoint): Adjust.
4849 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4850 * linux-low.h (enum lwp_stop_reason): New.
4851 (struct lwp_info) <stop_pc>: Adjust comment.
4852 <stopped_by_watchpoint>: Delete field.
4853 <stop_reason>: New field.
4854 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4855 * mem-break.c (software_breakpoint_inserted_here)
4856 (hardware_breakpoint_inserted_here): New function.
4857 * mem-break.h (software_breakpoint_inserted_here)
4858 (hardware_breakpoint_inserted_here): Declare.
4859 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4860 (cancel_breakpoints): Delete.
4861 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4862 (upload_fast_traceframes): Remove references to
4863 cancel_breakpoints.
4864
a33e3959
PA
48652015-01-09 Pedro Alves <palves@redhat.com>
4866
4867 * thread-db.c (find_new_threads_callback): Ignore thread if the
4868 kernel thread ID is -1.
4869
8784d563
PA
48702015-01-09 Pedro Alves <palves@redhat.com>
4871
4872 * linux-low.c (linux_attach_fail_reason_string): Move to
4873 nat/linux-ptrace.c, and rename.
4874 (linux_attach_lwp): Update comment.
4875 (attach_proc_task_lwp_callback): New function.
4876 (linux_attach): Adjust to rename and use
4877 linux_proc_attach_tgid_threads.
4878 (linux_attach_fail_reason_string): Delete declaration.
4879
76f2b779
JB
48802015-01-01 Joel Brobecker <brobecker@adacore.com>
4881
4882 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4883 * server.c (gdbserver_version): Likewise.
4884
fafcc06a
SDJ
48852014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4886
4887 * remote-utils.c: Include ctype.h.
4888 (input_interrupt): Explicitly handle the case when the char
4889 received is the NUL byte. Improve the printing of non-ASCII
4890 characters.
4891
beed38b8
JB
48922014-12-16 Joel Brobecker <brobecker@adacore.com>
4893
4894 * linux-low.c (linux_low_filter_event): Update call to
4895 linux_enable_event_reporting following the addition of
4896 a new parameter to that function.
4897
bf330350
CU
48982014-12-16 Catalin Udma <catalin.udma@freescale.com>
4899
4900 PR server/17457
4901 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4902 (AARCH64_FPCR_REGNO): Likewise.
4903 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4904 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4905 (aarch64_store_fpregset): Likewise.
4906
5227d625
JB
49072014-12-15 Joel Brobecker <brobecker@adacore.com>
4908
4909 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4910 Remove FIXME comment about assumption about N.
4911
f93b65a0
JB
49122014-12-13 Joel Brobecker <brobecker@adacore.com>
4913
4914 * configure.ac: If large-file support is disabled in GDBserver,
4915 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4916 * configure: Regenerate.
4917
e5a9158d
AA
49182014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4919
4920 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4921 warning upon ENODATA from ptrace.
4922 * linux-s390-low.c (s390_store_tdb): New.
4923 (s390_regsets): Add regset for NT_S390_TDB.
4924
feea5f36
AA
49252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4926
4927 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4928 without a fill_function.
4929 * linux-s390-low.c (s390_fill_last_break): Remove.
4930 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4931 (s390_arch_setup): Use regset's size instead of fill_function for
4932 loop end condition.
4933
098dbe61
AA
49342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4935
4936 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4937 the regset's store function when ptrace returned an error.
4938 * regcache.c (get_thread_regcache): Invalidate register cache
4939 before fetching inferior's registers.
4940
28eef672
AA
49412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4942
4943 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4944 while-loop as for-loop.
4945 (regsets_store_inferior_registers): Likewise.
4946
bdca27a2
YQ
49472014-11-28 Yao Qi <yao@codesourcery.com>
4948
4949 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4950 * config.in, configure: Re-generate.
4951 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4952 is defined.
4953
9c232dda
YQ
49542014-11-21 Yao Qi <yao@codesourcery.com>
4955
4956 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4957 (AC_CHECK_HEADERS): Remove malloc.h.
4958 * configure: Re-generated.
4959 * config.in: Re-generated.
4960 * server.h: Don't include alloca.h and malloc.h.
4961 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4962 Don't include malloc.h.
4963
43968415
JB
49642014-11-17 Joel Brobecker <brobecker@adacore.com>
4965
4966 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4967 corresponding ERRNO check in same block.
4968
40e91bc7
PA
49692014-11-12 Pedro Alves <palves@redhat.com>
4970
4971 * server.c (cont_thread): Update comment.
4972 (start_inferior, attach_inferior): No longer clear cont_thread.
4973 (handle_v_cont): No longer set cont_thread.
4974 (captured_main): Clear cont_thread each time a GDB connects.
4975
c2c118cf
PA
49762014-11-12 Pedro Alves <palves@redhat.com>
4977
4978 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4979 thread, and don't resume all threads if the Hc thread has exited.
4980
78708b7c
PA
49812014-11-12 Pedro Alves <palves@redhat.com>
4982
4983 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4984 the process group instead of to a specific LWP.
4985
a2abc7de
PA
49862014-10-15 Pedro Alves <palves@redhat.com>
4987
4988 PR server/17487
4989 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4990 parameter.
4991 (arm_set_thread_context): Delete.
4992 (the_low_target): Adjust.
4993 * win32-i386-low.c (debug_registers_changed)
4994 (debug_registers_used): Delete.
4995 (update_debug_registers_callback): New function.
4996 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4997 needing to update their debug registers.
4998 (win32_get_current_dr): New function.
4999 (x86_dr_low_get_addr, x86_dr_low_get_control)
5000 (x86_dr_low_get_status): Fetch the debug register from the thread
5001 record's context.
5002 (i386_initial_stuff): Adjust.
5003 (i386_get_thread_context): Remove current_event parameter. Don't
5004 clear debug_registers_changed nor copy DR values to
5005 debug_reg_state.
5006 (i386_set_thread_context): Delete.
5007 (i386_prepare_to_resume): New function.
5008 (i386_thread_added): Mark the thread as needing to update irs
5009 debug registers.
5010 (the_low_target): Remove i386_set_thread_context and install
5011 i386_prepare_to_resume.
5012 * win32-low.c (win32_get_thread_context): Adjust.
5013 (win32_set_thread_context): Use SetThreadContext
5014 directly.
5015 (win32_prepare_to_resume): New function.
5016 (win32_require_context): New function, factored out from ...
5017 (thread_rec): ... this.
5018 (continue_one_thread): Call win32_prepare_to_resume on each thread
5019 we're about to continue.
5020 (win32_resume): Call win32_prepare_to_resume on the event thread.
5021 * win32-low.h (struct win32_thread_info)
5022 <debug_registers_changed>: New field.
5023 (struct win32_target_ops): Change prototype of set_thread_context,
5024 delete set_thread_context and add prepare_to_resume.
5025 (win32_require_context): New declaration.
5026
a442d071
GB
50272014-10-08 Gary Benson <gbenson@redhat.com>
5028
5029 * server.h: Do not include common-exceptions.h.
5030
6f1947e8
GB
50312014-10-08 Gary Benson <gbenson@redhat.com>
5032
5033 * server.h: Do not include cleanups.h.
5034
63b434a4
JH
50352014-09-30 James Hogan <james.hogan@imgtec.com>
5036
5037 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5038 mips64-dsp-linux.c.
5039
c4d9ceb6
YQ
50402014-09-23 Yao Qi <yao@codesourcery.com>
5041
5042 * linux-low.c (lp_status_maybe_breakpoint): New function.
5043 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5044 (count_events_callback): Likewise.
5045 (select_event_lwp_callback): Likewise.
5046 (cancel_breakpoints_callback): Likewise.
5047
89a5711c
DB
50482014-09-19 Don Breazeal <donb@codesourcery.com>
5049
5050 * linux-low.c (handle_extended_wait): Call
5051 linux_ptrace_get_extended_event.
5052 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5053 linux_is_extended_waitstatus.
5054
bffc0964
JB
50552014-09-16 Joel Brobecker <brobecker@adacore.com>
5056
5057 * Makefile.in (CPPFLAGS): Define.
5058 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5059 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5060
0bfdf32f
GB
50612014-09-16 Gary Benson <gbenson@redhat.com>
5062
5063 * inferiors.h (current_inferior): Renamed as...
5064 (current_thread): New variable. All uses updated.
5065 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5066 (maybe_move_out_of_jump_pad): Likewise.
5067 (cancel_breakpoint): Likewise.
5068 (linux_low_filter_event): Likewise.
5069 (wait_for_sigstop): Likewise.
5070 (linux_resume_one_lwp): Likewise.
5071 (need_step_over_p): Likewise.
5072 (start_step_over): Likewise.
5073 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5074 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5075 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5076 and save_inferior as saved_thread.
5077 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5078 saved_thread.
5079 (regcache_invalidate_thread): Likewise.
5080 * remote-utils.c (prepare_resume_reply): Likewise.
5081 * thread-db.c (thread_db_get_tls_address): Likewise.
5082 (disable_thread_event_reporting): Likewise.
5083 (remove_thread_event_breakpoints): Likewise.
5084 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5085 as saved_thread.
5086 * target.h (set_desired_inferior): Renamed as...
5087 (set_desired_thread): New declaration. All uses updated.
5088 * server.c (myresume): Updated comment to reference thread instead
5089 of inferior.
5090 (handle_serial_event): Likewise.
5091 (handle_target_event): Likewise.
5092
361c8ade
GB
50932014-09-12 Tom Tromey <tromey@redhat.com>
5094 Gary Benson <gbenson@redhat.com>
5095
5096 * regcache.h: Include common-regcache.h.
5097 (regcache_read_pc): Don't declare.
5098 * regcache.c (get_thread_regcache_for_ptid): New function.
5099
bd9269f7
GB
51002014-09-11 Tom Tromey <tromey@redhat.com>
5101 Gary Benson <gbenson@redhat.com>
5102
5103 * symbol.c: New file.
5104 * Makefile.in (SFILES): Add symbol.c.
5105 (OBS): Add symbol.o.
5106
f8c1d06b
GB
51072014-09-11 Gary Benson <gbenson@redhat.com>
5108
5109 * target.c (target_stop_ptid, target_continue_ptid): New
5110 functions.
5111
721ec300
GB
51122014-09-11 Tom Tromey <tromey@redhat.com>
5113 Gary Benson <gbenson@redhat.com>
5114
5115 * target.h: Include target/target.h.
5116 * target.c (target_read_memory, target_read_uint32)
5117 (target_write_memory): New functions.
5118
c5e92cca
GB
51192014-09-11 Gary Benson <gbenson@redhat.com>
5120
5121 * server.h (debug_hw_points): Don't declare.
5122 * server.c (debug_hw_points): Don't define. Replace all uses
5123 with show_debug_regs.
5124 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5125 all uses with show_debug_regs.
5126
2e4bb98a
EBM
51272014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5128
5129 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5130 endianness into account.
5131 (ppc_supply_ptrace_register): Likewise.
5132
ac740bc7
JH
51332014-09-03 James Hogan <james.hogan@imgtec.com>
5134
5135 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5136 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5137
97ea6506
GB
51382014-09-03 Gary Benson <gbenson@redhat.com>
5139
5140 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5141 ALL_DEBUG_ADDRESS_REGISTERS.
5142
df7e5265
GB
51432014-09-02 Gary Benson <gbenson@redhat.com>
5144
5145 * i386-low.h: Renamed as...
5146 * x86-low.h: New file. All type, function and variable name
5147 prefixes changed from "i386_" to "x86_". All references updated.
5148 * i386-low.c: Renamed as...
5149 * x86-low.c: New file. All type, function and variable name
5150 prefixes changed from "i386_" to "x86_". All references updated.
5151
ed859da7
GB
51522014-09-02 Gary Benson <gbenson@redhat.com>
5153
5154 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5155 (x86_linux_new_thread): Likewise.
5156
860789c7
GB
51572014-08-29 Gary Benson <gbenson@redhat.com>
5158
5159 * server.h (setjmp.h): Do not include.
5160 (toplevel): Do not declare.
5161 (common-exceptions.h): Include.
5162 (cleanups.h): Likewise.
5163 * server.c (toplevel): Do not define.
5164 (exit_code): New static global.
5165 (detach_or_kill_for_exit_cleanup): New function.
5166 (main): New function. Original main renamed to...
5167 (captured_main): New function.
5168 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5169
ff55e1b5
GB
51702014-08-29 Gary Benson <gbenson@redhat.com>
5171
5172 * Makefile.in (SFILES): Add common/common-exceptions.c.
5173 (OBS): Add common-exceptions.o.
5174 (common-exceptions.o): New rule.
5175 * utils.c (prepare_to_throw_exception): New function.
5176
e9bcb658
GB
51772014-08-29 Gary Benson <gbenson@redhat.com>
5178
5179 * config.in: Regenerate.
5180 * configure: Likewise.
5181
e3180625
GB
51822014-08-29 Gary Benson <gbenson@redhat.com>
5183
5184 * Makefile.in (SFILES): Add common/cleanups.c.
5185 (OBS): cleanups.o.
5186 (cleanups.o): New rule.
5187
e3d6ba5d
GB
51882014-08-29 Gary Benson <gbenson@redhat.com>
5189
5190 * utils.c (internal_vwarning): New function.
5191
7096e886
GB
51922014-08-28 Gary Benson <gbenson@redhat.com>
5193
5194 * utils.h (fatal): Remove declaration.
5195 * utils.c (fatal): Remove function.
5196
14ce3192
GB
51972014-08-28 Gary Benson <gbenson@redhat.com>
5198
5199 * tracepoint.c (gdb_agent_init): Replace fatal with
5200 perror_with_name.
5201 (initialize_tracepoint): Likewise.
5202
50278d59
GB
52032014-08-28 Gary Benson <gbenson@redhat.com>
5204
5205 * remote-utils.c (remote_prepare): Replace fatal with error.
5206
aa96c426
GB
52072014-08-28 Gary Benson <gbenson@redhat.com>
5208
5209 * linux-low.c (linux_async): Replace fatal with warning.
5210 Tidy up and return.
5211 (linux_start_non_stop): Return -1 if linux_async failed.
5212
f7160e97
GB
52132014-08-28 Gary Benson <gbenson@redhat.com>
5214
5215 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5216 gdb_assert.
5217 (i386_dr_low_get_addr): Remove vague comment.
5218 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5219 gdb_assert.
5220
38e08fca
GB
52212014-08-28 Gary Benson <gbenson@redhat.com>
5222
5223 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5224 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5225 internal_error.
5226 (linux_resume_one_lwp): Likewise.
5227 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5228 gdb_assert.
5229 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5230 with internal_error.
5231 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5232 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5233 (find_register_by_name): Replace fatal with internal_error.
5234 (find_regno): Likewise.
5235 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5236 * thread-db.c (thread_db_create_event): Likewise.
5237 (thread_db_load_search): Likewise.
5238 (try_thread_db_load_1): Likewise.
5239 * tracepoint.c (get_jump_space_head): Replace fatal with
5240 internal_error.
5241 (claim_trampoline_space): Likewise.
5242 (have_fast_tracepoint_trampoline_buffer): Likewise.
5243 (cmd_qtstart): Likewise.
5244 (stop_tracing): Likewise.
5245 (fast_tracepoint_collecting): Likewise.
5246 (target_malloc): Likewise.
5247 (download_tracepoint): Likewise.
5248 (download_trace_state_variables): Replace check with gdb_assert.
5249 (upload_fast_traceframes): Replace fatal with internal_error.
5250
34abf635
GB
52512014-08-19 Tom Tromey <tromey@redhat.com>
5252 Gary Benson <gbenson@redhat.com>
5253
5254 * Makefile.in (SFILES): Add common/common-debug.c.
5255 (OBS): Add common-debug.o.
5256 (common-debug.o): New rule.
5257 * debug.h (debug_printf): Don't declare.
5258 * debug.c (debug_printf): Renamed and rewritten as...
5259 (debug_vprintf): New function.
5260
f6e94d78
GB
52612014-08-19 Gary Benson <gbenson@redhat.com>
5262
5263 * utils.h: Do not include print-utils.h.
5264
9239eeab
GB
52652014-08-19 Tom Tromey <tromey@redhat.com>
5266 Gary Benson <gbenson@redhat.com>
5267
5268 * server.h: Add static assertion.
5269 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5270
ef87c8bb
GB
52712014-08-19 Tom Tromey <tromey@redhat.com>
5272 Gary Benson <gbenson@redhat.com>
5273
5274 * Makefile.in (SFILES): Add common/errors.c.
5275 (OBS): Add errors.o.
5276 (IPA_OBS): Add errors-ipa.o.
5277 (errors.o): New rule.
5278 (errors-ipa.o): Likewise.
5279 * utils.h (perror_with_name, error, warning): Don't declare.
5280 * utils.c (warning): Renamed and rewritten as...
5281 (vwarning): New function.
5282 (error): Renamed and rewritten as...
5283 (verror): New function.
5284 (internal_error): Renamed and rewritten as...
5285 (internal_verror): New function.
5286
bb974a24
GB
52872014-08-07 Gary Benson <gbenson@redhat.com>
5288
5289 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5290 * configure: Regenerate.
5291 * config.in: Likewise.
5292 * server.h: Do not include errno.h.
5293 * event-loop.c: Likewise.
5294 * hostio-errno.c: Likewise.
5295 * linux-low.c: Likewise.
5296 * remote-utils.c: Likewise.
5297 * spu-low.c: Likewise.
5298 * utils.c: Likewise.
5299 * gdbreplay.c: Unconditionally include errno.h.
5300
6d3d12eb
GB
53012014-08-07 Gary Benson <gbenson@redhat.com>
5302
5303 * server.h: Do not include string.h.
5304 * event-loop.c: Likewise.
5305 * linux-low.c: Likewise.
5306 * regcache.c: Likewise.
5307 * remote-utils.c: Likewise.
5308 * spu-low.c: Likewise.
5309 * utils.c: Likewise.
5310
dccbb609
GB
53112014-08-07 Gary Benson <gbenson@redhat.com>
5312
5313 * server.h: Do not include gdb_assert.h.
5314
e76df0d0
GB
53152014-08-07 Gary Benson <gbenson@redhat.com>
5316
5317 * server.h: Do not include common-utils.h.
5318
4cb9c816
GB
53192014-08-07 Gary Benson <gbenson@redhat.com>
5320
5321 * server.h: Do not include ptid.h.
5322 * notif.h: Likewise.
5323
3995eeee
GB
53242014-08-07 Gary Benson <gbenson@redhat.com>
5325
5326 * server.h: Do not include gdb_locale.h.
5327
cb9f1a9b
GB
53282014-08-07 Gary Benson <gbenson@redhat.com>
5329
5330 * server.h: Do not include gdb/signals.h.
5331 * win32-low.c: Likewise.
5332
a5fceff8
GB
53332014-08-07 Gary Benson <gbenson@redhat.com>
5334
5335 * server.h: Do not include pathmax.h.
5336
b9391142
GB
53372014-08-07 Gary Benson <gbenson@redhat.com>
5338
5339 * server.h: Do not include libiberty.h.
5340 * linux-bfin-low.c: Likewise.
5341
0e443c87
GB
53422014-08-07 Gary Benson <gbenson@redhat.com>
5343
5344 * server.h: Do not include ansidecl.h.
5345
8ebb3f56
GB
53462014-08-07 Gary Benson <gbenson@redhat.com>
5347
5348 * linux-x86-low.c: Do not include stddef.h.
5349 * lynx-ppc-low.c: Likewise.
5350 * tracepoint.c: Likewise.
5351
8980bdf6
GB
53522014-08-07 Gary Benson <gbenson@redhat.com>
5353
5354 * server.h: Do not include stdarg.h.
5355 * nto-low.c: Likewise.
5356
d7096f71
GB
53572014-08-07 Gary Benson <gbenson@redhat.com>
5358
5359 * server.h: Do not include stdlib.h.
5360 * inferiors.c: Likewise.
5361 * linux-low.c: Likewise.
5362 * regcache.c: Likewise.
5363 * spu-low.c: Likewise.
5364 * tracepoint.c: Likewise.
5365 * utils.c: Likewise.
5366
d02f550d
GB
53672014-08-07 Gary Benson <gbenson@redhat.com>
5368
5369 * server.h: Do not include stdio.h.
5370 * linux-low.c: Likewise.
5371 * remote-utils.c: Likewise.
5372 * spu-low.c: Likewise.
5373 * utils.c: Likewise.
5374 * wincecompat.c: Likewise.
5375
87f6c4e3
GB
53762014-08-06 Gary Benson <gbenson@redhat.com>
5377
5378 * regcache.c (init_register_cache): Move conditionals inside if.
5379
7089dca4
GB
53802014-08-06 Gary Benson <gbenson@redhat.com>
5381
5382 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5383
462f517e
GB
53842014-07-31 Gary Benson <gbenson@redhat.com>
5385
5386 * ax.h: Do not include server.h.
5387 * gdbthread.h: Likewise.
5388 * lynx-low.h: Likewise.
5389 * notif.h: Likewise.
5390
976411d6
GB
53912014-07-30 Gary Benson <gbenson@redhat.com>
5392
5393 * server.h: Include common-defs.h.
5394 Do not include config.h or build-gnulib-gdbserver/config.h.
5395
d41f6d8e
GB
53962014-07-30 Gary Benson <gbenson@redhat.com>
5397
5398 * hostio-errno.c: Move server.h to top of includes list.
5399 * inferiors.c: Likewise.
5400 * linux-x86-low.c: Likewise.
5401 * notif.c: Include server.h.
5402
314c6a35
TT
54032014-07-24 Tom Tromey <tromey@redhat.com>
5404 Gary Benson <gbenson@redhat.com>
5405
5406 * server.h (CORE_ADDR): Now unsigned.
5407
69ff6be5
PA
54082014-07-16 Pedro Alves <palves@redhat.com>
5409
5410 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5411
ce9e3fe7
PA
54122014-07-15 Pedro Alves <palves@redhat.com>
5413
5414 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5415 copy.
5416
e76126e8
PA
54172014-07-11 Pedro Alves <palves@redhat.com>
5418
5419 * linux-low.c (kill_wait_lwp): New function, based on
5420 kill_one_lwp_callback, but use my_waitpid directly.
5421 (kill_one_lwp_callback, linux_kill): Use it.
5422
8e9db26e
PA
54232014-06-23 Pedro Alves <palves@redhat.com>
5424
5425 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5426 before setting DR0..DR3.
5427
698b3e08
GB
54282014-06-20 Gary Benson <gbenson@redhat.com>
5429
5430 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5431 * configure: Regenerated.
5432 * config.in: Likewise.
5433
125f8a3d
GB
54342014-06-20 Gary Benson <gbenson@redhat.com>
5435
5436 * Makefile.in (SFILES): Update locations for files moved
5437 from common to nat.
5438 (object file files): Reordered.
5439
42995dbd
GB
54402014-06-20 Gary Benson <gbenson@redhat.com>
5441
5442 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5443 (i386_dr_low_set_addr): Likewise.
5444 (i386_dr_low_get_addr): Likewise.
5445 (i386_dr_low_can_set_control): Likewise.
5446 (i386_dr_low_set_control): Likewise.
5447 (i386_dr_low_get_control): Likewise.
5448 (i386_dr_low_get_status): Likewise.
5449 (i386_get_debug_register_length): Likewise.
5450 * linux-x86-low.c (i386_dr_low_set_addr):
5451 Changed signature. Made static.
5452 (i386_dr_low_get_addr): Likewise.
5453 (i386_dr_low_set_control): Likewise.
5454 (i386_dr_low_get_control): Likewise.
5455 (i386_dr_low_get_status): Likewise.
5456 (i386_dr_low): New global variable.
5457 * win32-i386-low.c (i386_dr_low_set_addr):
5458 Changed signature. Made static.
5459 (i386_dr_low_get_addr): Likewise.
5460 (i386_dr_low_set_control): Likewise.
5461 (i386_dr_low_get_control): Likewise.
5462 (i386_dr_low_get_status): Likewise.
5463 (i386_dr_low): New global variable.
5464
e1d2394b
MS
54652014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5466
5467 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5468 * Makefile.in (AR, AR_FLAGS): Define.
5469 * configure: Regenerate.
5470
3a8ee006
GB
54712014-06-19 Gary Benson <gbenson@redhat.com>
5472
5473 * Makefile.in (i386-dregs.o): New rule.
5474 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5475 * i386-low.c (target.h): Remove include.
5476 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5477 (DR_CONTROL_SHIFT): Likewise.
5478 (DR_CONTROL_SIZE): Likewise.
5479 (DR_RW_EXECUTE): Likewise.
5480 (DR_RW_WRITE): Likewise.
5481 (DR_RW_READ): Likewise.
5482 (DR_RW_IORW): Likewise.
5483 (DR_LEN_1): Likewise.
5484 (DR_LEN_2): Likewise.
5485 (DR_LEN_4): Likewise.
5486 (DR_LEN_8): Likewise.
5487 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5488 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5489 (DR_ENABLE_SIZE): Likewise.
5490 (DR_LOCAL_SLOWDOWN): Likewise.
5491 (DR_GLOBAL_SLOWDOWN): Likewise.
5492 (DR_CONTROL_RESERVED): Likewise.
5493 (I386_DR_CONTROL_MASK): Likewise.
5494 (I386_DR_VACANT): Likewise.
5495 (I386_DR_LOCAL_ENABLE): Likewise.
5496 (I386_DR_GLOBAL_ENABLE): Likewise.
5497 (I386_DR_DISABLE): Likewise.
5498 (I386_DR_SET_RW_LEN): Likewise.
5499 (I386_DR_GET_RW_LEN): Likewise.
5500 (I386_DR_WATCH_HIT): Likewise.
5501 (i386_wp_op_t): Likewise.
5502 (i386_show_dr): Likewise.
5503 (i386_length_and_rw_bits): Likewise.
5504 (i386_insert_aligned_watchpoint): Likewise.
5505 (i386_remove_aligned_watchpoint): Likewise.
5506 (i386_handle_nonaligned_watchpoint): Likewise.
5507 i386_update_inferior_debug_regs(): Likewise.
5508 (i386_dr_insert_watchpoint): Likewise.
5509 (i386_dr_remove_watchpoint): Likewise.
5510 (i386_dr_region_ok_for_watchpoint): Likewise.
5511 (i386_dr_stopped_data_address): Likewise.
5512 (i386_dr_stopped_by_watchpoint): Likewise.
5513
8f26655c
GB
55142014-06-19 Gary Benson <gbenson@redhat.com>
5515
5516 * i386-low.c (i386_dr_show): Renamed to
5517 i386_show_dr and made static. All uses updated.
5518 (i386_dr_length_and_rw_bits): Renamed to
5519 i386_length_and_rw_bits and made static.
5520 All uses updated.
5521 (i386_dr_insert_aligned_watchpoint): Renamed to
5522 i386_insert_aligned_watchpoint and made static.
5523 All uses updated.
5524 (i386_dr_remove_aligned_watchpoint): Renamed to
5525 i386_remove_aligned_watchpoint and made static.
5526 All uses updated.
5527 (i386_dr_update_inferior_debug_regs): Renamed to
5528 i386_update_inferior_debug_regs and made static.
5529 All uses updated.
5530
b9228891
GB
55312014-06-18 Gary Benson <gbenson@redhat.com>
5532
5171def3
GB
5533 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5534 (i386_dr_low_can_set_control): Likewise.
5535 (i386_get_debug_register_length): Likewise.
5536 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5537 (i386_dr_low_can_set_control): Likewise.
5538 (i386_get_debug_register_length): Likewise.
5539
55402014-06-17 Gary Benson <gbenson@redhat.com>
5541
b9228891
GB
5542 * i386-low.h (i386-dregs.h): New include.
5543 (DR_FIRSTADDR): Now in i386-dregs.h.
5544 (DR_LASTADDR): Likewise.
5545 (DR_NADDR): Likewise.
5546 (DR_STATUS): Likewise.
5547 (DR_CONTROL): Likewise.
5548 (i386_debug_reg_state): Likewise.
5549 (i386_dr_insert_watchpoint): Likewise.
5550 (i386_dr_remove_watchpoint): Likewise.
5551 (i386_dr_region_ok_for_watchpoint): Likewise.
5552 (i386_dr_stopped_data_address): Likewise.
5553 (i386_dr_stopped_by_watchpoint): Likewise.
5554 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5555
4be83cc2
GB
55562014-06-18 Gary Benson <gbenson@redhat.com>
5557
5558 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5559 i386_dr_insert_watchpoint.
5560 (i386_low_remove_watchpoint): Renamed to
5561 i386_dr_remove_watchpoint.
5562 (i386_low_region_ok_for_watchpoint): Renamed to
5563 i386_dr_region_ok_for_watchpoint.
5564 (i386_low_stopped_data_address): Renamed to
5565 i386_dr_stopped_data_address.
5566 (i386_low_stopped_by_watchpoint): Renamed to
5567 i386_dr_stopped_by_watchpoint.
5568 * i386-low.c (i386_show_dr): Renamed to
5569 i386_dr_show and made nonstatic. All uses updated.
5570 (i386_length_and_rw_bits): Renamed to
5571 i386_dr_length_and_rw_bits and made nonstatic.
5572 All uses updated.
5573 (i386_insert_aligned_watchpoint): Renamed to
5574 i386_dr_insert_aligned_watchpoint and made nonstatic.
5575 All uses updated.
5576 (i386_remove_aligned_watchpoint): Renamed to
5577 i386_dr_remove_aligned_watchpoint and made nonstatic.
5578 All uses updated.
5579 (i386_update_inferior_debug_regs): Renamed to
5580 i386_dr_update_inferior_debug_regs and made nonstatic.
5581 All uses updated.
5582 (i386_low_insert_watchpoint): Renamed to
5583 i386_dr_insert_watchpoint. All uses updated.
5584 (i386_low_remove_watchpoint): Renamed to
5585 i386_dr_remove_watchpoint. All uses updated.
5586 (i386_low_region_ok_for_watchpoint): Renamed to
5587 i386_dr_region_ok_for_watchpoint. All uses updated.
5588 (i386_low_stopped_data_address): Renamed to
5589 i386_dr_stopped_data_address. All uses updated.
5590 (i386_low_stopped_by_watchpoint): Renamed to
5591 i386_dr_stopped_by_watchpoint. All uses updated.
5592
131aa0d4
GB
55932014-06-18 Gary Benson <gbenson@redhat.com>
5594
5595 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5596 (i386_dr_low_can_set_control): Likewise.
5597 (i386_insert_aligned_watchpoint): New check.
5598
d9305f7f
GB
55992014-06-18 Gary Benson <gbenson@redhat.com>
5600
5601 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5602 Renamed to state.
5603
e927c9fc
GB
56042014-06-18 Gary Benson <gbenson@redhat.com>
5605
5606 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5607 instead of fatal and error.
5608 (i386_handle_nonaligned_watchpoint): Likewise.
5609
1b6d4134
GB
56102014-06-18 Gary Benson <gbenson@redhat.com>
5611
5612 * i386-low.c (i386_get_debug_register_length): New macro.
5613 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5614 (i386_show_dr): Use debug_printf instead of fprintf. Use
5615 phex to format values.
5616
6e62758f
GB
56172014-06-18 Gary Benson <gbenson@redhat.com>
5618
5619 * i386-low.h: Comment changes.
5620 * i386-low.c: Likewise.
5621
fc6e2f03
GB
56222014-06-18 Gary Benson <gbenson@redhat.com>
5623
5624 * i386-low.c: Whitespace changes.
5625
f9d1eeed
TT
56262014-06-12 Tom Tromey <tromey@redhat.com>
5627
5628 * utils.c (freeargv): Remove.
5629
0b04e523
TT
56302014-06-12 Tom Tromey <tromey@redhat.com>
5631
5632 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5633 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5634 (parse_debug_format_options): Likewise.
5635 (gdbserver_usage): Likewise.
5636 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5637 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5638 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5639 against libiberty.
5640 ($(LIBGNU)): Depend on libiberty.
5641 (all-lib): Recurse into all subdirs.
5642 (install-only): Invoke "install" target in subdirs.
5643 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5644 targets.
5645 * configure: Rebuild.
5646 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5647 for vasprintf, vsnprintf, or gettimeofday.
5648 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5649 srv_tgtobj.
5650
270c9937
JB
56512014-06-05 Joel Brobecker <brobecker@adacore.com>
5652
5653 * development.sh: Delete.
5654 * Makefile.in (config.status): Adjust dependency on development.sh.
5655 * configure.ac: Adjust development.sh source call.
5656 * configure: Regenerate.
5657
0a261ed8
PA
56582014-06-02 Pedro Alves <palves@redhat.com>
5659
5660 * ax.c (gdb_free_agent_expr): New function.
5661 * ax.h (gdb_free_agent_expr): New declaration.
5662 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5663 list.
5664 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5665 static.
5666 (clear_breakpoint_conditions_and_commands): New function.
5667 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5668 (clear_breakpoint_conditions_and_commands): New declaration.
5669
e9dae05e
RR
56702014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5671
5672 * linux-aarch64-low.c (asm/ptrace.h): Include.
5673
5876f503
JK
56742014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5675
5676 Fix TLS access for -static -pthread.
5677 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5678 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5679 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5680
802e8e6d
PA
56812014-05-20 Pedro Alves <palves@redhat.com>
5682
5683 * linux-aarch64-low.c (aarch64_insert_point)
5684 (aarch64_remove_point): No longer check whether the type is
5685 supported here. Adjust to new interface.
5686 (the_low_target): Install aarch64_supports_z_point_type as
5687 supports_z_point_type method.
5688 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5689 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5690 instead of a Z packet char. Adjust.
5691 (arm_supports_z_point_type): New function.
5692 (arm_insert_point, arm_remove_point): Adjust to new interface.
5693 (the_low_target): Install arm_supports_z_point_type.
5694 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5695 (cris_insert_point, cris_remove_point): Adjust to new interface.
5696 Don't check whether the type is supported here.
5697 (the_low_target): Install cris_supports_z_point_type.
5698 * linux-low.c (linux_supports_z_point_type): New function.
5699 (linux_insert_point, linux_remove_point): Adjust to new interface.
5700 * linux-low.h (struct linux_target_ops) <insert_point,
5701 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5702 raw_breakpoint pointer parameter.
5703 <supports_z_point_type>: New method.
5704 * linux-mips-low.c (mips_supports_z_point_type): New function.
5705 (mips_insert_point, mips_remove_point): Adjust to new interface.
5706 Use mips_supports_z_point_type.
5707 (the_low_target): Install mips_supports_z_point_type.
5708 * linux-ppc-low.c (the_low_target): Install NULL as
5709 supports_z_point_type method.
5710 * linux-s390-low.c (the_low_target): Install NULL as
5711 supports_z_point_type method.
5712 * linux-sparc-low.c (the_low_target): Install NULL as
5713 supports_z_point_type method.
5714 * linux-x86-low.c (x86_supports_z_point_type): New function.
5715 (x86_insert_point): Adjust to new insert_point interface. Use
5716 insert_memory_breakpoint. Adjust to new
5717 i386_low_insert_watchpoint interface.
5718 (x86_remove_point): Adjust to remove_point interface. Use
5719 remove_memory_breakpoint. Adjust to new
5720 i386_low_remove_watchpoint interface.
5721 (the_low_target): Install x86_supports_z_point_type.
5722 * lynx-low.c (lynx_target_ops): Install NULL as
5723 supports_z_point_type callback.
5724 * nto-low.c (nto_supports_z_point_type): New.
5725 (nto_insert_point, nto_remove_point): Adjust to new interface.
5726 (nto_target_ops): Install nto_supports_z_point_type.
5727 * mem-break.c: Adjust intro comment.
5728 (struct raw_breakpoint) <raw_type, size>: New fields.
5729 <inserted>: Update comment.
5730 <shlib_disabled>: Delete field.
5731 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5732 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5733 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5734 (raw_bkpt_type_to_target_hw_bp_type): New function.
5735 (find_enabled_raw_code_breakpoint_at): New function.
5736 (find_raw_breakpoint_at): New type and size parameters. Use them.
5737 (insert_memory_breakpoint): New function, based off
5738 set_raw_breakpoint_at.
5739 (remove_memory_breakpoint): New function.
5740 (set_raw_breakpoint_at): Reimplement.
5741 (set_breakpoint): New, based on set_breakpoint_at.
5742 (set_breakpoint_at): Reimplement.
5743 (delete_raw_breakpoint): Go through the_target->remove_point
5744 instead of assuming memory breakpoints.
5745 (find_gdb_breakpoint_at): Delete.
5746 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5747 (find_gdb_breakpoint): New function.
5748 (set_gdb_breakpoint_at): Delete.
5749 (z_type_supported): New function.
5750 (set_gdb_breakpoint_1): New function, loosely based off
5751 set_gdb_breakpoint_at.
5752 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5753 (delete_gdb_breakpoint_at): Delete.
5754 (delete_gdb_breakpoint_1): New function, loosely based off
5755 delete_gdb_breakpoint_at.
5756 (delete_gdb_breakpoint): New function.
5757 (clear_gdb_breakpoint_conditions): Rename to ...
5758 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5759 breakpoint.
5760 (add_condition_to_breakpoint): Make static.
5761 (add_breakpoint_condition): Take a struct breakpoint pointer
5762 instead of an address. Adjust.
5763 (gdb_condition_true_at_breakpoint): Rename to ...
5764 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5765 z_type parameter.
5766 (gdb_condition_true_at_breakpoint): Reimplement.
5767 (add_breakpoint_commands): Take a struct breakpoint pointer
5768 instead of an address. Adjust.
5769 (gdb_no_commands_at_breakpoint): Rename to ...
5770 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5771 parameter. Return true if no breakpoint was found. Change debug
5772 output.
5773 (gdb_no_commands_at_breakpoint): Reimplement.
5774 (run_breakpoint_commands): Rename to ...
5775 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5776 and change return type to boolean.
5777 (run_breakpoint_commands): New function.
5778 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5779 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5780 breakpoint. Go through the_target->remove_point instead of
5781 assuming memory breakpoint.
5782 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5783 software and hardware breakpoints.
5784 (reinsert_raw_breakpoint): Go through the_target->insert_point
5785 instead of assuming memory breakpoint.
5786 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5787 software and hardware breakpoints.
5788 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5789 Check both software and hardware breakpoints.
5790 (validate_inserted_breakpoint): Assert the breakpoint is a
5791 software breakpoint. Set the inserted flag to -1 instead of
5792 setting shlib_disabled.
5793 (delete_disabled_breakpoints): Adjust.
5794 (validate_breakpoints): Only validate software breakpoints.
5795 Adjust to inserted flag change.
5796 (check_mem_read, check_mem_write): Skip breakpoint types other
5797 than software breakpoints. Adjust to inserted flag change.
5798 * mem-break.h (enum raw_bkpt_type): New enum.
5799 (raw_breakpoint, struct process_info): Forward declare.
5800 (Z_packet_to_target_hw_bp_type): Delete declaration.
5801 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5802 (set_gdb_breakpoint, delete_gdb_breakpoint)
5803 (clear_breakpoint_conditions): New declarations.
5804 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5805 (breakpoint_inserted_here): Update comment.
5806 (add_breakpoint_condition, add_breakpoint_commands): Replace
5807 address parameter with a breakpoint pointer parameter.
5808 (gdb_breakpoint_here): Update comment.
5809 (delete_gdb_breakpoint_at): Delete.
5810 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5811 * server.c (process_point_options): Take a struct breakpoint
5812 pointer instead of an address. Adjust.
5813 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5814 delete_gdb_breakpoint.
5815 * spu-low.c (spu_target_ops): Install NULL as
5816 supports_z_point_type method.
5817 * target.h: Include mem-break.h.
5818 (struct target_ops) <prepare_to_access_memory>: Update comment.
5819 <supports_z_point_type>: New field.
5820 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5821 instead of a char. Also take a raw breakpoint pointer.
5822 * win32-arm-low.c (the_low_target): Install NULL as
5823 supports_z_point_type.
5824 * win32-i386-low.c (i386_supports_z_point_type): New function.
5825 (i386_insert_point, i386_remove_point): Adjust to new interface.
5826 (the_low_target): Install i386_supports_z_point_type.
5827 * win32-low.c (win32_supports_z_point_type): New function.
5828 (win32_insert_point, win32_remove_point): Adjust to new interface.
5829 (win32_target_ops): Install win32_supports_z_point_type.
5830 * win32-low.h (struct win32_target_ops):
5831 <supports_z_point_type>: New method.
5832 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5833 instead of a char. Also take a raw breakpoint pointer.
5834
932539e3
PA
58352014-05-20 Pedro Alves <palves@redhat.com>
5836
5837 * mem-break.h: Include break-common.h.
5838 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5839 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5840 (Z_packet_to_target_hw_bp_type): New declaration.
5841 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5842 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5843 (Z_PACKET_ACCESS_WP): Delete macros.
5844 (Z_packet_to_hw_type): Delete function.
5845 * i386-low.h: Don't include break-common.h here.
5846 (Z_packet_to_hw_type): Delete declaration.
5847 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5848 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5849 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5850 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5851 * linux-aarch64-low.c: Don't include break-common.h here.
5852 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5853 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5854 (Z_packet_to_target_hw_bp_type): Delete function.
5855 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5856 function.
5857 (mips_insert_point, mips_remove_point): Use
5858 Z_packet_to_target_hw_bp_type.
5859
4ff0d3d8
PA
58602014-05-20 Pedro Alves <palves@redhat.com>
5861
5862 * linux-aarch64-low.c: Include break-common.h.
5863 (enum target_point_type): Delete.
5864 (Z_packet_to_point_type): Rename to ...
5865 (Z_packet_to_target_hw_bp_type): ... this, and return a
5866 target_hw_bp_type instead.
5867 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5868 instead of an enum target_point_type.
5869 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5870 breakpoint type.
5871 (aarch64_dr_state_insert_one_point)
5872 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5873 (aarch64_handle_aligned_watchpoint)
5874 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5875 Take an enum target_hw_bp_type instead of an enum
5876 target_point_type.
5877 (aarch64_supports_z_point_type): New function.
5878 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5879 use Z_packet_to_target_hw_bp_type.
5880
786dc519
JB
58812014-05-20 Joel Brobecker <brobecker@adacore.com>
5882
5883 * configure.ac: Only use -Werror by default when DEVELOPMENT
5884 is true.
5885 * configure: Regenerate.
5886
9e0aa64f
JK
58872014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5888
5889 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5890 * linux-x86-low.c (X86_64_USER_REGS): New.
5891 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5892
2b577b92
YQ
58932014-04-28 Yao Qi <yao@codesourcery.com>
5894
5895 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5896 name.
5897
94611da2
PA
58982014-04-25 Pedro Alves <palves@redhat.com>
5899
5900 PR server/16255
5901 * linux-low.c (linux_attach_fail_reason_string): New function.
5902 (linux_attach_lwp): Delete.
5903 (linux_attach_lwp_1): Rename to ...
5904 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5905 argument. Remove "initial" parameter. Return int instead of
5906 void. Don't error or warn here.
5907 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5908 failure to attach to the tgid. Call warning when failing to
5909 attach to an lwp.
5910 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5911 argument. Remove "initial" parameter. Return int instead of
5912 void. Don't error or warn here.
5913 (linux_attach_fail_reason_string): New declaration.
5914 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5915 interface change. Use linux_attach_fail_reason_string.
5916
01f9f808
MS
59172014-04-24 Michael Sturm <michael.sturm@mintel.com>
5918 Walfred Tedeschi <walfred.tedeschi@intel.com>
5919
5920 * Makefile.in: Added rules to handle new files
5921 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5922 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5923 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5924 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5925 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5926 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5927 x32-avx512-linux.o.
5928 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5929 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5930 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5931 i386/x32-avx512.xml.
5932 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5933 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5934 i386/x32-avx512-linux.xml.
5935 * i387-fp.c (num_avx512_k_registers): New constant for number
5936 of K registers.
5937 (num_avx512_zmmh_low_registers): New constant for number of
5938 lower ZMM registers (0-15).
5939 (num_avx512_zmmh_high_registers): New constant for number of
5940 higher ZMM registers (16-31).
5941 (num_avx512_ymmh_registers): New contant for number of higher
5942 YMM registers (ymm16-31 added by avx521 on x86_64).
5943 (num_avx512_xmm_registers): New constant for number of higher
5944 XMM registers (xmm16-31 added by AVX512 on x86_64).
5945 (struct i387_xsave): Add space for AVX512 registers.
5946 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5947 Add code to handle AVX512 registers.
5948 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5949 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5950 prototypei from generated file.
5951 (tdesc_amd64_avx512_linux): Likewise.
5952 (init_registers_x32_avx512_linux): Likewise.
5953 (tdesc_x32_avx512_linux): Likewise.
5954 (init_registers_i386_avx512_linux): Likewise.
5955 (tdesc_i386_avx512_linux): Likewise.
5956 (x86_64_regmap): Add AVX512 registers.
5957 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5958 mask.
5959 (initialize_low_arch): Add code to initialize AVX512 registers.
5960
51aa91f9
PA
59612014-04-23 Pedro Alves <palves@redhat.com>
5962
5963 * mem-break.c (find_gdb_breakpoint_at): Make static.
5964 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5965
a4165e94
PA
59662014-04-23 Pedro Alves <palves@redhat.com>
5967
5968 * i386-low.c: Don't include break-common.h here.
5969 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5970 prototype to take target_hw_bp_type as argument instead of a Z
5971 packet char.
5972 * i386-low.h: Include break-common.h here.
5973 (Z_packet_to_hw_type): Declare.
5974 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5975 prototypes.
5976 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5977 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5978 (x86_remove_point): Convert the packet number to a
5979 target_hw_bp_type before calling i386_low_remove_watchpoint.
5980 * win32-i386-low.c (i386_insert_point): Convert the packet number
5981 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5982 (i386_remove_point): Convert the packet number to a
5983 target_hw_bp_type before calling i386_low_remove_watchpoint.
5984
b8acf843
PA
59852014-04-23 Pedro Alves <palves@redhat.com>
5986
5987 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5988
d708bcd1
PA
59892014-04-10 Pedro Alves <palves@redhat.com>
5990
5991 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5992 Check if the condition or command is NULL before checking if the
5993 breakpoint is known. On success, return true.
5994 * mem-break.h (add_breakpoint_condition): Document return.
5995 (add_breakpoint_commands): Add describing comment.
5996 * server.c (skip_to_semicolon): New function.
5997 (process_point_options): Use it.
5998
2eec7d5b
PA
59992014-04-09 Pedro Alves <palves@redhat.com>
6000
6001 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6002 to lwpid_of.
6003
fa96cb38
PA
60042014-02-27 Pedro Alves <palves@redhat.com>
6005
6006 PR 12702
6007 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6008 macros.
6009 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6010 output.
6011 (last_thread_of_process_p): Take a PID argument instead of a
6012 thread pointer.
6013 (linux_wait_for_lwp): Delete.
6014 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6015 functions.
6016 (linux_low_filter_event): New function, party factored out from
6017 linux_wait_for_event.
6018 (linux_wait_for_event): Rename to ...
6019 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6020 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6021 sigsuspend. Check for zombie leaders.
6022 (linux_wait_for_event): Reimplement as wrapper around
6023 linux_wait_for_event_filtered.
6024 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6025 a normal or signal exit is seen, it's the whole process exiting.
6026 (wait_for_sigstop): No longer a for_each_inferior callback.
6027 Rewrite on top of linux_wait_for_event_filtered.
6028 (stop_all_lwps): Call wait_for_sigstop directly.
6029 * server.c (resume, handle_target_event): Handle
6030 TARGET_WAITKIND_NO_RESUMED.
6031
d763de10
JB
60322014-02-26 Joel Brobecker <brobecker@adacore.com>
6033
6034 * win32-low.c (psapi_get_dll_name,
6035 * win32_CreateToolhelp32Snapshot): Delete.
6036 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6037 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6038 Delete.
6039 (handle_load_dll): Add function description.
6040 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6041
850a0f76
JB
60422014-02-26 Joel Brobecker <brobecker@adacore.com>
6043
6044 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6045 Add comment.
6046 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6047 base address when calling win32_add_one_solib.
6048 (handle_load_dll): Delete local variable load_addr.
6049 Remove 0x1000 offset applied to DLL base address when calling
6050 win32_add_one_solib.
6051 (handle_unload_dll): Add comment.
6052
f25b3fc3
JB
60532014-02-26 Joel Brobecker <brobecker@adacore.com>
6054
6055 * win32-low.c (win32_add_all_dlls): Renames
6056 win32_ensure_ntdll_loaded. Rewrite function documentation.
6057 Adjust implementation to always load all DLLs.
6058 Add 0x1000 offset to DLL base address when calling
6059 win32_add_one_solib.
6060 (child_initialization_done): New static global.
6061 (do_initial_child_stuff): Set child_initialization_done to
6062 zero during child initialization, and 1 after. Replace call
6063 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6064 Add comment.
6065 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6066 (handle_unload_dll): Add function documentation.
6067 (get_child_debug_event): Ignore load and unload DLL events
6068 during child initialization.
6069
d86d4aaf
DE
60702014-02-20 Doug Evans <dje@google.com>
6071
3bc32da3 6072 Remove global all_lwps.
d86d4aaf
DE
6073 * inferiors.h (ptid_of): Move here from linux-low.h.
6074 (pid_of, lwpid_of): Ditto.
6075 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6076 parameter is a struct thread_info * now.
6077 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6078 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6079 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6080 directly.
6081 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6082 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6083 * linux-arm-low.c (update_registers_callback): Update, "entry"
6084 parameter is a struct thread_info * now.
6085 Fetch lwpid from current_inferior directly.
6086 (arm_insert_point): Pass &all_threads to find_inferior instead of
6087 &all_lwps.
6088 (arm_remove_point): Ditto.
6089 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6090 (arm_prepare_to_resume): Fetch pid from thread.
6091 (arm_read_description): Fetch lwpid from current_inferior directly.
6092 * linux-low.c (all_lwps): Delete.
6093 (delete_lwp): Delete call to remove_inferior.
6094 (handle_extended_wait): Fetch lwpid from thread.
6095 (add_lwp): Don't set lwp->entry.id. Remove call to
6096 add_inferior_to_list.
6097 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6098 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6099 (kill_one_lwp_callback): Ditto.
6100 (linux_kill): Don't dereference NULL pointer.
6101 Fetch ptid,lwpid from thread.
6102 (get_detach_signal): Fetch ptid from thread.
6103 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6104 Simplify call to regcache_invalidate_thread.
6105 (delete_lwp_callback): Update, "entry" parameter is a
6106 struct thread_info * now. Fetch pid from thread.
6107 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6108 (status_pending_p_callback): Update, "entry" parameter is a
6109 struct thread_info * now. Fetch ptid from thread.
6110 (find_lwp_pid): Update, "entry" parameter is a
6111 struct thread_info * now.
6112 (linux_wait_for_lwp): Fetch pid from thread.
6113 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6114 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6115 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6116 (dequeue_one_deferred_signal): Ditto.
6117 (cancel_breakpoint): Fetch ptid from current_inferior.
6118 (linux_wait_for_event): Pass &all_threads to find_inferior,
6119 not &all_lwps. Fetch ptid, lwpid from thread.
6120 (count_events_callback): Update, "entry" parameter is a
6121 struct thread_info * now.
6122 (select_singlestep_lwp_callback): Ditto.
6123 (select_event_lwp_callback): Ditto.
6124 (cancel_breakpoints_callback): Ditto.
6125 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6126 not &all_lwps.
6127 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6128 (unsuspend_one_lwp): Update, "entry" parameter is a
6129 struct thread_info * now.
6130 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6131 not &all_lwps.
6132 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6133 Fetch lwpid from thread, not lwp.
6134 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6135 Pass &all_threads to find_inferior, not &all_lwps.
6136 (send_sigstop): Fetch lwpid from thread, not lwp.
6137 (send_sigstop_callback): Update, "entry" parameter is a
6138 struct thread_info * now.
6139 (suspend_and_send_sigstop_callback): Ditto.
6140 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6141 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6142 struct thread_info * now.
6143 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6144 from thread, lwp.
6145 (lwp_running): Update, "entry" parameter is a
6146 struct thread_info * now.
6147 (stop_all_lwps): Fetch ptid from thread.
6148 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6149 (linux_resume_one_lwp): Fetch lwpid from thread.
6150 (linux_set_resume_request): Update, "entry" parameter is a
6151 struct thread_info * now. Fetch pid, lwpid from thread.
6152 (resume_status_pending_p): Update, "entry" parameter is a
6153 struct thread_info * now.
6154 (need_step_over_p): Ditto. Fetch lwpid from thread.
6155 (start_step_over): Fetch lwpid from thread.
6156 (linux_resume_one_thread): Update, "entry" parameter is a
6157 struct thread_info * now. Fetch lwpid from thread.
6158 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6159 (proceed_one_lwp): Update, "entry" parameter is a
6160 struct thread_info * now. Fetch lwpid from thread.
6161 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6162 struct thread_info * now.
6163 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6164 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6165 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6166 directly.
6167 (regsets_store_inferior_registers): Ditto.
6168 (fetch_register, store_register): Ditto.
6169 (linux_read_memory, linux_write_memory): Ditto.
6170 (linux_request_interrupt): Ditto.
6171 (linux_read_auxv): Ditto.
6172 (linux_xfer_siginfo): Ditto.
6173 (linux_qxfer_spu): Ditto.
6174 (linux_qxfer_libraries_svr4): Ditto.
6175 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6176 moved to inferiors.h.
6177 (get_lwp): Delete.
6178 (get_thread_lwp): Update.
6179 (struct lwp_info): Delete member "entry". Simplify comment for
6180 member "thread".
6181 (all_lwps): Delete.
6182 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6183 current_inferior directly.
6184 (update_watch_registers_callback): Update, "entry" parameter is a
6185 struct thread_info * now. Fetch pid from thread.
6186 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6187 (mips_insert_point): Fetch lwpid from current_inferior.
6188 Pass &all_threads to find_inferior, not &all_lwps.
6189 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6190 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6191 directly.
6192 (mips_stopped_data_address): Ditto.
6193 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6194 directly.
6195 * linux-tile-low.c (tile_arch_setup): Ditto.
6196 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6197 (update_debug_registers_callback): Update, "entry" parameter is a
6198 struct thread_info * now. Fetch pid from thread.
6199 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6200 Pass &all_threads to find_inferior, not &all_lwps.
6201 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6202 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6203 Pass &all_threads to find_inferior, not &all_lwps.
6204 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6205 (i386_dr_low_get_status): Ditto.
6206 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6207 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6208 (x86_linux_read_description): Ditto.
6209 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6210
3b8361aa
DE
62112014-02-20 Doug Evans <dje@google.com>
6212
6213 * inferiors.c (get_first_inferior): Fix buglet.
6214
f7667f0d
DE
62152014-02-19 Doug Evans <dje@google.com>
6216
6217 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6218 * inferiors.c (add_thread): Change result type to struct thread_info *.
6219 All callers updated.
6220 (add_lwp): Call add_thread here instead of in callers.
6221 All callers updated.
6222 * linux-low.h (get_lwp_thread): Rewrite.
6223 (struct lwp_info): New member "thread".
6224
b3312d80
DE
62252014-02-19 Doug Evans <dje@google.com>
6226
6227 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6228 All callers updated.
6229
ecc6f45c
DE
62302014-02-19 Doug Evans <dje@google.com>
6231
6232 * inferiors.c (add_thread): Fix whitespace.
6233
649ebbca
DE
62342014-02-19 Doug Evans <dje@google.com>
6235
6236 * dll.c (clear_dlls): Replace accessing list implemention details
6237 with API function.
6238 * gdbthread.h (get_first_thread): Declare.
6239 * inferiors.c (for_each_inferior_with_data): New function.
6240 (get_first_thread): New function.
6241 (find_thread_ptid): Simplify.
6242 (get_first_inferior): New function.
6243 (clear_list): Delete.
6244 (one_inferior_p): New function.
6245 (clear_inferior_list): New function.
6246 (clear_inferiors): Update.
6247 * inferiors.h (for_each_inferior_with_data): Declare.
6248 (clear_inferior_list): Declare.
6249 (one_inferior_p): Declare.
6250 (get_first_inferior): Declare.
6251 * linux-low.c (linux_wait_for_event): Replace accessing list
6252 implemention details with API function.
6253 * server.c (target_running): Ditto.
6254 (accumulate_file_name_length): New function.
6255 (emit_dll_description): New function.
6256 (handle_qxfer_libraries): Replace accessing list implemention
6257 details with API function.
6258 (handle_qxfer_threads_worker): New function.
6259 (handle_qxfer_threads_proper): Replace accessing list implemention
6260 details with API function.
6261 (handle_query): Ditto.
6262 (visit_actioned_threads_callback_ftype): New typedef.
6263 (visit_actioned_threads_data): New struct.
6264 (visit_actioned_threads): Rewrite to be find_inferior callback.
6265 (resume): Call find_inferior.
6266 (handle_status): Replace accessing list implemention
6267 details with API function.
6268 (process_serial_event): Replace accessing list implemention details
6269 with API function.
6270 * target.c (set_desired_inferior): Replace accessing list implemention
6271 details with API function.
6272 * tracepoint.c (same_process_p): New function.
6273 (gdb_agent_about_to_close): Replace accessing list implemention
6274 details with API function.
6275 * win32-low.c (child_delete_thread): Replace accessing list
6276 implemention details with API function.
6277 (match_dll_by_basename): New function.
6278 (dll_is_loaded_by_basename): New function.
6279 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6280 details call to dll_is_loaded_by_basename.
6281
80894984
DE
62822014-02-19 Doug Evans <dje@google.com>
6283
6284 * dll.h (struct dll_info): Add comment.
6285 * gdbthread.h (struct thread_info): Add comment.
6286 (current_ptid): Simplify.
6287 * inferiors.c (add_process): Update.
6288 (remove_process): Update.
6289 * inferiors.h (struct process_info): Rename member "head" to "entry".
6290 * linux-low.c (delete_lwp): Update.
6291 (add_lwp): Update.
6292 (last_thread_of_process_p): Update.
6293 (kill_one_lwp_callback, linux_kill): Update.
6294 (status_pending_p_callback): Update.
6295 (wait_for_sigstop): Update. Simplify read of ptid.
6296 (start_step_over): Update.
6297 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6298 (get_lwp_thread): Update.
6299 (struct lwp_info): Rename member "head" to "entry".
6300 * regcache.h (inferior_list_entry): Delete.
6301 * server.c (kill_inferior_callback): Update.
6302 (detach_or_kill_inferior_callback): Update.
6303 (print_started_pid): Update.
6304 (print_attached_pid): Update.
6305 (process_serial_event): Simplify read of ptid.
6306 * thread-db.c (thread_db_create_event): Update.
6307 (thread_db_get_tls_address): Update.
6308 * win32-low.c (current_inferior_ptid): Simplify.
6309
46917d26
TT
63102014-02-19 Tom Tromey <tromey@redhat.com>
6311
6312 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6313 argument.
6314 (target_supports_btrace): Update.
6315
0759a81e
YQ
63162014-02-14 Yao Qi <yao@codesourcery.com>
6317
6318 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6319 (rsp-low-ipa.o): New target.
6320
a7191e8b
TT
63212014-02-12 Tom Tromey <tromey@redhat.com>
6322
6323 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6324 convert_ascii_to_int.
6325 * regcache.c (registers_to_string): Likewise.
6326 * remote-utils.c (decode_M_packet): Likewise.
6327 * server.c (process_serial_event): Likewise.
6328
ff0e980e
TT
63292014-02-12 Tom Tromey <tromey@redhat.com>
6330
6331 * server.c (handle_query, handle_v_run): Use hex2bin, not
6332 unhexify.
6333 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6334
e9371aff
TT
63352014-02-12 Tom Tromey <tromey@redhat.com>
6336
6337 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6338 convert_int_to_ascii.
6339 * regcache.c (registers_to_string, collect_register_as_string):
6340 Likewise.
6341 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6342 Likewise.
6343 * server.c (process_serial_event): Likewise.
6344 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6345 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6346
971dc0b8
TT
63472014-02-12 Tom Tromey <tromey@redhat.com>
6348
6349 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6350 bin2hex, not hexify.
6351 * tracepoint.c (cmd_qtstatus): Likewise.
6352
0a822afb
TT
63532014-02-12 Tom Tromey <tromey@redhat.com>
6354
6355 * remote-utils.c (monitor_output): Pass explicit length to
6356 hexify.
6357
9c3d6531
TT
63582014-02-12 Tom Tromey <tromey@redhat.com>
6359
6360 * tracepoint.c: Include rsp-low.h.
6361 * server.c: Include rsp-low.h.
6362 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6363 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6364 declare.
6365 * remote-utils.c: Include rsp-low.h.
6366 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6367 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6368 (convert_int_to_ascii, convert_ascii_to_int): Move to
6369 common/rsp-low.c.
6370 * regcache.c: Include rsp-low.h.
6371 * ax.c: Include rsp-low.h.
6372 * Makefile.in (SFILES): Add common/rsp-low.c.
6373 (OBS): Add rsp-low.o.
6374 (rsp-low.o): New target.
6375
01fd3ea5
TT
63762014-02-12 Tom Tromey <tromey@redhat.com>
6377
6378 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6379 Include print-utils.h.
6380 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6381 (plongest, thirty_two, phex_nz): Remove.
6382 * Makefile.in (SFILES): Add common/print-utils.c.
6383 (OBS): Add print-utils.o.
6384 (print-utils-ipa.o): New target.
6385 (print-utils.o): New target.
6386 (IPA_OBJS): Add print-utils-ipa.o.
6387
e99dc820
TT
63882014-02-06 Tom Tromey <tromey@redhat.com>
6389
6390 * Makefile.in (SFILES): Fix indentation.
6391
ee1e2d4f
DE
63922014-02-05 Doug Evans <dje@google.com>
6393
6394 * linux-low.c (linux_wait_for_event): Improve comment.
6395 (linux_wait_1): Keep current_inferior in sync with event_child.
6396
f5a02773
DE
63972014-01-22 Doug Evans <dje@google.com>
6398
6399 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6400
87ce2a04
DE
64012014-01-22 Doug Evans <dje@google.com>
6402
6403 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6404 * configure: Regenerate.
6405 * config.in: Regenerate.
6406 * Makefile.in (SFILES): Add debug.c.
6407 (OBS): Add debug.o.
6408 * debug.c: New file.
6409 * debug.h: New file.
6410 * linux-aarch64-low.c (*): Update all debugging printfs to use
6411 debug_printf instead of fprintf.
6412 * linux-arm-low.c (*): Ditto.
6413 * linux-cris-low.c (*): Ditto.
6414 * linux-crisv32-low.c (*): Ditto.
6415 * linux-m32r-low.c (*): Ditto.
6416 * linux-sparc-low.c (*): Ditto.
6417 * linux-x86.c (*): Ditto.
6418 * linux-low.c (*): Ditto.
6419 (linux_wait_1): Add calls to debug_enter, debug_exit.
6420 (linux_wait): Remove redundant debugging printf.
6421 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6422 (linux_resume, unstop_all_lwps): Ditto.
6423 * mem-break.c (*): Update all debugging printfs to use
6424 debug_printf instead of fprintf.
6425 * remote-utils.c (*): Ditto.
6426 * thread-db.c (*): Ditto.
6427 * server.c #include <ctype.h>, "gdb_vecs.h".
6428 (debug_threads): Moved to debug.c.
6429 (*): Update all debugging printfs to use debug_printf instead of
6430 fprintf.
6431 (start_inferior): Replace call to fflush with call to debug_flush.
6432 (monitor_show_help): Mention set debug-format.
6433 (parse_debug_format_options): New function.
6434 (handle_monitor_command): Handle "monitor set debug-format".
6435 (gdbserver_usage): Mention --debug-format.
6436 (main): Parse --debug-format.
6437 * server.h (debug_threads): Declaration moved to debug.h.
6438 #include "debug.h".
6439 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6440 trace_debug_1 that uses debug_printf.
6441 (tracepoint_look_up_symbols): Update all debugging printfs to use
6442 debug_printf instead of fprintf.
6443
e671835b
BS
64442014-01-20 Baruch Siach <baruch@tkos.co.il>
6445
6446 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6447 sys/ptrace.h.
6448
b5737fa9
PA
64492014-01-17 Pedro Alves <palves@redhat.com>
6450
ea38d2a9 6451 PR build/16445
c7faa97a
PA
6452 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6453 defined after including gdb_proc_service.h.
b5737fa9 6454
40ed484e
DE
64552014-01-16 Doug Evans <dje@google.com>
6456
6457 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6458 (match_dll): Use it.
6459
969c39fb
MM
64602014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6461
6462 * target.h (target_ops) <read_btrace>: Change parameters and
6463 return type to allow error reporting.
6464 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6465 trace reading errors on.
6466 * linux-low.c (linux_low_read_btrace): Pass trace reading
6467 errors on.
6468 (linux_low_disable_btrace): New.
6469
ab7f45ba
DE
64702014-01-15 Doug Evans <dje@google.com>
6471
6472 * inferiors.c (thread_id_to_gdb_id): Delete.
6473 * inferiors.h (thread_id_to_gdb_id): Delete.
6474
66af0f44
EZ
64752014-01-13 Eli Zaretskii <eliz@gnu.org>
6476
6477 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6478 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6479 versions.
6480
9939e131
PA
64812014-01-08 Pedro Alves <palves@redhat.com>
6482
6483 * server.c (handle_status): Don't discard previous queued stop
6484 replies or thread's pending status here.
6485 (main) <disconnection>: Do it here instead.
6486
b7ea362b
PA
64872014-01-08 Pedro Alves <palves@redhat.com>
6488
6489 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6490 * server.c (visit_actioned_threads, handle_pending_status): New
6491 function.
6492 (handle_v_cont): Factor out parts to ...
6493 (resume): ... this new function. If in all-stop, and a thread
6494 being resumed has a pending status, report it without actually
6495 resuming.
6496 (myresume): Adjust to use the new 'resume' function.
6497 (clear_pending_status_callback, set_pending_status_callback)
6498 (find_status_pending_thread_callback): New functions.
6499 (handle_status): Handle the case of multiple threads having
6500 interesting statuses to report. Report threads' real last signal
6501 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6502 with an interesting thread to report the status for, instead of
6503 always reporting the status of the first thread.
6504
28498c42
JB
65052014-01-01 Joel Brobecker <brobecker@adacore.com>
6506
6507 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6508 * gdbreplay.c (gdbreplay_version): Likewise.
6509
f45c82da
YZ
65102013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6511
6512 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6513 iov.iov_len with the real length in use.
6514
379a5e2d
JB
65152013-12-13 Joel Brobecker <brobecker@adacore.com>
6516
6517 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6518 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6519 for all targets that use win32-low.c.
6520 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6521 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6522
4210d83e
PA
65232013-12-13 Pedro Alves <palves@redhat.com>
6524
6525 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6526 if equal to TARGET_WAITKIND_LOADED.
6527 * win32-low.c (cached_status): New static global.
6528 (win32_wait): Add declaration.
6529 (do_initial_child_stuff): Flush all initial pending debug events
6530 up to the initial breakpoint.
6531 (win32_wait): If CACHED_STATUS was set, return that instead
6532 of doing a real wait. Remove the code resuming the execution
6533 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6534 during the initial phase. Also remove the code changing
6535 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6536 TARGET_WAITKIND_STOPPED.
6537
e7f0d979
YQ
65382013-12-11 Yao Qi <yao@codesourcery.com>
6539
6540 * notif.c (handle_notif_ack): Return 0 if no notification
6541 matches.
6542
ebcf782c
DE
65432013-11-20 Doug Evans <dje@google.com>
6544
6545 * linux-low.c (linux_set_resume_request): Fix comment.
6546
20ad9378
DE
65472013-11-20 Doug Evans <dje@google.com>
6548
6549 * linux-low.c (resume_status_pending_p): Tweak comment.
6550
a196ebeb
WT
65512013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6552
6553 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6554 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6555 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6556 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6557 (srv_amd64_regobj): Add amd64-mpx.o.
6558 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6559 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6560 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6561 * i387-fp.c (num_pl_bnd_register) Added constant.
6562 (num_pl_bnd_cfg_registers) Added constant.
6563 (struct i387_xsave) Added reserved area and MPX fields.
6564 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6565 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6566 function.
6567 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6568 (init_registers_amd64_mpx_linux): Declare new function.
6569 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6570 (x86_64_regmap): Add MPX registers.
6571 (x86_linux_read_description): Add MPX case.
6572 (initialize_low_arch): Initialize MPX targets.
6573
0080a2f6
TT
65742013-11-18 Tom Tromey <tromey@redhat.com>
6575
6576 * configure: Rebuild.
6577 * configure.ac: Don't check for stdlib.h.
6578 * gdbreplay.c: Unconditionally include stdlib.h.
6579
2978b111
TT
65802013-11-18 Tom Tromey <tromey@redhat.com>
6581
6582 * config.in: Rebuild.
6583 * configure: Rebuild.
6584 * configure.ac: Don't use AC_HEADER_DIRENT.
6585
a3d08894
TT
65862013-11-18 Tom Tromey <tromey@redhat.com>
6587
6588 * server.h: Don't check HAVE_STRING_H.
6589 * gdbreplay.c: Don't check HAVE_STRING_H.
6590 * configure: Rebuild.
6591
0a5dd17d
TT
65922013-11-18 Tom Tromey <tromey@redhat.com>
6593
6594 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6595 LIBGNU.
6596
1bd2f0ba
TT
65972013-11-08 Tom Tromey <tromey@redhat.com>
6598
6599 * configure, config.in: Rebuild.
6600 * configure.ac: Remove unused configury.
6601
3266f10b
TT
66022013-11-08 Tom Tromey <tromey@redhat.com>
6603
6604 * acinclude.m4: Include common.m4, codeset.m4.
6605 * configure, config.in: Rebuild.
6606 * configure.ac: Use GDB_AC_COMMON.
6607
6682d959
AA
66082013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6609
6610 * linux-s390-low.c (HWCAP_S390_TE): New define.
6611 (s390_arch_setup): Consider the TE field in the HWCAP for
6612 determining 'have_regset_tdb'.
6613
fd0a4d76
SDJ
66142013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6615
6616 PR gdb/16014
6617 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6618 call to sizeof.
6619
1a3d890b
PA
66202013-10-02 Pedro Alves <palves@redhat.com>
6621
6622 * server.c (process_serial_event): Don't output "GDBserver
6623 exiting" if GDB is connected through stdio.
6624 * target.c (mywait): Likewise, be silent if GDB is connected
6625 through stdio.
6626
97ad4581
JB
66272013-10-01 Joel Brobecker <brobecker@adacore.com>
6628
6629 * lynx-low.c (lynx_add_threads_after_attach): New function.
6630 (lynx_attach): Remove call to add_thread. Add call to
6631 lynx_add_threads_after_attach instead.
6632
5b4e221c
MF
66332013-09-28 Mike Frysinger <vapier@gentoo.org>
6634
6635 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6636 * config.in, configure: Regenerated.
6637
ee47b2f8
YQ
66382013-09-18 Yao Qi <yao@codesourcery.com>
6639
6640 PR server/15959
6641 * server.c (start_inferior): Clear 'resume_info'.
6642
d6707650 66432013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6644
d6707650
JW
6645 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6646 for each register.
6647
9243dd0e 66482013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6649
9243dd0e
JW
6650 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6651 linux-tile-low.o to srv_tgtobj.
6652
c623a6ef
WN
66532013-09-16 Will Newton <will.newton@linaro.org>
6654
6655 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6656 out regs.
6657
fb71d39e
PA
66582013-09-06 Pedro Alves <palves@redhat.com>
6659
6660 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6661 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6662 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6663 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6664 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6665 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6666
8e7e9910
PA
66672013-09-06 Pedro Alves <palves@redhat.com>
6668
6669 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6670 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6671
7c3a12ca
PA
66722013-09-06 Pedro Alves <palves@redhat.com>
6673
6674 * linux-amd64-ipa.c: Include tracepoint.h.
6675 * linux-i386-ipa.c: Include tracepoint.h.
6676
8eb3d7b6
RW
66772013-09-06 Ricard Wanderlof <ricardw@axis.com>
6678
6679 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6680 (ps_get_thread_area): New function.
6681
eddddb9d
RW
66822013-09-06 Ricard Wanderlof <ricardw@axis.com>
6683
6684 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6685 (initialize_low_arch): Call init_registers_crisv32 rather than
6686 init_register_crisv32.
6687
533b0600
PA
66882013-09-05 Pedro Alves <palves@redhat.com>
6689
6690 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6691 to ...
6692 * hostio.h: ... this new file.
6693 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6694 win32-low.c: Include hostio.h.
6695
0ce3d3b5
PA
66962013-09-05 Pedro Alves <palves@redhat.com>
6697
6698 * server.h (gdb_client_data, handler_func, callback_handler_func)
6699 (delete_file_handler, add_file_handler, append_callback_event)
6700 (delete_callback_event, start_event_loop, initialize_event_loop):
6701 Move to event-loop.h and include it.
6702 * event-loop.h: New file.
6703
799cdc37
PA
67042013-09-05 Pedro Alves <palves@redhat.com>
6705
6706 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6707 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6708 (loaded_dll, unloaded_dll): Move to ...
6709 * dll.h: ... this new file.
6710 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6711
6a6bbd9d
PA
67122013-09-05 Pedro Alves <palves@redhat.com>
6713
6714 * server.h (current_process, get_thread_process, all_processes)
6715 (add_inferior_to_list, for_each_inferior, current_inferior)
6716 (remove_inferior, add_process, remove_process, find_process_pid)
6717 (have_started_inferiors_p, have_attached_inferiors_p)
6718 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6719 (clear_inferiors, find_inferior, find_inferior_id)
6720 (inferior_target_data, set_inferior_target_data)
6721 (inferior_regcache_data, set_inferior_regcache_data): Move to
6722 inferiors.h, and include it.
6723 * inferiors.h: New file.
6724
f699aaba
PA
67252013-09-05 Pedro Alves <palves@redhat.com>
6726
6727 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6728 Move ...
72f4393d 6729 * ax.h: ... here.
f699aaba 6730
c144c7a0
PA
67312013-09-05 Pedro Alves <palves@redhat.com>
6732
6733 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6734 tracepoint.h.
6735 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6736 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6737 (handle_tracepoint_general_set, handle_tracepoint_query)
6738 (tracepoint_finished_step, tracepoint_was_hit)
6739 (release_while_stepping_state_list, current_traceframe)
6740 (in_readonly_region, traceframe_read_mem)
6741 (fetch_traceframe_registers, traceframe_read_sdata)
6742 (traceframe_read_info, struct fast_tpoint_collect_status)
6743 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6744 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6745 (supply_fast_tracepoint_registers)
6746 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6747 (ipa_tdesc, claim_trampoline_space)
6748 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6749 (agent_mem_read, agent_get_trace_state_variable_value)
6750 (agent_set_trace_state_variable_value, agent_tsv_read)
6751 (agent_mem_read_string, get_raw_reg_func_addr)
6752 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6753 * tracepoint.h: ... this new file.
6754
ff42e6ab
PA
67552013-09-05 Pedro Alves <palves@redhat.com>
6756
6757 * server.h (perror_with_name, error, fatal, warning, paddress)
6758 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6759 include it.
6760 * utils.h: New file.
6761
541af0f4
PA
67622013-09-05 Pedro Alves <palves@redhat.com>
6763
6764 * server.h (remote_debug, noack_mode, transport_is_reliable)
6765 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6766 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6767 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6768 (write_enn, initialize_async_io, enable_async_io)
6769 (disable_async_io, check_remote_input_interrupt_request)
6770 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6771 (dead_thread_notify, prepare_resume_reply)
6772 (decode_address_to_semicolon, decode_address, decode_m_packet)
6773 (decode_M_packet, decode_X_packet, decode_xfer_write)
6774 (decode_search_memory_packet, unhexify, hexify)
6775 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6776 (look_up_one_symbol, relocate_instruction)
6777 (monitor_output): Move to remote-utils.h, and include it.
6778 * remote-utils.h: New file.
6779
eebdf26b
PA
67802013-09-05 Pedro Alves <palves@redhat.com>
6781
6782 * server.h (_): Delete.
6783
3aafd2ff
PA
67842013-09-02 Pedro Alves <palves@redhat.com>
6785
6786 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6787 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6788 allocated.
6789 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6790
cee83bcb
PM
67912013-09-02 Pierre Muller <muller@sourceware.org>
6792
6793 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6794 or WriteProcessMemory complete successfully and handle
6795 ERROR_PARTIAL_COPY error.
6796
9a13b2fa
PA
67972013-09-02 Pedro Alves <palves@redhat.com>
6798
6799 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6800 error instead of EIO.
6801
602e3198
JK
68022013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6803
6804 PR server/15604
6805 * linux-low.c: Include filestuff.h.
6806 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6807 * lynx-low.c: Include filestuff.h.
6808 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6809 * server.c: Include filestuff.h.
6810 (main): Call notice_open_fds.
6811 * spu-low.c: Include filestuff.h.
6812 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6813
96d7229d
LM
68142013-08-22 Luis Machado <lgustavo@codesourcery.com>
6815
6816 * Makefile.in: Explain why ../target and ../nat are not
6817 listed as include file search paths.
6818 (linux-waitpid.o): New object file rule.
6819 * configure.srv (srv_native_linux_obj): New variable.
6820 Replace all occurrences of linux native object files with
6821 $srv_native_linux_obj.
6822 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6823 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6824 (linux_enable_event_reporting): Remove declaration.
6825 (my_waitpid): Moved to common/linux-waitpid.c.
6826 (linux_wait_for_event): Pass ptid when calling
6827 linux_enable_event_reporting.
6828 (linux_supports_tracefork_flag): Remove.
6829 (linux_enable_event_reporting): Likewise.
6830 (linux_tracefork_grandchild): Remove.
6831 (STACK_SIZE): Moved to common/linux-ptrace.c.
6832 (linux_tracefork_child): Remove.
6833 (linux_test_for_tracefork): Remove.
6834 (linux_look_up_symbols): Call linux_supports_traceclone.
6835 (initialize_low): Remove call to linux_test_for_tracefork.
6836 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6837 common/linux-ptrace.h.
6838 (PTRACE_TYPE_ARG4): Likewise.
6839 Include linux-ptrace.h.
6840
32940073
PA
68412013-08-21 Pedro Alves <palves@redhat.com>
6842
6843 * config.in: Renegerate.
6844
33b60d58 68452013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6846
33b60d58
LM
6847 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6848 (SFILES): Remove $(srcdir)/common/target-common.c and
6849 add $(srcdir)/target/waitstatus.c.
6850 (OBS): Remove target-common.o and add waitstatus.o.
6851 (server_h): Remove $(srcdir)/../common/target-common.h and
6852 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6853 and $(srcdir)/../target/waitstatus.h.
6854 (target-common.o): Remove.
6855 (waitstatus.o): New target object file.
6856 * target.h: Do not include target-common.h and
6857 include target/resume.h, target/wait.h and
6858 target/waitstatus.h.
6859
b8e1b30e
LM
68602013-08-13 Luis Machado <lgustavo@codesourcery.com>
6861
6862 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6863 to PTRACE_TYPE_ARG3.
6864 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6865 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6866 PTRACE_TYPE_ARG4.
6867 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6868 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6869
7a60ad40
YQ
68702013-07-27 Jie Zhang <jie@codesourcery.com>
6871 Daniel Jacobowitz <dan@codesourcery.com>
6872 Yao Qi <yao@codesourcery.com>
6873
6874 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6875 (mips-linux-watch.o): New rule.
6876 (mips_linux_watch_h): New variable.
6877 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6878 srv_tgtobj.
6879 * linux-mips-low.c: Include mips-linux-watch.h.
6880 (struct arch_process_info, struct arch_lwp_info): New.
6881 (update_watch_registers_callback): New function.
6882 (mips_linux_new_process, mips_linux_new_thread) New functions.
6883 (mips_linux_prepare_to_resume, mips_insert_point): New
6884 functions.
6885 (mips_remove_point, mips_stopped_by_watchpoint): New
6886 functions.
6887 (rsp_bp_type_to_target_hw_bp_type): New function.
6888 (mips_stopped_data_address): New function.
6889 (the_low_target): Add watchpoint support functions.
6890
de6f69ad
YQ
68912013-07-27 Yao Qi <yao@codesourcery.com>
6892
6893 * i386-low.c: Include break-common.h.
6894 (enum target_hw_bp_type): Remove.
6895
3360c0bf
LM
68962013-07-24 Luis Machado <lgustavo@codesourcery.com>
6897
6898 * Makefile.in (SFILES): /common/target-common.c.
6899 (OBS): Add target-common.o.
6900 (server_h): Add $(srcdir)/../common/target-common.h.
6901 (target-common.o): New target.
6902 * server.c (queue_stop_reply_callback): Free
6903 status string after use.
6904 * target.c (target_waitstatus_to_string): Remove.
6905 * target.h: Include target-common.h.
6906 (resume_kind): Likewise.
6907 (target_waitkind): Likewise.
6908 (target_waitstatus): Likewise.
6909 (TARGET_WNOHANG): Likewise.
6910
bd885420
YQ
69112013-07-04 Yao Qi <yao@codesourcery.com>
6912
6913 * Makefile.in (host_alias): Use @host_noncanonical@.
6914 (target_alias): Use @target_noncanonical@.
6915 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6916 ACX_NONCANONICAL_HOST.
6917 * configure: Regenerated.
6918
6919 Revert:
6920 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6921
6922 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6923 * configure: Rebuild.
6924 * Makefile.in (version_host, version_target): Get from configure.
6925 (version.c): Use $(version_host) and $(version_target).
6926
17ef446e
PA
69272013-07-03 Pedro Alves <palves@redhat.com>
6928
6929 * Makefile.in (config.status): Depend on development.sh.
6930 * acinclude.m4: Include libmcheck.m4.
6931 * configure: Regenerate.
6932
7a9a7487
MG
69332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6934
6935 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6936 attribute inside the parentheses.
6937 (winapi_DebugSetProcessKillOnExit): Ditto.
6938 (winapi_DebugBreakProcess): Ditto.
6939 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6940
49b64de6
MG
69412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6942
6943 * notif.h (notif_event): Add a dummy member to avoid compiler
6944 errors.
6945
d5749ee7
PA
69462013-07-01 Pedro Alves <palves@redhat.com>
6947
6948 * hostio.c (HOSTIO_PATH_MAX): Define.
6949 (require_filename, handle_open, handle_unlink, handle_readlink):
6950 Use it.
6951
d8d2a3ee
PA
69522013-07-01 Pedro Alves <palves@redhat.com>
6953
6954 * server.h: Include "pathmax.h".
6955 * linux-low.c: Don't include sys/param.h.
6956 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6957 MAXPATHLEN.
6958 * win32-low.c: Don't include sys/param.h.
6959 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6960
bc7dea8d
PA
69612013-07-01 Pedro Alves <palves@redhat.com>
6962
6963 * event-loop.c: Don't check HAVE_UNISTD_H before including
6964 <unistd.h>.
6965 * gdbreplay.c: Likewise.
6966 * remote-utils.c: Likewise.
6967 * server.c: Likewise.
6968 * configure.ac: Don't check for unistd.h.
6969 * configure: Regenerate.
6970
d6c2da54
TT
69712013-06-28 Tom Tromey <tromey@redhat.com>
6972
6973 * Makefile.in (version.c): Use version.in, not
6974 common/version.in.
6975
257b6bec
MG
69762013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6977
6978 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6979 * configure: Rebuild.
6980 * Makefile.in (version_host, version_target): Get from configure.
6981 (version.c): Use $(version_host) and $(version_target).
6982
86ebe149
DK
69832013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6984
6985 Fix trace-status to output user name without trailing colon.
6986 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6987
f30aa5af
DK
69882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6989
6990 Fix trace-status to output proper start-time and stop-time.
6991 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6992 output start time and stop time in hex as gdb expects.
6993
28a93511
YQ
69942013-06-26 Pedro Alves <pedro@codesourcery.com>
6995
6996 * tracepoint.c (build_traceframe_info_xml): Output trace state
6997 variables present in the trace buffer.
6998
01208463
TT
69992013-06-24 Tom Tromey <tromey@redhat.com>
7000
7001 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7002 create-version.sh.
7003 (version.o): Remove.
7004 * gdbreplay.c: Include version.h.
7005 (version, host_name): Don't declare.
7006 * server.h: Include version.h.
7007 (version, host_name): Don't declare.
7008
760256f9
PA
70092013-06-12 Pedro Alves <palves@redhat.com>
7010
7011 * linux-x86-low.c (linux_is_elf64): Delete global.
7012 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7013 with local linux_pid_exe_is_elf_64_file use.
7014
030031ee
PA
70152013-06-11 Pedro Alves <palves@redhat.com>
7016
7017 * linux-low.c (regset_disabled, disable_regset): New functions.
7018 (regsets_fetch_inferior_registers)
7019 (regsets_store_inferior_registers): Use them.
7020 (initialize_regsets_info); Don't allocate the disabled_regsets
7021 array here.
7022 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7023 comment.
7024
5da6eb0a
PA
70252013-06-11 Pedro Alves <palves@redhat.com>
7026
7027 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7028 xmalloc.
7029
7e5aaa09
PA
70302013-06-11 Pedro Alves <palves@redhat.com>
7031
7032 * linux-x86-low.c (initialize_low_arch): Call
7033 init_registers_x32_avx_linux.
7034
d878444c
JK
70352013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7036
7037 Fix compatibility with Android Bionic.
7038 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7039 it is not empty.
7040
3aee8918
PA
70412013-06-07 Pedro Alves <palves@redhat.com>
7042
5f2b57b5 7043 PR server/14823
3aee8918
PA
7044 * Makefile.in (OBS): Add tdesc.o.
7045 (IPA_OBJS): Add tdesc-ipa.o.
7046 (tdesc-ipa.o): New rule.
7047 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7048 interface.
7049 * linux-low.c (new_inferior): Delete.
7050 (disabled_regsets, num_regsets): Delete.
7051 (linux_add_process): Adjust to set the new per-process
7052 new_inferior flag.
7053 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7054 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7055 was a stop. When calling arch_setup, switch the current inferior
7056 to the thread that got an event.
7057 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7058 (regsets_fetch_inferior_registers)
7059 (regsets_store_inferior_registers): New regsets_info parameter.
7060 Adjust to use it.
7061 (linux_register_in_regsets): New regs_info parameter. Adjust to
7062 use it.
7063 (register_addr, fetch_register, store_register): New usrregs_info
7064 parameter. Adjust to use it.
7065 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7066 parameter regs_info. Adjust to use it.
7067 (linux_fetch_registers): Get the current inferior's regs_info, and
7068 adjust to use it.
7069 (linux_store_registers): Ditto.
7070 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7071 (initialize_low): Don't initialize the target_regsets here. Call
7072 initialize_low_arch.
7073 * linux-low.h (target_regsets): Delete declaration.
7074 (struct regsets_info): New.
7075 (struct usrregs_info): New.
7076 (struct regs_info): New.
7077 (struct process_info_private) <new_inferior>: New field.
7078 (struct linux_target_ops): Delete the num_regs, regmap, and
7079 regset_bitmap fields. New field regs_info.
7080 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7081 * i387-fp.c (num_xmm_registers): Delete.
7082 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7083 calls to new interface.
7084 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7085 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7086 Infer the number of xmm registers from the regcache's target
7087 description.
7088 * i387-fp.h (num_xmm_registers): Delete.
7089 * inferiors.c (add_thread): Don't install the thread's regcache
7090 here.
7091 * proc-service.c (gregset_info): Fetch the current inferior's
7092 regs_info. Adjust to use it.
7093 * regcache.c: Include tdesc.h.
7094 (register_bytes, reg_defs, num_registers)
7095 (gdbserver_expedite_regs): Delete.
7096 (get_thread_regcache): If the thread doesn't have a regcache yet,
7097 create one, instead of aborting gdbserver.
7098 (regcache_invalidate_one): Rename to ...
7099 (regcache_invalidate_thread): ... this.
7100 (regcache_invalidate_one): New.
7101 (regcache_invalidate): Only invalidate registers of the current
7102 process.
7103 (init_register_cache): Add target_desc parameter, and use it.
7104 (new_register_cache): Ditto. Assert the target description has a
7105 non zero registers_size.
7106 (regcache_cpy): Add assertions. Adjust.
7107 (realloc_register_cache, set_register_cache): Delete.
7108 (registers_to_string, registers_from_string): Adjust.
7109 (find_register_by_name, find_regno, find_register_by_number)
7110 (register_cache_size): Add target_desc parameter, and use it.
7111 (free_register_cache_thread, free_register_cache_thread_one)
7112 (regcache_release, register_cache_size): New.
7113 (register_size): Add target_desc parameter, and use it.
7114 (register_data, supply_register, supply_register_zeroed)
7115 (supply_regblock, supply_register_by_name, collect_register)
7116 (collect_register_as_string, collect_register_by_name): Adjust.
7117 * regcache.h (struct target_desc): Forward declare.
7118 (struct regcache) <tdesc>: New field.
7119 (init_register_cache, new_register_cache): Add target_desc
7120 parameter.
7121 (regcache_invalidate_thread): Declare.
7122 (regcache_invalidate_one): Delete declaration.
7123 (regcache_release): Declare.
7124 (find_register_by_number, register_cache_size, register_size)
7125 (find_regno): Add target_desc parameter.
7126 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7127 declarations.
7128 * remote-utils.c: Include tdesc.h.
7129 (outreg, prepare_resume_reply): Adjust.
7130 * server.c: Include tdesc.h.
7131 (gdbserver_xmltarget): Delete declaration.
7132 (get_features_xml, process_serial_event): Adjust.
7133 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7134 declare.
7135 (struct process_info) <tdesc>: New field.
7136 (ipa_tdesc): Declare.
7137 * tdesc.c: New file.
7138 * tdesc.h: New file.
7139 * tracepoint.c: Include tdesc.h.
7140 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7141 (get_context_regcache): Adjust to pass ipa_tdesc down.
7142 (do_action_at_tracepoint): Adjust to get the register cache size
7143 from the context regcache's description.
7144 (traceframe_walk_blocks): Adjust to get the register cache size
7145 from the current trace frame's description.
7146 (traceframe_get_pc): Adjust to get current trace frame's
7147 description and pass it down.
7148 (gdb_collect): Adjust to get the register cache size from the
7149 IPA's description.
7150 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7151 (gdbserver_xmltarget): Delete.
7152 (initialize_low_tracepoint): Set the ipa's target description.
7153 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7154 (initialize_low_tracepoint): Set the ipa's target description.
7155 * linux-x86-low.c: Include tdesc.h.
7156 [__x86_64__] (is_64bit_tdesc): New.
7157 (ps_get_thread_area, x86_get_thread_area): Use it.
7158 (i386_cannot_store_register): Rename to ...
7159 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7160 (i386_cannot_fetch_register): Rename to ...
7161 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7162 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7163 to new interface.
7164 (target_regsets): Rename to ...
7165 (x86_regsets): ... this.
7166 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7167 interface.
7168 (x86_siginfo_fixup): Use is_64bit_tdesc.
7169 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7170 (tdesc_x32_avx_linux, tdesc_x32_linux)
7171 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7172 Declare.
7173 (x86_linux_update_xmltarget): Delete.
7174 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7175 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7176 (AMD64_LINUX_USER64_CS): New.
7177 (x86_linux_read_description): New, based on
7178 x86_linux_update_xmltarget.
7179 (same_process_callback): New.
7180 (x86_arch_setup_process_callback): New.
7181 (x86_linux_update_xmltarget): New.
7182 (x86_regsets_info): New.
7183 (amd64_linux_regs_info): New.
7184 (i386_linux_usrregs_info): New.
7185 (i386_linux_regs_info): New.
7186 (x86_linux_regs_info): New.
7187 (x86_arch_setup): Reimplement.
7188 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7189 (x86_emit_ops): Ditto.
7190 (the_low_target): Adjust. Install x86_linux_regs_info,
7191 x86_cannot_fetch_register, and x86_cannot_store_register.
7192 (initialize_low_arch): New.
7193 * linux-ia64-low.c (tdesc_ia64): Declare.
7194 (ia64_fetch_register): Adjust.
7195 (ia64_usrregs_info, regs_info): New globals.
7196 (ia64_regs_info): New function.
7197 (the_low_target): Adjust.
7198 (initialize_low_arch): New function.
7199 * linux-sparc-low.c (tdesc_sparc64): Declare.
7200 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7201 Adjust.
7202 (sparc_arch_setup): New function.
7203 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7204 (the_low_target): Adjust.
7205 (initialize_low_arch): New function.
7206 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7207 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7208 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7209 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7210 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7211 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7212 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7213 (tdesc_powerpc_isa205_vsx64l): Declare.
7214 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7215 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7216 (ppc_set_pc, ppc_get_hwcap): Adjust.
7217 (ppc_usrregs_info): Forward declare.
7218 (!__powerpc64__) ppc_regmap_adjusted: New global.
7219 (ppc_arch_setup): Adjust to the current process'es target
7220 description.
7221 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7222 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7223 (ppc_store_evrregset): Adjust.
7224 (target_regsets): Rename to ...
7225 (ppc_regsets): ... this, and make static.
7226 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7227 (ppc_regs_info): New function.
7228 (the_low_target): Adjust.
7229 (initialize_low_arch): New function.
7230 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7231 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7232 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7233 (tdesc_s390x_linux64v2): Declare.
7234 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7235 (s390_fill_gregset, s390_store_last_break): Adjust.
7236 (target_regsets): Rename to ...
7237 (s390_regsets): ... this, and make static.
7238 (s390_get_pc, s390_set_pc): Adjust.
7239 (s390_get_hwcap): New target_desc parameter, and use it.
7240 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7241 (s390_arch_setup): Adjust to set the current process'es target
7242 description. Don't adjust the regmap.
7243 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7244 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7245 (regs_info_3264): New globals.
7246 (s390_regs_info): New function.
7247 (the_low_target): Adjust.
7248 (initialize_low_arch): New function.
7249 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7250 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7251 [__mips64] (init_registers_mips_linux)
7252 (init_registers_mips_dsp_linux): Delete defines.
7253 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7254 (have_dsp): New global.
7255 (mips_read_description): New, based on mips_arch_setup.
7256 (mips_arch_setup): Reimplement.
7257 (get_usrregs_info): New function.
7258 (mips_cannot_fetch_register, mips_cannot_store_register)
7259 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7260 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7261 (target_regsets): Rename to ...
7262 (mips_regsets): ... this, and make static.
7263 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7264 (dsp_regs_info, regs_info): New globals.
7265 (mips_regs_info): New function.
7266 (the_low_target): Adjust.
7267 (initialize_low_arch): New function.
7268 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7269 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7270 Declare.
7271 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7272 (arm_read_description): New, with bits factored from
7273 arm_arch_setup.
7274 (arm_arch_setup): Reimplement.
7275 (target_regsets): Rename to ...
7276 (arm_regsets): ... this, and make static.
7277 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7278 (arm_regs_info): New function.
7279 (the_low_target): Adjust.
7280 (initialize_low_arch): New function.
7281 * linux-m68k-low.c (tdesc_m68k): Declare.
7282 (target_regsets): Rename to ...
7283 (m68k_regsets): ... this, and make static.
7284 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7285 (m68k_regs_info): New function.
7286 (m68k_arch_setup): New function.
7287 (the_low_target): Adjust.
7288 (initialize_low_arch): New function.
7289 * linux-sh-low.c (tdesc_sharch): Declare.
7290 (target_regsets): Rename to ...
7291 (sh_regsets): ... this, and make static.
7292 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7293 (sh_regs_info, sh_arch_setup): New functions.
7294 (the_low_target): Adjust.
7295 (initialize_low_arch): New function.
7296 * linux-bfin-low.c (tdesc_bfin): Declare.
7297 (bfin_arch_setup): New function.
7298 (bfin_usrregs_info, regs_info): New globals.
7299 (bfin_regs_info): New function.
7300 (the_low_target): Adjust.
7301 (initialize_low_arch): New function.
7302 * linux-cris-low.c (tdesc_cris): Declare.
7303 (cris_arch_setup): New function.
7304 (cris_usrregs_info, regs_info): New globals.
7305 (cris_regs_info): New function.
7306 (the_low_target): Adjust.
7307 (initialize_low_arch): New function.
7308 * linux-cris-low.c (tdesc_crisv32): Declare.
7309 (cris_arch_setup): New function.
7310 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7311 (cris_regs_info): New function.
7312 (the_low_target): Adjust.
7313 (initialize_low_arch): New function.
7314 * linux-m32r-low.c (tdesc_m32r): Declare.
7315 (m32r_arch_setup): New function.
7316 (m32r_usrregs_info, regs_info): New globals.
7317 (m32r_regs_info): Adjust.
7318 (initialize_low_arch): New function.
7319 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7320 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7321 (tic6x_usrregs_info): Forward declare.
7322 (tic6x_read_description): New function, based on ...
7323 (tic6x_arch_setup): ... this. Reimplement.
7324 (target_regsets): Rename to ...
7325 (tic6x_regsets): ... this, and make static.
7326 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7327 (tic6x_regs_info): New function.
7328 (the_low_target): Adjust.
7329 (initialize_low_arch): New function.
7330 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7331 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7332 (target_regsets): Rename to ...
7333 (xtensa_regsets): ... this, and make static.
7334 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7335 globals.
7336 (xtensa_arch_setup, xtensa_regs_info): New functions.
7337 (the_low_target): Adjust.
7338 (initialize_low_arch): New function.
7339 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7340 (nios2_arch_setup): Set the current process'es tdesc.
7341 (target_regsets): Rename to ...
7342 (nios2_regsets): ... this.
7343 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7344 (nios2_regs_info): New function.
7345 (the_low_target): Adjust.
7346 (initialize_low_arch): New function.
a261b8f5
PA
7347 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7348 (aarch64_arch_setup): Set the current process'es tdesc.
7349 (target_regsets): Rename to ...
7350 (aarch64_regsets): ... this.
7351 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7352 (aarch64_regs_info): New function.
7353 (the_low_target): Adjust.
7354 (initialize_low_arch): New function.
3aee8918
PA
7355 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7356 globals.
7357 (target_regsets): Rename to ...
7358 (tile_regsets): ... this.
7359 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7360 (tile_regs_info): New function.
7361 (tile_arch_setup): Set the current process'es tdesc.
7362 (the_low_target): Adjust.
7363 (initialize_low_arch): New function.
7364 * spu-low.c (tdesc_spu): Declare.
7365 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7366 * win32-arm-low.c (tdesc_arm): Declare.
7367 (arm_arch_setup): New function.
7368 (the_low_target): Install arm_arch_setup instead of
7369 init_registers_arm.
7370 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7371 (init_windows_x86): Rename to ...
7372 (i386_arch_setup): ... this. Set `win32_tdesc'.
7373 (the_low_target): Adjust.
7374 * win32-low.c (win32_tdesc): New global.
7375 (child_add_thread): Don't create the thread cache here.
7376 (do_initial_child_stuff): Set the new process'es tdesc.
7377 * win32-low.h (struct target_desc): Forward declare.
7378 (win32_tdesc): Declare.
7379 * lynx-i386-low.c (tdesc_i386): Declare global.
7380 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7381 * lynx-low.c (lynx_tdesc): New global.
7382 (lynx_add_process): Set the new process'es tdesc.
7383 * lynx-low.h (struct target_desc): Forward declare.
7384 (lynx_tdesc): Declare global.
7385 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7386 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7387 * nto-low.c (nto_tdesc): New global.
7388 (do_attach): Set the new process'es tdesc.
7389 * nto-low.h (struct target_desc): Forward declare.
7390 (nto_tdesc): Declare.
7391 * nto-x86-low.c (tdesc_i386): Declare.
7392 (nto_x86_arch_setup): Set `nto_tdesc'.
7393
b1fbec62
GB
73942013-06-04 Gary Benson <gbenson@redhat.com>
7395
7396 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7397 to qSupported response when appropriate.
7398 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7399 with nonzero-length annex.
7400 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7401 arguments supplied in annex.
7402
d1ec4ce7
DE
74032013-05-31 Doug Evans <dje@google.com>
7404
ac44adcb 7405 PR server/15594
d1ec4ce7
DE
7406 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7407 64 bits in 64-cross-32 environment.
7408
9b25f2d3
PA
74092013-05-28 Pedro Alves <palves@redhat.com>
7410
7411 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7412 (aarch64-without-fpu.c): Delete rule.
7413 * configure.srv (aarch64*-*-linux*): Remove references to
7414 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7415 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7416 declaration.
7417
6740dc9c
PA
74182013-05-24 Pedro Alves <palves@redhat.com>
7419
7420 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7421 instead of strchr/decode_address. Error if the range isn't split
7422 with a ','. Don't assume there's be a ':' in the action.
7423
c2d6af84
PA
74242013-05-23 Yao Qi <yao@codesourcery.com>
7425 Pedro Alves <palves@redhat.com>
7426
7427 * linux-low.c (lwp_in_step_range): New function.
7428 (linux_wait_1): If the thread was range stepping and stopped
7429 outside the stepping range, report the stop to GDB. Otherwise,
7430 continue stepping. Add range stepping debug output.
7431 (linux_set_resume_request): Copy the step range from the resume
7432 request to the lwp.
7433 (linux_supports_range_stepping): New.
7434 (linux_target_ops) <supports_range_stepping>: Set to
7435 linux_supports_range_stepping.
7436 * linux-low.h (struct linux_target_ops)
7437 <supports_range_stepping>: New field.
7438 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7439 * linux-x86-low.c (x86_supports_range_stepping): New.
7440 (the_low_target) <supports_range_stepping>: Set to
7441 x86_supports_range_stepping.
7442 * server.c (handle_v_cont): Handle 'r' action.
7443 (handle_v_requests): Append ";r" if the target supports range
7444 stepping.
7445 * target.h (struct thread_resume) <step_range_start,
7446 step_range_end>: New fields.
7447 (struct target_ops) <supports_range_stepping>:
7448 New field.
7449 (target_supports_range_stepping): New macro.
7450
58794e1a
JB
74512013-05-17 Joel Brobecker <brobecker@adacore.com>
7452
7453 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7454 confusion in comment.
7455
d631c5a7
JB
74562013-05-17 Joel Brobecker <brobecker@adacore.com>
7457
7458 * lynx-low.c (struct process_info_private): New type.
7459 (lynx_add_process): New function.
7460 (lynx_create_inferior, lynx_attach): Replace calls to
7461 add_process by calls to lynx_add_process.
7462 (lynx_resume): If PTID is null, then try using
7463 current_process()->private->last_wait_event_ptid.
7464 Add comments.
7465 (lynx_clear_inferiors): Delete. The contents of that function
7466 has been inlined in lynx_mourn;
7467 (lynx_wait_1): Save the ptid in the process's private data.
7468 (lynx_mourn): Free the process' private data. Replace call
7469 to lynx_clear_inferiors by call to clear_inferiors.
7470
96f7a20f
YQ
74712013-05-17 Yao Qi <yao@codesourcery.com>
7472
7473 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7474 the right place.
7475
db0dfaa0
LM
74762013-05-16 Luis Machado <lgustavo@codesourcery.com>
7477
7478 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7479 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7480 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7481 PT_TEXT_END_ADDR guards. Update comments.
7482 (linux_target_op) <read_offsets>: Conditionally define to
7483 linux_read_offsets if the target is UCLIBC and if it defines
7484 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7485
68f5f838
SL
74862013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7487 Andrew Jenner <andrew@codesourcery.com>
7488
7489 * Makefile.in (SFILES): Add linux-nios2-low.c.
7490 (clean): Add action to delete nios2-linux.c.
7491 (nios2-linux.c): New rule.
7492 * configure.srv: Add nios2*-*-linux*.
7493 * linux-nios2-low.c: New.
7494
1ebff1fd
HAQ
74952013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7496
7497 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7498
f6150862
HZ
74992013-04-25 Hui Zhu <hui@codesourcery.com>
7500
7501 PR gdb/15186
f6150862
HZ
7502 * ax.c (ax_printf): Add fflush.
7503
614c279d
TT
75042013-04-22 Tom Tromey <tromey@redhat.com>
7505
7506 * Makefile.in (SFILES): Add filestuff.c.
7507 (OBS): Add filestuff.o.
7508 (filestuff.o): New target.
7509 * config.in, configure: Rebuild.
7510 * configure.ac: Check for fdwalk, pipe2.
7511
7d4e5717
PA
75122013-04-17 Pedro Alves <palves@redhat.com>
7513
7514 * configure.ac (USE_THREAD_DB): Delete variable.
7515 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7516 Don't AC_SUBST USE_THREAD_DB.
7517 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7518 * config.in, configure: Regenerate.
7519
d5c93e41
PA
75202013-04-16 Pedro Alves <palves@redhat.com>
7521
7522 * linux-low.h (struct lwp_info) <thread_known>: Move under
7523 the USE_THREAD_DB #ifdef.
7524
04f5fe89
PA
75252013-04-16 Pedro Alves <palves@redhat.com>
7526
7527 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7528 (linux-low.o): Delete rule.
7529 * linux-low.h: Always include "gdb_thread_db.h" instead of
7530 conditionally including thread_db.h.
7531 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7532 HAVE_THREAD_DB_H.
7533
480b27bf
JK
75342013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7535
7536 * Makefile.in (install-only): Fix make install regression.
7537
43662968
JK
75382013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7539
7540 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7541 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7542 installation.
7543 * gdbserver.1: Remove.
7544
3e74e146
PA
75452013-03-22 Pedro Alves <palves@redhat.com>
7546
7547 * linux-low.c (handle_extended_wait): Don't call
7548 linux_enable_event_reporting.
7549
a8347a2a
TT
75502013-03-15 Tony Theodore <tonyt@logyst.com>
7551
7552 PR build/9098:
7553 * Makefile.in (SHELL): Use @SHELL@.
7554
eeb56fa7
SDJ
75552013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7556
7557 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7558 compiler warning.
7559
4fa7e2ff
JB
75602013-03-13 Joel Brobecker <brobecker@adacore.com>
7561
7562 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7563 Remove extraneous NULL element.
7564
8ddb1965
YQ
75652013-03-13 Yao Qi <yao@codesourcery.com>
7566
7567 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7568 'V' block in trace frame.
7569
9accd112
MM
75702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7571
7572 * target.h (struct target_ops): Add btrace ops.
7573 (target_supports_btrace): New macro.
7574 (target_enable_btrace): New macro.
7575 (target_disable_btrace): New macro.
7576 (target_read_btrace): New macro.
7577 * gdbthread.h (struct thread_info): Add btrace field.
7578 * server.c: Include btrace-common.h.
7579 (handle_btrace_general_set): New function.
7580 (handle_btrace_enable): New function.
7581 (handle_btrace_disable): New function.
7582 (handle_general_set): Call handle_btrace_general_set.
7583 (handle_qxfer_btrace): New function.
7584 (struct qxfer qxfer_packets[]): Add btrace entry.
7585 * inferiors.c (remove_thread): Disable btrace.
7586 * linux-low: Include linux-btrace.h.
7587 (linux_low_enable_btrace): New function.
7588 (linux_low_read_btrace): New function.
7589 (linux_target_ops): Add btrace ops.
7590 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7591 Add srv_linux_btrace=yes.
7592 (x86_64-*-linux*): Add linux-btrace.o.
7593 Add srv_linux_btrace=yes.
7594 * configure.ac: Define HAVE_LINUX_BTRACE.
7595 * config.in: Regenerated.
7596 * configure: Regenerated.
7597
5cc22e4c
MM
75982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7599
7600 * server.c (handle_qxfer): Preserve error message if -3 is
7601 returned.
7602 (qxfer): Document the -3 return value.
7603
7c97f91e
MM
76042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7605
7606 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7607 (linux_btrace_h): New variable.
7608 (linux-btrace.o): New rule.
7609
be9a119c 76102013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7611 Hafiz Abid Qadeer <abidh@codesourcery.com>
7612
7613 * tracepoint.c (trace_buffer_size): New global.
7614 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7615 (init_trace_buffer): Change to one-argument function. Allocate
7616 trace buffer memory.
7617 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7618 handle QTBuffer:size packet.
7619 (cmd_bigqtbuffer_size): New function.
7620 (initialize_tracepoint): Call init_trace_buffer with
7621 DEFAULT_TRACE_BUFFER_SIZE.
7622 * server.c (handle_query): Add QTBuffer:size in the
7623 supported packets.
7624
e64f7499
YQ
76252013-03-07 Yao Qi <yao@codesourcery.com>
7626
7627 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7628 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7629 of -1.
7630 (cmd_qtsp): Adjust condition. Do post increment.
7631 Set cur_action and cur_step_action back to 0.
7632
f0ae6fc3
PA
76332013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7634
7635 PR server/15236
7636 * linux-low.c (linux_write_memory): Return early success if LEN is
7637 zero.
7638
b5b0b0af
CV
76392013-03-05 Corinna Vinschen <vinschen@redhat.de>
7640
334ad4a8 7641 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7642
589bc927
TT
76432013-02-28 Tom Tromey <tromey@redhat.com>
7644
7645 * configure.ac: Invoke AC_SYS_LARGEFILE.
7646 * configure, config.in: Rebuild.
7647
dfe07582
CV
76482013-02-28 Corinna Vinschen <vinschen@redhat.com>
7649
7650 * win32-low.c: Throughout, fix format strings and casts of
7651 printf-like functions to avoid type related warnings on all
7652 platforms.
7653 (get_child_debug_event): Print dwDebugEventCode as hex since
7654 that's how it's usually documented.
7655
736cd585
YQ
76562013-02-28 Yao Qi <yao@codesourcery.com>
7657
7658 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7659 pulongest.
7660
e1f58301
JW
76612013-02-27 Jiong Wang <jiwang@tilera.com>
7662
7663 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7664 (reg-tilegx32.c): New rule.
7665 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7666 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7667 different register info initializer according to elf class.
7668 (init_registers_tilgx32): New function. The tilegx32 register info
7669 initializer.
7670 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7671 (tile_store_gregset): Likewise.
7672
d171ca78
YQ
76732013-02-27 Yao Qi <yao@codesourcery.com>
7674
7675 * server.c (process_point_options): Print debug message when
7676 debug_threads is true.
7677
282bbdf3
YQ
76782013-02-26 Yao Qi <yao@codesourcery.com>
7679
7680 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7681
aca22551
PA
76822013-02-19 Pedro Alves <palves@redhat.com>
7683 Kai Tietz <ktietz@redhat.com>
7684
7685 PR gdb/15161
7686
7687 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7688 instead of strtoul to extract address from packet.
7689 (process_serial_event) <'z'>: Likewise.
7690
4f3cee1c
YQ
76912013-02-18 Yao Qi <yao@codesourcery.com>
7692
7693 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7694
8e1d55a3
PA
76952013-02-14 Pedro Alves <palves@redhat.com>
7696
7697 Plug memory leak.
7698
7699 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7700 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7701
458820da
PA
77022013-02-14 Pedro Alves <palves@redhat.com>
7703
7704 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7705
baea0dae
PA
77062013-02-14 Pedro Alves <palves@redhat.com>
7707
7708 * tracepoint.c (save_string): Delete.
7709 (add_tracepoint_action): Use savestring instead of save_string.
7710
0b1afbb3
PA
77112013-02-12 Pedro Alves <palves@redhat.com>
7712
7713 * linux-xtensa-low.c: Ditto.
7714 * xtensa-xtregs.c: Ditto.
7715
8a4ac37e
PA
77162013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7717
7718 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7719 thread_db.
7720
148de6bb
MS
77212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7722
7723 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7724 aarch64_num_wp_regs and aarch64_num_bp_regs to
7725 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7726
55fac6e0
MS
77272013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7728
7729 * linux-aarch64-low.c (ps_get_thread_area): Replace
7730 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7731
176eb98c
MS
77322013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7733 Marcus Shawcroft <marcus.shawcroft@arm.com>
7734 Nigel Stephens <nigel.stephens@arm.com>
7735 Yufeng Zhang <yufeng.zhang@arm.com>
7736
7737 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7738 (aarch64.c, aarch64-without-fpu.c): New targets.
7739 * configure.srv (aarch64*-*-linux*): New.
7740 * linux-aarch64-low.c: New file.
7741
56f7af9c
MS
77422013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7743
43aaf8b6 7744 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7745 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7746 (dequeue_one_deferred_signal, linux_resume_one_thread)
7747 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7748 (linux_tracefork_grandchild, linux_test_for_tracefork)
7749 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7750 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7751 where the argument is 0.
7752
60f662b0
YQ
77532013-01-25 Yao Qi <yao@codesourcery.com>
7754
7755 * event-loop.c: Include "queue.h".
7756 (gdb_event_p): New typedef.
7757 (struct gdb_event) <next_event>: Remove.
7758 (event_queue): Change to QUEUE(gdb_event_p).
7759 (async_queue_event): Remove.
7760 (gdb_event_xfree): New.
7761 (initialize_event_loop): New.
7762 (process_event): Use API from QUEUE.
7763 (wait_for_event): Likewise.
7764 * server.c (main): Call initialize_event_loop.
7765 * server.h (initialize_event_loop): Declare.
7766
5ae4861a
YQ
77672013-01-18 Yao Qi <yao@codesourcery.com>
7768
7769 * ax.h (struct eval_agent_expr_context): New.
7770 (gdb_eval_agent_expr): Update declaration.
7771 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7772 TFRAME. Add new argument CTX.
7773 * server.h (struct eval_agent_expr_context): Declare.
7774 (agent_mem_read, agent_tsv_read): Update declaration.
7775 (agent_mem_read_string): Likewise.
7776 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7777 (add_traceframe_block): Add new argument TPOINT.
7778 Increase TPOINT->traceframe_usage.
7779 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7780 eval_tracepoint_agent_expr.
7781 (condition_true_at_tracepoint): Likewise.
7782 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7783 (agent_mem_read_string, agent_tsv_read): Likewise.
7784
85e00e85
YQ
77852013-01-16 Yao Qi <yao@codesourcery.com>
7786
7787 * linux-low.c (linux_resume_one_lwp): Don't check
7788 'lwp->bp_reinsert != 0'.
7789
4039cf45
JB
77902013-01-07 Joel Brobecker <brobecker@adacore.com>
7791 Pedro Alves <palves@redhat.com>
7792
7793 * lynx-low.c (ptrace_request_to_str): Define a temporary
7794 macro and use it to simplify this function's implementation.
7795
9044dee2
JB
77962013-01-07 Joel Brobecker <brobecker@adacore.com>
7797
7798 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7799 sets errno.
7800
e6352c8f
JB
78012013-01-07 Joel Brobecker <brobecker@adacore.com>
7802
7803 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7804
50681a27
JB
78052013-01-07 Joel Brobecker <brobecker@adacore.com>
7806
7807 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7808
3f6e77ef
JB
78092013-01-07 Joel Brobecker <brobecker@adacore.com>
7810
7811 * lynx-low.c (lynx_resume): Use the resume_info parameter
7812 to determine the ptid for the lynx_ptrace call, unless
7813 it is equal to minus_one_ptid, in which case we use the
7814 ptid of the current_inferior.
7815 (lynx_wait_1): After having received a thread create/exit
7816 event, resume the inferior's execution using the signaling
7817 thread's ptid, rather than the old ptid.
7818
7fda33ae
JB
78192013-01-07 Joel Brobecker <brobecker@adacore.com>
7820
7821 * lynx-low.c (lynx_resume): Delete variable ret.
7822
b9786c74
JB
78232013-01-01 Joel Brobecker <brobecker@adacore.com>
7824
7825 * gdbreplay.c (gdbreplay_version): Update copyright year.
7826 * server.c (gdbserver_version): Likewise.
7827
8b93d60f
JB
78282012-12-17 Joel Brobecker <brobecker@adacore.com>
7829
7830 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7831 new thread.
7832
037335a7
JB
78332012-12-17 Joel Brobecker <brobecker@adacore.com>
7834
7835 * lynx-low.c (ptrace_request_to_str): Add handling for
7836 PTRACE_GETTRACESIG.
7837
52d4cbd8
JB
78382012-12-17 Joel Brobecker <brobecker@adacore.com>
7839
7840 * lynx-low.c (lynx_attach): Delete variable new_process.
7841
ab8f6ca9
JB
78422012-12-17 Joel Brobecker <brobecker@adacore.com>
7843
7844 * lynx-low.c (lynx_create_inferior): Delete variable
7845 new_process.
7846
78cbc024
JB
78472012-12-17 Joel Brobecker <brobecker@adacore.com>
7848
7849 * lynx-low.c (ptrace_request_to_str): Do not handle
7850 PTRACE_GETTHREADLIST if this macro does not exist.
7851
14a00470
YQ
78522012-12-15 Yao Qi <yao@codesourcery.com>
7853
7854 * Makefile.in (OBS): Add notif.o.
7855 * notif.c, notif.h: New.
7856 * server.c: Include "notif.h".
7857 (struct vstop_notif) <next>: Remove.
7858 <base>: New field.
7859 (queue_stop_reply): Update.
7860 (push_event, send_next_stop_reply): Remove.
7861 (discard_queued_stop_replies): Update.
7862 (notif_stop): New variable.
7863 (handle_v_stopped): Remove.
7864 (handle_v_requests): Don't call handle_v_stopped. Call
7865 handle_ack_notif instead.
7866 (queue_stop_reply_callback): Call notif_event_enque instead
7867 of queue_stop_reply.
7868 (handle_status): Don't call send_next_stop_reply, call
7869 notif_write_event instead.
7870 (kill_inferior_callback): Likewise.
7871 (detach_or_kill_inferior_callback): Likewise.
7872 (main): Call initialize_notif.
7873 (process_serial_event): Call QUEUE_is_empty.
7874 (handle_target_event): Call notif_push instead of push event.
7875 * server.h (push_event): Remove declaration.
7876
61c125b9
TT
78772012-12-10 Tom Tromey <tromey@redhat.com>
7878
7879 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7880 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7881 macros.
7882 (.c.o): Rewrite.
7883 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7884 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7885 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7886 (amd64-linux-ipa.o, ax.o): Rewrite.
7887 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7888 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7889 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7890 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7891 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7892 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7893 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7894 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7895 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7896 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7897 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7898 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7899 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7900 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7901 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7902 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7903 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7904 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7905 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7906 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7907 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7908 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7909 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7910 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7911 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7912 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7913 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7914 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7915 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7916 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7917 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7918 (reg-tilegx.o): Remove.
7919 (all_object_files): New macro.
7920 Include .deps files.
7921 * aclocal.m4, configure: Rebuild.
7922 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7923 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7924 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7925
e90e9ad9
TT
79262012-12-05 Tom Tromey <tromey@redhat.com>
7927
7928 PR gdb/14917:
7929 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7930
02d403bf 79312012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7932
7933 * configure.ac: Check for linux/perf_event.h.
7934 * config.in: Regenerated.
7935 * configure: Regenerated.
7936
0270a750
PA
79372012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7938
7939 * hostio.c (handle_readlink): Decrease buffer size
7940 parameter passed to readlink by one byte.
7941
8c29b58e
YQ
79422012-11-26 Yao Qi <yao@codesourcery.com>
7943
7944 * configure.ac (build_warnings): Append '-Wempty-body'.
7945 * configure: Regenerated.
7946 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7947 body.
7948
8bdce1ff
PM
79492012-11-15 Pierre Muller <muller@sourceware.org>
7950
7951 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7952 * config.in: Regenerate.
7953 * configure: Regenerate.
7954 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7955 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7956 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7957 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7958 header.
7959 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7960 instead of <sys/wait.h> header.
7961 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7962
02d403bf 79632012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7964
7965 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7966 (various make rules): Remove -DGDBSERVER
7967
fbd5db48
YQ
79682012-11-09 Yao Qi <yao@codesourcery.com>
7969
7970 * spu-low.c (current_ptid): Move it to ..
7971 * gdbthread.h: ... here. New.
7972 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7973 * server.c (myresume, process_serial_event): Likewise.
7974 * thread-db.c (thread_db_find_new_threads): Likewise.
7975 * tracepoint.c (run_inferior_command): Likewise.
7976
b3dc46ff
AB
79772012-10-01 Andrew Burgess <aburgess@broadcom.com>
7978
7979 * server.c (handle_search_memory_1): Include access length in
7980 warning message.
7981
07c04788
HPN
79822012-09-05 Michael Brandt <michael.brandt@axis.com>
7983
7984 * linux-crisv32-low.c: Fix compile errors.
7985
918d227b
YQ
79862012-09-04 Yao Qi <yao@codesourcery.com>
7987
7988 * tracepoint.c (cmd_qtsv): Adjust debug message.
7989 Don't check CUR_TPOINT.
7990
18c1b81a
YQ
79912012-08-28 Yao Qi <yao@codesourcery.com>
7992
7993 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7994 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7995 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7996 Remove declarations of xmalloc, xreallloc, xstrdup and
7997 freeargv.
7998 * Makefile.in (libiberty_h): New.
7999 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8000 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8001
dc82f37b
YQ
80022012-08-23 Yao Qi <yao@codesourcery.com>
8003
8004 * server.h: Remove declaration of 'xsnprintf'.
8005
406b1477
KS
80062012-08-22 Keith Seitz <keiths@redhat.com>
8007
8008 * server.h: Include build-gnulib-gbserver/config.h.
8009 * gdbreplay.c: Likewise.
8010
e6712ff1
DE
80112012-08-08 Doug Evans <dje@google.com>
8012
8013 * Makefile.in (SFILES): Add gdb_vecs.c.
8014 (OBS): Add gdb_vecs.o.
8015 (gdb_vecs_h, host_defs_h): New variables.
8016 (thread-db.o): Add $(gdb_vecs_h) dependency.
8017 (gdb_vecs.o): New rule.
8018 * thread-db.c: #include "gdb_vecs.h".
8019 (thread_db_load_search): Use a vector to iterate over path elements.
8020 Handle text appearing after "$pdir".
8021
8022 * configure.ac: Add check for strstr.
8023 * config.in: Regenerate.
8024 * configure: Regenerate.
8025
7c3270ae
UW
80262012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8027
8028 * hostio.c (handle_pread): If pread fails, fall back to attempting
8029 lseek/read.
8030 (handle_pwrite): Likewise for pwrite.
8031
b62e2b27
UW
80322012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8033
8034 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8035 between unsupported TYPE and unimplementable ADDR/LEN combination.
8036 (arm_insert_point): Act on new return value.
8037
78a99e91
PA
80382012-07-31 Pedro Alves <palves@redhat.com>
8039
8040 * server.c (process_point_options): Only skip tokens if we find
8041 one that is unrecognized. Don't treat 'X' specially while
8042 skipping unrecognized tokens.
8043
fcf303ab
UW
80442012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8045
8046 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8047 to 4-byte-align HW breakpoint addresses for Thumb.
8048
7255706c
YQ
80492012-07-27 Yao Qi <yao@codesourcery.com>
8050
8051 PR remote/14161.
8052
8053 * server.h: Declare gdb_agent_about_to_close.
8054 * target.c (kill_inferior): Include "agent.h".
8055 New. Send command 'kill'.
8056 * target.h (kill_inferior): Removed macro.
8057 * tracepoint.c (gdb_agent_about_to_close): New.
8058 (gdb_agent_helper_thread): Handle command 'close'.
8059 Wait endlessly until the inferior stops.
8060 Install gdb_agent_remove_socket to atexit hook.
8061 (agent_socket_name): New static variable.
8062 (gdb_agent_socket_init): Replace local variable 'name' with
8063 'agent_socket_name'.
8064 (gdb_agent_remove_socket): New.
8065
5a3f286f
YQ
80662012-07-27 Yao Qi <yao@codesourcery.com>
8067
8068 * server.c (process_point_options): Stop at 'X' when parsing.
8069
961bd387
ME
80702012-07-19 Michael Eager <eager@eagercon.com>
8071
a261b8f5 8072 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8073 to hw_execute.
8074 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8075 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8076 hardware breakpoint.
8077
aa7c7447
JK
80782012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8079
8080 * gdbserver/linux-low.c (initialize_low): Call
8081 linux_ptrace_init_warnings.
8082
7f216e7c
DE
80832012-07-02 Doug Evans <dje@google.com>
8084
8085 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8086 pointer to int.
8087
d3ce09f5
SS
80882012-07-02 Stan Shebs <stan@codesourcery.com>
8089
8090 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8091 (ax.o): Add it to build rule.
8092 (ax-ipa.o): Ditto.
8093 (OBS): Add format.o.
8094 (IPA_OBS): Add format.o.
8095 * server.c (handle_query): Claim support for breakpoint commands.
8096 (process_point_options): Add command case.
8097 (process_serial_event): Leave running if there are printfs in
8098 effect.
8099 * mem-break.h (any_persistent_commands): Declare.
8100 (add_breakpoint_commands): Declare.
8101 (gdb_no_commands_at_breakpoint): Declare.
8102 (run_breakpoint_commands): Declare.
8103 * mem-break.c (struct point_command_list): New struct.
8104 (struct breakpoint): New field command_list.
8105 (any_persistent_commands): New function.
8106 (add_commands_to_breakpoint): New function.
8107 (add_breakpoint_commands): New function.
8108 (gdb_no_commands_at_breakpoint): New function.
8109 (run_breakpoint_commands): New function.
8110 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8111 locally.
8112 * ax.c: Include format.h.
8113 (ax_printf): New function.
8114 (gdb_eval_agent_expr): Add printf opcode.
8115
2f8f6aed
YQ
81162012-06-13 Yao Qi <yao@codesourcery.com>
8117
8118 * server.c (start_inferior): Remove duplicated writes to fields
8119 'last_resume_kind' and 'last_status' of 'current_inferior'.
8120
0c9070b3
YQ
81212012-06-12 Yao Qi <yao@codesourcery.com>
8122 Pedro Alves <palves@redhat.com>
8123
8124 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8125 comment.
8126 * server.c (handle_v_cont): Extend comment.
8127
c52daf70
YQ
81282012-06-11 Yao Qi <yao@codesourcery.com>
8129
8130 * linux-low.c (linux_attach): Add 'static'.
8131
d38bbb0a
YQ
81322012-06-06 Yao Qi <yao@codesourcery.com>
8133
8134 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8135
89dc0afd
JK
81362012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8137
8138 Fix gcc -flto compilation warning.
8139 * server.c (main): Make variable multi_mode and attach volatile.
8140
75f62ce7
TJB
81412012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8142
8143 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8144 if the platform doesn't know about it.
8145
65f479b6
PA
81462012-05-30 Jeff Kenton <jkenton@tilera.com>
8147
8148 * Makefile.in (SFILES): Add linux-tile-low.c.
8149 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8150 * configure.srv: Handle tilegx-*-linux*.
8151 * linux-tile-low.c: New file.
8152
0c5bf5a9
JK
81532012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8154
8155 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8156
a493e3e2
PA
81572012-05-24 Pedro Alves <palves@redhat.com>
8158
8159 PR gdb/7205
8160
43aaf8b6 8161 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8162
2ea28649
PA
81632012-05-24 Pedro Alves <palves@redhat.com>
8164
8165 PR gdb/7205
8166
8167 Replace target_signal with gdb_signal throughout.
8168
8d409d16
MR
81692012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8170
8171 * linux-low.c (linux_store_registers): Avoid the copying sequence
8172 when no data has been retrieved by ptrace.
8173
23512c01
MGD
81742012-05-22 Will Deacon <will.deacon@arm.com>
8175
8176 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8177 Include asm/ptrace.h.
8178 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8179 already defined.
8180
4934b29e
MR
81812012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8182
8183 * linux-low.c (linux_store_registers): Don't re-retrieve data
8184 with ptrace that has already been obtained from /proc. Always
8185 copy any data retrieved with ptrace to the buffer supplied.
8186
bde24c0a
PA
81872012-05-11 Yao Qi <yao@codesourcery.com>
8188 Pedro Alves <palves@redhat.com>
8189
8190 * linux-low.c (enum stopping_threads_kind): New.
8191 (stopping_threads): Change type to `enum stopping_threads_kind'.
8192 (handle_extended_wait): If stopping and suspending threads, leave
8193 the new_lwp suspended too.
8194 (linux_wait_for_event): Adjust.
8195 (stop_all_lwps): Set `stopping_threads' to
8196 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8197 whether we're suspending threads or just stopping them. Assert no
8198 recursion happens.
8199
623b6bdf
YQ
82002012-04-29 Yao Qi <yao@codesourcery.com>
8201
8202 * server.h: Move some code to ...
8203 * gdbthread.h: ... here. New.
8204 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8205 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8206 (nto-low.o, win32-low.o): Likewise.
8207 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8208 * regcache.c, remote-utils.c, server.c: Likewise.
8209 * target.c, tracepoint.c, win32-low.c: Likewise.
8210
f15f9948
TJB
82112012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8212
8213 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8214 (PTRACE_ARG4_TYPE): Likewise.
8215 (PTRACE_XFER_TYPE): Likewise.
8216 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8217 ptrace to PTRACE_ARG3_TYPE.
8218 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8219 (PTRACE_ARG4_TYPE): Likewise.
8220 (PTRACE_XFER_TYPE): Likewise.
8221 (linux_detach_one_lwp): Cast fourth argument of
8222 ptrace to long then PTRACE_ARG4_TYPE.
8223 (regsets_fetch_inferior_registers): Cast third argument of
8224 ptrace to long then PTRACE_ARG3_TYPE.
8225 (regsets_store_inferior_registers): Likewise.
8226
38ea300a
PA
82272012-04-20 Pedro Alves <palves@redhat.com>
8228
8229 * configure: Regenerate.
8230
c971b7fa
PA
82312012-04-19 Pedro Alves <palves@redhat.com>
8232
43aaf8b6 8233 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8234 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8235 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8236 (all, install-only, uninstall, clean-info, all-lib, clean): No
8237 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8238 (maintainer-clean realclean distclean): Use subdir_do.
8239 (subdir_do): New.
8240 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8241 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8242 * acinclude.m4: Include acx_configure_dir.m4.
8243 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8244 calls. Call AC_PROG_RANLIB. Configure gnulib using
8245 ACX_CONFIGURE_DIR.
8246 (GNULIB): New.
8247 (GNULIB_STDINT_H): Adjust.
8248 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8249 * gdbreplay.c: Include build-gnulib/config.h.
8250 * server.h: Likewise.
8251 * aclocal.m4: Regenerate.
8252 * config.in: Regenerate.
8253 * configure: Regenerate.
c971b7fa 8254
809277f8
PA
82552012-04-19 Pedro Alves <palves@redhat.com>
8256
8257 * Makefile.in (LIBGNU, INCGNU): Adjust.
8258 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8259 (all, install-only, uninstall, clean-info, all-lib, clean)
8260 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8261 * configure.ac: Adjust AC_OUTPUT output.
8262 * aclocal.m4: Regenerate.
8263 * configure: Regenerate.
8264
fd9bb8b8
PA
82652012-04-19 Pedro Alves <palves@redhat.com>
8266
8267 * Makefile.in (generated_files): New.
8268 (server_h): Remove the explicit dependency on config.h, and depend
8269 on $generated_files.
8270
1c298c66
PA
82712012-04-19 Pedro Alves <palves@redhat.com>
8272
8273 * Makefile.in (INCGNU): Add -Ignulib.
8274
57c4b50b
PA
82752012-04-19 Pedro Alves <palves@redhat.com>
8276
8277 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8278 (INCGNU): ... this, and spell out -I here.
8279 (GNULIB_LIB): Rename to ...
8280 (LIBGNU): ... this.
8281 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8282
1030e047
PA
82832012-04-19 Pedro Alves <palves@redhat.com>
8284
8285 * config.in: Regenerate.
8286
447d4319
PA
82872012-04-19 Pedro Alves <palves@redhat.com>
8288
8289 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8290 * server.h (memmem): Remove declaration.
8291 * config.in: Regenerate.
8292 * configure: Regenerate.
8293
aad9eab9
YQ
82942012-04-19 Yao Qi <yao@codesourcery.com>
8295
8296 * Makefile.in (SFILES): Add common/vec.c.
8297 (OBS): Add vec.o.
8298 (vec.o): New rule.
8299
3e10640f
YQ
83002012-04-19 Yao Qi <yao@codesourcery.com>
8301
8302 * remote-utils.c (prepare_resume_reply): Replace with macro
8303 target_core_of_thread.
8304 * server.c (handle_qxfer_threads_proper): Likewise.
8305 * target.h (traget_core_of_thread): New macro.
8306
71622373
PA
83072012-04-18 Pedro Alves <palves@redhat.com>
8308
8309 * aclocal.m4: Regenerate.
8310 * configure: Regenerate.
8311
80d26939
YQ
83122012-04-16 Yao Qi <yao@codesourcery.com>
8313
8314 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8315 duplicated on address.
8316
42476b70
YQ
83172012-04-16 Yao Qi <yao@codesourcery.com>
8318
8319 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8320 (struct tracepoint_action_ops) <send>: New field.
8321 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8322 (agent_expr_send, x_tracepoint_action_send): New.
8323 (l_tracepoint_action_send): New.
8324 (cmd_qtdp): Download and install tracepoint
8325 according to `use_agent'.
8326 (run_inferior_command): Add one more parameter `len'.
8327 Update callers.
8328 (tracepoint_send_agent): New.
8329 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8330
7bc83639
YQ
83312012-04-16 Yao Qi <yao@codesourcery.com>
8332
8333 * tracepoint.c (download_tracepoints): Moved to ...
8334 (cmd_qtstart): ... here.
8335
5f18041e
YQ
83362012-04-14 Yao Qi <yao@codesourcery.com>
8337
8338 * tracepoint.c: Include inttypes.h.
8339 (struct collect_memory_action): Use sized types.
8340 (struct tracepoint): Likewise.
8341 (cmd_qtdp, stop_tracing): Update print specifiers.
8342 (cmd_qtp, response_tracepoint): Likewise.
8343 (collect_data_at_tracepoint): Likewise.
8344 (collect_data_at_step): Likewise.
8345
55a8c076
YQ
83462012-04-14 Yao Qi <yao@codesourcery.com>
8347
8348 Import gnulib module inttypes.
8349 * aclocal.m4, config.in, configure: Regenerated.
8350
dc750257
YQ
83512012-04-14 Yao Qi <yao@codesourcery.com>
8352
8353 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8354 Makefile and config.status at last.
8355
0ab5faf9
YQ
83562012-04-13 Yao Qi <yao@codesourcery.com>
8357
8358 * tracepoint.c: Include stdint.h unconditionally.
8359
18f5fd81
TJB
83602012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8361
8362 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8363 on BFD_HAVE_SYS_PROCFS_TYPE.
8364 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8365 * configure: Regenerate.
8366 * config.in: Likewise.
8367
4d47af5c
L
83682012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8369
8370 * Makefile.in (clean): Also remove x32.c x32-linux.c
8371 x32-avx.c x32-avx-linux.c.
8372 (x32.o): New target.
8373 (x32.c): Likewise.
8374 (x32-linux.o): Likewise.
8375 (x32-linux.c): Likewise.
8376 (x32-avx.o): Likewise.
8377 (x32-avx.c): Likewise.
8378 (x32-avx-linux.o): Likewise.
8379 (x32-avx-linux.c): Likewise.
8380
8381 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8382 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8383 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8384 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8385 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8386 i386/x32-avx-linux.xml.
8387
8388 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8389 (init_registers_x32_avx_linux): Likwise.
8390 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8391 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8392
ecedbe58
PA
83932012-04-13 Pedro Alves <palves@redhat.com>
8394
8395 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8396 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8397 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8398 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8399 the sub-make.
8400
c92b5177
L
84012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8402
8403 * linux-x86-low.c (compat_x32_clock_t): New.
8404 (compat_x32_siginfo_t): Likewise.
8405 (compat_x32_siginfo_from_siginfo): Likewise.
8406 (siginfo_from_compat_x32_siginfo): Likewise.
8407 (linux_is_elf64): Likewise.
8408 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8409 and siginfo_from_compat_x32_siginfo for x32.
8410 (x86_arch_setup): Set linux_is_elf64.
8411
214d508e
L
84122012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8413
8414 PR gdb/13969
8415 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8416 e_machine field.
8417 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8418 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8419 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8420 compatible with process.
8421
c9a1864a
YQ
84222012-04-12 Yao Qi <yao@codesourcery.com>
8423
8424 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8425 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8426 (install-only, install-info, clean): Handle sub dir gnulib.
8427 (all-lib, am--refresh): New targets.
8428 (memmem.o): Remove target.
8429 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8430 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8431 (AC_REPLACE_FUNCS): Remove memmem.
8432 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8433 (AC_OUTPUT): Generate Makefile in gnulib/.
8434 * aclocal.m4, config.in, configure: Regenerated.
8435
367ba2c2
MR
84362012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8437
8438 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8439
9d236627
PA
84402012-04-05 Pedro Alves <palves@redhat.com>
8441
8442 -Werror=strict-aliasing
8443
8444 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8445 pointer.
8446
111217b3
PA
84472012-04-04 Pedro Alves <palves@redhat.com>
8448
8449 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8450 (sparc_store_gregset_from_stack, sparc_store_gregset)
8451 (sparc_breakpoint_at): Fix formatting.
8452
8365dcf5
TJB
84532012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8454
8455 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8456 are available.
8457 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8458 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8459 * config.in: Regenerate.
8460 * configure: Likewise.
8461
689cc2ae
PA
84622012-03-29 Pedro Alves <palves@redhat.com>
8463
8464 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8465 Correct ptrace arguments.
8466
c14dfd32
PA
84672012-03-28 Pedro Alves <palves@redhat.com>
8468
8469 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8470 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8471 (IA64_FR1_REGNUM): New defines.
8472 (ia64_fetch_register): New.
8473 (the_low_target): Install it.
8474 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8475 field.
8476 * linux-low.c (linux_fetch_registers): Try the
8477 the_low_target.fetch_register hook first.
8478
8479 * linux-arm-low.c (the_low_target): Adjust.
8480 * linux-bfin-low.c (the_low_target): Adjust.
8481 * linux-cris-low.c (the_low_target): Adjust.
8482 * linux-crisv32-low.c (the_low_target): Adjust.
8483 * linux-m32r-low.c (the_low_target): Adjust.
8484 * linux-m68k-low.c (the_low_target): Adjust.
8485 * linux-mips-low.c (the_low_target): Adjust.
8486 * linux-ppc-low.c (the_low_target): Adjust.
8487 * linux-s390-low.c (the_low_target): Adjust.
8488 * linux-sh-low.c (the_low_target): Adjust.
8489 * linux-sparc-low.c (the_low_target): Adjust.
8490 * linux-tic6x-low.c (the_low_target): Adjust.
8491 * linux-x86-low.c (the_low_target): Adjust.
8492 * linux-xtensa-low.c (the_low_target): Adjust.
8493
63c88e13
PA
84942012-03-26 Pedro Alves <palves@redhat.com>
8495
8496 * server.c (handle_qxfer_libraries): Don't bail early if
8497 the_target->qxfer_libraries_svr4 is not NULL.
8498
fb723180
PA
84992012-03-26 Pedro Alves <palves@redhat.com>
8500
8501 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8502
0afae3cf
PA
85032012-03-23 Pedro Alves <palves@redhat.com>
8504
8505 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8506 "library-list-svr4" element's start tag when the the DSO list is
8507 empty.
8508
485f1ee4
PA
85092012-03-23 Pedro Alves <palves@redhat.com>
8510
8511 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8512 a variable whose type size is the same as the inferior's pointer
8513 size.
8514
a5362b9a
TS
85152012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8516
8517 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8518 struct siginfo.
8519 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8520 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8521 * linux-low.h: Include <signal.h>.
8522 (struct siginfo): Remove forward declaration.
8523 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8524 struct siginfo.
8525
d226c142
MF
85262012-03-21 Mike Frysinger <vapier@gentoo.org>
8527
8528 * .gitignore: Ignore more files.
8529
122f36ef
PA
85302012-03-19 Pedro Alves <palves@redhat.com>
8531 Jan Kratochvil <jan.kratochvil@redhat.com>
8532
8533 * server.c (cont_thread, general_thread): Add describing comments.
8534 (start_inferior): Clear `cont_thread'.
8535 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8536 of a process.
8537
fc3e5175
YQ
85382012-03-15 Yao Qi <yao@codesourcery.com>
8539
8540 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8541 handling to ...
8542 (cmd_qtdp): ... here.
8543
8d0d92cd
YQ
85442012-03-15 Yao Qi <yao@codesourcery.com>
8545
8546 * tracepoint.c (struct tracepoint_action_ops): New.
8547 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8548 (m_tracepoint_action_download): New.
8549 (r_tracepoint_action_download): New.
8550 (x_tracepoint_action_download): New.
8551 (l_tracepoint_action_download): New.
8552 (add_tracepoint_action): Install `action->ops' according type.
8553 (download_tracepoint_1): Move code `download' function pointer
8554 of various tracepoint_action_ops.
8555
87b0bb13
JK
85562012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8557
8558 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8559 linux_ptrace_attach_warnings.
8560
5f572dec
JK
85612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8562
8563 * Makefile.in (linux-ptrace.o): New.
8564 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8565 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8566 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8567 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8568 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8569 of these targets.
8570 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8571
f4647387
YQ
85722012-03-08 Yao Qi <yao@codesourcery.com>
8573 Pedro Alves <palves@redhat.com>
8574
8575 Fix PR server/13392.
8576 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8577 offset of JMP insn.
8578 * tracepoint.c (remove_tracepoint): New.
8579 (cmd_qtdp): Call remove_tracepoint when failed to install.
8580
9b224c5e
PA
85812012-03-07 Pedro Alves <palves@redhat.com>
8582
8583 * linux-low.c (get_detach_signal): New.
8584 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8585 Pass on pending signals to PTRACE_DETACH. Check the result of the
8586 ptrace call.
8587 * server.c (program_signals, program_signals_p): New.
8588 (handle_general_set): Handle QProgramSignals.
8589 * server.h (program_signals, program_signals_p): Declare.
8590
e237a7e2
JK
85912012-03-05 Pedro Alves <palves@redhat.com>
8592 Jan Kratochvil <jan.kratochvil@redhat.com>
8593
8594 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8595 New comment why.
8596
5808517f
YQ
85972012-03-03 Yao Qi <yao@codesourcery.com>
8598
8599 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8600 agent_look_up_symbols.
8601
58b4daa5
YQ
86022012-03-03 Yao Qi <yao@codesourcery.com>
8603
8604 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8605 (linux-x86-low.o): Likewise.
8606 * server.h: Remove in_process_agent_loaded.
8607 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8608 common/agent.c.
8609 Update callers.
8610
8ffcbaaf
YQ
86112012-03-03 Yao Qi <yao@codesourcery.com>
8612
8613 * tracepoint.c (gdb_agent_capability): New global.
8614 (in_process_agent_loaded_ust): Renamed to
8615 `in_process_agent_supports_ust'.
8616 Update callers.
8617 (in_process_agent_supports_ust): Call agent_capability_check.
8618 (clear_installed_tracepoints): Assert that agent supports
8619 agent.
8620
d1feda86
YQ
86212012-03-03 Yao Qi <yao@codesourcery.com>
8622
8623 * linux-low.c (linux_supports_agent): New.
8624 (linux_target_ops): Initialize field `supports_agent' with
8625 linux_supports_agent.
8626 * target.h (struct target_ops) <supports_agent>: New.
8627 (target_supports_agent): New macro.
8628 * server.c (handle_general_set): Handle packet 'QAgent'.
8629 (handle_query): Send `QAgent+'.
8630 * Makefile.in (server.o): Depends on agent.h.
8631
2fa291ac
YQ
86322012-03-03 Yao Qi <yao@codesourcery.com>
8633
8634 * Makefile.in (OBS): Add agent.o.
8635 Add new rule for agent.o.
8636 Track dependence of tracepoint.c on agent.h.
8637 * tracepoint.c (run_inferior_command_1):
8638 (run_inferior_command): Call agent_run_command.
8639 (gdb_ust_connect_sync_socket): Deleted. Move it to
8640 common/agent.c.
8641 (resume_thread, stop_thread): Likewise.
8642 (gdb_ust_socket_init): Renamed to ...
8643 (gdb_agent_socket_init): ... New.
8644 (gdb_ust_thread): Renamed to ...
8645 (gdb_agent_helper_thread): ... New.
8646 (gdb_ust_init): Move some code to ...
8647 (gdb_agent_init): ... here. New.
8648 [HAVE_UST]: Call gdb_ust_init.
8649 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8650 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8651 * config.in, configure: Regenerated.
8652
05044653
PA
86532012-03-02 Pedro Alves <palves@redhat.com>
8654
8655 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8656 * linux-low.c (struct simple_pid_list): New.
8657 (stopped_pids): New a struct simple_pid_list pointer.
8658 (add_to_pid_list, pull_pid_from_list): New.
8659 (handle_extended_wait): Don't assume the first signal new children
8660 report is SIGSTOP. Adjust call to pull_pid_from_list.
8661 (linux_wait_for_lwp): Adjust.
8662
8d00225b
YQ
86632012-03-02 Yao Qi <yao@codesourcery.com>
8664
8665 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8666 debug log.
8667
19560ba5
YQ
86682012-03-02 Yao Qi <yao@codesourcery.com>
8669
8670 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8671 `stop_pc' and `tpoint'. Update caller.
8672
1faeff08
MR
86732012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8674
8675 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8676 * linux-low.c (use_linux_regsets): New macro.
8677 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8678 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8679 (linux_register_in_regsets): New function.
8680 (usr_fetch_inferior_registers): Skip registers covered by
8681 regsets.
8682 (usr_store_inferior_registers): Likewise.
8683 (usr_fetch_inferior_registers): New macro.
8684 (usr_store_inferior_registers): Likewise.
8685 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8686 (linux_store_registers): Likewise.
8687 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8688 prototype.
8689 (init_registers_mips64_dsp_linux): Likewise.
8690 (init_registers_mips_linux): New macro.
8691 (init_registers_mips_dsp_linux): Likewise.
8692 (mips_dsp_num_regs): Likewise.
8693 (DSP_BASE, DSP_CONTROL): New fallback macros.
8694 (mips_base_regs): New macro.
8695 (mips_regmap): Use it. Fix the size.
8696 (mips_dsp_regmap): New variable.
8697 (mips_dsp_regset_bitmap): Likewise.
8698 (mips_arch_setup): New function.
8699 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8700 than mips_regmap.
8701 (mips_cannot_store_register): Likewise.
8702 (the_low_target): Update .arch_setup, .num_regs and .regmap
8703 initializers. Add .regset_bitmap initializer.
8704 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8705 initializer.
8706 * linux-bfin-low.c (the_low_target): Likewise.
8707 * linux-cris-low.c (the_low_target): Likewise.
8708 * linux-crisv32-low.c (the_low_target): Likewise.
8709 * linux-ia64-low.c (the_low_target): Likewise.
8710 * linux-m32r-low.c (the_low_target): Likewise.
8711 * linux-m68k-low.c (the_low_target): Likewise.
8712 * linux-ppc-low.c (the_low_target): Likewise.
8713 * linux-s390-low.c (the_low_target): Likewise.
8714 * linux-sh-low.c (the_low_target): Likewise.
8715 * linux-sparc-low.c (the_low_target): Likewise.
8716 * linux-tic6x-low.c (the_low_target): Likewise.
8717 * linux-x86-low.c (the_low_target): Likewise.
8718 * linux-xtensa-low.c (the_low_target): Likewise.
8719 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8720 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8721 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8722 srv_xmlfiles.
8723 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8724 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8725
c03e6ccc
YQ
87262012-02-29 Yao Qi <yao@codesourcery.com>
8727 Pedro Alves <palves@redhat.com>
8728
8729 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8730 `step_over_finished' is true.
8731
644cebc9
PA
87322012-02-27 Pedro Alves <palves@redhat.com>
8733
8734 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8735 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8736
c14d7ab2
PA
87372012-02-27 Pedro Alves <palves@redhat.com>
8738
8739 PR server/9684
8740 * linux-low.c (pid_is_stopped): New.
8741 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8742
412c89dd
LM
87432012-02-25 Luis Machado <lgustavo@codesourcery.com>
8744
8745 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8746 of conditions.
8747
b745defe
MR
87482012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8749
8750 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8751
9f3a5c85
LM
87522012-02-24 Luis Machado <lgustavo@codesourcery>
8753
8754 * server.c (handle_query): Advertise support for target-side
8755 breakpoint condition evaluation.
8756 (process_point_options): New function.
8757 (process_serial_event): When inserting a breakpoint, check for
8758 a target-side condition that should be evaluated.
8759
8760 * mem-break.c: Include regcache.h and ax.h.
8761 (point_cond_list_t): New data structure.
8762 (breakpoint) <cond_list>: New field.
8763 (find_gdb_breakpoint_at): Make non-static.
8764 (delete_gdb_breakpoint_at): Clear any target-side
8765 conditions.
8766 (clear_gdb_breakpoint_conditions): New function.
8767 (add_condition_to_breakpoint): Likewise.
8768 (add_breakpoint_condition): Likewise.
8769 (gdb_condition_true_at_breakpoint): Likewise.
8770 (gdb_breakpoint_here): Return result directly instead
8771 of going through a local variable.
8772
8773 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8774 (clear_gdb_breakpoint_conditions): Likewise.
8775 (add_breakpoint_condition): Likewise.
8776 (gdb_condition_true_at_breakpoint): Likewise.
8777
8778 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8779 (need_step_over_p): Take target-side breakpoint condition into
8780 consideration.
8781
5e1dc496
LM
87822012-02-24 Luis Machado <lgustavo@codesourcery>
8783
8784 * server.h: Include tracepoint.h.
8785 (agent_mem_read, agent_get_trace_state_variable_value,
8786 agent_set_trace_state_variable_value,
8787 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8788 get_set_tsv_func_addr): New prototypes.
8789
8790 * ax.h: New include file.
8791 * ax.c: New source file.
8792
8793 * tracepoint.c: Include ax.h.
8794 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8795 agent_expr, eval_result_type): Move to ax.h.
8796 (parse_agent_expr): Rename to ...
8797 (gdb_parse_agent_expr): ... this, make it non-static and move
8798 to ax.h.
8799 (unparse_agent_expr) Rename to ...
8800 (gdb_unparse_agent_expr): ... this, make it non-static and move
8801 to ax.h.
8802 (eval_agent_expr): Rename to ...
8803 (eval_tracepoint_agent_expr): ... this.
8804 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8805 forward declarations.
8806 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8807 (agent_get_trace_state_variable_value): New function.
8808 (agent_set_trace_state_variable_value): New function.
8809 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8810 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8811 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8812 (condition_true_at_tracepoint): Likewise.
8813 (parse_agent_expr): Rename to ...
8814 (gdb_parse_agent_expr): ... this and move to ax.c.
8815 (unparse_agent_expr): Rename to ...
8816 (gdb_unparse_agent_expr): ... this and move to ax.c.
8817 (gdb_agent_op_name): Move to ax.c.
8818 (eval_agent_expr): Rename to ...
8819 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8820 and move to ax.c.
8821 (eval_tracepoint_agent_expr): New function.
8822 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8823 non-static.
5e1dc496
LM
8824 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8825 ax.c.
8826 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8827 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8828 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8829 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8830 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8831 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8832 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8833 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8834 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8835 (compile_bytecodes): Remove forward declaration.
8836 (is_goto_target): Move to ax.c.
8837 (compile_bytecodes): Move to ax.c and call
8838 agent_get_trace_state_variable_value (...) and
8839 agent_set_trace_state_variable_value (...).
8840
8841 * Makefile.in: Update ax.c and IPA dependencies.
8842
277e4e52
PA
88432012-02-24 Pedro Alves <palves@redhat.com>
8844
8845 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8846 (cmd_bigqtbuffer_circular): ... this. Only handle
8847 'QTBuffer:circular:'.
8848 (handle_tracepoint_general_set): Adjust.
8849
bf4c19f7
YQ
88502012-02-16 Yao Qi <yao@codesourcery.com>
8851
8852 * inferiors.c: Move code to ...
8853 * dll.c: .... here. New.
8854 * server.h: Declare clear_dlls.
8855 * Makefile.in (SFILES): Add dll.c.
8856 (OBS): Add dll.o
8857 (dll.o): New rule.
8858
d73f2619
YQ
88592012-02-11 Yao Qi <yao@codesourcery.com>
8860
8861 * server.c: (handle_monitor_command): Add a new parameter
8862 `own_buf'.
8863 (handle_query): Update caller.
8864
f8255c2a
JB
88652012-02-09 Joel Brobecker <brobecker@adacore.com>
8866
8867 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8868 * configure, config.in: Regenerate.
8869 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8870 is not defined.
8871
da84f473
PA
88722012-02-02 Pedro Alves <palves@redhat.com>
8873
8874 Try SIGKILL first, then PTRACE_KILL.
8875 * linux-low.c (linux_kill_one_lwp): New.
8876 (linux_kill_one_lwp): Rename to ...
8877 (kill_one_lwp_callback): ... this. Use the new
8878 linux_kill_one_lwp.
8879
e886a173
PA
88802012-02-02 Pedro Alves <palves@redhat.com>
8881
8882 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8883 inferior.
8884
be07f1a2
PA
88852012-01-27 Pedro Alves <palves@redhat.com>
8886
8887 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8888 (elf_64_file_p): Make static.
8889 (linux_pid_exe_is_elf_64_file): New.
8890 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8891 Delete declarations.
8892 (linux_pid_exe_is_elf_64_file): Declare.
8893 * linux-x86-low.c (x86_arch_setup): Use
8894 linux_pid_exe_is_elf_64_file.
8895
d8301ad1
JK
88962012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8897
8898 * linux-low.c (linux_wait_for_event_1): Rename to ...
8899 (linux_wait_for_event): ... here and merge it with former
8900 linux_wait_for_event - new variable wait_ptid, use it.
8901 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8902
01b17894
PA
89032012-01-23 Pedro Alves <palves@redhat.com>
8904
8905 * server.c (main): Avoid yet another case of infinite loop while
8906 detaching/killing after a longjmp.
8907
e825046f
JK
89082012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8909
8910 Code cleanup.
8911 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8912
b9e7b9c3
UW
89132012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8914
8915 * hostio.c (handle_readlink): New function.
8916 (handle_vFile): Call it to handle "vFile:readlink" packets.
8917
901f9912
UW
89182012-01-20 Pedro Alves <palves@redhat.com>
8919 Ulrich Weigand <ulrich.weigand@linaro.org>
8920
8921 * server.c (handle_v_requests): Only support vAttach and vRun to
8922 start multiple processes when in extended protocol mode.
8923
fc1ab1a0
PA
89242012-01-17 Pedro Alves <palves@redhat.com>
8925
8926 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8927 memalign plus mprotect to allocate the scratch buffer.
8928
7d5d4e98
PA
89292012-01-13 Pedro Alves <palves@redhat.com>
8930
8931 * server.c (attach_inferior): Clear `cont_thread'.
8932
f128d5e9
PA
89332012-01-13 Pedro Alves <palves@redhat.com>
8934
8935 * server.c (main): Avoid infinite loop while detaching/killing
8936 after a longjmp.
8937
06db92f0
DE
89382012-01-09 Doug Evans <dje@google.com>
8939
8940 * server.c (start_inferior): Set last_ptid in --wrapper case.
8941
32d92999
YQ
89422012-01-06 Yao Qi <yao@codesourcery.com>
8943
8944 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8945 defined.
8946 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8947
5e0a92a9
YQ
89482012-01-04 Yao Qi <yao@codesourcery.com>
8949
8950 * tracepoint.c (cmd_qtdp): Print debug message
8951 for static tracepoint.
8952
ae639e8c
YQ
89532012-01-04 Yao Qi <yao@codesourcery.com>
8954
8955 * tracepoint.c (trace_vdebug): Differentiate debug message
8956 between gdbserver and IPA.
8957
f72429c5
YQ
89582012-01-03 Yao Qi <yao@codesourcery.com>
8959
8960 * tracepoint.c (tracepoint_was_hit): Don't collect for
8961 static tracepoint.
8962
12c3e59c
JB
89632012-01-02 Joel Brobecker <brobecker@adacore.com>
8964
8965 * terminal.h: Reformat copyright header.
8966
67827812
JB
89672012-01-02 Joel Brobecker <brobecker@adacore.com>
8968
8969 * server.c (gdbserver_version): Update copyright year.
8970 * gdbreplay.c (gdbreplay_version): Likewise.
8971
3e52c33d
JK
89722011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8973
8974 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8975
8976 Revert:
8977 2011-12-18 Hui Zhu <teawater@gmail.com>
8978 * linux-low.c (linux_create_inferior): Save return value to ret.
8979
66f1260e
HZ
89802011-12-18 Hui Zhu <teawater@gmail.com>
8981
8982 * linux-low.c (linux_create_inferior): Save return value to ret.
8983
e77616d7
DE
89842011-12-16 Doug Evans <dje@google.com>
8985
e7b06c57
DE
8986 * linux-low.c (linux_create_inferior): If stdio connection,
8987 redirect stdin from /dev/null, stdout to stderr.
8988 * remote-utils.c (remote_is_stdio): New static global.
8989 (remote_connection_is_stdio): New function.
8990 (remote_prepare): Handle stdio connection.
8991 (remote_open): Ditto.
8992 (remote_close): Don't close stdin for stdio connections.
8993 (read_prim,write_prim): New functions. Replace all calls to
8994 read/write to these.
8995 * server.c (main): Watch for "-" argument. Move call to
8996 remote_prepare before start_inferior.
8997 * server.h (STDIO_CONNECTION_NAME): New macro.
8998 (remote_connection_is_stdio): Declare.
8999
e77616d7
DE
9000 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9001 in debugging output.
9002
82067193
YQ
90032011-12-15 Yao Qi <yao@codesourcery.com>
9004
9005 * tracepoint.c: Include sys/syscall.h.
9006 (gdb_ust_thread): Remove preprocessor conditional.
9007
82bfbe7e
PA
90082011-12-14 Pedro Alves <pedro@codesourcery.com>
9009
9010 * linux-low.c (linux_detach_one_lwp): Call
9011 the_low_target.prepare_to_resume before detaching.
9012
712c6575
YQ
90132011-12-14 Yao Qi <yao@codesourcery.com>
9014
9015 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9016 of write.
9017
d54d1edf
YQ
90182011-12-14 Yao Qi <yao@codesourcery.com>
9019
9020 * i386-low.c (i386_low_stopped_data_address): Initialize local
9021 variable `control'.
9022
6210a125
PA
90232011-12-13 Pedro Alves <pedro@codesourcery.com>
9024
9025 PR remote/13492
9026
9027 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9028 DR_CONTROL unless necessary. Extend comments.
9029 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9030 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9031
2ece8244
YQ
90322011-12-13 Yao Qi <yao@codesourcery.com>
9033
9034 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9035 macros.
9036 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9037
784867a5
JK
90382011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9039
9040 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9041 Print new debug message for such case.
9042
6bf36717
JK
90432011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9044
9045 Fix overlapping memcpy.
9046 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9047 the read_inferior_memory transfer.
9048 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9049 write_inferior_memory transfer.
9050 (set_fast_tracepoint_jump): New variable buf. Use it for the
9051 read_inferior_memory and write_inferior_memory transfers.
9052 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9053 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9054 Use it for the write_inferior_memory transfer.
9055 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9056 buffers.
9057
50275556
MR
90582011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9059
9060 * linux-low.c (fetch_register, store_register): Make code
9061 consistent, fix formatting.
9062
7325beb4
MR
90632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9064
9065 * linux-low.c (usr_store_inferior_registers): Factor out code
9066 to handle individual registers into...
9067 (store_register): ... this new function.
9068
c642a434
UW
90692011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9070
9071 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9072 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9073 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9074 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9075 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9076 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9077 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9078 (srv_xmlfiles): Add new XML files.
9079
9080 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9081 and <sys/uio.h>.
9082 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9083 (init_registers_s390_linux32v1): Add prototype.
9084 (init_registers_s390_linux32v2): Likewise.
9085 (init_registers_s390_linux64v1): Likewise.
9086 (init_registers_s390_linux64v2): Likewise.
9087 (init_registers_s390x_linux64v1): Likewise.
9088 (init_registers_s390x_linux64v2): Likewise.
9089 (s390_num_regs): Increment to 52.
9090 (s390_regmap): Add orig_r2 register.
9091 (s390_num_regs_3264): Increment to 68.
9092 (s390_regmap_3264): Add orig_r2 register.
9093 (s390_collect_ptrace_register): Handle orig_r2 register.
9094 (s390_supply_ptrace_register): Likewise.
9095 (s390_fill_last_break): New function.
9096 (s390_store_last_break): Likewise.
9097 (s390_fill_system_call): New function.
9098 (s390_store_system_call): Likewise.
9099 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9100 register sets.
9101 (s390_check_regset): New function.
9102 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9103 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9104 Update target_regsets for available register sets.
9105
2268b414
JK
91062011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9107 Jan Kratochvil <jan.kratochvil@redhat.com>
9108
9109 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9110 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9111 New.
9112 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9113 * linux-low.h (struct process_info_private): New member r_debug.
9114 * server.c (handle_qxfer_libraries): Call
9115 the_target->qxfer_libraries_svr4.
9116 (handle_qxfer_libraries_svr4): New function.
9117 (qxfer_packets): New entry "libraries-svr4".
9118 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9119 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9120 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9121 PACKET_qXfer_libraries_svr4.
9122
d6db1fab
UW
91232011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9124
9125 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9126 PSW address/mask between 8-byte and 16-byte formats.
9127 (s390_supply_ptrace_register): Likewise.
9128 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9129 basic addressing mode bit.
9130
242f5f1c
SS
91312011-11-24 Stan Shebs <stan@codesourcery.com>
9132
9133 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9134
f196051f
SS
91352011-11-17 Stan Shebs <stan@codesourcery.com>
9136
9137 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9138 (tracing_start_time): New global.
9139 (tracing_stop_time): New global.
9140 (tracing_user_name): New global.
9141 (tracing_notes): New global.
9142 (tracing_stop_note): New global.
9143 (cmd_qtstart): Set traceframe_usage, start_time.
9144 (stop_tracing): Set stop_time.
9145 (cmd_qtstatus): Report additional status.
9146 (cmd_qtp): New function.
9147 (handle_tracepoint_query): Call it.
9148 (cmd_qtnotes): New function.
9149 (handle_tracepoint_general_set): Call it.
9150 (get_timestamp): Rename from tsv_get_timestamp.
9151
405f8e94
SS
91522011-11-14 Stan Shebs <stan@codesourcery.com>
9153 Kwok Cheung Yeung <kcy@codesourcery.com>
9154
9155 * linux-x86-low.c (small_jump_insn): New.
9156 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9157 trampoline and error message, build a trampoline and issue a small
9158 jump instruction to it.
9159 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9160 trampoline and error message.
9161 (x86_get_min_fast_tracepoint_insn_len): New.
9162 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9163 * linux-low.h (struct linux_target_ops): Add arguments to
9164 install_fast_tracepoint_jump_pad operation, add new operation.
9165 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9166 arguments.
9167 (linux_get_min_fast_tracepoint_insn_len): New function.
9168 (linux_target_op): Add new operation.
9169 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9170 (gdb_trampoline_buffer_end): Ditto.
9171 (gdb_trampoline_buffer_error): Ditto.
9172 (struct ipa_sym_addresses): Add fields for new IPA variables.
9173 (symbol_list): Add entries for new IPA variables.
9174 (struct tracepoint): Add fields to hold the address range of the
9175 trampoline used by the tracepoint.
9176 (trampoline_buffer_head): New static variable.
9177 (trampoline_buffer_tail): Ditto.
9178 (claim_trampoline_space): New function.
9179 (have_fast_tracepoint_trampoline_buffer): New function.
9180 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9181 structure.
9182 (install_fast_tracepoint): Ditto, also add error buffer argument.
9183 (cmd_qtminftpilen): New function.
9184 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9185 (fast_tracepoint_from_trampoline_address): New function.
9186 (fast_tracepoint_collecting): Handle trampoline as part of jump
9187 pad space.
9188 (set_trampoline_buffer_space): New function.
9189 (initialize_tracepoint): Initialize new IPA variables.
9190 * target.h (struct target_ops): Add arguments to
9191 install_fast_tracepoint_jump_pad operation, add new
9192 get_min_fast_tracepoint_insn_len operation.
9193 (target_get_min_fast_tracepoint_insn_len): New.
9194 (install_fast_tracepoint_jump_pad): Add arguments.
9195 * server.h (IPA_BUFSIZ): Define.
9196 * linux-i386-ipa.c: Include extra header files.
9197 (initialize_fast_tracepoint_trampoline_buffer): New function.
9198 (initialize_low_tracepoint): Call it.
9199 * server.h (set_trampoline_buffer_space): Declare.
9200 (claim_trampoline_space): Ditto.
9201 (have_fast_tracepoint_trampoline_buffer): Ditto.
9202
1e4d1764
YQ
92032011-11-14 Yao Qi <yao@codesourcery.com>
9204
9205 * server.c (handle_query): Handle InstallInTrace for qSupported.
9206 * tracepoint.c (add_tracepoint): Sort list.
9207 (install_tracepoint, download_tracepoint): New.
9208 (cmd_qtdp): Call them to install and download tracepoints.
9209 (sort_tracepoints): Removed.
9210 (cmd_qtstart): Update.
9211
5c73ff4e
YQ
92122011-11-14 Yao Qi <yao@codesourcery.com>
9213
9214 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9215 * mem-break.h: Declare.
9216 * tracepoint.c (cmd_qtstart): Move some code to ...
9217 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9218 New.
9219 (download_tracepoints): Move some code to ...
9220 (download_tracepoint_1): ... here. New.
9221
86a30030
YQ
92222011-11-08 Yao Qi <yao@codesourcery.com>
9223
9224 * remote-utils.c (relocate_instruction): A comment fix.
9225
8d26e50c
JB
92262011-11-07 Joel Brobecker <brobecker@adacore.com>
9227
9228 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9229 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9230 dr_status_mirror and dr_control_mirror from debug_reg_state.
9231 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9232 (i386_initial_stuff): Remove use of deleted globals.
9233 (i386_get_thread_context, i386_set_thread_context,
9234 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9235 from debug_reg_state.
9236
a59306a3
YQ
92372011-11-05 Yao Qi <yao@codesourcery.com>
9238
9239 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9240 address as TPOINT's.
9241
3065dfb6
SS
92422011-11-02 Stan Shebs <stan@codesourcery.com>
9243
9244 * tracepoint.c (agent_mem_read_string): New function.
9245 (eval_agent_expr): Call it for tracenz.
9246 * server.c (handle_query): Report support for tracenz.
9247
fd0d8c7c
YQ
92482011-11-02 Yao Qi <yao@codesourcery.com>
9249
9250 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9251
609086b1
YQ
92522011-11-02 Yao Qi <yao@codesourcery.com>
9253
9254 * target.h: Fix a typo in comment.
9255
b9fd1791
PA
92562011-10-31 Pedro Alves <pedro@codesourcery.com>
9257
9258 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9259 clobber the breakpoints' shadows with fast tracepoint jumps.
9260 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9261 * target.c (write_inferior_memory): Also pass MYADDR down to
9262 check_mem_write.
9263
03583c20
UW
92642011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9265
9266 * configure.ac: Check support for personality routine.
9267 * configure: Regenerate.
9268 * config.in: Likewise.
9269 * linux-low.c: Include <sys/personality.h>.
9270 Define ADDR_NO_RANDOMIZE if necessary.
9271 (linux_create_inferior): Disable address space randomization when
9272 forking inferior, if requested.
9273 (linux_supports_disable_randomization): New function.
9274 (linux_target_ops): Install it.
9275 * server.h (disable_randomization): Declare.
9276 * server.c (disable_randomization): New global variable.
9277 (handle_general_set): Handle QDisableRandomization.
9278 (handle_query): Likewise for qSupported.
9279 (main): Support --disable-randomization and --no-disable-randomization
9280 command line arguments.
9281 * target.h (struct target_ops): Add supports_disable_randomization.
9282 (target_supports_disable_randomization): New macro.
9283
723b724b
MF
92842011-09-29 Mike Frysinger <vapier@gentoo.org>
9285
9286 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9287 ifdef check.
9288 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9289 [!PT_GETDSBT] (target_loadmap): New definition.
9290 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9291 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9292 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9293 and PT_GETDSBT to LINUX_LOADMAP.
9294 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9295 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9296
55329a5c 92972011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9298
9299 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9300 (arm_linux_hwbp_cap): New static variable.
9301 (arm_linux_get_hwbp_cap): Replace by ...
9302 (arm_linux_init_hwbp_cap): ... this new function.
9303 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9304 (arm_linux_get_hw_watchpoint_count): Likewise.
9305 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9306 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9307 (arm_prepare_to_resume): Use perror_with_name instead of error.
9308
55329a5c 93092011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9310
9311 * linux-arm-low.c: Include <signal.h>.
9312 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9313 (struct arm_linux_hwbp_cap): New data type.
9314 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9315 (struct arm_linux_hw_breakpoint): New data type.
9316 (MAX_BPTS, MAX_WPTS): Define.
9317 (struct arch_process_info, struct arch_lwp_info): New data types.
9318 (arm_linux_get_hwbp_cap): New function.
9319 (arm_linux_get_hw_breakpoint_count): Likewise.
9320 (arm_linux_get_hw_watchpoint_count): Likewise.
9321 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9322 (arm_hwbp_control_initialize): Likewise.
9323 (arm_hwbp_control_is_enabled): Likewise.
9324 (arm_hwbp_control_is_initialized): Likewise.
9325 (arm_hwbp_control_disable): Likewise.
9326 (arm_linux_hw_breakpoint_equal): Likewise.
9327 (arm_linux_hw_point_initialize): Likewise.
9328 (struct update_registers_data): New data structure.
9329 (update_registers_callback: New function.
9330 (arm_insert_point): Likewise.
9331 (arm_remove_point): Likewise.
9332 (arm_stopped_by_watchpoint): Likewise.
9333 (arm_stopped_data_address): Likewise.
9334 (arm_new_process): Likewise.
9335 (arm_new_thread): Likewise.
9336 (arm_prepare_to_resume): Likewise.
9337 (the_low_target): Register arm_insert_point, arm_remove_point,
9338 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9339 arm_new_thread, and arm_prepare_to_resume.
9340
6b9801d4
SS
93412011-09-15 Stan Shebs <stan@codesourcery.com>
9342
9343 * server.h (struct emit_ops): Add compare-goto fields.
9344 * tracepoint.c (gdb_agent_op_sizes): New table.
9345 (emit_eq_goto): New function.
9346 (emit_ne_goto): New function.
9347 (emit_lt_goto): New function.
9348 (emit_le_goto): New function.
9349 (emit_gt_goto): New function.
9350 (emit_ge_goto): New function.
9351 (is_goto_target): New function.
9352 (compile_bytecodes): Recognize special cases of compare-goto
9353 combinations and call specialized emitters for them.
9354 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9355 (amd64_emit_ne_goto): New function.
9356 (amd64_emit_lt_goto): New function.
9357 (amd64_emit_le_goto): New function.
9358 (amd64_emit_gt_goto): New function.
9359 (amd64_emit_ge_goto): New function.
9360 (amd64_emit_ops): Add the new functions.
9361 (i386_emit_eq_goto): New function.
9362 (i386_emit_ne_goto): New function.
9363 (i386_emit_lt_goto): New function.
9364 (i386_emit_le_goto): New function.
9365 (i386_emit_gt_goto): New function.
9366 (i386_emit_ge_goto): New function.
9367 (i386_emit_ops): Add the new functions.
9368
bf15cbda
SS
93692011-09-08 Stan Shebs <stan@codesourcery.com>
9370
9371 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9372 (i386_emit_epilogue): Restore %ebx.
9373
943ca1dd
JZ
93742011-08-31 Jie Zhang <jzhang918@gmail.com>
9375
9376 * server.c (step_thread): Remove definition.
9377 (process_serial_event): Don't handle Hs.
9378 * server.h (step_thread): Remove declaration.
9379 * target.c (set_desired_inferior): Remove use of step_thread.
9380
e3deef73
LM
93812011-08-24 Luis Machado <lgustavo@codesourcery.com>
9382
9383 * linux-low.c: Include linux-procfs.h.
9384 (linux_attach_lwp_1): Update comments.
9385 (linux_attach): Scan for existing threads when attaching to a
9386 process that is the tgid.
9387 * Makefile.in: Update dependencies.
9388
13da1c97
LM
93892011-08-24 Luis Machado <lgustavo@codesourcery.com>
9390
9391 * configure.srv: Add linux-procfs.o dependencies.
9392
881127c9
YQ
93932011-08-14 Yao Qi <yao@codesourcery.com>
9394
9395 * target.h (struct target_ops): Fix indent.
9396 * win32-low.c (win32_target_ops): Fix comment.
9397
58dbd541
YQ
93982011-08-14 Andrew Jenner <andrew@codesourcery.com>
9399 Yao Qi <yao@codesourcery.com>
9400
9401 * Makefile.in (clean): Remove tic6x-*.c files.
9402 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9403 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9404 (tic6x-c64xp-linux.c): Likewise.
9405 * configure.srv: Add support for tic6x-*-uclinux.
9406 * linux-tic6x-low.c: New.
9407 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9408
78d85199
YQ
94092011-08-14 Andrew Stubbs <ams@codesourcery.com>
9410 Yao Qi <yao@codesourcery.com>
9411
9412 * target.h (struct target_ops): Add read_loadmap.
9413 * linux-low.c (struct target_loadseg): New type.
9414 (struct target_loadmap): New type.
9415 (linux_read_loadmap): New function.
9416 (linux_target_ops): Add linux_read_loadmap.
9417 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9418 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9419 to NULL.
78d85199 9420
a959a88d
EZ
94212011-08-05 Eli Zaretskii <eliz@gnu.org>
9422
9423 * win32-low.c: Include <stdint.h>.
9424
1ced966e
PA
94252011-07-22 Pedro Alves <pedro@codesourcery.com>
9426
9427 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9428 to the inferior here.
9429 (i386_remove_aligned_watchpoint): Ditto.
9430 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9431 fit part of the watchpoint in the debug registers.
9432 (i386_update_inferior_debug_regs): New.
9433 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9434 registers, and only update the inferior on success.
9435 (i386_low_remove_watchpoint): Ditto.
9436
d26e3629
KY
94372011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9438
9439 * linux-low.c (compare_ints, unique, list_threads, show_process,
9440 linux_core_of_thread): Delete.
9441 (linux_target_ops): Change linux_core_of_thread to
9442 linux_common_core_of_thread.
9443 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9444 * utils.c (malloc_failure): Change type of argument.
9445 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9446 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9447 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9448 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9449 (IPA_OBJS): Add common-utils-ipa.o.
9450 (ptid_h, linux_osdata_h): New macros.
9451 (server_h): Add common/common-utils.h, common/xml-utils.h,
9452 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9453 common/ptid.h.
9454 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9455 ptid.o, buffer.o): New rules.
9456 (linux-low.o): Add common/linux-osdata.h as a dependency.
9457 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9458 * configure.ac: Add AC_HEADER_DIRENT check.
9459 * config.in: Regenerate.
9460 * configure: Regenerate.
9461 * remote-utils.c (xml_escape_text): Delete.
9462 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9463 buffer_xml_printf): Move to common/buffer.c.
9464 * server.c (main): Remove call to initialize_inferiors.
9465 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9466 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9467 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9468 internal_error, gdb_assert, gdb_assert_fail): Delete.
9469 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9470 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9471 common/buffer.h.
9472 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9473 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9474 initialize_inferiors): Delete.
9475
2275a1a7
PA
94762011-07-20 Pedro Alves <pedro@codesourcery.com>
9477
9478 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9479 symbol error.
9480
0a5b1e09
PA
94812011-05-31 Pedro Alves <pedro@codesourcery.com>
9482
9483 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9484 assertion.
9485 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9486
6938fd34
YQ
94872011-05-26 Yao Qi <yao@codesourcery.com>
9488
9489 * Makefile.in (thread-db.o): Track dependence to
9490 common/gdb_thread_db.h.
9491 * thread-db.c: include gdb_thread_db.h from right place.
9492
b481f9e0
TT
94932011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9494
9495 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9496 __FILE__ and __LINE__ to internal_error.
9497
98a5dd13
DE
94982011-05-13 Doug Evans <dje@google.com>
9499
9500 * thread-db.c (try_thread_db_load_from_sdir): New function.
9501 (try_thread_db_load_from_dir): New function.
9502 (thread_db_load_search): Handle $sdir, ignore $pdir.
9503 Remove trying of system directories if search of
9504 libthread-db-search-path fails, that is now done via $sdir.
9505
d248b706
KY
95062011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9507
9508 * server.c (handle_query): Add EnableDisableTracepoints to the list
9509 of supported features.
43aaf8b6 9510 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9511 tracepoints.
43aaf8b6
PA
9512 (cmd_qtenable_disable): New.
9513 (cmd_qtstart): Install tracepoints even if disabled.
9514 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9515 receiving a QTEnable or QTDisable packet.
9516 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9517 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9518 tracepoints.
9519 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9520
84e578fb
DE
95212011-05-10 Doug Evans <dje@google.com>
9522
9523 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9524
71f55dd8
DE
95252011-05-04 Doug Evans <dje@google.com>
9526
9527 * linux-low.c (linux_join): Skip process lookup.
9528 * spu-low.c (spu_join): Ditto.
9529 * server.c (join_inferiors_callback): Delete.
9530 (process_serial_event): For 'D' packet (detach) call join_inferior
9531 directly.
9532
4d393d60
JM
95332011-05-04 Joseph Myers <joseph@codesourcery.com>
9534
9535 * README: Don't mention xscale*-*-linux*.
9536 * configure.srv (xscale*-*-linux*): Don't handle target.
9537
b00ad6ff
NF
95382011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9539
9540 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9541 casting pointers.
9542 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9543 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9544 (i386_emit_void_call_2): Likewise.
9545
af96c192
YQ
95462011-04-26 Yao Qi <yao@codesourcery.com>
9547
43aaf8b6
PA
9548 * linux-low.c: Move common macros to linux-ptrace.h.
9549 Include linux-ptrace.h.
af96c192
YQ
9550 * Makefile.in (linux_ptrace_h): New.
9551 (linux-low.o): Depends on linux-ptrace.h.
9552
03f2bd59
JK
95532011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9554
9555 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9556 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9557 (remote_prepare): New function with most of the TCP code from ...
9558 (remote_open): ... here. Detect PORT here unconditionally. Move also
9559 setting transport_is_reliable.
9560 * server.c (run_once): New variable.
9561 (gdbserver_usage): Document it.
9562 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9563 the first run if RUN_ONCE.
9564 * server.h (run_once, remote_prepare): New declarations.
9565
7a9dd1b2
TT
95662011-04-19 Tom Tromey <tromey@redhat.com>
9567
9568 * win32-low.c (handle_load_dll): Remove duplicate "the".
9569
81239425
PM
95702011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9571
9572 Remove support for old Cygwin 1.5 versions.
9573 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9574 function to avoid warning.
9575 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9576 warning.
9577
9e0627f1
PM
95782011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9579
9580 * gdbserver/server.h (Macro _): Define it if not available.
9581
588eebee
MS
95822011-03-14 Michael Snyder <msnyder@vmware.com>
9583
348af9f7 9584 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9585
43f70d4c
JB
95862011-03-10 Joel Brobecker <brobecker@adacore.com>
9587
9588 * Makefile.in (maintainer-clean realclean distclean): Remove
9589 "make ... subdir_do" command.
9590
348af9f7
MS
95912011-03-10 Michael Snyder <msnyder@vmware.com>
9592
9593 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9594
9595 * server.c (handle_v_run): Free alloced buffer on early return.
9596
e637a4f5
YQ
95972011-03-09 Yao Qi <yao@codesourcery.com>
9598
9599 Revert:
9600 2011-03-04 Yao Qi <yao@codesourcery.com>
9601
9602 * Makefile.in: Remove GNU make feature --directory.
9603
9604 2011-03-05 Yao Qi <yao@codesourcery.com>
9605
9606 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9607 (subdir_do): New make target. Copied from gdb/Makefile.
9608 (maintainer-clean, realclean, distclean, clean): Call corresponding
9609 make targets in common/Makefile.
9610
9611 2011-02-11 Yao Qi <yao@codesourcery.com>
9612
9613 * configure.ac: Call AC_PROG_RANLIB.
9614 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9615 * configure: Regenerate.
9616
e6edda56
JK
96172011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9618
9619 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9620
e5141119
JB
96212011-03-06 Yao Qi <yao@codesourcery.com>
9622
9623 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9624
64794aa4
JB
96252011-03-05 Yao Qi <yao@codesourcery.com>
9626
9627 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9628 (subdir_do): New make target. Copied from gdb/Makefile.
9629 (maintainer-clean, realclean, distclean, clean): Call corresponding
9630 make targets in common/Makefile.
9631
7a762829
YQ
96322011-03-04 Yao Qi <yao@codesourcery.com>
9633
9634 * Makefile.in: Remove GNU make feature --directory.
9635
348af9f7
MS
96362011-03-04 Michael Snyder <msnyder@vmware.com>
9637
9638 * server.c (queue_stop_reply): Call xmalloc not malloc.
9639
96402011-03-02 Michael Snyder <msnyder@vmware.com>
9641
9642 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9643
9f72fee2
MS
96442011-02-28 Michael Snyder <msnyder@vmware.com>
9645
588eebee
MS
9646 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9647 (cmd_qtframe): Ditto.
9648 (cmd_qtbuffer): Ditto.
9649 (cmd_bigqtbuffer): Ditto.
9650
9f72fee2
MS
9651 * utils.c (decimal2str): Initialize 'width' to nine, then
9652 don't mess with it.
9653
8040bd49
UW
96542011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9655
9656 * hostio.c (require_data): Free *data, not data.
9657
7e52cbd0
JK
96582011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9659
9660 * hostio.c (require_data): Use free, not xfree.
9661
9130f83e
MS
96622011-02-27 Michael Snyder <msnyder@vmware.com>
9663
4b812f4e
MS
9664 * server.c (handle_query): Discard unused value.
9665
9130f83e
MS
9666 * hostio.c (require_data): Free malloc memory before returning
9667 error.
9668
69d37113
MS
96692011-02-26 Michael Snyder <msnyder@vmware.com>
9670
9671 * linux-low.c (list_threads): Call closedir for dirent.
9672
35f5825a
MS
96732011-02-27 Michael Snyder <msnyder@vmware.com>
9674
2a589cef
MS
9675 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9676 a case statement falls through.
9677
0adea5f7
MS
9678 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9679
35f5825a
MS
9680 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9681 in comparison.
9682
238f1c74
MS
96832011-02-26 Michael Snyder <msnyder@vmware.com>
9684
9685 * utils.c (decimal2str): Eliminate dead code and dead param.
9686 (pulongest): Drop dead param from call to decimal2str.
9687 (plongest): Ditto.
9688
633ff500
JB
96892011-02-24 Joel Brobecker <brobecker@adacore.com>
9690
9691 Revert the following patch (not approved yet):
9692 2011-02-21 Hui Zhu <teawater@gmail.com>
9693 * tracepoint.c (tp_printf): New function.
9694 (eval_agent_expr): Handle gdb_agent_op_printf.
9695
f9c6ff72
HZ
96962011-02-21 Hui Zhu <teawater@gmail.com>
9697
9698 * tracepoint.c (tp_printf): New function.
9699 (eval_agent_expr): Handle gdb_agent_op_printf.
9700
94d5e490
TT
97012011-02-18 Tom Tromey <tromey@redhat.com>
9702
9703 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9704 (tracepoint.o): Likewise.
9705 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9706 (gdb_agent_op_names): Likewise.
9707
c7f96d2b
TT
97082011-02-18 Tom Tromey <tromey@redhat.com>
9709
9710 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9711 gdb_agent_op_rot>: New constants.
9712 (gdb_agent_op_names): Add pick and roll.
9713 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9714 cases.
9715
0feedb2c
JK
97162011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9717
9718 * aclocal.m4: Regenerated with aclocal-1.11.1.
9719
b3b9301e
PA
97202011-02-14 Pedro Alves <pedro@codesourcery.com>
9721
9722 * server.c (handle_qxfer_traceframe_info): New.
9723 (qxfer_packets): Register "traceframe-info".
9724 (handle_query): Report support for qXfer:traceframe-info:read+.
9725 * tracepoint.c (match_blocktype): New.
9726 (traceframe_find_block_type): Rename to ...
9727 (traceframe_walk_blocks): ... this. Add callback filter argument,
9728 and use it.
9729 (traceframe_find_block_type): New, reimplemented on top of
9730 traceframe_walk_blocks.
9731 (build_traceframe_info_xml): New.
9732 (traceframe_read_info): New.
9733 * server.h (traceframe_read_info): Declare.
9734
4f3e6fb7
YQ
97352011-02-11 Yao Qi <yao@codesourcery.com>
9736
9737 * configure.ac: Call AC_PROG_RANLIB.
9738 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9739 * configure: Regenerate.
9740
764880b7
PA
97412011-02-07 Pedro Alves <pedro@codesourcery.com>
9742
9743 * server.c (gdb_read_memory): Change return semantics to allow
9744 partial transfers.
9745 (handle_search_memory_1): Adjust.
9746 (process_serial_event) <'m' packet>: Handle partial transfers.
9747 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9748
1c79eb8a
PA
97492011-01-28 Pedro Alves <pedro@codesourcery.com>
9750
9751 * regcache.c (init_register_cache): Initialize
9752 regcache->register_status.
9753 (free_register_cache): Release regcache->register_status.
9754 (regcache_cpy): Copy register_status.
9755 (registers_to_string): Print 'x's for unavailable registers.
9756 (supply_register): Mark the register's status valid or
9757 unavailable, depending on whether a buffer was passed in or not.
9758 (supply_register_zeroed): New.
9759 (supply_regblock): Mark the registers' status valid or
9760 unavailable, depending on whether a buffer was passed in or not.
9761 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9762 (struct regcache): New `register_status' field.
9763 (supply_register_zeroed): Declare.
9764 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9765 supply_register_zeroed, rather than passing a NULL buffer to
9766 supply_register.
9767 * tracepoint.c (fetch_traceframe_registers): Update comment.
9768
85724a0e
PA
97692011-01-28 Pedro Alves <pedro@codesourcery.com>
9770
9771 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9772 buffer explicit.
9773
d08aafef
PA
97742011-01-25 Pedro Alves <pedro@codesourcery.com>
9775
9776 * server.h (decode_xfer_write): Change prototype.
9777 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9778 and don't extract the annex here.
9779 * server.c (decode_xfer_read): Remove `annex' parameter,
9780 and don't extract the annex here.
9781 (decode_xfer): New.
9782 (struct qxfer): New.
9783 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9784 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9785 (handle_qxfer_statictrace): New functions, abstracted out from
9786 handle_query, and made to use the struct qxfer interface.
9787 (handle_threads_qxfer_proper): Rename to ...
9788 (handle_qxfer_threads_proper): ... this.
9789 (handle_threads_qxfer): Rename to ...
9790 (handle_qxfer_threads): ... this. Adjust.
9791 (qxfer_packets): New array.
9792 (handle_qxfer): New function.
9793 (handle_query): Use handle_qxfer.
9794
493e2a69
MS
97952011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9796
9797 * gdbreplay.c: Shorten lines of >= 80 columns.
9798 * linux-low.c: Ditto.
9799 * linux-ppc-low.c: Ditto.
9800 * linux-s390-low.c: Ditto.
9801 * linux-sparc-low.c: Ditto.
9802 * linux-x86-low.c: Ditto.
9803 * linux-xtensa-low.c: Ditto.
9804 * mem-break.c: Ditto.
9805 * nto-low.c: Ditto.
9806 * regcache.h: Ditto.
9807 * remote-utils.c: Ditto.
9808 * server.c: Ditto.
9809 * server.h: Ditto.
9810 * thread-db.c: Ditto.
9811 * tracepoint.c: Ditto.
9812 * utils.c: Ditto.
9813 * win32-low.h: Ditto.
9814
44944448
JB
98152011-01-05 Joel Brobecker <brobecker@adacore.com>
9816
9817 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9818 update.
9819
71ce852c
JB
98202011-01-01 Joel Brobecker <brobecker@adacore.com>
9821
9822 * server.c (gdbserver_version): Update copyright year in version
9823 output.
9824 * gdbreplay.c (gdbreplay_version): Ditto.
9825
eb826dc6
MF
98262010-12-29 Jie Zhang <jie.zhang@analog.com>
9827
9828 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9829 * linux-bfin-low.c: New file.
9830 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9831 PT_DATA_ADDR for BFIN targets.
9832 * Makefile.in (SFILES): Add linux-bfin-low.c.
9833 (clean): Remove reg-bfin.c.
9834 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9835 * README: Mention supported Blackfin targets.
9836
39ab222a
MF
98372010-12-23 Mike Frysinger <vapier@gentoo.org>
9838
9839 * .gitignore: New file.
9840
a1f2ce7d
MF
98412010-11-16 Mike Frysinger <vapier@gentoo.org>
9842
9843 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9844
f474844c
JZ
98452010-10-22 Jie Zhang <jie@codesourcery.com>
9846
9847 * Makefile.in: Add FLAGS_TO_PASS variable.
9848 (install): Remove dependency of install-only and recursively
9849 invoke make for install-only.
9850
f1048712
DE
98512010-10-04 Doug Evans <dje@google.com>
9852
9853 * Makefile.in (uninstall): Use $(DESTDIR).
9854
b53a1623
PA
98552010-09-24 Pedro Alves <pedro@codesourcery.com>
9856
e6ee044d
PA
9857 PR gdb/11842
9858
b53a1623
PA
9859 * linux-x86-low.c (compat_siginfo_from_siginfo)
9860 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9861 si_code is < 0. Check for si_code == SI_TIMER before checking for
9862 si_code < 0.
9863
fa1bd1e4
JB
98642010-09-13 Joel Brobecker <brobecker@adacore.com>
9865
9866 * lynx-i386-low.c: New file.
9867 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9868
47fac8f8
JB
98692010-09-13 Joel Brobecker <brobecker@adacore.com>
9870
9871 * lynx-low.c (ptrace_request_to_str): Remove handling for
9872 request values that have been removed in LynxOS 5.x.
9873
1adfc54d
JB
98742010-09-13 Joel Brobecker <brobecker@adacore.com>
9875
9876 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9877 <ptrace.h>
9878
c2a66c29
NS
98792010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9880
9881 * configure.ac: Add --enable-inprocess-agent option.
9882 * configure: Rebuilt.
9883
32fcada3
YQ
98842010-09-06 Yao Qi <yao@codesourcery.com>
9885
9886 * linux-low.c (linux_kill): Remove unused variable.
9887 (linux_stabilize_threads): Likewise.
9888 * server.c (start_inferior): Likewise.
9889 (queue_stop_reply_callback): Likewise.
9890 * tracepoint.c (do_action_at_tracepoint): Likewise.
9891
0cccb683
YQ
98922010-09-06 Yao Qi <yao@codesourcery.com>
9893
9894 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9895 on return.
9896
423ec54c
JK
98972010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9898
9899 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9900
12ac6819
PA
99012010-09-06 Pedro Alves <pedro@codesourcery.com>
9902
9903 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9904 "$(IPA_DEPFILES)".
9905
8ed54b31
JB
99062010-09-01 Joel Brobecker <brobecker@adacore.com>
9907
9908 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9909 gdbserver/lynx-ppc-low.c: New files.
9910 * Makefile.in (lynx_low_h): New variable.
9911 (lynx-low.o, lynx-ppc-low.o): New rules.
9912 * configure.ac: On LynxOS, link with -lnetinet.
9913 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9914 * configure: regenerate.
9915
bb0116a4
JB
99162010-09-01 Joel Brobecker <brobecker@adacore.com>
9917
9918 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9919 * configure.ac: Add check for vasprintf and vsnprintf.
9920 * configure, config.in: Regenerate.
9921 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9922
a778ab81 99232010-09-01 Joel Brobecker <brobecker@adacore.com>
9924
9925 * gdbreplay.c: Move include of alloca.h up, next to include of
9926 malloc.h.
9927 * server.h: Add include of malloc.h.
9928 * mem-break.c: Remove include of malloc.h.
9929 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9930
8b034a19 99312010-09-01 Joel Brobecker <brobecker@adacore.com>
9932
9933 * Makefile.in (memmem.o): Build with -Wno-error.
9934
99352010-09-01 Joel Brobecker <brobecker@adacore.com>
9936
9937 * utils.c (xsnprintf): Make non-static.
9938 * server.h: Add xsnprintf declaration.
9939 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9940 replace calls to snprintf by calls to xsnprintf throughout.
9941
99422010-09-01 Joel Brobecker <brobecker@adacore.com>
9943
9944 * configure.ac: Add configure check for alloca.
9945 * configure, config.in: Regenerate.
9946 * server.h: Include alloca.h if it exists.
9947 * gdbreplay.c: Include alloca.h if it exists.
9948
1a981360
PA
99492010-08-28 Pedro Alves <pedro@codesourcery.com>
9950
9951 * linux-low.c (__SIGRTMIN): Define if not already defined.
9952 (linux_create_inferior): Check for __ANDROID__ rather than
9953 __SIGRTMIN.
9954 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9955 are already deferred.
9956 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9957 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9958 stopped and already has a pending signal to report.
9959 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9960 a pending signal to report or is moving out of a jump pad.
9961 (linux_init_signals): Check for __ANDROID__ rather than
9962 __SIGRTMIN.
9963
b4d51a55
PA
99642010-08-28 Pedro Alves <pedro@codesourcery.com>
9965
9966 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9967 debug_threads check. Avoid a linear search when not doing debug
9968 output.
9969
ec48365d
PA
99702010-08-27 Pedro Alves <pedro@codesourcery.com>
9971
9972 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9973 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9974 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9975 (process_event): Change local fd's type to gdb_fildes_t.
9976 (create_file_handler): Adjust prototype.
9977 (delete_file_handler): Adjust prototype.
9978 (handle_file_event): Adjust prototype. Use pfildes.
9979 (create_file_event): Adjsut prototype.
9980 * remote-utils.c (remote_desc, listen_desc): Change type to
9981 gdb_fildes_t.
9982 * server.h: New gdb_fildes_t typedef.
9983 [USE_WIN32API]: Include winsock2.h.
9984 (delete_file_handler, add_file_handler): Adjust prototypes.
9985 (pfildes): Declare.
9986 * utils.c (pfildes): New.
9987
854d88f0
PA
99882010-08-27 Pedro Alves <pedro@codesourcery.com>
9989
9990 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9991 * configure: Regenerate.
9992
0146f85b
PA
99932010-08-27 Pedro Alves <pedro@codesourcery.com>
9994
9995 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9996 (linux_done_accessing_memory): ... this.
9997 (linux_target_ops): Adjust.
9998 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9999 * nto-low.c (nto_target_ops): Adjust comment.
10000 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10001 * spu-low.c (spu_target_ops): Adjust comment.
10002 * target.h (target_ops): Rename unprepare_to_access_memory field
10003 to done_accessing_memory.
10004 (unprepare_to_access_memory): Rename to ...
10005 (done_accessing_memory): ... this.
10006
90d74c30
PA
100072010-08-26 Pedro Alves <pedro@codesourcery.com>
10008
10009 * linux-low.c (linux_prepare_to_access_memory): New.
10010 (linux_unprepare_to_access_memory): New.
10011 (linux_target_ops): Install them.
10012 * server.c (read_memory): Rename to ...
10013 (gdb_read_memory): ... this. Use
10014 prepare_to_access_memory/prepare_to_access_memory.
10015 (write_memory): Rename to ...
10016 (gdb_write_memory): ... this. Use
10017 prepare_to_access_memory/prepare_to_access_memory.
10018 (handle_search_memory_1): Adjust.
10019 (process_serial_event): Adjust.
10020 * target.h (struct target_ops): New fields
10021 prepare_to_access_memory and unprepare_to_access_memory.
10022 (prepare_to_access_memory, unprepare_to_access_memory): New.
10023 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10024 prepare_to_access_memory/prepare_to_access_memory.
10025 * nto-low.c (nto_target_ops): Adjust.
10026 * spu-low.c (spu_target_ops): Adjust.
10027 * win32-low.c (win32_target_ops): Adjust.
10028
fd467969
PA
100292010-08-26 Pedro Alves <pedro@codesourcery.com>
10030
10031 * Makefile.in (WARN_CFLAGS): Get it from configure.
10032 (WERROR_CFLAGS): New.
10033 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10034 * configure.ac: Introduce --enable-werror, which adds -Werror to
10035 the compiler command line. Enabled by default. Disable with
10036 --disable-werror. Add -Wdeclaration-after-statement
10037 Wpointer-arith and -Wformat-nonliteral to warning flags.
10038 * configure: Regenerate.
10039
331e2f5f
PA
100402010-08-26 Pedro Alves <pedro@codesourcery.com>
10041
10042 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10043
e581f2b4
PA
100442010-08-26 Pedro Alves <pedro@codesourcery.com>
10045
10046 * gdbreplay.c (remote_error): New.
10047 (gdbchar): New.
10048 (expect): Use gdbchar. Check for error reading from GDB.
10049 Clarify sync error output.
10050 (play): Check for errors writing to GDB.
10051 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10052 * remote-utils.c (getpkt): Check for errors writing to the remote
10053 descriptor.
10054
3c11dd79
PA
100552010-08-25 Pedro Alves <pedro@codesourcery.com>
10056
10057 * linux-low.c (linux_wait_1): Move non-debugging code out of
10058 `debug_threads' control.
10059
d20a8ad9
PA
100602010-08-25 Pedro Alves <pedro@codesourcery.com>
10061
10062 * linux-low.c (linux_wait_1): Don't set last_status here.
10063 * server.c (push_event, queue_stop_reply_callback): Assert we're
10064 not pushing a TARGET_WAITKIND_IGNORE event.
10065 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10066 (myresume, handle_target_event): Set the thread's last_resume_kind
10067 and last_status from the target returned status.
10068
964e4306
PA
100692010-08-25 Pedro Alves <pedro@codesourcery.com>
10070
10071 PR threads/10729
10072
10073 * linux-x86-low.c (update_debug_registers_callback): New.
10074 (i386_dr_low_set_addr): Use it.
10075 (i386_dr_low_get_addr): New.
10076 (i386_dr_low_set_control): Use update_debug_registers_callback.
10077 (i386_dr_low_get_control): New.
10078 (i386_dr_low_get_status): Adjust.
10079 * linux-low.c (linux_stop_lwp): New.
10080 * linux-low.h (linux_stop_lwp): Declare.
10081
10082 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10083 argument instead of a i386_debug_reg_state.
10084 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10085 a i386_debug_reg_state.
10086 (i386_insert_aligned_watchpoint): Adjust.
10087 (i386_remove_aligned_watchpoint): Adjust.
10088 (i386_low_stopped_data_address): Read the debug registers from the
10089 inferior instead of from the mirrors.
10090 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10091 (i386_dr_low_get_addr): Declare.
10092 (i386_dr_low_get_control): Declare.
10093 (i386_dr_low_get_status): Change prototype.
10094
10095 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10096 (i386_dr_low_get_addr): New.
10097 (i386_dr_low_get_control): New.
10098 (i386_dr_low_get_status): Adjust prototype. Return
10099 dr_status_mirror.
10100 (i386_initial_stuff): Clear dr_status_mirror and
10101 dr_control_mirror.
10102 (i386_get_thread_context): Adjust.
10103 (i386_set_thread_context): Adjust.
10104 (i386_thread_added): Adjust.
10105
5f21a75b
PA
101062010-08-24 Pedro Alves <pedro@codesourcery.com>
10107
10108 * linux-low.h (linux_thread_area): Delete declaration.
10109
3e4c1235
TS
101102010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10111
10112 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10113 after its termination.
10114
1971b033
PA
101152010-08-09 Pedro Alves <pedro@codesourcery.com>
10116
10117 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10118 (gdb_wants_all_stopped): Delete.
10119 (linux_wait_1): Don't call them.
10120 * server.c (handle_v_cont): Tag all threads as want-stopped.
10121 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10122 stopped as "client-wants-stopped".
10123
310444ac
PA
101242010-07-31 Pedro Alves <pedro@codesourcery.com>
10125
10126 * Makefile.in (signals_h): New.
10127 (server_h): Depend on it.
10128 (server.o): Don't depend on $(signals_def).
10129 (signals.o): Depend on $(signals_def).
10130
a19cae16
JK
101312010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10132
10133 * Makefile.in (signals_def): New.
10134 (server_h): Append include/gdb/signals.h and signals_def.
10135 (server.o): Append signals_def.
10136
30d50328
JK
101372010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10138
10139 * server.c (handle_target_event): Use target_signal_to_host for
10140 resume_info.sig initialization.
10141 * target.h (struct thread_resume) <sig>: New comment.
10142
5c3216e2
OS
101432010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10144
c6f46ca0
OS
10145 * server.c (handle_query): strcpy() the returned string from paddress()
10146 instead of sprintf().
5c3216e2
OS
10147 * utils.c (paddress): Return phex_nz().
10148
6bd31874
JB
101492010-07-07 Joel Brobecker <brobecker@adacore.com>
10150
10151 * server.c (handle_v_cont): Call mourn_inferior if process
10152 just exited.
10153 (myresume): Likewise.
10154
0fb4aa4b
PA
101552010-07-01 Pedro Alves <pedro@codesourcery.com>
10156
10157 Static tracepoints, and integration with UST.
10158
10159 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10160 * mem-break.c (uninsert_all_breakpoints)
10161 (reinsert_all_breakpoints): New.
10162 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10163 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10164 (gdb_agent_ust_loaded, helper_thread_id)
10165 (gdb_agent_helper_thread_id): New macros.
10166 (struct ipa_sym_addresses): Add addr_ust_loaded,
10167 addr_helper_thread_id, addr_cmd_buf.
10168 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10169 (in_process_agent_loaded_ust): New.
10170 (write_e_ust_not_loaded): New.
10171 (maybe_write_ipa_ust_not_loaded): New.
10172 (struct collect_static_trace_data_action): New.
10173 (enum tracepoint_type) <static_tracepoint>: New.
10174 (struct tracepoint) <handle>: Mention static tracepoints.
10175 (struct static_tracepoint_ctx): New.
10176 (CMD_BUF_SIZE): New.
10177 (add_tracepoint_action): Handle static tracepoint actions.
10178 (unprobe_marker_at): New.
10179 (clear_installed_tracepoints): Handle static tracepoints.
10180 (cmd_qtdp): Handle static tracepoints.
10181 (probe_marker_at): New.
10182 (cmd_qtstart): Handle static tracepoints.
10183 (response_tracepoint): Handle static tracepoints.
10184 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10185 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10186 (get_context_regcache): Handle static tracepoints.
10187 (do_action_at_tracepoint): Handle static tracepoint actions.
10188 (traceframe_find_block_type): Handle static trace data blocks.
10189 (traceframe_read_sdata): New.
10190 (download_tracepoints): Download static tracepoint actions.
10191 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10192 (GDB_PROBE_NAME): New.
10193 (ust_ops): New.
10194 (GET_UST_SYM): New.
10195 (USTF): New.
10196 (dlsym_ust): New.
10197 (ust_marker_to_static_tracepoint): New.
10198 (gdb_probe): New.
10199 (collect_ust_data_at_tracepoint): New.
10200 (gdb_ust_probe): New.
10201 (UNIX_PATH_MAX, SOCK_DIR): New.
10202 (gdb_ust_connect_sync_socket): New.
10203 (resume_thread, stop_thread): New.
10204 (run_inferior_command): New.
10205 (init_named_socket): New.
10206 (gdb_ust_socket_init): New.
10207 (cstr_to_hexstr): New.
10208 (next_st): New.
10209 (first_marker, next_marker): New.
10210 (response_ust_marker): New.
10211 (cmd_qtfstm, cmd_qtsstm): New.
10212 (unprobe_marker_at, probe_marker_at): New.
10213 (cmd_qtstmat, gdb_ust_thread): New.
10214 (gdb_ust_init): New.
10215 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10216 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10217 (ST_REGENTRY): New.
10218 (x86_64_st_collect_regmap): New.
10219 (X86_64_NUM_ST_COLLECT_GREGS): New.
10220 (AMD64_RIP_REGNUM): New.
10221 (supply_static_tracepoint_registers): New.
10222 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10223 (ST_REGENTRY): New.
10224 (i386_st_collect_regmap): New.
10225 (i386_NUM_ST_COLLECT_GREGS): New.
10226 (supply_static_tracepoint_registers): New.
10227 * server.c (handle_query): Handle qXfer:statictrace:read.
10228 <qSupported>: Report support for StaticTracepoints, and
10229 qXfer:statictrace:read features.
10230 * server.h (traceframe_read_sdata)
10231 (supply_static_tracepoint_registers): Declare.
10232 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10233 (unpack_varlen_hex): Include in IPA build.
10234 * Makefile.in (ustlibs, ustinc): New.
10235 (IPA_OBJS): Add remote-utils-ipa.o.
10236 ($(IPA_LIB)): Link -ldl and -lpthread.
10237 (UST_CFLAGS): New.
10238 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10239 * config.in, configure: Regenerate.
10240
9e4344e5
PA
102412010-06-20 Ian Lance Taylor <iant@google.com>
10242 Pedro Alves <pedro@codesourcery.com>
10243
10244 * linux-x86-low.c (always_true): Delete.
10245 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10246 trying to fool the compiler with always_true.
10247
c6beb2cb
PA
102482010-06-20 Pedro Alves <pedro@codesourcery.com>
10249
10250 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10251 conditions in gdbserver.
10252
d2ed6730
UW
102532010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10254
10255 * spu-low.c (spu_read_memory): Wrap around local store limit.
10256 (spu_write_memory): Likewise.
10257
4e29fb54
PA
102582010-06-15 Pedro Alves <pedro@codesourcery.com>
10259
10260 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10261 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10262 LONGEST uses.
10263 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10264 uses.
10265 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10266 uses with LONGEST uses.
10267
6a271cae
PA
102682010-06-14 Stan Shebs <stan@codesourcery.com>
10269 Pedro Alves <pedro@codesourcery.com>
10270
10271 Bytecode compiler.
10272
10273 * linux-x86-low.c: Include limits.h.
10274 (add_insns): New.
10275 (always_true): New.
10276 (EMIT_ASM): New.
10277 (EMIT_ASM32): New.
10278 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10279 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10280 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10281 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10282 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10283 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10284 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10285 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10286 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10287 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10288 (amd64_emit_void_call_2): New.
10289 (amd64_emit_ops): New.
10290 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10291 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10292 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10293 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10294 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10295 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10296 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10297 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10298 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10299 (i386_emit_stack_adjust, i386_emit_int_call_1)
10300 (i386_emit_void_call_2): New.
10301 (i386_emit_ops): New.
10302 (x86_emit_ops): New.
10303 (the_low_target): Install x86_emit_ops.
10304 * server.h (struct emit_ops): New.
10305 (get_raw_reg_func_addr): Declare.
10306 (current_insn_ptr, emit_error): Declare.
10307 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10308 (set_trace_state_variable_value): New defines.
10309 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10310 addr_get_trace_state_variable_value and
10311 addr_set_trace_state_variable_value.
10312 (symbol_list): New fields for get_raw_reg,
10313 get_trace_state_variable_value and set_trace_state_variable_value.
10314 (condfn): New typedef.
10315 (struct tracepoint): New field `compiled_cond'.
10316 (do_action_at_tracepoint): Clear compiled_cond.
10317 (get_trace_state_variable_value, set_trace_state_variable_value):
10318 Export in the IPA.
10319 (condition_true_at_tracepoint): If there's a compiled condition,
10320 run that.
10321 (current_insn_ptr, emit_error): New globals.
10322 (struct bytecode_address): New.
10323 (get_raw_reg_func_addr): New.
10324 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10325 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10326 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10327 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10328 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10329 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10330 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10331 (compile_tracepoint_condition, compile_bytecodes): New.
10332 * target.h (emit_ops): Forward declare.
10333 (struct target_ops): New field emit_ops.
10334 (target_emit_ops): New.
10335 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10336 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10337 * linux-low.c (linux_emit_ops): New.
10338 (linux_target_ops): Install it.
10339 * linux-low.h (struct linux_target_ops): New field emit_ops.
10340
92b72907
UW
103412010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10342
10343 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10344 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10345
fa593d66
PA
103462010-06-01 Pedro Alves <pedro@codesourcery.com>
10347 Stan Shebs <stan@codesourcery.com>
10348
10349 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10350 (all): Depend on $(extra_libraries).
10351 (install-only): Install the IPA.
10352 (IPA_OBJS, IPA_LIB): New.
10353 (clean): Remove the IPA lib.
10354 (IPAGENT_CFLAGS): New.
10355 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10356 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10357 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10358 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10359 * configure.ac: Check for atomic builtins support in the compiler.
10360 (IPA_DEPFILES, extra_libraries): Define.
10361 * configure.srv (ipa_obj): Add description.
10362 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10363 (i[34567]86-*-linux*): Set ipa_obj.
10364 (x86_64-*-linux*): Set ipa_obj.
10365 * linux-low.c (stabilizing_threads): New.
10366 (supports_fast_tracepoints): New.
10367 (linux_detach): Stabilize threads before detaching.
10368 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10369 the lwp is either not stabilizing, or is moving out of a jump pad.
10370 (linux_fast_tracepoint_collecting): New.
10371 (maybe_move_out_of_jump_pad): New.
10372 (enqueue_one_deferred_signal): New.
10373 (dequeue_one_deferred_signal): New.
10374 (linux_wait_for_event_1): If moving out of a jump pad, defer
10375 pending signals to later.
10376 (linux_stabilize_threads): New.
10377 (linux_wait_1): Check if threads need moving out of jump pads, and
10378 do it if so.
10379 (stuck_in_jump_pad_callback): New.
10380 (move_out_of_jump_pad_callback): New.
10381 (lwp_running): New.
10382 (linux_resume_one_lwp): Handle moving out of jump pads.
10383 (linux_set_resume_request): Dequeue deferred signals.
10384 (need_step_over_p): Also step over fast tracepoint jumps.
10385 (start_step_over): Also uninsert fast tracepoint jumps.
10386 (finish_step_over): Also reinsert fast tracepoint jumps.
10387 (linux_install_fast_tracepoint_jump): New.
10388 (linux_target_ops): Install linux_stabilize_threads and
10389 linux_install_fast_tracepoint_jump_pad.
10390 * linux-low.h (linux_target_ops) <get_thread_area,
10391 install_fast_tracepoint_jump_pad>: New fields.
10392 (struct lwp_info) <collecting_fast_tracepoint,
10393 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10394 (linux_get_thread_area): Declare.
10395 * linux-x86-low.c (jump_insn): New.
10396 (x86_get_thread_area): New.
10397 (append_insns): New.
10398 (push_opcode): New.
10399 (amd64_install_fast_tracepoint_jump_pad): New.
10400 (i386_install_fast_tracepoint_jump_pad): New.
10401 (x86_install_fast_tracepoint_jump_pad): New.
10402 (the_low_target): Install x86_get_thread_area and
10403 x86_install_fast_tracepoint_jump_pad.
10404 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10405 (struct fast_tracepoint_jump): New.
10406 (fast_tracepoint_jump_insn): New.
10407 (fast_tracepoint_jump_shadow): New.
10408 (find_fast_tracepoint_jump_at): New.
10409 (fast_tracepoint_jump_here): New.
10410 (delete_fast_tracepoint_jump): New.
10411 (set_fast_tracepoint_jump): New.
10412 (uninsert_fast_tracepoint_jumps_at): New.
10413 (reinsert_fast_tracepoint_jumps_at): New.
10414 (set_breakpoint_at): Use write_inferior_memory.
10415 (uninsert_raw_breakpoint): Use write_inferior_memory.
10416 (check_mem_read): Mask out fast tracepoint jumps.
10417 (check_mem_write): Mask out fast tracepoint jumps.
10418 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10419 (set_fast_tracepoint_jump): Declare.
10420 (delete_fast_tracepoint_jump)
10421 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10422 (reinsert_fast_tracepoint_jumps_at): Declare.
10423 * regcache.c: Don't compile many functions when building the
10424 in-process agent library.
10425 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10426 the register buffer in the heap.
10427 (free_register_cache): If the register buffer isn't owned by the
10428 regcache, don't free it.
10429 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10430 pre-existing register caches.
10431 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10432 type.
10433 (convert_ascii_to_int): : Constify `from' parameter type.
10434 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10435 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10436 the needed buffer in-place.
10437 (relocate_instruction): New.
10438 * server.c (handle_query) <qSymbols>: If the target supports
10439 tracepoints, give it a chance of looking up symbols. Report
10440 support for fast tracepoints.
10441 (handle_status): Stabilize threads.
10442 (process_serial_event): Adjust.
10443 * server.h (struct fast_tracepoint_jump): Forward declare.
10444 (struct process_info) <fast_tracepoint_jumps>: New field.
10445 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10446 (decode_X_packet, decode_M_packet): Adjust.
10447 (relocate_instruction): Declare.
10448 (in_process_agent_loaded): Declare.
10449 (tracepoint_look_up_symbols): Declare.
10450 (struct fast_tpoint_collect_status): Declare.
10451 (fast_tracepoint_collecting): Declare.
10452 (force_unlock_trace_buffer): Declare.
10453 (handle_tracepoint_bkpts): Declare.
10454 (initialize_low_tracepoint)
10455 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10456 * target.h (struct target_ops) <stabilize_threads,
10457 install_fast_tracepoint_jump_pad>: New fields.
10458 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10459 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10460 [HAVE_STDINT_H]: Include stdint.h.
10461 (trace_debug_1): Rename to ...
10462 (trace_vdebug): ... this.
10463 (trace_debug): Rename to ...
10464 (trace_debug_1): ... this. Add `level' parameter.
10465 (trace_debug): New.
10466 (ATTR_USED, ATTR_NOINLINE): New.
10467 (IP_AGENT_EXPORT): New.
10468 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10469 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10470 (about_to_request_buffer_space, trace_buffer_is_full)
10471 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10472 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10473 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10474 (traceframe_write_count, traceframes_created)
10475 (trace_state_variables)
10476 New renaming defines.
10477 (struct ipa_sym_addresses): New.
10478 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10479 (symbol_list): New.
10480 (ipa_sym_addrs): New.
10481 (all_tracepoint_symbols_looked_up): New.
10482 (in_process_agent_loaded): New.
10483 (write_e_ipa_not_loaded): New.
10484 (maybe_write_ipa_not_loaded): New.
10485 (tracepoint_look_up_symbols): New.
10486 (debug_threads) [IN_PROCESS_AGENT]: New.
10487 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10488 (UNKNOWN_SIDE_EFFECTS): New.
10489 (stop_tracing): New.
10490 (flush_trace_buffer): New.
10491 (stop_tracing_bkpt): New.
10492 (flush_trace_buffer_bkpt): New.
10493 (read_inferior_integer): New.
10494 (read_inferior_uinteger): New.
10495 (read_inferior_data_pointer): New.
10496 (write_inferior_data_pointer): New.
10497 (write_inferior_integer): New.
10498 (write_inferior_uinteger): New.
10499 (struct collect_static_trace_data_action): Delete.
10500 (enum tracepoint_type): New.
10501 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10502 <actions_str, step_actions, step_actions_str>: Only include in
10503 GDBserver.
fa593d66
PA
10504 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10505 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10506 (tracepoints): Use IP_AGENT_EXPORT.
10507 (last_tracepoint): Don't include in the IPA.
10508 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10509 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10510 (alloced_trace_state_variables): New.
10511 (trace_state_variables): Use IP_AGENT_EXPORT.
10512 (traceframe_t): Delete unused variable.
10513 (circular_trace_buffer): Don't include in the IPA.
10514 (trace_buffer_start): Delete.
10515 (struct trace_buffer_control): New.
10516 (trace_buffer_free): Delete.
10517 (struct ipa_trace_buffer_control): New.
10518 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10519 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10520 New.
10521 (trace_buffer_ctrl): New.
10522 (TRACE_BUFFER_CTRL_CURR): New.
10523 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10524 Reimplement as macros.
10525 (trace_buffer_wrap): Delete.
10526 (traceframe_write_count, traceframe_read_count)
10527 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10528 (struct tracepoint_hit_ctx) <type>: New field.
10529 (struct fast_tracepoint_ctx): New.
10530 (memory_barrier): New.
10531 (cmpxchg): New.
10532 (record_tracepoint_error): Update atomically in the IPA.
10533 (clear_inferior_trace_buffer): New.
10534 (about_to_request_buffer_space): New.
10535 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10536 updating the same buffer.
10537 (add_tracepoint): Default the tracepoint's type to trap
10538 tracepoint, and orig_size to -1.
10539 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10540 internal variables.
10541 (create_trace_state_variable): New parameter `gdb'. Handle it.
10542 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10543 (cmd_qtdp): Handle fast tracepoints.
10544 (cmd_qtdv): Adjust.
10545 (max_jump_pad_size): New.
10546 (gdb_jump_pad_head): New.
10547 (get_jump_space_head): New.
10548 (claim_jump_space): New.
10549 (sort_tracepoints): New.
10550 (MAX_JUMP_SIZE): New.
10551 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10552 IPA.
10553 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10554 support. Upload fast traceframes, and delete internal IPA
10555 breakpoints.
10556 (stop_tracing_handler): New.
10557 (flush_trace_buffer_handler): New.
10558 (cmd_qtstop): Upload fast tracepoints.
10559 (response_tracepoint): Handle fast tracepoints.
10560 (tracepoint_finished_step): Upload fast traceframes. Set the
10561 tracepoint hit context's tracepoint type.
10562 (handle_tracepoint_bkpts): New.
10563 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10564 type. Add comment about fast tracepoints.
10565 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10566 non-existing action_str field.
10567 (get_context_regcache): Handle fast tracepoints.
10568 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10569 to the regcache.
10570 (fast_tracepoint_from_jump_pad_address): New.
10571 (fast_tracepoint_from_ipa_tpoint_address): New.
10572 (collecting_t): New.
10573 (force_unlock_trace_buffer): New.
10574 (fast_tracepoint_collecting): New.
10575 (collecting): New.
10576 (gdb_collect): New.
10577 (write_inferior_data_ptr): New.
10578 (target_tp_heap): New.
10579 (target_malloc): New.
10580 (download_agent_expr): New.
10581 (UALIGN): New.
10582 (download_tracepoints): New.
10583 (download_trace_state_variables): New.
10584 (upload_fast_traceframes): New.
10585 (IPA_FIRST_TRACEFRAME): New.
10586 (IPA_NEXT_TRACEFRAME_1): New.
10587 (IPA_NEXT_TRACEFRAME): New.
10588 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10589 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10590 (gdb_jump_pad_buffer_end): New.
10591 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10592 (initialize_tracepoint): Adjust.
10593 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10594 buffer. Initialize the low module.
10595 * utils.c (PREFIX, TOOLNAME): New.
10596 (malloc_failure): Use PREFIX.
10597 (error): In the IPA, an error causes an exit.
10598 (fatal, warning): Use PREFIX.
10599 (internal_error): Use TOOLNAME.
10600 (NUMCELLS): Increase to 10.
10601 * configure, config.in: Regenerate.
10602
d149dd1d
PA
106032010-06-01 Pedro Alves <pedro@codesourcery.com>
10604
10605 * server.c (handle_query) <qSupported>: Do two passes over the
10606 qSupported string to avoid nesting strtok.
10607
f6528abd
JK
106082010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10609
10610 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10611 (CDEPS): New.
10612 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10613 -Wl,--dynamic-list.
10614 * configure: Regenerate.
10615 * proc-service.list: New.
10616
ca2a87a0
JK
106172010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10618
10619 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10620 New comment.
10621
363a6e9f
OS
106222010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10623
10624 * gdbreplay.c (remote_open): Check error return from socket() call by
10625 its equality to -1 not by it being negative.
10626 * remote-utils.c (remote_open): Likewise.
10627
d23b6cb1
PA
106282010-05-23 Pedro Alves <pedro@codesourcery.com>
10629
10630 * config.h: Regenerate.
10631
28d3cf85
MK
106322010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10633
10634 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10635 doesn't provide PTRACE_GET_THREAD_AREA.
10636
fea36a59
MK
106372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10638
10639 * linux-m68k-low.c: Include <asm/ptrace.h>
10640 (ps_get_thread_area): Implement.
10641
24b066ba
DE
106422010-05-03 Doug Evans <dje@google.com>
10643
10644 * event-loop.c (struct callback_event): New struct.
10645 (callback_list): New global.
10646 (append_callback_event, delete_callback_event): New functions.
10647 (process_callback): New function.
10648 (start_event_loop): Call it.
10649 * remote-utils.c (NOT_SCHEDULED): Define.
10650 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10651 moved out of readchar.
10652 (readchar): Rewrite. Call reschedule before returning.
10653 (reset_readchar): New function.
10654 (remote_close): Call it.
10655 (process_remaining, reschedule): New functions.
10656 * server.h (callback_handler_func): New typedef.
10657 (append_callback_event, delete_callback_event): Declare.
10658
9836d6ea
PA
106592010-05-03 Pedro Alves <pedro@codesourcery.com>
10660
10661 * proc-service.c (ps_pglobal_lookup): Use
10662 thread_db_look_up_one_symbol.
10663 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10664 parameter. Use it instead of all_symbols_looked_up.
10665 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10666 field.
10667 (all_symbols_looked_up): Don't declare.
10668 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10669 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10670 field.
10671 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10672 Set all_symbols_looked_up here.
10673 (thread_db_look_up_one_symbol): New.
10674 (thread_db_get_tls_address): Adjust.
10675 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10676 thread_db object on the heap, and tentatively set it in the
10677 process structure.
10678 (thread_db_init): Don't set all_symbols_looked_up here.
10679 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10680
7984d532
PA
106812010-05-03 Pedro Alves <pedro@codesourcery.com>
10682
10683 * linux-low.c (linux_kill, linux_detach): Adjust.
10684 (status_pending_p_callback): Remove redundant statement. Check
10685 for !TARGET_WAITIKIND_IGNORE, instead of
10686 TARGET_WAITKIND_STOPPED.
10687 (handle_tracepoints): Make sure LWP is locked. Adjust.
10688 (linux_wait_for_event_1): Adjust.
10689 (linux_cancel_breakpoints): New.
10690 (unsuspend_one_lwp): New.
10691 (unsuspend_all_lwps): New.
10692 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10693 (send_sigstop_callback): Change return type to int, add new
10694 `except' parameter and handle it.
10695 (suspend_and_send_sigstop_callback): New.
10696 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10697 pass them down. If SUSPEND, also increment the lwp's suspend
10698 count.
10699 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10700 (need_step_over_p): Don't consider suspended LWPs.
10701 (start_step_over): Adjust.
10702 (proceed_one_lwp): Change return type to int, add new `except'
10703 parameter and handle it.
10704 (unsuspend_and_proceed_one_lwp): New.
10705 (proceed_all_lwps): Use find_inferior instead of
10706 for_each_inferior.
10707 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10708 also decrement the suspend count of LWPs. Pass `except' down,
10709 instead of hacking its suspend count.
10710 (linux_pause_all): Add `freeze' parameter. Adjust.
10711 (linux_unpause_all): New.
10712 (linux_target_ops): Install linux_unpause_all.
10713 * server.c (handle_status): Adjust.
10714 * target.h (struct target_ops): New fields `unpause_all' and
10715 `cancel_breakpoints'. Add new parameter to `pause_all'.
10716 (pause_all): Add new `freeze' parameter.
10717 (unpause_all): New.
10718 (cancel_breakpoints): New.
10719 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10720 cancel breakpoints.
10721 (cmd_qtstart): Pause threads.
10722 (stop_tracing): Pause threads, and cancel breakpoints.
10723 * win32-low.c (win32_target_ops): Adjust.
10724
e471f25b
PA
107252010-05-03 Pedro Alves <pedro@codesourcery.com>
10726
10727 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10728 the inferior right away from here...
10729 (linux_wait_1): ... to here, and adjust to check the thread's
10730 last_resume_kind instead of the lwp's step or stop_expected flags.
10731
1915ef4f
PA
107322010-05-02 Pedro Alves <pedro@codesourcery.com>
10733
10734 * README: Use consistent `GDB' and `GDBserver' spellings.
10735
f9e39928
PA
107362010-05-02 Pedro Alves <pedro@codesourcery.com>
10737
10738 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10739 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10740 (linux_detach_one_lwp): Assume the lwp is stopped.
10741 (any_thread_of): Delete.
10742 (linux_detach): Stop all lwps here. Don't blindly delete all
10743 breakpoints.
10744 (delete_lwp_callback): New.
10745 (linux_mourn): Delete all lwps of the process that is gone.
10746 (linux_wait_1): Don't delete the last lwp of the process here.
10747 * mem-break.h (mark_breakpoints_out): Declare.
10748 * mem-break.c (mark_breakpoints_out): New.
10749 (free_all_breakpoints): Use it.
10750 * server.c (handle_target_event): If the process is gone, mark
10751 breakpoints out.
10752 * thread-db.c (struct thread_db) <create_bp>: New field.
10753 (thread_db_enable_reporting): Fix prototype. Store a thread event
10754 breakpoint reference in the thread_db struct.
10755 (thread_db_load_search): Clear the thread_db object.
10756 (try_thread_db_load_1): Ditto.
10757 (switch_to_process): New.
10758 (disable_thread_event_reporting): Use it.
10759 (remove_thread_event_breakpoints): New.
10760 (thread_db_detach, thread_db_mourn): Use it.
10761
1e7fc18c
PA
107622010-05-01 Pedro Alves <pedro@codesourcery.com>
10763
10764 * linux-low.c (linux_enable_event_reporting): New.
10765 (linux_wait_for_event_1, handle_extended_wait): Use it.
10766
02fc4de7
PA
107672010-04-30 Pedro Alves <pedro@codesourcery.com>
10768
10769 * linux-low.c (linux_kill_one_lwp, linux_kill)
10770 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10771 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10772 SIGSTOP even if the LWP is stopped.
10773 (send_sigstop_callback): New.
10774 (stop_all_lwps): Use send_sigstop_callback instead.
10775 (linux_resume_one_thread): Adjust.
10776 (proceed_one_lwp): Still proceed an LWP that the client has
10777 requested to stop, if we haven't reported it as stopped yet. Make
10778 sure that LWPs the client want stopped, have a pending SIGSTOP.
10779
bc3b5632
DE
107802010-04-26 Doug Evans <dje@google.com>
10781
ae1ada35
DE
10782 * server.c (handle_general_set): Make static.
10783
bc3b5632
DE
10784 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10785 Print received char after testing for error/eof instead of before.
10786 (input_interrupt): Tweak comment.
10787
65730243
DE
107882010-04-23 Doug Evans <dje@google.com>
10789
10790 * server.c (start_inferior): Print inferior argv if --debug.
10791
a8ae7dc0
AR
107922010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10793
10794 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10795 * nto-x86-low.c: Include server.h
10796
1c07cc19
PM
107972010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10798
10799 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10800 be consistent with other sources of this directory.
10801 (init_registers_amd64): Correct name of source file of this function
10802 in the comment.
10803
e0a61e09
PM
108042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10805
10806 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10807 64-bit executables.
10808
54709339
PM
108092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10810
10811 * win32-i386-low.c: Add 64-bit support.
10812 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10813 (init_registers_amd64): Declare.
10814 (mappings): Add 64-bit version of array.
10815 (init_windows_x86): New function.
10816 (the_low_target): Change init_arch field to init_windows_x86.
10817
e8f0053d
PM
108182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10819
10820 * win32-low.c: Adapt to support also 64-bit architecture.
10821 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10822 (get_image_name): Use SIZE_T type for local variable `done'.
10823 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10824 (toolhelp_get_dll_name): Idem.
10825 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10826 Use uintptr_t typecast to avoid warning.
10827 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10828 (handle_exception): Use phex_nz to avoid warning.
10829 (win32_wait): Remove unused local variable `process'.
10830
c481e77e
PM
108312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10832
10833 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10834 `amd64-avx.o'.
10835
12ea4b69
PM
108362010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10837
10838 * configure.ac: Use `ws2_32' library for srv_mingw.
10839 * configure: Regenerate.
10840 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10841 * remote-utils.c: Likewise.
10842
f6d1620c
L
108432010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10844
10845 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10846 if __x86_64__ is defined.
10847
8e642873
PM
108482010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10849
10850 * configure: Regenerate.
10851
711e434b
PM
108522010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10853
10854 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10855 * target.h (target_ops): New get_tib_address field.
10856 * win32-low.h (win32_thread_info): Add thread_local_base field.
10857 * win32-low.c (child_add_thread): Add tlb argument.
10858 Set thread_local_base field to TLB.
10859 (get_child_debug_event): Adapt to child_add_thread change.
10860 (win32_get_tib_address): New function.
10861 (win32_target_ops): Set get_tib_address field to
10862 win32_get_tib_address.
10863 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10864
505106cd
PA
108652010-04-12 Pedro Alves <pedro@codesourcery.com>
10866
505106cd
PA
10867 * linux-low.c (linux_mourn): Also remove the process.
10868 * server.c (handle_target_event): Don't remove the process here.
10869 * nto-low.c (nto_mourn): New.
10870 (nto_target_ops): Install it.
10871 * spu-low.c (spu_mourn): New.
10872 (spu_target_ops): Install it.
10873 * win32-low.c (win32_mourn): New.
10874 (win32_target_ops): Install it.
10875
e8470a06
PA
108762010-04-12 Pedro Alves <pedro@codesourcery.com>
10877
10878 * server.h (buffer_xml_printf): Remove redundant `;'.
10879
45ba0d02
PA
108802010-04-12 Pedro Alves <pedro@codesourcery.com>
10881
10882 * regcache.c (set_register_cache): Invalidate regcaches before
10883 changing the register cache layout.
10884 (regcache_invalidate_one): Allow a NULL regcache.
10885 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10886 regcaches before changing the register cache layout or the target
10887 regsets.
10888
59e04013
L
108892010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10890
10891 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10892 variable warning on Linux/x86-64.
10893
8336d594
PA
108942010-04-11 Pedro Alves <pedro@codesourcery.com>
10895
10896 GDBserver disconnected tracing support.
10897
10898 * linux-low.c (linux_remove_process): Delete.
10899 (add_lwp): Don't set last_resume_kind here.
10900 (linux_kill): Use `mourn'.
10901 (linux_detach): Use `thread_db_detach', and `mourn'.
10902 (linux_mourn): New.
10903 (linux_attach_lwp_1): Adjust comment.
10904 (linux_attach): last_resume_kind moved the thread_info; adjust.
10905 (status_pending_p_callback): Adjust.
10906 (linux_wait_for_event_1): Adjust.
10907 (count_events_callback, select_singlestep_lwp_callback)
10908 (select_event_lwp_callback, cancel_breakpoints_callback)
10909 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10910 (proceed_one_lwp): Adjust.
10911 (linux_async): Add debug output.
10912 (linux_thread_stopped): New.
10913 (linux_pause_all): New.
10914 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10915 linux_pause_all.
10916 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10917 (thread_db_free): Delete declaration.
10918 (thread_db_detach, thread_db_mourn): Declare.
10919 * thread-db.c (thread_db_init): Use thread_db_mourn.
10920 (thread_db_free): Delete, split in two.
10921 (disable_thread_event_reporting): New.
10922 (thread_db_detach): New.
10923 (thread_db_mourn): New.
10924
10925 * server.h (struct thread_info) <last_resume_kind>: New field.
10926 <attached>: Add comment.
10927 <gdb_detached>: New field.
10928 (handler_func): Change return type to int.
10929 (handle_serial_event, handle_target_event): Ditto.
10930 (gdb_connected): Declare.
10931 (tracing): Delete.
10932 (disconnected_tracing): Declare.
10933 (stop_tracing): Declare.
10934
10935 * server.c (handle_query) <qSupported>: Report support for
10936 disconnected tracing.
10937 (queue_stop_reply_callback): Account for running threads.
10938 (gdb_wants_thread_stopped): New.
10939 (gdb_wants_all_threads_stopped): New.
10940 (gdb_reattached_process): New.
10941 (handle_status): Clear the `gdb_detached' flag of all processes.
10942 In all-stop, stop all threads.
10943 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10944 (process_serial_event): If the remote connection breaks, or if an
10945 exit was forced with "monitor exit", force an event loop exit.
10946 Handle disconnected tracing on detach.
10947 (handle_serial_event): Adjust.
10948 (handle_target_event): If GDB isn't connected, forward events back
10949 to the inferior, unless the last process exited, in which case,
10950 exit gdbserver. Adjust interface.
10951
10952 * remote-utils.c (remote_open): Don't block in accept. Instead
10953 register an event loop source on the listen socket file
10954 descriptor. Refactor bits into ...
10955 (listen_desc): ... this new global.
10956 (gdb_connected): ... this new function.
10957 (enable_async_notification): ... this new function.
10958 (handle_accept_event): ... this new function.
10959 (remote_close): Clear remote_desc.
10960
10961 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10962
10963 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10964 New fields.
10965 (mourn_inferior): Define.
10966 (target_process_qsupported): Avoid the dangling else problem.
10967 (thread_stopped): Define.
10968 (pause_all): Define.
10969 (target_waitstatus_to_string): Declare.
10970 * target.c (target_waitstatus_to_string): New.
10971
10972 * tracepoint.c (tracing): Make extern.
10973 (disconnected_tracing): New.
10974 (stop_tracing): Make extern. Handle tracing stops due to GDB
10975 disconnecting.
10976 (cmd_qtdisconnected): New.
10977 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10978 (handle_tracepoint_general_set): Handle QTDisconnected.
10979
10980 * event-loop.c (event_handler_func): Change return type to int.
10981 (process_event): Bail out if the event handler wants the event
10982 loop to stop.
10983 (handle_file_event): Ditto.
10984 (start_event_loop): Bail out if the event handler wants the event
10985 loop to stop.
10986
10987 * nto-low.c (nto_target_ops): Adjust.
10988 * spu-low.c (spu_wait): Don't remove the process here.
10989 (spu_target_ops): Adjust.
10990 * win32-low.c (win32_wait): Don't remove the process here.
10991 (win32_target_ops): Adjust.
10992
5d267c4c
PA
109932010-04-11 Pedro Alves <pedro@codesourcery.com>
10994
10995 * regcache.c (realloc_register_cache): Invalidate inferior's
10996 regcache before recreating it.
10997
623ccd72
PA
109982010-04-09 Pedro Alves <pedro@codesourcery.com>
10999
11000 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11001
219f2f23
PA
110022010-04-09 Stan Shebs <stan@codesourcery.com>
11003 Pedro Alves <pedro@codesourcery.com>
11004
11005 * server.h (LONGEST): New.
11006 (struct thread_info) <while_stepping>: New field.
11007 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11008 Declare.
11009 (initialize_tracepoint, handle_tracepoint_general_set)
11010 (handle_tracepoint_query, tracepoint_finished_step)
11011 (tracepoint_was_hit, release_while_stepping_state_list):
11012 (current_traceframe): Declare.
11013 * server.c (handle_general_set): Handle tracepoint packets.
11014 (read_memory): New.
11015 (write_memory): New.
11016 (handle_search_memory_1): Use read_memory.
11017 (handle_query): Report support for conditional tracepoints, trace
11018 state variables, and tracepoint sources. Handle tracepoint
11019 queries.
11020 (main): Initialize the tracepoints module.
11021 (process_serial_event): Handle traceframe reads/writes.
11022
11023 * linux-low.c (handle_tracepoints): New.
11024 (linux_wait_1): Call it.
11025 (linux_resume_one_lwp): Handle while-stepping.
11026 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11027 (linux_target_ops): Install them.
11028 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11029 New field.
11030 * linux-x86-low.c (x86_supports_tracepoints): New.
11031 (the_low_target). Install it.
11032
11033 * mem-break.h (delete_breakpoint): Declare.
11034 * mem-break.c (delete_breakpoint): Make external.
11035
11036 * target.h (struct target_ops): Add `supports_tracepoints',
11037 `read_pc', and `write_pc' fields.
11038 (target_supports_tracepoints): Define.
11039 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11040 (phex_nz): New.
11041
11042 * regcache.h (struct regcache) <registers_owned>: New field.
11043 (init_register_cache, regcache_cpy): Declare.
11044 (regcache_read_pc, regcache_write_pc): Declare.
11045 (register_cache_size): Declare.
11046 (supply_regblock): Declare.
11047 * regcache.c (init_register_cache): New.
11048 (new_register_cache): Use it.
11049 (regcache_cpy): New.
11050 (register_cache_size): New.
11051 (supply_regblock): New.
11052 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11053
219f2f23
PA
11054 * tracepoint.c: New.
11055
11056 * Makefile.in (OBS): Add tracepoint.o.
11057 (tracepoint.o): New rule.
11058
3a13a53b
L
110592010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11060
11061 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11062 (i386-mmx.o): New.
11063 (i386-mmx.c): Likewise.
11064 (i386-mmx-linux.o): Likewise.
11065 (i386-mmx-linux.c): Likewise.
11066
11067 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11068 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11069 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11070 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11071
11072 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11073 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11074 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11075
1570b33e
L
110762010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11077
11078 * Makefile.in (clean): Updated.
11079 (i386-avx.o): New.
11080 (i386-avx.c): Likewise.
11081 (i386-avx-linux.o): Likewise.
11082 (i386-avx-linux.c): Likewise.
11083 (amd64-avx.o): Likewise.
11084 (amd64-avx.c): Likewise.
11085 (amd64-avx-linux.o): Likewise.
11086 (amd64-avx-linux.c): Likewise.
11087
11088 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11089 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11090 (srv_amd64_regobj): Add amd64-avx.o.
11091 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11092 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11093 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11094 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11095 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11096 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11097 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11098
11099 * i387-fp.c: Include "i386-xstate.h".
11100 (i387_xsave): New.
11101 (i387_cache_to_xsave): Likewise.
11102 (i387_xsave_to_cache): Likewise.
11103 (x86_xcr0): Likewise.
11104
11105 * i387-fp.h (i387_cache_to_xsave): Likewise.
11106 (i387_xsave_to_cache): Likewise.
11107 (x86_xcr0): Likewise.
11108
11109 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11110 * linux-crisv32-low.c (target_regsets): Likewise.
11111 * linux-m68k-low.c (target_regsets): Likewise.
11112 * linux-mips-low.c (target_regsets): Likewise.
11113 * linux-ppc-low.c (target_regsets): Likewise.
11114 * linux-s390-low.c (target_regsets): Likewise.
11115 * linux-sh-low.c (target_regsets): Likewise.
11116 * linux-sparc-low.c (target_regsets): Likewise.
11117 * linux-xtensa-low.c (target_regsets): Likewise.
11118
11119 * linux-low.c: Include <sys/uio.h>.
11120 (regsets_fetch_inferior_registers): Support nt_type.
11121 (regsets_store_inferior_registers): Likewise.
11122 (linux_process_qsupported): New.
11123 (linux_target_ops): Add linux_process_qsupported.
11124
11125 * linux-low.h (regset_info): Add nt_type.
11126 (linux_target_ops): Add process_qsupported.
11127
11128 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11129 and <sys/uio.h>.
11130 (init_registers_i386_avx_linux): New.
11131 (init_registers_amd64_avx_linux): Likewise.
11132 (xmltarget_i386_linux_no_xml): Likewise.
11133 (xmltarget_amd64_linux_no_xml): Likewise.
11134 (PTRACE_GETREGSET): Likewise.
11135 (PTRACE_SETREGSET): Likewise.
11136 (x86_fill_xstateregset): Likewise.
11137 (x86_store_xstateregset): Likewise.
11138 (use_xml): Likewise.
11139 (x86_linux_update_xmltarget): Likewise.
11140 (x86_linux_process_qsupported): Likewise.
11141 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11142 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11143 init_registers_i386_linux here. Call
11144 x86_linux_update_xmltarget.
11145 (the_low_target): Add x86_linux_process_qsupported.
11146
11147 * server.c (handle_query): Call target_process_qsupported.
11148
11149 * target.h (target_ops): Add process_qsupported.
11150 (target_process_qsupported): New.
11151
fc7238bb
PA
111522010-04-03 Pedro Alves <pedro@codesourcery.com>
11153
11154 * inferiors.c (add_thread): Set last_status kind to
11155 TARGET_WAITKIND_IGNORE.
11156 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11157 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11158 (linux_wait_1): Move `thread' local definition to block that uses
11159 it. Don't NULL initialize `event_child'.
11160 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11161 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11162 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11163
bdabb078
PA
111642010-04-01 Pedro Alves <pedro@codesourcery.com>
11165
11166 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11167 an extended waitstatus, or by a watchpoint.
11168 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11169 thread was stepping or has been stopped by a watchpoint.
11170
d3bbe7a0
PA
111712010-04-01 Pedro Alves <pedro@codesourcery.com>
11172
11173 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11174 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11175 of another, then delete the previous, and validate all
11176 breakpoints.
11177 (validate_inserted_breakpoint): New.
11178 (delete_disabled_breakpoints): New.
11179 (validate_breakpoints): New.
11180 (check_mem_read): Validate breakpoints before trusting their
11181 shadow. Delete disabled breakpoints.
11182 (check_mem_write): Validate breakpoints before trusting they
11183 should be inserted. Delete disabled breakpoints.
11184 * mem-break.h (validate_breakpoints):
11185 * server.c (handle_query): Validate breakpoints when we see a
11186 qSymbol query.
11187
8b07ae33
PA
111882010-04-01 Pedro Alves <pedro@codesourcery.com>
11189
11190 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11191 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11192 if we could tell there's a GDB breakpoint at stop_pc.
11193 (need_step_over_p): Don't do a step over if we find a GDB
11194 breakpoint at the resume PC.
11195
11196 * mem-break.c (struct raw_breakpoint): New.
11197 (enum bkpt_type): New type `gdb_breakpoint'.
11198 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11199 fields. New field `raw'.
11200 (find_raw_breakpoint_at): New.
11201 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11202 breakpoint instead.
11203 (set_breakpoint_at): Adjust.
11204 (delete_raw_breakpoint): New.
11205 (release_breakpoint): New.
11206 (delete_breakpoint): Rename to...
11207 (delete_breakpoint_1): ... this. Add proc parameter. Use
11208 release_breakpoint. Return ENOENT.
11209 (delete_breakpoint): Reimplement.
11210 (find_breakpoint_at): Delete.
11211 (find_gdb_breakpoint_at): New.
11212 (delete_breakpoint_at): Delete.
11213 (set_gdb_breakpoint_at): New.
11214 (delete_gdb_breakpoint_at): New.
11215 (gdb_breakpoint_here): New.
11216 (set_reinsert_breakpoint): Use release_breakpoint.
11217 (uninsert_breakpoint): Rename to ...
11218 (uninsert_raw_breakpoint): ... this.
11219 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11220 (reinsert_raw_breakpoint): Change parameter type to
11221 raw_breakpoint.
11222 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11223 instead.
11224 (check_breakpoints): Adjust. Use release_breakpoint.
11225 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11226 (breakpoint_inserted_here): Ditto.
11227 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11228 Don't trust the breakpoint's shadow if it is not inserted.
11229 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11230 (delete_all_breakpoints): Adjust.
11231 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11232 use delete_breakpoint_1.
11233
11234 * mem-break.h (breakpoints_supported): Delete declaration.
11235 (set_gdb_breakpoint_at): Declare.
11236 (gdb_breakpoint_here): Declare.
11237 (delete_breakpoint_at): Delete.
11238 (delete_gdb_breakpoint_at): Declare.
11239
11240 * server.h (struct raw_breakpoint): Forward declare.
11241 (struct process_info): New field `raw_breakpoints'.
11242
11243 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11244 breakpoints.
11245
6bf5e0ba
PA
112462010-03-24 Pedro Alves <pedro@codesourcery.com>
11247
11248 * linux-low.c (status_pending_p_callback): Fix comment.
11249 (linux_wait_for_event_1): Move most of the internal breakpoint
11250 handling from here...
11251 (linux_wait_1): ... to here.
11252 (count_events_callback): New.
11253 (select_singlestep_lwp_callback): New.
11254 (select_event_lwp_callback): New.
11255 (cancel_breakpoints_callback): New.
11256 (select_event_lwp): New.
11257 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11258 priority to all LWPs that have had events that should be reported
11259 to the client. Cancel breakpoints when about to reporting the
11260 event to the client, not while stopping lwps. No longer cancel
11261 finished single-steps here.
11262 (cancel_finished_single_step): Delete.
11263 (cancel_finished_single_steps): Delete.
11264
414a389f
PA
112652010-03-24 Pedro Alves <pedro@codesourcery.com>
11266
11267 * mem-break.c (enum bkpt_type): New.
11268 (struct breakpoint): New field `type'.
11269 (set_breakpoint_at): Change return type to struct breakpoint
11270 pointer. Set type to `other_breakpoint' by default.
11271 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11272 in the breakpoint list.
11273 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11274 (reinsert_breakpoint): Rename to ...
11275 (reinsert_raw_breakpoint): ... this.
11276 (reinsert_breakpoints_at): Adjust.
11277 * mem-break.h (struct breakpoint): Declare.
11278 (set_breakpoint_at): Change return type to struct breakpoint
11279 pointer.
11280
2280c721
PA
112812010-03-24 Pedro Alves <pedro@codesourcery.com>
11282
11283 * server.c (handle_query): Assign, not compare.
11284
d50171e4
PA
112852010-03-24 Pedro Alves <pedro@codesourcery.com>
11286
11287 Teach linux gdbserver to step-over-breakpoints.
11288
11289 * linux-low.c (can_hardware_single_step): New.
11290 (supports_breakpoints): New.
11291 (handle_extended_wait): If stopping threads, read the stop pc of
11292 the new cloned LWP.
11293 (get_pc): New.
11294 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11295 low target doesn't support retrieving the PC.
11296 (add_lwp): Set last_resume_kind to resume_continue.
11297 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11298 (linux_attach): Don't clear stop_expected. Set the lwp's
11299 last_resume_kind to resume_stop.
11300 (linux_detach_one_lwp): Don't check for removed breakpoints.
11301 (check_removed_breakpoint): Delete.
11302 (status_pending_p): Rename to ...
11303 (status_pending_p_callback): ... this. Don't check for removed
11304 breakpoints. Don't consider threads that are stopped from GDB's
11305 perspective.
11306 (linux_wait_for_lwp): Always read the stop_pc here.
11307 (cancel_breakpoint): New.
11308 (step_over_bkpt): New global.
11309 (linux_wait_for_event_1): Implement stepping over breakpoints.
11310 (gdb_wants_lwp_stopped): New.
11311 (gdb_wants_all_stopped): New.
11312 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11313 single-step traps here. Store the thread's last reported target
11314 wait status.
11315 (send_sigstop): Don't clear stop_expected. Always set it,
11316 instead.
11317 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11318 (cancel_finished_single_step): New.
11319 (cancel_finished_single_steps): New.
11320 (wait_for_sigstop): Don't cancel finished single-step traps here.
11321 (linux_resume_one_lwp): Don't check for removed breakpoints.
11322 Don't set `step' on non-hardware step archs.
11323 (linux_set_resume_request): Ignore resume_stop requests if already
11324 stopping or stopped. Set the lwp's last_resume_kind.
11325 (resume_status_pending_p): Don't check for removed breakpoints.
11326 (need_step_over_p): New.
11327 (start_step_over): New.
11328 (finish_step_over): New.
11329 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11330 requests. Clear the thread's last reported target waitstatus.
11331 Don't use the `suspended' flag. Don't consider pending breakpoints.
11332 (linux_resume): Start a step-over if necessary.
11333 (proceed_one_lwp): New.
11334 (proceed_all_lwps): New.
11335 (unstop_all_lwps): New.
11336 * linux-low.h (struct lwp_info): Rewrite comment for the
11337 `suspended' flag. Add the `stop_pc' field. Delete the
11338 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11339 Add `'last_resume_kind' and `need_step_over' fields.
11340 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11341 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11342 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11343 (set_raw_breakpoint_at): New.
11344 (set_breakpoint_at): Rewrite to use it.
11345 (reinsert_breakpoint_handler): Delete.
11346 (set_reinsert_breakpoint): New.
11347 (reinsert_breakpoint_by_bp): Delete.
11348 (delete_reinsert_breakpoints): New.
11349 (uninsert_breakpoint): Rewrite.
11350 (uninsert_breakpoints_at): New.
11351 (reinsert_breakpoint): Rewrite.
11352 (reinsert_breakpoints_at): New.
11353 (check_breakpoints): Rewrite.
11354 (breakpoint_here): New.
11355 (breakpoint_inserted_here): New.
11356 (check_mem_read): Adjust.
11357 * mem-break.h (breakpoints_supported, breakpoint_here)
11358 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11359 (reinsert_breakpoint_by_bp): Delete declaration.
11360 (delete_reinsert_breakpoints): Declare.
11361 (reinsert_breakpoint): Delete declaration.
11362 (reinsert_breakpoints_at): Declare.
11363 (uninsert_breakpoint): Delete declaration.
11364 (uninsert_breakpoints_at): Declare.
11365 (check_breakpoints): Adjust prototype.
11366 * server.h: Adjust include order.
11367 (struct thread_info): Declare here. Add a `last_status' field.
11368
30ba68cb
MS
113692010-03-23 Michael Snyder <msnyder@vmware.com>
11370
11371 * server.c (crc32): New function.
11372 (handle_query): Add handling for 'qCRC:' request.
11373
b9a881c2
PA
113742010-03-23 Pedro Alves <pedro@codesourcery.com>
11375
11376 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11377 lwp had been stopped by a watchpoint.
11378
e92d13d5
PA
113792010-03-16 Pedro Alves <pedro@codesourcery.com>
11380
11381 * server.h (internal_error): Declare.
11382 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11383 * utils.c (internal_error): New function.
11384
64daa791
AS
113852010-03-15 Andreas Schwab <schwab@redhat.com>
11386
11387 * configure.srv: Fix typo setting srv_regobj.
11388
f52cd8cd
PA
113892010-03-15 Pedro Alves <pedro@codesourcery.com>
11390
11391 * linux-low.c (fetch_register): Avoid passing a non string literal
11392 format to `error'.
11393 (usr_store_inferior_registers): Ditto.
11394
93ae6fdc
PA
113952010-03-14 Pedro Alves <pedro@codesourcery.com>
11396
11397 * linux-low.c (linux_write_memory): Bail out early if peeking
11398 memory failed.
11399
c3adc08c
PA
114002010-03-14 Pedro Alves <pedro@codesourcery.com>
11401
11402 * linux-low.h (struct lwp_info): New fields
11403 `stopped_by_watchpoint' and `stopped_data_address'.
11404 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11405 here, and cache them in the lwp object.
11406 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11407 directly.
11408 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11409 field.
11410 (linux_stopped_by_watchpoint): Rewrite.
11411 (linux_stopped_data_address): Rewrite.
11412
bce522a2
PA
114132010-03-06 Simo Melenius <simo.melenius@iki.fi>
11414
11415 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11416 switching the current inferior, not before.
11417
90884b2b
L
114182010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11419
11420 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11421 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11422 i386-linux.c and amd64-linux.c.
11423 (reg-i386.o): Removed.
11424 (reg-i386.c): Likewise.
11425 (reg-i386-linux.o): Likewise.
11426 (reg-i386-linux.c): Likewise.
11427 (reg-x86-64.o): Likewise.
11428 (reg-x86-64.c): Likewise.
11429 (reg-x86-64-linux.o): Likewise.
11430 (reg-x86-64-linux.c): Likewise.
11431 (i386.o): New.
11432 (i386.c): Likewise.
11433 (i386-linux.o): Likewise.
11434 (i386-linux.c): Likewise.
11435 (amd64.o): Likewise.
11436 (amd64.c): Likewise.
11437 (amd64-linux.o): Likewise.
11438 (amd64-linux.c): Likewise.
11439
11440 * configure.srv (srv_i386_regobj): New.
11441 (srv_i386_linux_regobj): Likewise.
11442 (srv_amd64_regobj): Likewise.
11443 (srv_amd64_linux_regobj): Likewise.
11444 (srv_i386_32bit_xmlfiles): Likewise.
11445 (srv_i386_64bit_xmlfiles): Likewise.
11446 (srv_i386_xmlfiles): Likewise.
11447 (srv_amd64_xmlfiles): Likewise.
11448 (srv_i386_linux_xmlfiles): Likewise.
11449 (srv_amd64_linux_xmlfiles): Likewise.
11450 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11451 srv_xmlfiles to $srv_i386_xmlfiles.
11452 (i[34567]86-*-mingw32ce*): Likewise.
11453 (i[34567]86-*-mingw*): Likewise.
11454 (i[34567]86-*-nto*): Likewise.
11455 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11456 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11457 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11458 (x86_64-*-linux*): Likewise.
11459
11460 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11461 (init_registers_amd64_linux): New.
11462 (x86_arch_setup): Replace init_registers_x86_64_linux with
11463 init_registers_amd64_linux.
11464
193f13e6
MK
114652010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11466
11467 * configure.ac: Check for libdl. If it is not available link against
11468 static libthread_db.
11469 * configure: Regenerate.
11470
85d721b8
PA
114712010-02-22 Pedro Alves <pedro@codesourcery.com>
11472
11473 PR9605
11474
11475 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11476 handing a read watchpoint.
11477 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11478
6076632b
DE
114792010-02-12 Doug Evans <dje@google.com>
11480
11481 * linux-low.c (linux_supports_tracefork_flag): Document.
11482 (linux_look_up_symbols): Add comment.
11483
3327ccf7
L
114842010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11485
11486 * regcache.c (supply_register): Clear regcache if buf is NULL.
11487
0718675c 114882010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11489 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11490
11491 * inferiors.c (find_inferior): Add function documentation.
11492 (unloaded_dll): Handle the case where the unloaded dll has not
11493 been previously registered in the dll list.
11494
177321bd
DJ
114952010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11498 (thumb2_breakpoint): New.
11499 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11500
2b009048
DJ
115012010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11502
11503 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11504 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11505 breakpoints.
11506
3be029c7
PA
115072010-01-21 Pedro Alves <pedro@codesourcery.com>
11508
11509 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11510
18f5de3b
JK
115112010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11512
11513 * linux-s390-low.c (s390_collect_ptrace_register)
11514 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11515
3743bb4f
DE
115162010-01-21 Doug Evans <dje@google.com>
11517
14ce3065
DE
11518 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11519 (PTRACE_ARG4_TYPE): New macro.
11520 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11521 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11522 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11523 (usr_store_inferior_registers): Ditto.
11524 (linux_read_memory, linux_write_memory): Ditto.
11525 (linux_test_for_tracefork): Ditto.
11526
3743bb4f
DE
11527 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11528 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11529
8b315be5
PA
115302010-01-21 Pedro Alves <pedro@codesourcery.com>
11531
11532 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11533 target.
11534
85492558
PA
115352010-01-21 Pedro Alves <pedro@codesourcery.com>
11536
11537 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11538 prototype to take a regcache. Adjust.
11539
442ea881
PA
115402010-01-20 Pedro Alves <pedro@codesourcery.com>
11541
11542 * regcache.h (struct thread_info): Forward declare.
11543 (struct regcache): New.
11544 (new_register_cache): Adjust prototype.
11545 (get_thread_regcache): Declare.
11546 (free_register_cache): Adjust prototype.
11547 (registers_to_string, registers_from_string): Ditto.
11548 (supply_register, supply_register_by_name, collect_register)
11549 (collect_register_as_string, collect_register_by_name): Ditto.
11550 * regcache.c (struct inferior_regcache_data): Delete.
11551 (get_regcache): Rename to ...
11552 (get_thread_regcache): ... this. Adjust. Switch inferior before
11553 fetching registers.
11554 (regcache_invalidate_one): Adjust.
11555 (regcache_invalidate): Fix prototype.
11556 (new_register_cache): Return the new register cache.
11557 (free_register_cache): Change prototype.
11558 (realloc_register_cache): Adjust.
11559 (registers_to_string): Change prototype to take a regcache. Adjust.
11560 (registers_from_string): Ditto.
11561 (register_data): Ditto.
11562 (supply_register): Ditto.
11563 (supply_register_by_name): Ditto.
11564 (collect_register): Ditto.
11565 (collect_register_as_string): Ditto.
11566 (collect_register_by_name): Ditto.
11567 * server.c (process_serial_event): Adjust.
11568 * linux-low.h (regset_fill_func, regset_store_func): Change
11569 prototype.
11570 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11571 Change prototype.
11572 * linux-low.c (get_stop_pc): Adjust.
11573 (check_removed_breakpoint): Adjust.
11574 (linux_wait_for_event): Adjust.
11575 (linux_resume_one_lwp): Adjust.
11576 (fetch_register): Add regcache parameter. Adjust.
11577 (usr_store_inferior_registers): Ditto.
11578 (regsets_fetch_inferior_registers): Ditto.
11579 (regsets_store_inferior_registers): Ditto.
11580 (linux_fetch_registers, linux_store_registers): Ditto.
11581 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11582 regcache. Adjust.
43aaf8b6
PA
11583 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11584 Ditto.
442ea881
PA
11585 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11586 prototype to take a regcache.
11587 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11588 * remote-utils.c (convert_ascii_to_int, outreg)
11589 (prepare_resume_reply): Change prototype to take a regcache.
11590 Adjust.
11591 * target.h (struct target_ops) <fetch_registers, store_registers>:
11592 Change prototype to take a regcache.
11593 (fetch_inferior_registers, store_inferior_registers): Change
11594 prototype to take a regcache. Adjust.
11595 * proc-service.c (ps_lgetregs): Adjust.
11596 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11597 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11598 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11599 take a regcache. Adjust.
11600 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11601 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11602 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11603 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11604 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11605 (cris_cannot_fetch_register):
11606 (cris_breakpoint_at): Change prototype to take a regcache.
11607 Adjust.
11608 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11609 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11610 to take a regcache. Adjust.
11611 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11612 Adjust.
11613 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11614 take a regcache. Adjust.
11615 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11616 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11617 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11618 * linux-mips-low.c (mips_get_pc):
11619 (mips_set_pc): Change prototype to take a regcache. Adjust.
11620 (mips_reinsert_addr): Adjust.
11621 (mips_collect_register): Change prototype to take a regcache.
11622 Adjust.
11623 (mips_supply_register):
11624 (mips_collect_register_32bit, mips_supply_register_32bit)
11625 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11626 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11627 * linux-ppc-low.c (ppc_supply_ptrace_register)
11628 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11629 (parse_spufs_run): Adjust.
11630 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11631 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11632 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11633 take a regcache. Adjust.
11634 * linux-s390-low.c (s390_collect_ptrace_register)
11635 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11636 (s390_set_pc): Change prototype to take a regcache. Adjust.
11637 (s390_arch_setup): Adjust.
11638 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11639 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11640 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11641 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11642 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11643 regcache. Adjust.
11644 (sparc_breakpoint_at): Adjust.
11645 * linux-xtensa-low.c (xtensa_fill_gregset):
11646 (xtensa_store_gregset):
11647 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11648 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11649 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11650 prototype to take a regcache. Adjust.
11651 * win32-arm-low.c (arm_fetch_inferior_register)
11652 (arm_store_inferior_register): Change prototype to take a
11653 regcache. Adjust.
11654 * win32-i386-low.c (i386_fetch_inferior_register)
11655 (i386_store_inferior_register): Change prototype to take a
11656 regcache. Adjust.
11657 * win32-low.c (child_fetch_inferior_registers)
11658 (child_store_inferior_registers): Change prototype to take a
11659 regcache. Adjust.
11660 (win32_wait): Adjust.
11661 (win32_fetch_inferior_registers): Change prototype to take a
11662 regcache. Adjust.
11663 (win32_store_inferior_registers): Adjust.
11664 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11665 store_inferior_register>: Change prototype to take a regcache.
11666
60c3d7b0
DE
116672010-01-20 Doug Evans <dje@google.com>
11668
11669 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11670 #ifdef.
11671 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11672 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11673
dc146f7c
VP
116742010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11675
11676 * linux-low.c (linux_core_of_thread): New.
11677 (compare_ints, show_process, list_threads): New.
11678 (linux_qxfer_osdata): Report threads and cores.
11679 (linux_target_op): Register linux_core_of_thread.
11680 * remote-utils.c (prepare_resume_reply): Report the core.
11681 (buffer_xml_printf): Support %d specifier.
11682 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11683 New.
11684 (handle_query): Handle qXfer:threads. Announce availability
11685 thereof.
11686 * target.h (struct target_ops): New field core_of_thread.
11687
7803799a
UW
116882010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11689
11690 * Makefile.in (clean): Remove new generated files.
11691 (reg-s390.o, reg-s390.c): Remove rules.
11692 (reg-s390x.o, reg-s390x.c): Likewise.
11693 (s390-linux32.o, s390-linux32.c): Add rules.
11694 (s390-linux64.o, s390-linux64.c): Likewise.
11695 (s390x-linux64.o, s390x-linux64.c): Likewise.
11696 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11697 * linux-s390-low.c: Include <elf.h>.
11698 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11699 (init_registers_s390): Remove prototype.
11700 (init_registers_s390x): Likewise.
11701 (init_registers_s390_linux32): Add prototype.
11702 (init_registers_s390_linux64): Likewise.
11703 (init_registers_s390x_linux64): Likewise.
11704 (s390_num_regs_3264): New define.
11705 (s390_regmap_3264): New global variable.
11706 (s390_cannot_fetch_register): Remove obsolete check.
11707 (s390_cannot_store_register): Likewise.
11708 (s390_collect_ptrace_register): Handle upper/lower register halves.
11709 (s390_supply_ptrace_register): Likewise.
11710 (s390_fill_gregset): Update to register number changes.
11711 (s390_get_hwcap): New routine.
11712 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11713 Install appropriate regmap and register set.
11714
6e7ffa39
JB
117152010-01-01 Joel Brobecker <brobecker@adacore.com>
11716
11717 * server.c (gdbserver_version): Update copyright year to 2010.
11718 * gdbreplay.c (gdbreplay_version): Likewise.
11719
957f3f49
DE
117202009-12-28 Doug Evans <dje@google.com>
11721
11722 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11723 elf/external.h. Include <elf.h> instead but only if necessary.
11724
ca5c370d
PA
117252009-12-28 Pedro Alves <pedro@codesourcery.com>
11726
11727 * linux-low.c (linux_remove_process): Remove `detaching'
11728 parameter. Don't release/detach from thread_db here.
11729 (linux_kill): Release/detach from thread_db here, ...
11730 (linux_detach): ... and here, before actually detaching.
11731 (linux_wait_1): ... and here, when a process exits.
11732 * thread-db.c (any_thread_of): New.
11733 (thread_db_free): Switch the current inferior to a thread of the
11734 passed in process.
11735
4ee62156
DE
117362009-12-21 Doug Evans <dje@google.com>
11737
d90e6a88
DE
11738 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11739
c5f62d5f
DE
11740 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11741 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11742 warning ifndef __NR_tkill. Move setting of errno there too.
11743 Delete unnecessary resetting of errno after syscall.
11744 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11745
10e86dd7
DE
11746 * configure.ac: Check for dladdr.
11747 * config.in: Regenerate.
11748 * configure: Regenerate.
11749 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11750 (try_thread_db_load): Update.
11751
4ee62156
DE
11752 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11753
00f515da
DE
117542009-12-18 Doug Evans <dje@google.com>
11755
e9464885
DE
11756 * event-loop.c: Include unistd.h if it exists.
11757
07d4f67e
DE
11758 * linux-low.c (my_waitpid): Move definition away from being in
11759 between linux_tracefork_child/linux_test_for_tracefork.
11760
00f515da
DE
11761 * gdb_proc_service.h (psaddr_t): Fix type.
11762 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11763 signature to match glibc.
11764
1de1badb
DE
117652009-12-16 Doug Evans <dje@google.com>
11766
11767 * linux-low.c (linux_read_memory): Fix argument to read.
11768
aeeb81d1
PA
117692009-11-26 Pedro Alves <pedro@codesourcery.com>
11770
11771 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11772 events, don't leave current_inferior pointing at null.
11773
10357975
PA
117742009-11-26 Pedro Alves <pedro@codesourcery.com>
11775
11776 * win32-low.c (LOG): Delete.
11777 (OUTMSG): Output to stderr.
11778 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11779 on compile time LOG macro.
11780 (win32_wait): Fix debug output.
11781
cf6e3471
PA
117822009-11-26 Pedro Alves <pedro@codesourcery.com>
11783
11784 * win32-low.c (win32_add_one_solib): If the dll name is
11785 "ntdll.dll", prepend the system directory to the dll path.
11786
0c85e18e
MK
117872009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11788
11789 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11790
9ac544ce 117912009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11792 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11793
11794 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11795 * configure.ac: Check for __mcoldfire__ and set
11796 gdb_cv_m68k_is_coldfire.
11797 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11798 reg-cf.o and reg-m68k.o.
11799 * configure: Regenerated.
11800
fd7dd3e6
PA
118012009-11-16 Pedro Alves <pedro@codesourcery.com>
11802
11803 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11804 Pass it to thread_db_free.
11805 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11806 proper `detaching' argument to linux_remove_process.
11807 * linux-low.h (thread_db_free): Add `detaching' parameter.
11808 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11809 to thread_db_free.
11810 (thread_db_free): Add `detaching' parameter. Only
11811 call td_ta_clear_event if detaching from process.
11812
75aa492e
MK
118132009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11814
11815 * thread-db.c (thread_db_free): Fix typo.
11816
21e1bee4
PP
118172009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11818
11819 PR gdb/10838
11820 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11821
8838b45e
NS
118222009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11823
11824 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11825 with an i686 compiler.
11826 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11827 needed.
11828 * configure: Rebuilt.
11829
8a35fb51
SL
118302009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11831
11832 PR gdb/10783
11833
11834 * server.c (handle_search_memory_1): Correct read_addr initialization
11835 in loop for searching subsequent chunks.
11836
96f15937
PP
118372009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11838
11839 * configure.ac: New --with-libthread-db option.
11840 * thread-db.c: Allow direct dependence on libthread_db.
11841 (thread_db_free): Adjust.
11842 * config.in: Regenerate.
11843 * configure: Likewise.
889bf7c5 11844
5f7d1694
PP
118452009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11846
11847 PR gdb/10757
11848 * thread-db.c (attach_thread): New function.
11849 (maybe_attach_thread): Return success/failure.
11850 (find_new_threads_callback): Adjust.
889bf7c5
PA
11851 (thread_db_find_new_threads): Loop until no new threads.
11852
88e3b899
PA
118532009-10-13 Pedro Alves <pedro@codesourcery.com>
11854
11855 * proc-service.c (ps_lgetregs): Formatting.
11856
cdbfd419
PP
118572009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11858
11859 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11860 * configure.ac: Adjust.
11861 * linux-low.h (struct process_info_private): Move members to struct
11862 thread_db.
11863 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11864 * linux-low.c (linux_remove_process): Adjust.
11865 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11866 * server.c (handle_query): Move code ...
11867 (handle_monitor_command): ... here. New function.
11868 * target.h (struct target_ops): New member.
11869 * thread-db.c (struct thread_db): New.
11870 (libthread_db_search_path): New variable.
11871 (thread_db_create_event, thread_db_enable_reporting)
11872 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11873 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11874 (try_thread_db_load_1, dladdr_to_soname): New functions.
11875 (try_thread_db_load, thread_db_load_search): New functions.
11876 (thread_db_init): Search for libthread_db.
11877 (thread_db_free): New function.
11878 (thread_db_handle_monitor_command): Likewise.
11879 * config.in: Regenerate.
11880 * configure: Regenerate.
889bf7c5 11881
4168d2d6
UW
118822009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11883
11884 * spu-low.c (spu_kill): Wait for inferior to terminate.
11885 Call clear_inferiors.
11886 (spu_detach): Call clear_inferiors.
11887
81ecdfbb
RW
118882009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11889
11890 * aclocal.m4: Regenerate.
11891 * config.in: Likewise.
11892 * configure: Likewise.
11893
0b9ff2c0
UW
118942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11895
11896 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11897 (parse_spufs_run): New function.
11898 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11899 (ppc_breakpoint_at): Handle SPU breakpoints.
11900
efcbbd14
UW
119012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11902
11903 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11904 (SPUFS_MAGIC): Define.
11905 (spu_enumerate_spu_ids): New function.
11906 (linux_qxfer_spu): New function.
11907 (linux_target_ops): Install linux_qxfer_spu.
11908
f4d9bade
UW
119092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11910
11911 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11912 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11913 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11914 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11915 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11916 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11917 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11918 (init_registers_powerpc_cell32l): Add prototype.
11919 (init_registers_powerpc_cell64l): Likewise.
11920 (ppc_arch_setup): Detect Cell/B.E. architecture.
11921
96e946ca
RW
119222009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11923
11924 * Makefile.in (datarootdir): New variable.
11925
58d6951d
DJ
119262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11927
11928 * linux-low.c (linux_write_memory): Update debugging output.
11929 * Makefile.in (clean): Add new descriptions.
11930 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11931 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11932 * configure.srv: Add new files for arm*-*-linux*.
11933 * linux-arm-low.c: Add new declarations.
11934 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11935 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11936 (HWCAP_VFPv3D16): New.
11937 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11938 instead of __IWMMXT__.
11939 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11940 (arm_arch_setup): New.
11941 (target_regsets): Remove #ifdef. Add VFP regset.
11942 (the_low_target): Use arm_arch_setup.
11943
12b42a12
DJ
119442009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11945
11946 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11947 the main thread again.
11948
ac8c974e
AR
119492009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11950
11951 Adding Neutrino gdbserver.
11952 * configure: Regenerated.
11953 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11954 * configure.srv (i[34567]86-*-nto*): New target.
11955 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11956 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11957 (nto_comctrl) [__QNX__]: New function.
11958 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11959
4424e0c3 119602009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11961
11962 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11963 srv_tgtobj.
11964
912cf4ba
PA
119652009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11966 Pedro Alves <pedro@codesourcery.com>
11967
11968 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11969 don't support CONTEXT_EXTENDED_REGISTERS.
11970 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11971 (the_low_target): Install them.
11972 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11973 failing with ERROR_PIPE_NOT_CONNECTED.
11974
aa5ca48f
DE
119752009-06-30 Doug Evans <dje@google.com>
11976 Pierre Muller <muller@ics.u-strasbg.fr>
11977
11978 Add h/w watchpoint support to x86-linux, win32-i386.
11979 * Makefile.in (SFILES): Add i386-low.c
11980 (i386_low_h): Define.
11981 (i386-low.o): Add dependencies.
11982 (linux-x86-low.o): Add i386-low.h dependency.
11983 (win32-i386-low.o): Ditto.
11984 * i386-low.c: New file.
11985 * i386-low.h: New file.
11986 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11987 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11988 * linux-low.c (linux_add_process): Initialize arch_private.
11989 (linux_remove_process): Free arch_private.
11990 (add_lwp): Initialize arch_private.
11991 (delete_lwp): Free arch_private.
11992 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11993 provided.
11994 * linux-low.h (process_info_private): New member arch_private.
11995 (lwp_info): New member arch_private.
11996 (linux_target_ops): New members new_process, new_thread,
11997 prepare_to_resume.
11998 (ptid_of): New macro.
11999 * linux-x86-low.c: Include stddef.h, i386-low.h.
12000 (arch_process_info): New struct.
12001 (arch_lwp_info): New struct.
12002 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12003 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12004 (i386_dr_low_get_status): New function.
12005 (x86_insert_point, x86_remove_point): New functions.
12006 (x86_stopped_by_watchpoint): New function.
12007 (x86_stopped_data_address): New function.
12008 (x86_linux_new_process, x86_linux_new_thread): New functions.
12009 (x86_linux_prepare_to_resume): New function.
12010 (the_low_target): Add entries for insert_point, remove_point,
12011 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12012 prepare_to_resume.
12013 * server.c (debug_hw_points): New global.
12014 (monitor_show_help): Document set debug-hw-points.
12015 (handle_query): Process "set debug-hw-points".
12016 * server.h (debug_hw_points): Declare.
12017 (paddress): Declare.
12018 * utils.c (NUMCELLS, CELLSIZE): New macros.
12019 (get_sell, xsnprintf, paddress): New functions.
12020 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12021 remove_point, stopped_by_watchpoint, stopped_data_address.
12022 * win32-i386-low.c: Include i386-low.h.
12023 (debug_reg_state): Replaces dr.
12024 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12025 (i386_dr_low_get_status): New function.
12026 (i386_insert_point, i386_remove_point): New functions.
12027 (i386_stopped_by_watchpoint): New function.
12028 (i386_stopped_data_address): New function.
12029 (i386_initial_stuff): Update.
12030 (get_thread_context,set_thread_context,i386_thread_added): Update.
12031 (the_low_target): Add entries for insert_point,
12032 remove_point, stopped_by_watchpoint, stopped_data_address.
12033 * win32-low.c (win32_insert_watchpoint): New function.
12034 (win32_remove_watchpoint): New function.
12035 (win32_stopped_by_watchpoint): New function.
12036 (win32_stopped_data_address): New function.
12037 (win32_target_ops): Add entries for insert_watchpoint,
12038 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12039 * win32-low.h (win32_target_ops): New members insert_point,
12040 remove_point, stopped_by_watchpoint, stopped_data_address.
12041
d993e290
PA
120422009-06-25 Pedro Alves <pedro@codesourcery.com>
12043
12044 * server.c (process_serial_event): Re-return unsupported, not
12045 error, if the type isn't recognized. Re-allow supporting only
12046 insert or remove packets. Also call require_running for
12047 breakpoints. Add missing break statement to default case. Tidy.
12048 * target.h (struct target_ops): Rename insert_watchpoint to
12049 insert_point, and remove_watchpoint to remove_point.
12050
12051 * linux-low.h (struct linux_target_ops): Likewise.
12052 * linux-low.c (linux_insert_watchpoint): Rename to ...
12053 (linux_insert_point): ... this. Adjust.
12054 (linux_remove_watchpoint): Rename to ...
12055 (linux_remove_point): ... this. Adjust.
12056 (linux_target_ops): Adjust.
12057 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12058 (cris_insert_point): ... this.
12059 (cris_remove_watchpoint): Rename to ...
12060 (cris_remove_point): ... this.
12061 (the_low_target): Adjust.
12062
0f54c268
PM
120632009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12064
12065 * server.c (handle_v_kill): Pass signal_pid to
12066 kill_inferior if multi_process is zero.
12067
c6314022
AR
120682009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12069
12070 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12071 * target.h (target_ops): Comment for *_watchpoint to make it clear
12072 the functions can get types '0' and '1'.
12073
4463ce24
AR
120742009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12075
12076 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12077 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12078 * regcache.c (get_regcache): Likewise.
12079 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12080 * win32-low.c (child_fetch_inferior_registers): Remove check for
12081 regno 0.
12082
cf8fd78b
PA
120832009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12084 Pedro Alves <pedro@codesourcery.com>
12085
12086 * target.h (struct target_ops) <supports_multi_process>: New
12087 callback.
12088 (target_supports_multi_process): New.
12089 * server.c (handle_query): Even if GDB reports support, only
12090 enable multi-process if the target also supports it. Report
12091 multi-process support only if the target backend supports it.
12092 * linux-low.c (linux_supports_multi_process): New function.
12093 (linux_target_ops): Install it as target_supports_multi_process
12094 callback.
12095
47c0c975
DE
120962009-05-24 Doug Evans <dje@google.com>
12097
e09875d4
DE
12098 Global renaming of find_thread_pid to find_thread_ptid.
12099 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12100 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12101 All callers updated.
12102
e27d73f6
DE
12103 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12104 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12105 directly.
12106
47c0c975
DE
12107 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12108 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12109 (linux_resume_one_lwp): Ditto.
12110
2acc282a
DE
121112009-05-23 Doug Evans <dje@google.com>
12112
12113 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12114 from struct inferior_list_entry * to struct lwp_info *.
12115 All callers updated.
12116
9f1036c1
DE
121172009-05-13 Doug Evans <dje@google.com>
12118
12119 * linux-x86-low.c: Don't include assert.h.
12120 (x86_siginfo_fixup): Use fatal, not assert.
12121 (x86_arch_setup): Fix comment.
12122
d0722149
DE
121232009-05-12 Doug Evans <dje@google.com>
12124
12125 Biarch support for i386/amd64 gdbserver.
12126 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12127 Add linux-x86-low.c.
12128 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12129 (linux-x86-low.o): Add.
12130 * linux-x86-64-low.c: Delete.
12131 * linux-i386-low.c: Delete.
12132 * linux-x86-low.c: New file.
12133 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12134 linux-x86-low.o.
12135 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12136 linux-x86-low.o.
12137 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12138 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12139 (linux_child_pid_to_exec_file): New function.
12140 (elf_64_header_p, elf_64_file_p): New functions.
12141 (siginfo_fixup): New function.
12142 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12143 give target a chance to convert layout.
12144 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12145 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12146
fdeb2a12
DE
121472009-05-07 Doug Evans <dje@google.com>
12148
12149 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12150 (regsets_store_inferior_registers): Ditto.
12151
a6dbe5df
PA
121522009-05-06 Pedro Alves <pedro@codesourcery.com>
12153
12154 PR server/10048
12155
12156 * linux-low.c (must_set_ptrace_flags): Delete.
12157 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12158 of the global.
12159 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12160 `lwp->must_set_ptrace_flags' instead.
ba42693b 12161 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12162 (linux_wait_1): ... not here.
12163
5091eb23
DE
121642009-04-30 Doug Evans <dje@google.com>
12165
9f767825
DE
12166 * inferiors.c (started_inferior_callback): New function.
12167 (attached_inferior_callback): New function.
12168 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12169 * server.c (print_started_pid, print_attached_pid): New functions.
12170 (detach_or_kill_for_exit): New function.
12171 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12172 * server.h (have_started_inferiors_p): Declare.
12173 (have_attached_inferiors_p): Declare.
12174
5091eb23
DE
12175 * inferiors.c (remove_process): Fix memory leak, free process.
12176 * linux-low.c (linux_remove_process): New function.
12177 (linux_kill): Call it instead of remove_process.
12178 (linux_detach, linux_wait_1): Ditto.
12179
155c8968
PA
121802009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12181
12182 * configure.srv: Add x86 Windows CE target.
12183
7fe519cb
UW
121842009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12185
12186 * inferiors.c (get_thread_process): Make global.
12187 * server.h (get_thread_process): Add prototype.
12188 * thread-db.c (find_one_thread): Use get_thread_process
12189 instead of current_process.
12190 (thread_db_get_tls_address): Do not crash if called when
12191 thread layer is not yet initialized.
12192
5472f405
UW
121932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12194
12195 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12196 * spu-low.c (current_tid): Rename to ...
12197 (current_ptid): ... this.
12198 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12199 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12200 ptid_get_lwp (current_ptid) instead of current_tid.
12201 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12202 instead of current_tid. Use find_process_pid to verify pid
12203 argument is valid. Pass proper argument to remove_process.
12204 (spu_thread_alive): Compare current_ptid instead of current_tid.
12205 (spu_resume): Likewise.
12206
55ac2b99
PA
122072009-04-02 Pedro Alves <pedro@codesourcery.com>
12208
12209 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12210 variable.
12211
95954743
PA
122122009-04-01 Pedro Alves <pedro@codesourcery.com>
12213
12214 Implement the multiprocess extensions, and add linux multiprocess
12215 support.
12216
12217 * server.h (ULONGEST): Declare.
12218 (struct ptid, ptid_t): New.
12219 (minus_one_ptid, null_ptid): Declare.
12220 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12221 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12222 (struct inferior_list_entry): Change `id' type from unsigned from
12223 to ptid_t.
12224 (struct sym_cache, struct breakpoint, struct
12225 process_info_private): Forward declare.
12226 (struct process_info): Declare.
12227 (current_process): Declare.
12228 (all_processes): Declare.
12229 (initialize_inferiors): Declare.
12230 (add_thread): Adjust to use ptid_t.
12231 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12232 (add_process, remove_process, find_thread_pid): Declare.
12233 (find_inferior_id): Adjust to use ptid_t.
12234 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12235 (multi_process): Declare.
12236 (push_event): Adjust to use ptid_t.
12237 (read_ptid, write_ptid): Declare.
12238 (prepare_resume_reply): Adjust to use ptid_t.
12239 (clear_symbol_cache): Declare.
12240 * inferiors.c (all_processes): New.
12241 (null_ptid, minus_one_ptid): New.
12242 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12243 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12244 (add_thread): Change unsigned long to ptid. Remove gdb_id
12245 parameter. Adjust.
12246 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12247 (gdb_id_to_thread): Rename to ...
12248 (find_thread_pid): ... this. Change unsigned long to ptid.
12249 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12250 (loaded_dll, pull_pid_from_list): Adjust.
12251 (add_process, remove_process, find_process_pid)
12252 (get_thread_process, current_process, initialize_inferiors): New.
12253 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12254 (struct target_waitstatus) <related_pid>: Ditto.
12255 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12256 return type to int.
12257 (struct target_ops) <join>: Add `pid' argument.
12258 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12259 (struct target_ops) <wait>: Add `ptid' field. Change return type
12260 to ptid.
12261 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12262 (mywait): Add `ptid' argument. Change return type to ptid_t.
12263 (target_pid_to_str): Declare.
12264 * target.c (set_desired_inferior): Adjust to use ptids.
12265 (mywait): Add new `ptid' argument. Adjust.
12266 (target_pid_to_str): New.
12267 * mem-break.h (free_all_breakpoints): Declare.
12268 * mem-break.c (breakpoints): Delelete.
12269 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12270 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12271 to use per-process breakpoint list.
12272 (free_all_breakpoints): New.
12273 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12274 (symbol_cache, all_symbols_looked_up): Delete.
12275 (hexchars): New.
12276 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12277 read_ptid): New.
12278 (prepare_resume_reply): Change ptid argument's type from unsigned
12279 long to ptid_t. Adjust. Implement W;process and X;process.
12280 (free_sym_cache, clear_symbol_cache): New.
12281 (look_up_one_symbol): Adjust to per-process symbol cache. *
12282 * server.c (cont_thread, general_thread, step_thread): Change type
12283 to ptid_t.
12284 (attached): Delete.
12285 (multi_process): New.
12286 (last_ptid): Change type to ptid_t.
12287 (struct vstop_notif) <ptid>: Change type to ptid_t.
12288 (queue_stop_reply, push_event): Change `ptid' argument's type to
12289 ptid_t.
12290 (discard_queued_stop_replies): Add `pid' argument.
12291 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12292 changes. Don't reference the `attached' global.
12293 (attach_inferior): Adjust to mywait interface changes.
12294 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12295 features. Handle and report "multiprocess+". Handle
12296 "qAttached:PID".
12297 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12298 changes.
12299 (handle_v_kill): New.
12300 (handle_v_stopped): Adjust to use target_pid_to_str.
12301 (handle_v_requests): Allow multiple attaches and runs when
12302 multiprocess extensions are in effect. Handle "vKill".
12303 (myresume): Adjust to use ptids.
12304 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12305 (handle_status): Adjust to discard_queued_stop_replies interface
12306 change.
12307 (first_thread_of, kill_inferior_callback)
12308 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12309 (main): Call initialize_inferiors. Adjust to use ptids, killing
12310 and detaching from all inferiors. Handle multiprocess packet
12311 variants.
12312 * linux-low.h: Include gdb_proc_service.h.
12313 (struct process_info_private): New.
12314 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12315 <lwpid_of>: Use ptid_get_lwp.
12316 (get_lwp_thread): Adjust.
12317 (struct lwp_info): Add `dead' member.
12318 (find_lwp_pid): Declare.
12319 * linux-low.c (thread_db_active): Delete.
12320 (new_inferior): Adjust comment.
12321 (inferior_pid): Delete.
12322 (linux_add_process): New.
12323 (handle_extended_wait): Adjust.
12324 (add_lwp): Change unsigned long to ptid.
12325 (linux_create_inferior): Add process to processes table. Adjust
12326 to use ptids. Don't set new_inferior here.
12327 (linux_attach_lwp): Rename to ...
12328 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12329 it. Adjust to use ptids.
12330 (linux_attach_lwp): New.
12331 (linux_attach): Add process to processes table. Don't set
12332 new_inferior here.
12333 (struct counter): New.
12334 (second_thread_of_pid_p, last_thread_of_process_p): New.
12335 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12336 multiple processes.
12337 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12338 processes. Remove process from process table.
12339 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12340 to multiple processes.
12341 (any_thread_of): New.
12342 (linux_detach): Add `pid' argument, and handle it. Remove process
12343 from processes table.
12344 (linux_join): Add `pid' argument. Handle it.
12345 (linux_thread_alive): Change unsighed long argument to ptid_t.
12346 Consider dead lwps as not being alive.
12347 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12348 threads we're not interested in.
12349 (same_lwp, find_lwp_pid): New.
12350 (linux_wait_for_lwp): Change `pid' argument's type from int to
12351 ptid_t. Adjust.
12352 (linux_wait_for_event): Rename to ...
12353 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12354 from int to ptid_t. Adjust.
12355 (linux_wait_for_event): New.
12356 (linux_wait_1): Add `ptid' argument. Change return type to
12357 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12358 that exit from the process table.
12359 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12360 Adjust.
12361 (mark_lwp_dead): New.
12362 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12363 stopping all threads, mark its main lwp as dead.
12364 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12365 ptids.
12366 (fetch_register, usr_store_inferior_registers)
12367 (regsets_fetch_inferior_registers)
12368 (regsets_store_inferior_registers, linux_read_memory)
12369 (linux_write_memory): Inline `inferior_pid'.
12370 (linux_look_up_symbols): Adjust to use per-process
12371 `thread_db_active'.
12372 (linux_request_interrupt): Adjust to use ptids.
12373 (linux_read_auxv): Inline `inferior_pid'.
12374 (initialize_low): Don't reference thread_db_active.
12375 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12376 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12377 (ps_getpid): Return the pid of the current inferior.
12378 * thread-db.c (proc_handle, thread_agent): Delete.
12379 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12380 per-process data.
12381 (find_one_thread): Change argument type to ptid_t. Adjust to
12382 per-process data.
12383 (maybe_attach_thread): Adjust to per-process data and ptids.
12384 (thread_db_find_new_threads): Ditto.
12385 (thread_db_init): Ditto.
12386 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12387 processes table. Adjust to use ptids.
12388 (spu_kill, spu_detach): Adjust interface. Remove process from
12389 processes table.
12390 (spu_join, spu_thread_alive): Adjust interface.
12391 (spu_wait): Adjust interface. Remove process from processes
12392 table. Adjust to use ptids.
12393 * win32-low.c (current_inferior_tid): Delete.
12394 (current_inferior_ptid): New.
12395 (debug_event_ptid): New.
12396 (thread_rec): Take a ptid. Adjust.
12397 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12398 (child_delete_thread): Ditto.
12399 (do_initial_child_stuff): Add `attached' argument. Add process to
12400 processes table.
12401 (child_fetch_inferior_registers, child_store_inferior_registers):
12402 Adjust.
12403 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12404 (win32_attach): Pass 1 to do_initial_child_stuff.
12405 (win32_kill): Adjust interface. Remove process from processes
12406 table.
12407 (win32_detach): Ditto.
12408 (win32_join): Adjust interface.
12409 (win32_thread_alive): Take a ptid.
12410 (win32_resume): Adjust to use ptids.
12411 (get_child_debug_event): Ditto.
12412 (win32_wait): Adjust interface. Remove exiting process from
12413 processes table.
12414
bd99dc85
PA
124152009-04-01 Pedro Alves <pedro@codesourcery.com>
12416
12417 Non-stop mode support.
12418
12419 * server.h (non_stop): Declare.
12420 (gdb_client_data, handler_func): Declare.
12421 (delete_file_handler, add_file_handler, start_event_loop):
12422 Declare.
12423 (handle_serial_event, handle_target_event, push_event)
12424 (putpkt_notif): Declare.
12425 * target.h (enum resume_kind): New.
12426 (struct thread_resume): Replace `step' field by `kind' field.
12427 (TARGET_WNOHANG): Define.
12428 (struct target_ops) <wait>: Add `options' argument.
12429 <supports_non_stop, async, start_non_stop>: New fields.
12430 (target_supports_non_stop, target_async): New.
12431 (start_non_stop): Declare.
12432 (mywait): Add `options' argument.
12433 * target.c (mywait): Add `options' argument. Print child exit
12434 notifications here.
12435 (start_non_stop): New.
12436 * server.c (non_stop, own_buf, mem_buf): New globals.
12437 (struct vstop_notif): New.
12438 (notif_queue): New global.
12439 (queue_stop_reply, push_event, discard_queued_stop_replies)
12440 (send_next_stop_reply): New.
12441 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12442 interface changes.
12443 (attach_inferior): In non-stop mode, don't wait for the target
12444 here.
12445 (handle_general_set): Handle QNonStop.
12446 (handle_query): When handling qC, return the current general
12447 thread, instead of the first thread of the list.
12448 (handle_query): If the backend supports non-stop mode, include
12449 QNonStop+ in the qSupported query response.
12450 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12451 and non-stop mode.
12452 (handle_v_attach, handle_v_run): Handle non-stop mode.
12453 (handle_v_stopped): New.
12454 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12455 (myresume): Adjust to use resume_kind. Handle non-stop.
12456 (queue_stop_reply_callback): New.
12457 (handle_status): Handle non-stop mode.
12458 (main): Clear non_stop flag on reconnection. Use the event-loop.
12459 Refactor serial protocol handling from here ...
12460 (process_serial_event): ... to this new function. When GDB
12461 selects any thread, select one here. In non-stop mode, wait until
12462 GDB acks all pending events before exiting.
12463 (handle_serial_event, handle_target_event): New.
12464 * remote-utils.c (remote_open): Install remote_desc in the event
12465 loop.
12466 (remote_close): Remove remote_desc from the event loop.
12467 (putpkt_binary): Rename to...
12468 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12469 (putpkt_binary): New as wrapper around putpkt_binary_1.
12470 (putpkt_notif): New.
12471 (prepare_resume_reply): In non-stop mode, don't change the
12472 general_thread.
12473 * event-loop.c: New.
12474 * Makefile.in (OBJ): Add event-loop.o.
12475 (event-loop.o): New rule.
12476
12477 * linux-low.h (pid_of): Moved here.
12478 (lwpid_of): New.
12479 (get_lwp_thread): Use lwpid_of.
12480 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12481 * linux-low.c (pid_of): Delete.
12482 (inferior_pid): Use lwpid_of.
12483 (linux_event_pipe): New.
12484 (target_is_async_p): New.
12485 (delete_lwp): New.
12486 (handle_extended_wait): Use lwpid_of.
12487 (add_lwp): Don't set lwpid field.
12488 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12489 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12490 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12491 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12492 first. Adjust to linux_wait_for_event interface changes. Use
12493 lwpid_of.
12494 (linux_detach): Don't delete the main lwp here.
12495 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12496 (status_pending_p): Don't consider explicitly suspended lwps.
12497 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12498 pointer. Add OPTIONS argument. Change return type to int. Use
12499 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12500 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12501 pointer. Add status pointer argument. Return a pid instead of a
12502 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12503 changes. In non-stop mode, don't switch to a random thread.
12504 (linux_wait): Rename to...
12505 (linux_wait_1): ... this. Add target_options argument, and handle
12506 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12507 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12508 clean exit and signal exit code. Don't stop all threads in
12509 non-stop mode. In all-stop mode, only stop all threads when
12510 reporting a stop to GDB. Handle explicit thread stop requests.
12511 (async_file_flush, async_file_mark): New.
12512 (linux_wait): New.
12513 (send_sigstop): Use lwpid_of.
12514 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12515 interface changes. In non-stop mode, don't switch to a random
12516 thread.
12517 (linux_resume_one_lwp): Use lwpid_of.
12518 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12519 (linux_resume_one_thread): ... this. Handle resume_stop. In
12520 non-stop mode, don't look for pending flag in all threads.
12521 (resume_status_pending_p): Don't consider explicitly suspended
12522 threads.
12523 (my_waitpid): Reimplement. Emulate __WALL.
12524 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12525 Use lwpid_of.
12526 (sigchld_handler, linux_supports_non_stop, linux_async)
12527 (linux_start_non_stop): New.
12528 (linux_target_ops): Register linux_supports_non_stop, linux_async
12529 and linux_start_non_stop.
12530 (initialize_low): Install SIGCHLD handler.
12531 * thread-db.c (thread_db_create_event, find_one_thread)
12532 (thread_db_get_tls_address): Use lwpid_of.
12533 * win32-low.c (win32_detach): Adjust to use resume_kind.
12534 (win32_wait): Add `options' argument.
12535 * spu-low.c (spu_resume): Adjust to use resume_kind.
12536 (spu_wait): Add `options' argument.
12537
5b1c542e
PA
125382009-04-01 Pedro Alves <pedro@codesourcery.com>
12539
12540 Decouple target code from remote protocol.
12541
12542 * target.h (enum target_waitkind): New.
12543 (struct target_waitstatus): New.
12544 (struct target_ops) <wait>: Return an unsigned long. Take a
12545 target_waitstatus pointer instead of a char pointer.
12546 (mywait): Likewise.
12547 * target.c (mywait): Change prototype to return an unsigned long.
12548 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12549 * server.h (thread_from_wait, old_thread_from_wait): Delete
12550 declarations.
12551 (prepare_resume_reply): Change prototype to take a
12552 target_waitstatus.
12553 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12554 (last_status, last_ptid): New.
12555 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12556 pid instead of a signal.
12557 (attach_inferior): Remove "status" and "signal" parameters.
12558 Adjust.
12559 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12560 not as an address.
12561 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12562 (handle_v_requests, myresume): Remove "status" and "signal"
12563 parameters. Adjust.
12564 (handle_status): New.
12565 (main): Delete local `status'. Adjust.
12566 * remote-utils.c: Include target.h.
12567 (prepare_resume_reply): Change prototype to take a
12568 target_waitstatus. Adjust.
12569
12570 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12571 interface.
12572 * spu-low.c (spu_wait): Adjust.
12573 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12574 Delete.
12575 (win32_wait): Adjust.
12576
2bd7c093
PA
125772009-04-01 Pedro Alves <pedro@codesourcery.com>
12578
12579 * target.h (struct thread_resume): Delete leave_stopped member.
12580 (struct target_ops): Add a `n' argument to the `resume' callback.
12581 * server.c (start_inferior): Adjust.
12582 (handle_v_cont, myresume): Adjust.
12583 * linux-low.c (check_removed_breakpoint): Adjust to resume
12584 interface change, and to removed leave_stopped field.
12585 (resume_ptr): Delete.
12586 (struct thread_resume_array): New.
12587 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12588 resume interface change.
12589 (linux_continue_one_thread, linux_queue_one_thread)
12590 (resume_status_pending_p): Check if the resume field is NULL
12591 instead of checking the leave_stopped member.
12592 (linux_resume): Adjust to the target resume interface change.
12593 * spu-low.c (spu_resume): Adjust to the target resume interface
12594 change.
12595 * win32-low.c (win32_detach, win32_resume): Ditto.
12596
c35fafde
PA
125972009-04-01 Pedro Alves <pedro@codesourcery.com>
12598
12599 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12600 flag.
12601 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12602 pending.
12603 (linux_continue_one_thread): Only preserve the stepping flag if
12604 there's a pending breakpoint.
12605
0a59d50b
PA
126062009-03-31 Pedro Alves <pedro@codesourcery.com>
12607
12608 * server.c (main): After the inferior having exited, call
12609 remote_close before exiting gdbserver.
12610
f04c6d38
TJB
126112009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12612
12613 Fix size of FPSCR in Power 7 processors.
12614 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12615 (PPC_FEATURE_HAS_DFP): New #define.
12616 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12617 size of the FPSCR.
12618
78e5cee6
PA
126192009-03-23 Pedro Alves <pedro@codesourcery.com>
12620
12621 * server.c (handle_query) Whitespace and formatting.
12622
1b3f6016
PA
126232009-03-22 Pedro Alves <pedro@codesourcery.com>
12624
12625 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12626 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12627 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12628 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12629 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12630 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12631 Makefile.in, configure.ac: Fix whitespace throughout.
12632 * configure: Regenerate.
12633
a07b2135
PA
126342009-03-22 Pedro Alves <pedro@codesourcery.com>
12635
12636 * inferiors.c (find_inferior): Make it safe for the callback
12637 function to delete the currently iterated inferior.
12638
67cc2626
PA
126392009-03-22 Pedro Alves <pedro@codesourcery.com>
12640
12641 * Makefile.in (linuw_low_h): Move higher.
12642 (thread-db.o): Depend on $(linux_low_h).
12643
54a0b537
PA
126442009-03-17 Pedro Alves <pedro@codesourcery.com>
12645
12646 Rename "process" to "lwp" throughout.
12647
12648 * linux-low.c (all_processes): Rename to...
12649 (all_lwps): ... this.
12650 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12651 (add_process): Rename to ...
12652 (add_lwp): ... this. Adjust.
12653 (linux_create_inferior): Adjust.
12654 (linux_attach_lwp): Adjust.
12655 (linux_attach): Adjust.
12656 (linux_kill_one_process): Rename to ...
12657 (linux_kill_one_lwp): ... this. Adjust.
12658 (linux_kill): Adjust.
12659 (linux_detach_one_process): Rename to ...
12660 (linux_detach_one_lwp): ... this. Adjust.
12661 (linux_detach): Adjust.
12662 (check_removed_breakpoint): Adjust.
12663 (status_pending_p): Adjust.
12664 (linux_wait_for_process): Rename to ...
12665 (linux_wait_for_lwp): ... this. Adjust.
12666 (linux_wait_for_event): Adjust.
12667 (send_sigstop): Adjust.
12668 (wait_for_sigstop): Adjust.
12669 (stop_all_processes): Rename to ...
12670 (stop_all_lwps): ... this.
12671 (linux_resume_one_process): Rename to ...
12672 (linux_resume_one_lwp): ... this. Adjust.
12673 (linux_set_resume_request, linux_continue_one_thread)
12674 (linux_queue_one_thread, resume_status_pending_p)
12675 (usr_store_inferior_registers, regsets_store_inferior_registers)
12676 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12677 Adjust.
12678 * linux-low.h (get_process): Rename to ...
12679 (get_lwp): ... this. Adjust.
12680 (get_thread_process): Rename to ...
12681 (get_thread_lwp): ... this. Adjust.
12682 (get_process_thread): Rename to ...
12683 (get_lwp_thread): ... this. Adjust.
12684 (struct process_info): Rename to ...
12685 (struct lwp_info): ... this.
12686 (all_processes): Rename to ...
12687 (all_lwps): ... this.
12688 * proc-service.c (ps_lgetregs): Adjust.
12689 * thread-db.c (thread_db_create_event, find_one_thread)
12690 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12691
0b16c5cf
PA
126922009-03-14 Pedro Alves <pedro@codesourcery.com>
12693
12694 * server.c (handle_query): Handle "qAttached".
12695
32de4b9d
NS
126962009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12697
12698 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12699 GPLv3, update license URL.
12700
2aecd87f
DE
127012009-03-01 Doug Evans <dje@google.com>
12702
93efd302 12703 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12704 (server_h): Add gdb_signals.h.
12705 (signals.o): Update.
12706 * server.h (target_signal_from_host,target_signal_to_host_p)
12707 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12708
86b1f9c5
PM
127092009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12710
12711 * remote-utils.c (getpkt): Also generate remote-debug
12712 information if noack_mode is set.
12713
4aa995e1
PA
127142009-02-06 Pedro Alves <pedro@codesourcery.com>
12715
12716 * server.c (handle_query): Report qXfer:siginfo:read and
12717 qXfer:siginfo:write as supported and handle them.
12718 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12719 * linux-low.c (linux_xfer_siginfo): New.
12720 (linux_target_ops): Set it.
12721
62709adf
PA
127222009-01-26 Pedro Alves <pedro@codesourcery.com>
12723
12724 * server.c (gdbserver_usage): Mention --remote-debug.
12725 (main): Accept '--remote-debug' switch.
12726
aef93bd7
DE
127272009-01-18 Doug Evans <dje@google.com>
12728
12729 * regcache.c (new_register_cache): No need to check result of xcalloc.
12730 * server.c (handle_search_memory): Back out calls to xmalloc,
12731 result is checked and error is returned to user upon failure.
12732 (handle_query): Ditto. Add more checks for result of malloc.
12733 (handle_v_cont): Check result of malloc, report error back to
12734 user upon failure.
12735 (handle_v_run): Ditto. Call freeargv.
12736 * server.h (freeargv): Declare.
12737 * utils.c (freeargv): New fn.
12738
54363045
DE
127392009-01-15 Doug Evans <dje@google.com>
12740
f626972c
DE
12741 * gdbreplay.c (perror_with_name): Make arg const char *.
12742 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12743 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12744 * utils.c (perror_with_name): Make arg const char *.
54363045 12745
18aae699
PA
127462009-01-14 Pedro Alves <pedro@codesourcery.com>
12747
12748 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12749 when handling a EXIT_PROCESS_DEBUG_EVENT.
12750
ff703abe
JB
127512009-01-06 Joel Brobecker <brobecker@adacore.com>
12752
12753 * gdbreplay.c (gdbreplay_version): Update copyright year.
12754 * server.c (gdbserver_version): Likewise.
12755
f21cc1a2 127562009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12757
12758 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12759 (handle_extended_wait): Improve comment.
0e21c1ec 12760
bca929d3
DE
127612008-12-13 Doug Evans <dje@google.com>
12762
12763 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12764 * server.h (ATTR_MALLOC): New macro.
12765 (xmalloc,xcalloc,xstrdup): Declare.
12766 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12767 * inferiors.c: Ditto.
12768 * linux-low.c: Ditto.
12769 * mem-break.c: Ditto.
12770 * regcache.c: Ditto.
12771 * remote-utils.c: Ditto.
12772 * server.c: Ditto.
12773 * target.c: Ditto.
12774 * win32-low.c: Ditto.
12775
97438e3f
DE
127762008-12-12 Doug Evans <dje@google.com>
12777
896c7fbb
DE
12778 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12779 in debugging printf.
12780
97438e3f
DE
12781 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12782
e3b886f8
DE
127832008-12-09 Doug Evans <dje@google.com>
12784
12785 * linux-low.h (struct process_info): Delete member tid, unused.
12786 * thread-db.c (find_one_thread): Update.
12787 (maybe_attach_thread): Update.
12788
07e059b5
VP
127892008-12-02 Pedro Alves <pedro@codesourcery.com>
12790
889bf7c5
PA
12791 * target.h (struct target_ops): Add qxfer_osdata member.
12792 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12793 and dirent.h.
12794 (linux_qxfer_osdata): New functions.
12795 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12796 callback.
12797 * server.c (handle_query): Handle "qXfer:osdata:read:".
12798 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12799 (buffer_xml_printf): New functions.
12800 * server.h (struct buffer): New.
12801 (buffer_grow_str, buffer_grow_str0): New macros.
12802 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12803 (buffer_xml_printf): Declare.
07e059b5 12804
4cab47ab
DE
128052008-11-24 Doug Evans <dje@google.com>
12806
12807 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12808
f142445f
DJ
128092008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12810
12811 * server.c (handle_v_run): Always use the supplied argument list.
12812
d0107bb6 128132008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12814
d0107bb6
BW
12815 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12816 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12817
2c4ad781
TJB
128182008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12819
12820 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12821 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12822 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12823 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12824 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12825 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12826 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12827 XML target descriptions.
12828 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12829 when inferior is running on an ISA 2.05 or later processor. Add
12830 special case to return offset for full 64-bit slot of FPSCR when
12831 in 32-bits.
12832
dfb64f85
DJ
128332008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12834
12835 * Makefile.in (SFILES, clean): Added sparc64 files.
12836 (reg-sparc64.o, reg-sparc64.c): New.
12837 * configure.srv (sparc*-*-linux*): New configuration.
12838 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12839 syscall arguments for SPARC.
12840 (regsets_store_inferior_registers): Likewise.
12841 * linux-sparc-low.c: New file.
12842
66b6e1dd
DE
128432008-10-21 Doug Evans <dje@google.com>
12844
12845 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12846 (READLINE_DIR,READLINE_DEP): Delete.
12847 (INTERNAL_CFLAGS): Update.
12848 (LINTFLAGS): Update.
12849
9b710a42
PA
128502008-10-10 Pedro Alves <pedro@codesourcery.com>
12851
12852 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12853 whole argv from the last run, not just argv[0].
12854
5822d809
PA
128552008-09-08 Pedro Alves <pedro@codesourcery.com>
12856
12857 * regcache.c (new_register_cache): Return NULL if the register
12858 cache size isn't known yet.
12859 (free_register_cache): Avoid dereferencing a NULL regcache.
12860
74aac56f
DJ
128612008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12862
12863 * configure.srv: Merge MIPS and MIPS64.
12864
400b20f5
MR
128652008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12866
12867 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12868
677c5bb1
LM
128692008-08-18 Luis Machado <luisgpm@br.ibm.com>
12870
12871 * Makefile.in: Add required vsx dependencies.
12872
12873 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12874 Declare init_registers_powerpc_vsx32l.
12875 Declare init_registers_powerpc_vsx64l.
12876 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12877 (ppc_arch_setup): Check for VSX in hwcap.
12878 (ppc_fill_vsxregset): New function.
12879 (ppc_store_vsxregset): New function.
12880 Add new VSX entry in regset_info target_regsets.
12881
12882 * configure.srv: Add new VSX dependencies.
12883
a6f3e723
SL
128842008-08-12 Pedro Alves <pedro@codesourcery.com>
12885
12886 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12887 (remote_open): Set or clear transport_is_reliable.
12888 (putpkt_binary): Don't expect acks in noack mode.
12889 (getpkt): Don't send ack/nac in noack mode.
12890 * server.c (handle_general_set): Handle QStartNoAckMode.
12891 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12892 qSupported.
12893 (main): Reset noack_mode on every connection.
12894 * server.h (noack_mode): Declare.
12895
a417dc56
RW
128962008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12897
12898 * Makefile.in (GDBREPLAY_OBS): New variable.
12899 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12900
3221518c
UW
129012008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12902 Daniel Jacobowitz <dan@codesourcery.com>
12903
12904 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12905 (usr_store_inferior_registers): Likewise.
12906 (regsets_store_inferior_registers): Likewise.
12907
ec56be1b
PA
129082008-07-31 Rolf Jansen <rj@surtec.com>
12909 Pedro Alves <pedro@codesourcery.com>
12910
12911 * configure.ac: Check for memmem declaration.
12912 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12913 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12914 (disable_packet_qfThreadInfo): Unconditionally compile.
12915 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12916 * configure, config.in: Regenerate.
12917
2fe5e3ff
DE
129182008-07-28 Doug Kwan <dougkwan@google.com>
12919
12920 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12921 (linux_write_memory): Remove declaration of errno.
12922
836acd6d
UW
129232008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12924
12925 * linux-low.c (handle_extended_wait): Do not use "status"
12926 variable uninitialized.
12927
aeba519e
PA
129282008-07-07 Pedro Alves <pedro@codesourcery.com>
12929
12930 * server.c (handle_v_attach): Inhibit reporting dll changes.
12931
db42f210
PA
129322008-06-27 Pedro Alves <pedro@codesourcery.com>
12933
12934 * remote-utils.c (prepare_resume_reply): If requested, don't
12935 output "thread:TID" in the T stop reply.
12936
12937 * server.c (disable_packet_vCont, disable_packet_Tthread)
12938 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12939 (handle_query): If requested, disable support for qC, qfThreadInfo
12940 and qsThreadInfo.
12941 (handle_v_requests): If requested, disable support for vCont.
12942 (gdbserver_show_disableable): New.
12943 (main): Handle --disable-packet and --disable-packet=LIST.
12944
12945 * server.h (disable_packet_vCont, disable_packet_Tthread)
12946 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12947
8e4c5421
CD
129482008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12949
12950 * server.c (gdbserver_usage): Mention --version.
12951
6e23a804
DJ
129522008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12953
12954 * Makefile.in (gdbreplay.o): New rule.
12955
90aa6a40
JM
129562008-06-06 Joseph Myers <joseph@codesourcery.com>
12957
12958 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12959 message, not gdbserver.
12960
c16158bc 129612008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12962 Nathan Sidwell <nathan@codesourcery.com>
12963 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12964
12965 * acinclude.m4: Include ../../config/acx.m4.
12966 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12967 * configure, config.in: Regenerate.
12968 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12969 * server.c (gdbserver_version): Print PKGVERSION.
12970 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12971 (main): Adjust gdbserver_usage calls.
12972 * gdbreplay.c (version, host_name): Add declarations.
12973 (gdbreplay_version, gdbreplay_usage): New.
12974 (main): Accept --version and --help options.
12975
aeb75bf5
DJ
129762008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12977
12978 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12979 (arm_breakpoint_at): Handle Thumb.
12980 (the_low_target): Add comment.
12981
76b233dd
UW
129822008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12983
12984 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12985
08388c79
DE
129862008-05-09 Doug Evans <dje@google.com>
12987
a3c83fae
DE
12988 * server.h (decode_search_memory_packet): Declare.
12989 * remote-utils.c (decode_search_memory_packet): New fn.
12990 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12991 (handle_search_memory): New fn.
12992 (handle_query): Process qSearch:memory packets.
12993
bb9c3d36
UW
129942008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12995
12996 * regcache.c (registers_length): Remove.
12997 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12998 full register packet.
12999 * regcache.h (registers_length): Remove prototype.
13000 * server.h (PBUFSIZ): Define to 16384.
13001
7284e1be
UW
130022008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13003
13004 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13005 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13006 powerpc-64l.o, and powerpc-altivec64l.o.
13007 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13008 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13009 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13010 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13011 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13012 to srv_xmlfiles.
13013
13014 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13015 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13016 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13017 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13018 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13019 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13020 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13021 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13022 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13023 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13024 (clean): Update.
13025
13026 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13027 (init_registers_powerpc_32l): ... this new prototype.
13028 (init_registers_powerpc_32): Remove, replace by ...
13029 (init_registers_powerpc_altivec32l): ... this new prototype.
13030 (init_registers_powerpc_e500): Remove, replace by ...
13031 (init_registers_powerpc_e500l): ... this new prototype.
13032 (init_registers_ppc64): Remove, replace by ...
13033 (init_registers_powerpc_64l): ... this new prototype.
13034 (init_registers_powerpc_64): Remove, replace by ...
13035 (init_registers_powerpc_altivec64l): ... this new prototype.
13036 (ppc_num_regs): Set to 73.
13037 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13038 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13039 (ppc_cannot_store_register): Handle orig_r3 and trap.
13040 (ppc_arch_setup): Update init_registers_... calls.
13041 (ppc_fill_gregset): Handle orig_r3 and trap.
13042
13043 * inferiors.c (clear_inferiors): Reset current_inferior.
13044
fdc59709
PB
130452008-04-23 Paolo Bonzini <bonzini@gnu.org>
13046
889bf7c5
PA
13047 * acinclude.m4: Add override.m4.
13048 * configure: Regenerate.
fdc59709 13049
c9b2f845
UW
130502008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13051
13052 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13053 initial call to init_register_ppc64.
13054
550512b8
UW
130552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13056
43aaf8b6
PA
13057 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13058 single powerpc*-*-linux* case.
550512b8
UW
13059 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13060
b6430ec3
UW
130612008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13062
13063 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13064 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13065 from reg_xmlfiles.
13066 * linux-ppc-low.c: Include <elf.h>.
13067 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13068 (ppc_hwcap): New global variable.
13069 (ppc_regmap): Remove __SPE__ #ifdef sections.
13070 (ppc_regmap_e500): New global variable.
13071 (ppc_cannot_store_register): Update __SPE__ special case.
13072 (ppc_get_hwcap): New function.
13073 (ppc_arch_setup): Use it to determine whether inferior supports
13074 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13075 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13076 Do not access registers if target does not support AltiVec.
13077 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13078 Do not access registers if target does not support SPE.
13079 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13080
52fa2412
UW
130812008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13082
13083 * linux-low.c (disabled_regsets, num_regsets): New.
13084 (use_regsets_p): Delete.
13085 (linux_wait_for_process): Clear disabled_regsets.
13086 (regsets_fetch_inferior_registers): Check and set it.
13087 (regsets_store_inferior_registers): Likewise.
13088 (linux_fetch_registers, linux_store_registers): Do not use
13089 use_regsets_p.
13090 (initialize_low): Allocate disabled_regsets.
13091
e28b3332
DJ
130922008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13093
13094 * Makefile.in (LIBOBJS): New.
13095 (OBS): Use LIBOBJS.
13096 (memmem.o): New rule.
13097 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13098 * configure: Regenerated.
13099
4536995d
UW
131002008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13101
13102 * server.c (handle_query): Never return "unsupported" for
13103 qXfer:features:read queries.
13104
221c031f
UW
131052008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13106
13107 * server.c (get_features_xml): Fix inverted condition.
13108 (handle_query): Always support qXfer:feature:read.
13109
ccd213ac
DJ
131102008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13111
13112 * server.c (wrapper_argv): New.
13113 (start_inferior): Handle wrapper_argv. If set, expect an extra
13114 trap.
13115 (gdbserver_usage): Document --wrapper.
13116 (main): Parse --wrapper.
13117
6fe305f7
UW
131182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13119
13120 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13121 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13122 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13123 (ppc_set_pc): Likewise.
13124 (ppc_arch_setup): New function.
13125 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13126 of collect_register.
889bf7c5 13127 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13128
5b0a002e
UW
131292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13130
13131 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13132 instead of linux-ppc64-low.o.
13133 * linux-ppc64-low.c: Remove file.
13134 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13135 (linux-ppc64-low.o): Remove rule.
13136
13137 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13138 (init_registers_powerpc_64): Likewise.
13139 (ppc_regmap): Conditionally define depending on __powerpc64__.
13140 (ppc_cannot_store_register): Do not special-case "fpscr" when
13141 compiled on __powerpc64__.
13142 (ppc_collect_ptrace_register): New function.
13143 (ppc_supply_ptrace_register): New function.
13144 (ppc_breakpoint): Change type to "unsigned int".
13145 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13146 (the_low_target): Conditionally provide initializers for the
889bf7c5 13147 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13148 collect_ptrace_register and supply_ptrace_register members.
13149
9b4b61c8
UW
131502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13151
13152 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13153 * server.c (gdbserver_xmltarget): Define.
13154 (get_features_xml): Use it to replace "target.xml" and arch_string.
13155
13156 * configure.srv: Remove srv_xmltarget. Add XML files that were
13157 mentioned there to srv_xmlfiles instead. Remove conditional tests
13158 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13159 srv_xmlfiles and srv_regobj to include all possible choices.
13160 * configure.ac (srv_xmltarget): Remove.
13161 (srv_xmlfiles): Do not add "target.xml".
13162 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13163 checks for supplementary target information.
13164 * configure: Regenerate.
13165 * Makefile.in (XML_TARGET): Remove.
13166 (target.xml): Remove rule.
13167 (clean): Do not clean up target.xml.
13168 (.PRECIOUS): Do not mention target.xml.
13169
13170 * target.h (struct target_ops): Remove arch_string member.
13171 * linux-low.c (linux_arch_string): Remove.
13172 (linux_target_ops): Remove arch_string initializer.
13173 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13174 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13175 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13176 * spu-low.c (spu_arch_string): Remove.
13177 (spu_target_ops): Remove arch_string initializer.
13178 * win32-low.c (win32_arch_string): Remove.
13179 (win32_target_ops): Remove arch_string initializer.
13180 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13181 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13182 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13183
ee1a7ae4
UW
131842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13185
13186 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13187 by collect_ptrace_register and supply_ptrace_register hooks.
13188 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13189 instead of checking for the_low_target.left_pad_xfer.
13190 (usr_store_inferior_registers): Use collect_ptrace_register callback
13191 instead of checking for the_low_target.left_pad_xfer.
13192
13193 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13194 (s390_supply_ptrace_register): Likewise.
13195 (s390_fill_gregset): Call s390_collect_ptrace_register.
13196 (the_low_target): Update.
13197
13198 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13199 (ppc_supply_ptrace_register): Likewise.
13200 (the_low_target): Update.
13201
13202 * linux-i386-low.c (the_low_target): Update.
13203 * linux-x86-64-low.c (the_low_target): Update.
13204
d61ddec4
UW
132052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13206
13207 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13208 reg-s390.o and reg-s390x.o.
13209
13210 * linux-low.c (new_inferior): New global variable.
13211 (linux_create_inferior, linux_attach): Set it.
13212 (linux_wait_for_process): Call the_low_target.arch_setup after the
13213 target has stopped for the first time.
13214 (initialize_low): Do not call the_low_target.arch_setup.
13215
13216 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13217 (s390_set_pc): Likewise.
13218 (s390_arch_setup): New function.
13219 (the_low_target): Use s390_arch_setup as arch_setup routine.
13220
13221 * regcache.c (realloc_register_cache): New function.
13222 (set_register_cache): Call it for each existing regcache.
13223
d05b4ac3
UW
132242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13225
13226 * server.h (init_registers): Remove prototype.
13227
13228 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13229 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13230 instead of init_registers ().
13231 * linux-arm-low.c (init_registers_arm): Add prototype.
13232 (init_registers_arm_with_iwmmxt): Likewise.
13233 (the_low_target): Add initializer for arch_setup field.
13234 * linux-cris-low.c (init_registers_cris): Add prototype.
13235 (the_low_target): Add initializer for arch_setup field.
13236 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13237 (the_low_target): Add initializer for arch_setup field.
13238 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13239 (the_low_target): Add initializer for arch_setup field.
13240 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13241 (the_low_target): Add initializer for arch_setup field.
13242 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13243 (the_low_target): Add initializer for arch_setup field.
13244 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13245 (the_low_target): Add initializer for arch_setup field.
13246 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13247 (init_registers_mips64_linux): Likewise.
13248 (the_low_target): Add initializer for arch_setup field.
13249 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13250 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13251 (the_low_target): Add initializer for arch_setup field.
13252 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13253 (init_registers_powerpc_64): Likewise.
13254 (the_low_target): Add initializer for arch_setup field.
13255 * linux-s390-low.c (init_registers_s390): Add prototype.
13256 (init_registers_s390x): Likewise.
13257 (the_low_target): Add initializer for arch_setup field.
13258 * linux-sh-low.c (init_registers_sh): Add prototype.
13259 (the_low_target): Add initializer for arch_setup field.
13260 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13261 (the_low_target): Add initializer for arch_setup field.
13262 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13263 (the_low_target): Add initializer for arch_setup field.
13264
13265 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13266 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13267 instead of init_registers ().
13268 * win32-arm-low.c (init_registers_arm): Add prototype.
13269 (the_low_target): Add initializer for arch_setup field.
13270 * win32-i386-low.c (init_registers_i386): Add prototype.
13271 (the_low_target): Add initializer for arch_setup field.
13272
13273 * spu-low.c (init_registers_spu): Add prototype.
13274 (initialize_low): Call initialie_registers_spu () instead of
13275 initialize_registers ().
13276
fd96d250
PA
132772008-02-19 Pedro Alves <pedro@codesourcery.com>
13278
13279 * server.c (handle_v_requests): When handling the vRun and vAttach
13280 packets, if already debugging a process, don't kill it. Return an
13281 error instead.
13282
d41b6bb4
DJ
132832008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13284
13285 * server.c (handle_query): Correct length check.
13286
5ac588cf
PA
132872008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13288
13289 * win32-low.c (do_initial_child_stuff): Add process handle
13290 parameter. Set current_process_handle and current_process_id from the
13291 parameters. Clear globals.
13292 (win32_create_inferior): Don't set current_process_handle and
13293 current_process_id here. Instead pass them on the call to
13294 do_initial_child_stuff.
13295 (win32_attach): Likewise.
13296 (win32_clear_inferiors): New.
13297 (win32_kill): Don't close the current process handle or the
13298 current thread handle here. Instead call win32_clear_inferiors.
13299 (win32_detach): Don't open a new handle to the process. Call
13300 win32_clear_inferiors.
13301 (win32_join): Don't rely on current_process_handle; open a new
13302 handle using the process id.
13303 (win32_wait): Call win32_clear_inferiors when the inferior process
13304 has exited.
13305
ecd7ecbc
DJ
133062008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13307
13308 * server.c (monitor_show_help): Add "exit".
13309
1525d545
MG
133102008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13311
ecd7ecbc 13312 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13313 (clean): Add reg-xtensa.c.
13314 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13315 * configure.srv (xtensa*-*-linux*) New target.
13316 * linux-xtensa-low.c: New.
13317 * xtensa-xtregs.c: New.
1525d545 13318
59a016f0
PA
133192008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13320
13321 * hostio.c: Don't include errno.h.
13322 (errno_to_fileio_errno): Move to hostio-errno.
13323 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13324 error number outputting to the target->hostio_last_error callback.
13325 (hostio_packet_error): Use FILEIO_EINVAL directly.
13326 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13327 calls to hostio_error.
13328 * hostio-errno.c: New.
13329 * server.h (hostio_last_error_from_errno): Declare.
13330 * target.h (target_ops): Add hostio_last_error member.
13331 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13332 as hostio_last_error handler.
889bf7c5 13333 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13334 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13335 (wince_hostio_last_error): New functions.
13336 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13337 as hostio_last_error handler.
13338 (win32_target_ops) [!_WIN32_WCE]: Register
13339 hostio_last_error_from_errno as hostio_last_error handler.
13340 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13341 (hostio-errno.o): New rule.
13342 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13343 * configure.srv (srv_hostio_err_objs): New variable. Default to
13344 hostio-errno.o.
13345 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13346 * configure: Regenerate.
13347
2d717e4f
DJ
133482008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13349
13350 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13351 (linux_kill, linux_detach): Clean up the process list.
13352 * remote-utils.c (remote_open): Improve port number parsing.
13353 (putpkt_binary, input_interrupt): Only send interrupts if the target
13354 is running.
13355 * server.c (extended_protocol): Make static.
13356 (attached): Define earlier.
13357 (exit_requested, response_needed, program_argv): New variables.
13358 (target_running): New.
13359 (start_inferior): Clear attached here.
13360 (attach_inferior): Set attached here.
13361 (require_running): Define.
13362 (handle_query): Use require_running and target_running. Implement
13363 "monitor exit".
13364 (handle_v_attach, handle_v_run): New.
13365 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13366 (gdbserver_usage): Update.
13367 (main): Redo argument parsing. Handle --debug and --multi. Handle
13368 --attach along with other options or after the port. Save
13369 program_argv. Support no initial program. Resynchronize
13370 communication with GDB after an error. Handle "monitor exit".
13371 Use require_running and target_running. Always allow the extended
13372 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13373 restart in extended mode.
13374 * README: Refer to the GDB manual. Update --attach usage.
13375
7407e2de
AS
133762007-12-20 Andreas Schwab <schwab@suse.de>
13377
13378 * linux-low.c (STACK_SIZE): Define.
13379 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13380 (linux_test_for_tracefork): Likewise.
13381
b65d95c5
DJ
133822007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13383
13384 * linux-low.c (linux_wait_for_event): Update messages. Do not
13385 reinsert auto-delete breakpoints.
13386 * mem-break.c (struct breakpoint): Change return type of handler to
13387 int.
13388 (set_breakpoint_at): Update handler type.
13389 (reinsert_breakpoint_handler): Return 1 instead of calling
13390 delete_breakpoint.
13391 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13392 setting a new one.
13393 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13394 * mem-break.h (set_breakpoint_at): Update handler type.
13395 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13396 * win32-low.c (auto_delete_breakpoint): New.
13397 (get_child_debug_event): Use it.
13398
4e799345
DJ
133992007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13400
13401 * configure.ac: Check for pread and pwrite.
13402 * hostio.c (handle_pread): Fall back to lseek and read.
13403 (handle_pwrite): Fall back to lseek and write.
13404 * config.in, configure: Regenerated.
13405
27524b67
DJ
134062007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13407
13408 * server.c (myresume): Add own_buf argument.
13409 (main): Update calls.
13410
a20d5e98
DJ
134112007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13412
13413 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13414 * remote-utils.c (remote_open): Do not call disable_async_io.
13415 (block_async_io): Delete.
13416 (unblock_async_io): Make static.
13417 (initialize_async_io): New.
13418 * server.c (handle_v_cont): Handle async I/O here.
13419 (myresume): Likewise. Move other common resume tasks here...
13420 (main): ... from here. Call initialize_async_io. Disable async
13421 I/O before the main loop.
13422 * server.h (initialize_async_io): Declare.
13423 (block_async_io, unblock_async_io): Delete prototypes.
13424 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13425
b79d787e
DJ
134262007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13427
13428 * remote-utils.c (readchar): Allow binary data in received messages.
13429
d97903b2
PA
134302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13431
13432 * win32-low.c (attaching): New global.
13433 (win32_create_inferior): Clear the `attaching' global.
13434 (win32_attach): Set the `attaching' global.
13435 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13436 attaching. Only set a breakpoint at the entry point if not
13437 attaching.
13438
311de423
PA
134392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13440
13441 * server.c (main): Don't report dll events on the initial
13442 connection on attaches.
13443
6c2d16d2
PA
134442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13445
13446 * server.c (main): Relax numerical bases supported for the pid of
13447 the --attach command line argument.
13448
5ca906e6
PA
134492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13450
13451 * win32-low.c (win32_attach): Call OpenProcess before
13452 DebugActiveProcess, not after. Add last error output to error
13453 call.
13454
9c6c8194
PA
134552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13456
13457 * win32-low.c (win32_get_thread_context)
13458 (win32_set_thread_context): New functions.
13459 (thread_rec): Use win32_get_thread_context.
13460 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13461 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13462 field.
13463
4d5d1aaa
PA
134642007-12-03 Leo Zayas
13465 Pedro Alves <pedro_alves@portugalmail.pt>
13466
13467 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13468 global variables.
13469 (child_add_thread): Minor cleanup.
13470 (child_continue): Resume artificially suspended threads before
13471 calling ContinueDebugEvent.
13472 (suspend_one_thread): New.
13473 (fake_breakpoint_event): New.
13474 (get_child_debug_event): Change return type to int. Check here if
13475 gdb sent an interrupt request. If a soft interrupt was requested,
13476 fake a breakpoint event. Return 0 if there is no event to handle,
13477 and 1 otherwise.
13478 (win32_wait): Don't check here if gdb sent an interrupt request.
13479 Ensure there is a valid event to handle.
13480 (win32_request_interrupt): Add soft interruption method as last
13481 resort.
13482
c436e841
PA
134832007-12-03 Leo Zayas
13484 Pedro Alves <pedro_alves@portugalmail.pt>
13485
13486 * win32-low.h (win32_thread_info): Add descriptions to the
13487 structure members. Replace `suspend_count' counter by a
13488 `suspended' flag.
13489 * win32-low.c (thread_rec): Update condition of when to get the
13490 context from the inferior. Rely on ContextFlags being set if it
13491 has already been retrieved. Only suspend the inferior thread if
13492 we haven't already. Warn if that fails.
13493 (continue_one_thread): s/suspend_count/suspended/. Only call
13494 ResumeThread once. Warn if that fails.
13495
e7b5fa67
PA
134962007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13497
13498 * win32-low.c (win32_wait): Don't read from the inferior when it
13499 has already exited.
13500
a385171d
PA
135012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13502
13503 * Makefile.in (win32_low_h): New variable.
13504 (win32-low.o): Add dependency on $(win32_low_h).
13505 (win32-arm-low.o, win32-i386-low.o): New rules.
13506
f80c84b3
DJ
135072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13508
13509 * hostio.c: Correct copyright year.
13510
a6b151f1
DJ
135112007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13512
13513 * Makefile.in (OBS): Add hostio.o.
13514 (hostio.o): New rule.
13515 * server.h (handle_vFile): Declare.
13516 * hostio.c: New file.
13517 * server.c (handle_v_requests): Take packet_len and new_packet_len
13518 for binary packets. Call handle_vFile.
13519 (main): Update call to handle_v_requests.
13520
f9387fc3
DJ
135212007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13522
13523 * linux-low.c: Include <sched.h>.
13524
51c2684e
DJ
135252007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13526
13527 * linux-low.c (linux_tracefork_grandchild): New.
13528 (linux_tracefork_child): Use clone.
13529 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13530
75f83163
JB
135312007-10-31 Joel Brobecker <brobecker@adacore.com>
13532
13533 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13534
da5898ce
DJ
135352007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13536
13537 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13538
24a09b5f
DJ
135392007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13540
13541 * inferiors.c (change_inferior_id): Delete.
13542 (add_pid_to_list, pull_pid_from_list): New.
13543 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13544 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13545 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13546 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13547 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13548 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13549 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13550 (using_threads): Always set to 1.
13551 (handle_extended_wait): New.
13552 (add_process): Do not set TID.
13553 (linux_create_inferior): Set must_set_ptrace_flags.
13554 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13555 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13556 (linux_thread_alive): Rename TID argument to LWPID.
13557 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13558 (linux_wait_for_event): Do not use TID or check using_threads. Update
13559 call to dead_thread_notify. Call handle_extended_wait.
13560 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13561 (send_sigstop): Delete sigstop_sent.
13562 (wait_for_sigstop): Avoid TID.
13563 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13564 (linux_test_for_tracefork): New.
13565 (linux_lookup_signals): Use thread_db_active and
13566 linux_supports_tracefork_flag.
13567 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13568 * linux-low.h (get_process_thread): Avoid TID.
13569 (struct process_ifo): Move thread_known and tid to the end. Remove
13570 sigstop_sent.
13571 (linux_attach_lwp, thread_db_init): Update prototypes.
13572 * server.h (change_inferior_id): Delete prototype.
13573 (add_pid_to_list, pull_pid_from_list): New prototypes.
13574 * thread-db.c (thread_db_use_events): New.
13575 (find_first_thread): Rename to...
13576 (find_one_thread): ...this. Update callers and messages. Do not
13577 call fatal. Check thread_db_use_events. Do not call
13578 change_inferior_id or new_thread_notify.
13579 (maybe_attach_thread): Update. Do not call new_thread_notify.
13580 (thread_db_init): Set thread_db_use_events. Check use_events.
13581 * utils.c (fatal, warning): Correct message prefix.
13582
30ed0a8f
DJ
135832007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13584
13585 * Makefile.in (clean): Remove new files.
13586 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13587 (powerpc-64.o, powerpc-64.c): New rules.
13588 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13589 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13590 with SPE.
13591 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13592 SPE targets.
13593 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13594 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13595 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13596 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13597 (target_regsets): Add AltiVec and SPE register sets.
13598 * configure.ac: Check for AltiVec and SPE.
13599 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13600 (ppc_fill_vrregset, ppc_store_vrregset): New.
13601 (target_regsets): Add AltiVec register set.
13602 * configure: Regenerated.
13603
fd462a61
DJ
136042007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13605
13606 * linux-low.c (O_LARGEFILE): Define.
13607 (linux_read_memory): Use /proc/PID/mem.
13608 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13609 * configure, config.in: Regenerated.
13610
69f223ed
DJ
136112007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13612
13613 * linux-low.c (linux_wait_for_event): Do not pass signals while
13614 single-stepping.
13615
aec18585
PA
136162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13617
13618 * win32-low.c (create_process): New.
13619 (win32_create_inferior): Use create_process instead of
13620 CreateProcess. If create_process failed retry appending an ".exe"
13621 suffix. Store the GetLastError result immediatelly after
13622 create_process calls and use it on the call to error.
13623
34d86ddd
PA
136242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13625
13626 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13627
5a0e3bd0
JB
136282007-08-23 Joel Brobecker <brobecker@adacore.com>
13629
13630 * configure.ac: Switch license to GPLv3.
13631
f88c79e6
MS
136322007-08-01 Michael Snyder <msnyder@access-company.com>
13633
13634 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13635
6b3d9b83
PA
136362007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13637
13638 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13639 typedef.
13640 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13641 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13642 CloseToolhelp32Snapshot.
13643 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13644 CloseToolhelp32Snapshot.
13645
c588c53c
MS
136462007-07-27 Michael Snyder <michael.snyder@access-company.com>
13647
13648 * server.c (main): Check for inferior exit before main loop.
13649
aa0403d9
PA
136502007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13651
13652 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13653 instead of on tmp_desc.
13654
255e7678
DJ
136552007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13656 Daniel Jacobowitz <dan@codesourcery.com>
13657
13658 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13659 (add_thread): Minor cleanups.
13660 (clear_inferiors): Move lower in the file. Clear the DLL
13661 list.
13662 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13663 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13664 (xml_escape_text): New.
13665 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13666 for qSupported.
13667 (handle_v_cont): Report errors.
13668 (gdbserver_version): Update.
13669 (main): Correct size of own_buf. Do not report initial DLL events.
13670 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13671 (unloaded_dll, xml_escape_text): New.
13672 * win32-low.c (enum target_waitkind): Update comments.
13673 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13674 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13675 (win32_EnumProcessModules, win32_GetModuleInformation)
13676 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13677 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13678 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13679 (win32_Module32First, win32_Module32Next, load_toolhelp)
13680 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13681 (get_child_debug_event): Handle DLL events.
13682 (win32_wait): Likewise.
13683
0d37add9
DJ
136842007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13687 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13688
45e2715e
PA
136892007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13690
13691 * win32-low.c (handle_output_debug_string): Ignore event if not
13692 waiting.
13693
c5674cf1
PA
136942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13695
13696 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13697
2bbe3cc1
DJ
136982007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13701
ae13219e
DJ
137022007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13703
13704 * inferiors.c (change_inferior_id): Add comment.
13705 * linux-low.c (check_removed_breakpoint): Add an early
13706 prototype. Improve debug output.
13707 (linux_attach): Doc update.
13708 (linux_detach_one_process, linux_detach): Clean up before releasing
13709 each process.
13710 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13711 * linux-low.h (struct process_info): Doc improvement.
13712 * mem-break.c (delete_all_breakpoints): New.
13713 * mem-break.h (delete_all_breakpoints): New prototype.
13714 * thread-db.c (find_first_thread): New.
13715 (thread_db_create_event): Call it instead of
13716 thread_db_find_new_threads. Clean up unused variables.
13717 (maybe_attach_thread): Remove first thread handling.
13718 (thread_db_find_new_threads): Use find_first_thread.
13719 (thread_db_get_tls_address): Likewise.
13720
4105de34
DJ
137212007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13722
13723 * thread-db.c (thread_db_find_new_threads): Add prototype.
13724 (thread_db_create_event): Check for the main thread before adding
13725 a new thread.
13726 (maybe_attach_thread): Only enable event reporting if TID == 0.
13727 (thread_db_get_tls_address): Check for new threads.
13728
2b876972
DJ
137292007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * linux-low.c (linux_create_inferior): Try execv before execvp.
13732 * spu-low.c (spu_create_inferior): Likewise.
13733
7a245884
DJ
137342007-06-13 Mike Frysinger <vapier@gentoo.org>
13735
13736 * linux-low.c (linux_create_inferior): Change execv to execvp.
13737 * spu-low.c (spu_create_inferior): Likewies.
13738
117ce543
DJ
137392007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13740
13741 * Makefile.in (clean): Clean new files instead of deleted ones.
13742 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13743 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13744 rules.
13745 * configure.srv: Specify XML files and new regformats for MIPS and
13746 MIPS64 GNU/Linux.
13747 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13748 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13749 an entry for the restart register.
13750 (mips_cannot_fetch_register, mips_cannot_store_register)
13751 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13752 register names to match the XML descriptions.
13753 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13754 restart register instead of $0.
13755
0e7f50da
UW
137562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13757 Markus Deuling <deuling@de.ibm.com>
13758
13759 * remote-utils.c (decode_xfer_write): New function.
13760 * server.h (decode_xfer_write): Add prototype.
13761 * server.c (handle_query): Add PACKET_LEN argument. Support
13762 qXfer:spu:read and qXfer:spu:write packets.
13763 (main): Pass packet_len to handle_query.
13764 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13765 * target.h (target_ops): Add qxfer_spu.
13766
374c1d38
UW
137672007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13768
13769 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13770 accessing non-seekable spufs files.
13771
bb63802a
UW
137722007-05-16 Markus Deuling <deuling@de.ibm.com>
13773
889bf7c5 13774 * server.c (handle_query): Add reply for qC packet.
bb63802a 13775
7390519e
PA
137762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13777 Leo Zayas <lerele@champenstudios@com>
13778
13779 * server.h (check_remote_input_interrupt_request): New function.
13780 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13781 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13782 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13783 (check_remote_input_interrupt_request): New function.
13784 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13785 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13786 winapi_GenerateConsoleCtrlEvent): New typedefs.
13787 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13788 to 250 ms.
13789 (win32_wait): Check for remote interrupt request
13790 with check_remote_input_interrupt_request.
13791 (win32_request_interrupt): New function.
13792 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13793
34b34921
PA
137942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13795
13796 * win32-low.c (debug_registers_changed,
13797 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13798 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13799 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13800 (thread_rec): Get context using the low target.
13801 (child_add_thread): Call thread_added on the low target,
13802 which does the same thing.
13803 (regptr): Delete.
13804 (do_initial_child_stuff): Remove debug registers references.
13805 Set context using the low target. Resume threads after
13806 setting the contexts.
13807 (child_continue): Remove dead variable. Remove debug
13808 registers references.
13809 (child_fetch_inferior_registers): Go through the low target.
13810 (do_child_store_inferior_registers): Remove.
13811 (child_store_inferior_registers): Go through the low target.
13812 (win32_resume): Remove debug registers references.
13813 Set context using the low target.
13814 (handle_exception): Change return type to void. Don't record
13815 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13816 first chance exception.
889bf7c5 13817 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13818 goto loop. Always return after waiting for debug event.
13819 (win32_wait): Convert to switch statement. Handle spurious
13820 events.
13821
13822 * win32-i386-low.c (debug_registers_changed,
13823 debug_registers_used): New.
13824 (initial_stuff): Rename to ...
13825 (i386_initial_stuff): ... this. Clear debug registers
13826 state variables.
13827 (store_debug_registers): Delete.
13828 (i386_get_thread_context): New.
13829 (load_debug_registers): Delete.
13830 (i386_set_thread_context): New.
13831 (i386_thread_added): New.
13832 (single_step): Rename to ...
13833 (i386_single_step): ... this.
13834 (do_fetch_inferior_registers): Rename to ...
13835 (i386_fetch_inferior_register): ... this.
13836 (i386_store_inferior_register): New.
13837 (the_low_target): Adapt to new interface.
13838
13839 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13840 (arm_get_thread_context): New.
13841 (arm_set_thread_context): New.
13842 (regptr): New.
13843 (do_fetch_inferior_registers): Rename to ...
13844 (arm_fetch_inferior_register): ... this.
13845 (arm_store_inferior_register): New.
13846 (arm_wince_breakpoint): Reimplement as unsigned long.
13847 (arm_wince_breakpoint_len): Define.
13848 (the_low_target): Adapt to new interface.
13849
13850 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13851 load_debug_registers. Add get_thread_context, set_thread_context,
13852 thread_added and store_inferior_register. Rename
13853 fetch_inferior_registers to fetch_inferior_register.
13854 (regptr): Remove declaration.
13855
dd6953e1
PA
138562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13857
13858 * linux-low.c (linux_detach): Change return type to int. Return 0.
13859 * spu-low.c (spu_detach): Likewise.
13860
444d6139
PA
138612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13862
13863 * target.h (target_ops): Change return type of detach to int.
13864 Add join.
13865 (join_inferior): New.
13866 * server.c (main): Don't skip detach support on mingw32.
13867 If the inferior doesn't support detaching return error.
13868 Call join_inferior instead of using waitpid.
13869 * linux-low.c (linux_join): New.
13870 (linux_target_op): Add linux_join.
13871 * spu-low.c (spu_join): New.
13872 (spu_target_ops): Add spu_join.
13873 * win32-low.c (win32_detach): Adapt to new interface.
13874 Reopen current_process_handle before detaching. Issue a child
13875 resume before detaching.
13876 (win32_join): New.
13877 (win32_target_op): Add win32_join.
13878
1d5315fe
PA
138792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13880
13881 * win32-low.c (win32-attach): Fix return value.
13882 * target.h (target_ops): Describe ATTACH return values.
13883
bf914831
PA
138842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13885
13886 * win32-low.c (GETPROCADDRESS): Define.
13887 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13888 (winapi_DebugSetProcessKillOnExit): Likewise.
13889 (win32_create_inferior): Force usage of ansi CreateProcessA.
13890 (win32_attach): Use GETPROCADDRESS.
13891 (win32_detach): Likewise.
13892
f72f3e60
PA
138932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13894
13895 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13896
ed50f18f
PA
138972007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13898
13899 * win32-low.c: Commit leftover changes from 2007-03-29.
13900
0c2ead7e
DJ
139012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13902
13903 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13904 fields short instead of int. Add explicit padding.
13905 (i387_cache_to_fsave): Remove unnecessary casts.
13906 (i387_fsave_to_cache): Doc fix.
13907 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13908
73725ff3
DJ
139092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13912 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13913
d99f33d8
PA
139142007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13915
13916 * configure.srv (arm*-*-mingw32ce*): Move near the other
13917 arm targets.
13918
68070c10
PA
139192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13920
2482afc6 13921 * configure.ac: Add errno checking.
68070c10
PA
13922 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13923 sys/file.h and malloc.h.
13924 (AC_CHECK_DECLS): Add perror.
13925 (srv_mingwce): Handle.
2482afc6 13926 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13927 win32-i386-low.o to srv_tgtobj.
13928 (i[34567]86-*-mingw*): Likewise.
13929 (arm*-*-mingw32ce*): Add case.
13930 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13931 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13932 [__MINGW32CE__] (strerror): New function.
13933 [__MINGW32CE__] (errno): Define to GetLastError.
13934 [__MINGW32CE__] (COUNTOF): New macro.
13935 (remote_open): Remove extra close call.
13936 * mem-break.c (delete_breakpoint_at): New function.
13937 * mem-break.h (delete_breakpoint_at): Declare.
13938 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13939 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13940 [USE_WIN32API] (read, write): Add char* casts.
13941 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13942 * server.h: Include wincecompat.h on Windows CE.
13943 [HAVE_ERRNO_H]: Check.
13944 (perror): Declare if not declared.
13945 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13946 (perror_with_name): Remove errno declaration.
13947 * wincecompat.h: New.
13948 * wincecompat.c: New.
13949 * win32-low.h: New.
13950 * win32-arm-low.c: New.
13951 * win32-i386-low.c: New.
13952 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13953 (OUTMSG2): Make it safe.
13954 (_T): New macro.
13955 (COUNTOF): New macro.
13956 (NUM_REGS): Get it from the low target.
13957 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13958 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13959 (thread_rec): Let low target handle debug registers.
13960 (child_add_thread): Likewise.
13961 (child_init_thread_list): Likewise.
13962 (continue_one_thread): Likewise.
13963 (regptr): New.
13964 (do_child_fetch_inferior_registers): Move to ...
13965 * win32-i386-low.c: ... here, and rename to ...
13966 (do_fetch_inferior_registers): ... this.
889bf7c5 13967 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13968 Go through the low target.
13969 (do_child_store_inferior_registers): Use regptr.
13970 (strwinerror): New function.
13971 (win32_create_inferior): Handle Windows CE.
13972 Use strwinerror instead of strerror on Windows error
13973 codes. Add program to the error output.
13974 Don't close the main thread handle on Windows CE.
13975 (win32_attach): Use coredll.dll on Windows CE.
13976 (win32_kill): Close current process and current
13977 thread handles.
13978 (win32_detach): Use coredll.dll on Windows CE.
13979 (win32_resume): Let low target handle debug registers, and
13980 step request.
13981 (handle_exception): Add/Remove initial breakpoint. Avoid
13982 non-existant WSTOPSIG on Windows CE.
13983 (win32_read_inferior_memory): Cast to remove warning.
13984 (win32_arch_string): Go through the low target.
13985 (initialize_low): Call set_breakpoint_data with the low
13986 target's breakpoint.
13987 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13988 FOP_REGNUM, mappings): Move to ...
13989 * win32-i386-low.c: ... here.
13990 * win32-low.c (win32_thread_info): Move to ...
13991 * win32-low.h: ... here.
13992 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13993 win32-arm-low.c and wincecompat.c.
13994 (all:): Add $EXEEXT.
13995 (install-only:): Likewise.
13996 (gdbserver:): Likewise.
13997 (gdbreplay:): Likewise.
13998 * config.in: Regenerate.
13999 * configure: Regenerate.
14000
41093d81
PA
140012007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14002
14003 * win32-low.c: Rename typedef thread_info to
14004 win32_thread_info throughout.
14005
544afa54
PA
140062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14007
14008 * win32-i386-low.c: Rename to ...
14009 * win32-low.c: ... this.
14010 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14011 * Makefile.in: Likewise.
14012
bce7165d
PA
140132007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14014
14015 * remote-utils.c (monitor_output): Constify msg parameter.
14016 * server.h (monitor_output): Likewise.
14017 * win32-i386-low.c (handle_output_debug_string): New.
14018 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14019 handle_output_debug_string.
14020 (get_child_debug_event): Likewise.
14021
506c7aa0
DJ
140222007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14023
14024 * server.c (main): Correct strtoul check.
14025
42c81e2a
DJ
140262007-03-27 Jon Ringle <jon@ringle.org>
14027
14028 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14029
9453113a
DJ
140302007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14031
14032 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14033
64a69107
DJ
140342007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14035
14036 * terminal.h: Check HAVE_SGTTY_H.
14037
140382007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14039
14040 * remote-utils.c (remote_open): Print out the assigned port number.
14041
c74d0ad8
DJ
140422007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * remote-utils.c (monitor_output): New function.
14045 * server.c (debug_threads): Define here.
14046 (monitor_show_help): New function.
14047 (handle_query): Handle qRcmd.
14048 (main): Do not handle 'd' packet.
14049 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14050 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14051 of debug_threads.
14052
de7c3b4a
PA
140532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14054
14055 * Makefile.in (EXEEXT): New.
14056 (clean): Use $(EXEEXT).
14057
ef57601b
PA
140582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14059
14060 * target.h (target_ops): Rename send_signal to request_interrupt,
14061 and remove enum target_signal parameter.
14062 * linux-low.c (linux_request_interrupt): Rename from
14063 linux_send_signal, and always send SIGINT.
14064 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14065 and always send SIGINT.
14066 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14067 of send_signal.
14068 (input_interrupt): Likewise.
14069
820f2bda
PA
140702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14071
14072 * server.c (get_features_xml): Check if target implemented
14073 arch_string.
14074 * win32-i386-low.c (win32_arch_string): New.
14075 (win32_target_ops): Add win32_arch_string as arch_string member.
14076
ab39bf24
UW
140772007-02-22 Markus Deuling <deuling@de.ibm.com>
14078
14079 * spu-low.c (spu_arch_string): New.
14080 (spu_target_ops): Add spu_arch_string.
14081
61ff6e04
DJ
140822007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14085 * configure.ac: Do not check for terminal.h.
14086 * configure, config.in: Regenerated.
14087
fb1e4ffc
DJ
140882007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * Makefile.in (OBS): Add $(XML_BUILTIN).
14091 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14092 (clean): Update.
14093 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14094 (arm-with-iwmmxt.c): New.
14095 * config.in, configure: Regenerate.
14096 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14097 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14098 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14099 (arm*-*-linux*): Add iWMMXt and regset support.
14100 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14101 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14102 (arm_store_wmmxregset, target_regsets): New.
14103 * server.c (get_features_xml): Take annex argument. Check builtin
14104 XML documents.
14105 (handle_query): Handle multiple annexes.
14106
0f48aa01
DJ
141072007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14108
14109 * remote-utils.c [USE_WIN32API] (read, write): Define.
14110 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14111 write.
14112
23181151
DJ
141132007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * linux-i386-low.c (the_low_target): Set arch_string.
14116 * linux-x86-64-low.c (the_low_target): Likewise.
14117 * linux-low.c (linux_arch_string): New.
14118 (linux_target_ops): Add it.
14119 * linux-low.h (struct linux_target_ops): Add arch_string.
14120 * server.c (write_qxfer_response): Use const void * for DATA.
14121 (get_features_xml): New.
14122 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14123 * target.h (struct target_ops): Add arch_string method.
14124
9d606399
DJ
141252007-01-03 Denis Pilat <denis.pilat@st.com>
14126 Daniel Jacobowitz <dan@codesourcery.com>
14127
14128 * linux-low.c (linux_kill): Handle being called with no threads.
14129 * win32-i386-low.c (win32_kill): Likewise.
14130 (get_child_debug_event): Clear current_process_handle.
14131
141322006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14133 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * remote-utils.c (remote_open): Check the type of specified
14136 serial port devices before opening them.
14137 * server.c (main): Kill the inferior if an error occurs during
14138 the first remote_open.
14139
a5e13d24
DJ
141402006-12-05 Markus Deuling <deuling@de.ibm.com>
14141
14142 * README: Update supported targets.
14143
186947f7
DJ
141442006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14145
14146 * Makefile.in (clean): Remove reg-mips64.c.
14147 (reg-mips64.c, reg-mips64.o): New rules.
14148 * configure.srv: Handle mips64. Include regset support for mips.
14149 * linux-mips-low.c (union mips_register): New.
14150 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14151 (mips_breakpoint, mips_breakpoint_at): Use int.
14152 (mips_collect_register, mips_supply_register)
14153 (mips_collect_register_32bit, mips_supply_register_32bit)
14154 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14155 (mips_store_fpregset, target_regsets): New.
14156 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14157
a13e2c95
UW
141582006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14159
14160 * configure.srv: Add target "spu*-*-*".
14161 * Makefile.in (clean): Remove reg-spu.c.
14162 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14163 * spu-low.c: New file.
14164
cb7283db
DJ
141652006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * configure.ac: Correct td_thr_tls_get_addr test.
14168 * configure: Regenerated.
14169
89be2091
DJ
141702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14171
14172 * linux-low.c (linux_wait_for_event): Reformat. Use the
14173 pass_signals array.
14174 * remote-utils.c (decode_address_to_semicolon): New.
14175 * server.c (pass_signals, handle_general_set): New.
14176 (handle_query): Mention QPassSignals for qSupported.
14177 (main): Call handle_general_set.
14178 * server.h (pass_signals, decode_address_to_semicolon): New.
14179
000ef4f0
DJ
141802006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14181
14182 * server.c (handle_query): Correct error handling for read_auxv.
14183
b7149293
UW
141842005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14185
14186 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14187 and srv_linux_thread_db to yes.
14188 * linux-s390-low.c (s390_fill_gregset): New function.
14189 (target_regsets): Define data structure.
14190
dae5f5cf
DJ
141912006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14194 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14195 * config.in, configure: Regenerated.
14196 * inferiors.c (gdb_id_to_thread): New function.
14197 (gdb_id_to_thread_id): Use it.
14198 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14199 * linux-low.h (struct process_info): Add th member.
14200 (thread_db_get_tls_address): New prototype.
14201 * remote-utils.c (decode_address): Make non-static.
14202 * server.c (handle_query): Handle qGetTLSAddr.
14203 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14204 * target.h (struct target_ops): Add get_tls_address.
14205 * thread-db.c (maybe_attach_thread): Save the thread handle.
14206 (thread_db_get_tls_address): New.
14207
32ca6d61
DJ
142082006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14211 (linux_resume_one_process): Take a siginfo_t *. Update all
14212 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14213 (struct pending_signals): Add a siginfo_t.
14214 (linux_wait_for_process): Always set last_status.
14215 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14216 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14217 * linux-low.h (struct process_info): Add last_status.
14218
5ffff7c1
DJ
142192006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * remote-utils.c (try_rle): New function.
14222 (putpkt_binary): Use it.
14223
8695c747
DJ
142242006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14225
14226 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14227 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14228 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14229 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14230 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14231 point registers.
14232
290fadea
RS
142332006-08-08 Richard Sandiford <richard@codesourcery.com>
14234
14235 * server.c (terminal_fd): New variable.
14236 (old_foreground_pgrp): Likewise.
14237 (restore_old_foreground_pgrp): New function.
14238 (start_inferior): Record the terminal file descriptor in terminal_fd
14239 and its original foreground group in old_foreground_pgrp. Register
14240 restore_old_foreground_pgrp with atexit().
14241
9f2e1e63
DJ
142422006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14243
14244 * server.c (handle_query): Correct qPart to qXfer.
14245
b80864fb
DJ
142462006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14247
14248 * configure.ac: Check for more headers which are missing on
14249 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14250 * configure.srv: Add Cygwin and mingw32.
14251 * remote-utils.c: Don't include headers unconditionally which
14252 are missing on mingw32. Include <winsock.h> for mingw32.
14253 (remote_open): Adjust for mingw32 support. Flush
14254 standard error after writing to it.
14255 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14256 (unblock_async_io, enable_async_io, disable_async_io)
14257 (readchar, getpkt): Update for Winsock support.
14258 (prepare_resume_reply): Expect a protocol signal number.
14259 * server.c: Disable <sys/wait.h> on mingw32.
14260 (start_inferior): Adjust for mingw32 support. Flush
14261 standard error after writing to it.
14262 (attach_inferior): Likewise. Use protocol signal
14263 numbers.
14264 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14265 and names.
14266 * win32-i386-low.c: New file.
14267 * Makefile.in (XM_CLIBS): Set.
14268 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14269 (win32-i386-low.o): New dependency rule.
14270 * linux-low.c (linux_wait): Use target signal numbers.
14271 * target.h (struct target_ops): Doc fix.
14272 * server.h (target_signal_to_name): New prototype.
14273 * gdbreplay.c: Don't include headers unconditionally which
14274 are missing on mingw32. Include <winsock.h> for mingw32.
14275 (remote_close, remote_open): Adjust for Winsock support.
14276 * configure, config.in: Regenerated.
14277
0876f84a
DJ
142782006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14279
14280 * server.c (decode_xfer_read, write_qxfer_response): New.
14281 (handle_query): Take a packet length argument. Handle
14282 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14283 the qSupported response.
14284 (main): Update call to handle_query.
14285
01f9e8fa
DJ
142862006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14287
14288 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14289 (putpkt_binary): Renamed from putpkt and adjusted for binary
14290 data.
14291 (putpkt): New wrapper for putpkt_binary.
14292 (readchar): Don't mask off the high bit.
14293 (decode_X_packet): New function.
14294 * server.c (main): Call putpkt_binary if a handler sets the packet
14295 length. Save the length of the incoming packet. Handle 'X'.
14296 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14297
be2a5f71
DJ
142982006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14299
14300 * server.c (handle_query): Handle qSupported.
14301
ea025f5f
DJ
143022006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14303
14304 * remote-utils.c (all_symbols_looked_up): New variable.
14305 (look_up_one_symbol): Check it.
14306 * server.h (look_up_one_symbol): New declaration.
14307 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14308
9308fc88
DJ
143092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14312 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14313 (PTRACE_GET_THREAD_AREA): Define.
14314 (ps_get_thread_area): New function.
14315
52fb6437
NS
143162006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14317
14318 * configure.srv (m68k*-*-uclinux*): New target.
14319 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14320 (linux_resume_one_process): Remove extraneous cast.
14321 (linux_read_offsets): New.
14322 (linux_target_op): Add linux_read_offsets on mmuless systems.
14323 * server.c (handle_query): Add qOffsets logic.
14324 * target.h (struct target_ops): Add read_offsets.
14325
21b0f40c
DJ
143262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14329 (PTRACE_GET_THREAD_AREA): Define.
14330 (ps_get_thread_area): New function.
14331 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14332 (linux-x86-64-low.o): Update.
14333
0050a760
DJ
143342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14335
14336 * configure.ac: Remove checks for prfpregset_t.
14337 * gdb_proc_service.h: New file.
14338 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14339 new "gdb_proc_service.h".
14340 * proc-service.c: Likewise.
14341 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14342 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14343 * Makefile.in (gdb_proc_service_h): Updated.
14344 * configure, config.in: Regenerated.
14345
b92a518e
DJ
143462006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14347
14348 * remote-utils.c (prepare_resume_reply): Move declaration
14349 of gdb_id_from_wait to the top of the block.
14350
545587ee
DJ
143512006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * linux-low.c (regsets_store_inferior_registers): Read the regset
14354 from the target before filling it.
14355
9db87ebd
DJ
143562006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14357
14358 * server.c (attach_inferior): Return SIGTRAP for a successful
14359 attach.
14360
dd24457d
DJ
143612006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * Makefile.in (OBS): Add version.o.
14364 (STAGESTUFF): Delete.
14365 (version.o): Add dependencies.
14366 (version.c): Replace rule.
14367 (clean): Remove version.c.
14368 * server.c (gdbserver_version): New.
14369 (gdbserver_usage): Use printf.
14370 (main): Handle --version and --help.
14371 * server.h (version, host_name): Add declarations.
14372
6f0f660e
EZ
143732005-12-23 Eli Zaretskii <eliz@gnu.org>
14374
889bf7c5
PA
14375 * linux-arm-low.c:
14376 * linux-arm-low.c:
14377 * inferiors.c:
14378 * i387-fp.h:
14379 * i387-fp.c:
14380 * gdbreplay.c:
14381 * regcache.c:
14382 * proc-service.c:
14383 * mem-break.h:
14384 * mem-break.c:
14385 * linux-x86-64-low.c:
14386 * linux-sh-low.c:
14387 * linux-s390-low.c:
14388 * linux-ppc64-low.c:
14389 * linux-ppc-low.c:
14390 * linux-mips-low.c:
14391 * linux-m68k-low.c:
14392 * linux-m32r-low.c:
14393 * linux-low.h:
14394 * linux-low.c:
14395 * linux-ia64-low.c:
14396 * linux-i386-low.c:
14397 * linux-crisv32-low.c:
14398 * thread-db.c:
14399 * terminal.h:
14400 * target.h:
14401 * target.c:
14402 * server.h:
14403 * server.c:
14404 * remote-utils.c:
14405 * regcache.h:
14406 * utils.c:
14407 * Makefile.in:
14408 * configure.ac:
6f0f660e
EZ
14409 * gdbserver.1: Add (C) after Copyright. Update the FSF
14410 address.
14411
9d1fb177
DJ
144122005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14413
14414 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14415 (arm_breakpoint_at): Recognize both breakpoints.
14416 (the_low_target): Use the correct breakpoint instruction.
14417
011a70c2
DJ
144182005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14419
14420 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14421 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14422 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14423 (the_low_target): Update.
14424
7fb85e41
AS
144252005-10-25 Andreas Schwab <schwab@suse.de>
14426
14427 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14428
14429 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14430 (ia64_num_regs): Reduce to 462.
14431
3db0444b
DJ
144322005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14433
14434 * acinclude.m4: Correct quoting.
14435 * aclocal.m4: Regenerated.
14436
14437 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14438 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14439 (thread_db_init): Call thread_db_err_str.
14440 * configure.ac: Check for TD_VERSION.
14441 * config.in, configure: Regenerated.
14442
bee0189a
DJ
144432005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14444
14445 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14446
e9d25b98
DJ
144472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14448
14449 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14450 is not available. Define HAVE_PTRACE_GETREGS if it is.
14451 * config.in, configure: Regenerated.
14452 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14453 * linux-i386-low.c, linux-m68k-low.c: Update to use
14454 HAVE_PTRACE_GETREGS.
14455 * linux-low.c (regsets_fetch_inferior_registers)
14456 (regsets_store_inferior_registers): Only return 0 if we processed
14457 GENERAL_REGS.
14458 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14459 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14460
a06660f7
DJ
144612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * inferiors.c (struct thread_info): Add gdb_id.
14464 (add_thread): Add gdb_id argument.
14465 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14466 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14467 calls to add_thread.
14468 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14469 * server.c (handle_query): Use thread_to_gdb_id.
14470 (handle_v_cont, main): Use gdb_id_to_thread_id.
14471 * server.h (add_thread): Update prototype.
14472 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14473 prototypes.
14474
5a1f5858
DJ
144752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14478 left-padded registers.
14479 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14480 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14481
e122f1f5
SE
144822005-07-01 Steve Ellcey <sje@cup.hp.com>
14483
14484 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14485 * configure: Regenerate.
14486 * config.in: Regenerate.
14487 * server.h (NEED_DECLARATION_STRERROR):
14488 Replace with !HAVE_DECL_STRERROR.
14489
d592fa2f
DJ
144902005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14491
14492 * linux-low.c (linux_wait, linux_send_signal): Don't test
14493 an unsigned long variable for > 0 if it could be MAX_ULONG.
14494 * server.c (myresume): Likewise.
14495 * target.c (set_desired_inferior): Likewise.
14496
ccbd4912
MK
144972005-06-13 Mark Kettenis <kettenis@gnu.org>
14498
14499 * configure.ac: Simplify and improve check for socklen_t.
14500 * configure, config.in: Regenerate.
14501
f450004a
DJ
145022005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14503
14504 * acconfig.h: Remove.
14505 * configure.ac: Add a test for socklen_t. Use three-argument
14506 AC_DEFINE throughout.
14507 * config.in: Regenerated using autoheader 2.59.
14508 * configure: Regenerated.
14509
14510 * gdbreplay.c (socklen_t): Provide a default.
14511 (remote_open): Use socklen_t.
14512 * remote-utils.c (socklen_t): Provide a default.
14513 (remote_open): Use socklen_t.
14514 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14515 unsigned char.
14516
14517 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14518 char for buffers.
14519 * linux-low.c (linux_read_memory, linux_write_memory)
14520 (linux_read_auxv): Likewise.
14521 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14522 (check_mem_write): Likewise.
14523 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14524 Likewise.
14525 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14526 (registers_from_string, register_data): Likewise.
14527 * server.c (handle_query, main): Likewise.
14528 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14529 (decode_M_packet): Likewise.
14530 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14531 * target.h (struct target_ops): Update read_memory, write_memory,
14532 and read_auxv.
14533 (read_inferior_memory, write_inferior_memory): Update.
14534 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14535 to unsigned char *.
14536 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14537 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14538 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14539 linux-s390-low.c, linux-sh-low.c: Update for changes in
14540 read_inferior_memory and the_low_target->breakpoint.
14541
eee84df1
DJ
145422005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14543
14544 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14545 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14546 * configure.srv: Add powerpc64-*-linux*.
14547 * linux-ppc64-low.c: New file.
14548
45b134e5
OF
145492005-05-23 Orjan Friberg <orjanf@axis.com>
14550
14551 * linux-cris-low.c: New file with support for CRIS.
14552 * linux-crisv32-low.c: Ditto for CRISv32.
14553 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14554 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14555 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14556 reg-crisv32.o, and reg-crisv32.c to make rules.
14557 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14558 recognized targets.
14559
48d93c75
UW
145602005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14561
14562 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14563 of sizeof (PTRACE_XFER_TYPE).
14564 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14565
e013ee27
OF
145662005-05-12 Orjan Friberg <orjanf@axis.com>
14567
889bf7c5 14568 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14569 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14570 pointers for hardware watchpoint support.
14571 * linux-low.h (struct linux_target_ops): Ditto.
14572 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14573 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14574 to linux_target_ops.
14575 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14576 reply packet.
14577 * server.c (main): Recognize 'Z' and 'z' packets.
14578
b0ded00b
UW
145792005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14580
14581 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14582 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14583 (the_low_target): Add new members.
14584
8643e2ad
DJ
145852005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * proc-service.c (ps_lgetregs): Search all_processes instead of
14588 all_threads.
14589
fc620387
DJ
145902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14591
14592 * server.c (start_inferior): Change return type to int.
14593 (attach_inferior): Change sigptr to int *.
14594 (handle_v_cont, handle_v_requests): Change signal to int *.
14595 (main): Change signal to int.
14596
145972005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14598
14599 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14600 * configure.srv: Add m32r*-*-linux*.
14601 * linux-m32r-low.c: New file.
14602
e0e76420
DJ
146032005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14604
14605 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14606
a1928bad
DJ
146072005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14608
14609 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14610 Take unsigned long arguments for PIDs.
14611 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14612 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14613 (wait_for_sigstop, linux_resume_one_process)
14614 (regsets_fetch_inferior_registers, linux_send_signal)
14615 (linux_read_auxv): Likewise. Update the types of variables holding
14616 PIDs. Update format string specifiers.
14617 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14618 * remote-utils.c (prepare_resume_reply): Likewise.
14619 * server.c (cont_thread, general_thread, step_thread)
14620 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14621 unsigned long.
14622 (handle_query): Update format specifiers.
14623 (handle_v_cont, main): Use strtoul for thread IDs.
14624 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14625 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14626 (general_thread, step_thread, thread_from_wait)
14627 (old_thread_from_wait): Update.
14628 * target.h (struct thread_resume): Use unsigned long for THREAD.
14629 (struct target_ops): Use unsigned long for arguments to attach and
14630 thread_alive.
14631
dcdb98d2
DJ
146322005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14633
14634 * acinclude.m4: Include bfd/bfd.m4 directly.
14635 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14636 <agriffis@toolchain.org>.
14637 * aclocal.m4, configure: Regenerated.
14638
bec39cab
AC
146392005-01-07 Andrew Cagney <cagney@gnu.org>
14640
14641 * configure.ac: Rename configure.in, require autoconf 2.59.
14642 * configure: Re-generate.
14643
434c4c77
DJ
146442004-12-08 Daniel Jacobowitz <dan@debian.org>
14645
14646 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14647 LIBS when finished.
14648 * aclocal.m4: Regenerated.
14649 * configure: Regenerated.
14650
db1d3e1b
AS
146512004-11-21 Andreas Schwab <schwab@suse.de>
14652
14653 * linux-m68k-low.c (m68k_num_gregs): Define.
14654 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14655 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14656 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14657 (m68k_breakpoint_at): New. Add to the_low_target.
14658
14659 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14660 srv_linux_thread_db to yes.
14661
43360365
JB
146622004-10-20 Joel Brobecker <brobecker@gnat.com>
14663
14664 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14665 (ARCH_SET_FS): Likewise.
14666 (ARCH_GET_FS): Likewise.
14667 (ARCH_GET_GS): Likewise.
14668
fd500816
DJ
146692004-10-16 Daniel Jacobowitz <dan@debian.org>
14670
14671 * linux-i386-low.c (ps_get_thread_area): New.
14672 * linux-x86-64-low.c (ps_get_thread_area): New.
14673 * linux-low.c: Include <sys/syscall.h>.
14674 (linux_kill_one_process): Don't kill the first thread here.
14675 (linux_kill): Kill the first thread here.
14676 (kill_lwp): New function.
14677 (send_sigstop, linux_send_signal): Use it.
14678 * proc-service.c: Clean up #ifdefs.
14679 (fpregset_info): Delete.
14680 (ps_lgetregs): Update and enable implementation.
14681 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14682 implementations.
14683 * remote-utils.c (struct sym_cache, symbol_cache): New.
14684 (input_interrupt): Print a clearer message.
14685 (async_io_enabled): New variable.
14686 (enable_async_io, disable_async_io): Use it. Update comments.
14687 (look_up_one_symbol): Use the symbol cache.
14688 * thread-db.c (thread_db_look_up_symbols): New function.
14689 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14690
f6de3c42
DJ
146912004-10-16 Daniel Jacobowitz <dan@debian.org>
14692
14693 * configure.in: Test for -rdynamic.
14694 * configure: Regenerated.
14695 * Makefile (INTERNAL_LDFLAGS): New.
14696 (gdbserver, gdbreplay): Use it.
14697
2c0fc042
AC
146982004-09-02 Andrew Cagney <cagney@gnu.org>
14699
14700 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14701
075b3282
DJ
147022004-03-23 Daniel Jacobowitz <drow@mvista.com>
14703
14704 * linux-low.c (linux_wait): Clear all_processes list also.
14705
fa6a77dc
DJ
147062004-03-12 Daniel Jacobowitz <drow@mvista.com>
14707
14708 * linux-low.c: Include <errno.h>. Remove extern declaration of
14709 errno.
14710
6d782a97
DJ
147112004-03-12 Daniel Jacobowitz <drow@mvista.com>
14712
14713 * gdbreplay.c, server.h, utils.c: Update copyright years.
14714
3a7fb99b
DJ
147152004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14716
14717 * server.c (main): Print child status or termination signal from
14718 variable 'signal', not 'sig'.
14719
c3e735a6
DJ
147202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14721
14722 * linux-low.c (linux_read_memory): Change return type to
14723 int. Check for and return error from ptrace().
14724 * target.c (read_inferior_memory): Change return type to int. Pass
14725 back return status from the_target->read_memory().
14726 * target.h (struct target_ops): Adapt *read_memory() prototype.
14727 Update comment.
14728 (read_inferior_memory): Adapt prototype.
14729 * server.c (main): Return an error packet if
14730 read_inferior_memory() returns an error.
14731
a59d1c82
DJ
147322004-03-04 Daniel Jacobowitz <drow@mvista.com>
14733
14734 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14735 Unify with other clean targets.
14736
dc3f8883
DJ
147372004-02-29 Daniel Jacobowitz <drow@mvista.com>
14738
14739 * server.c (handle_v_cont): Call set_desired_inferior.
14740
89a208da
DJ
147412004-02-29 Daniel Jacobowitz <drow@mvista.com>
14742
14743 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14744
62ea82f5
DJ
147452004-02-29 Daniel Jacobowitz <drow@mvista.com>
14746
14747 * linux-low.c (linux_wait): Unblock async I/O.
14748 (linux_resume): Block and enable async I/O.
14749 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14750 * server.h (block_async_io, unblock_async_io): Add prototypes.
14751
6910d122
DJ
147522004-02-29 Daniel Jacobowitz <drow@mvista.com>
14753
14754 * remote-utils.c (remote_open): Print a status notice after
14755 opening a TCP port.
14756 * server.c (attach_inferior): Print a status notice after
14757 attaching.
14758
147592004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14760
14761 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14762
c89dc5d4
DJ
147632004-02-26 Daniel Jacobowitz <drow@mvista.com>
14764
14765 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14766 error packet.
14767 * server.c, target.h: Update copyright years.
14768
4b8dad4a
RM
147692004-02-25 Roland McGrath <roland@redhat.com>
14770
14771 * target.h (struct target_ops): New member `read_auxv'.
14772 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14773 * linux-low.c (linux_read_auxv): New function.
14774 (linux_target_ops): Initialize `read_auxv' member to that.
14775
d7446758
JB
147762004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14777
14778 Committed by Jim Blandy <jimb@redhat.com>.
14779
14780 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14781 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14782 instead of GPR_SIZE to distiguish s390 and s390x targets.
14783
5544ad89
DJ
147842004-01-31 Daniel Jacobowitz <drow@mvista.com>
14785
14786 * linux-low.c: Update copyright year.
14787 (check_removed_breakpoint): Clear pending_is_breakpoint.
14788 (linux_set_resume_request, linux_queue_one_thread)
14789 (resume_status_pending_p): New functions.
14790 (linux_continue_one_thread): Use process->resume.
14791 (linux_resume): Only resume threads if there are no pending events.
14792 * linux-low.h (struct process_info): Add resume request
14793 pointer.
14794
2a68b70e
DJ
147952004-01-30 Daniel Jacobowitz <drow@mvista.com>
14796
14797 * regcache.c (new_register_cache): Clear the allocated register
14798 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14799
64386c31
DJ
148002003-10-13 Daniel Jacobowitz <drow@mvista.com>
14801
14802 * linux-low.c (linux_resume): Take a struct thread_resume *
14803 argument.
14804 (linux_wait): Update call.
14805 (resume_ptr): New static variable.
14806 (linux_continue_one_thread): Renamed from
14807 linux_continue_one_process. Use resume_ptr.
14808 (linux_resume): Use linux_continue_one_thread.
14809 * server.c (handle_v_cont, handle_v_requests): New functions.
14810 (myresume): New function.
14811 (main): Handle 'v' case.
14812 * target.h (struct thread_resume): New type.
14813 (struct target_ops): Change argument of "resume" to struct
14814 thread_resume *.
14815 (myresume): Delete macro.
14816
c938e9b0
L
148172003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14818
14819 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14820 (uninstall): Support DESTDIR.
14821
7f313d07
BC
14822Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14823
14824 * configure.srv: Add xscale*linux copy of arm*linux entry.
14825
3b2fc2ea
DJ
148262003-07-24 Daniel Jacobowitz <drow@mvista.com>
14827
14828 * linux-arm-low.c (arm_reinsert_addr): New function.
14829 (the_low_target): Add arm_reinsert_addr.
14830
1c0a559e
MK
148312003-07-08 Mark Kettenis <kettenis@gnu.org>
14832
14833 * mem-break.c: Remove whitespace at end of file.
14834
43d5792c
DJ
148352003-06-28 Daniel Jacobowitz <drow@mvista.com>
14836
14837 * configure.in: Check whether we need to prototype strerror.
14838 * server.h: Optionally prototype strerror.
14839 * gdbreplay.c (perror_with_name): Use strerror.
14840 * linux-low.c (linux_attach_lwp): Use strerror.
14841 * utils.c (perror_with_name): Use strerror.
14842 * config.in, configure: Regenerated.
14843
c8a86edf
DJ
148442003-06-28 Daniel Jacobowitz <drow@mvista.com>
14845
14846 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14847 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14848
73d37363
DJ
148492003-06-20 Daniel Jacobowitz <drow@mvista.com>
14850
14851 * Makefile.in (SFILES): Update.
14852 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14853 low-sun3.c: Remove files.
14854
6ad8ae5c
DJ
148552003-06-17 Daniel Jacobowitz <drow@mvista.com>
14856
14857 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14858 (linux_detach_one_process, linux_detach): New functions.
14859 (linux_target_ops): Add linux_detach.
14860 * server.c (main): Handle 'D' packet.
14861 * target.h (struct target_ops): Add "detach" member.
14862 (detach_inferior): Define.
14863
1581182a
MK
148642003-06-13 Mark Kettenis <kettenis@gnu.org>
14865
14866 From Kelley Cook <kelleycook@wideopenwest.com>:
14867 * configure.srv: Accept i[34567]86 variants.
14868
e5379b03
DJ
148692003-06-05 Daniel Jacobowitz <drow@mvista.com>
14870
14871 * linux-low.c (linux_wait_for_event): Correct comment typos.
14872 (linux_resume_one_process): Call check_removed_breakpoint.
14873 (linux_send_signal): New function.
14874 (linux_target_ops): Add linux_send_signal.
14875 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14876 of kill.
14877 * target.h (struct target_ops): Add send_signal.
14878
2ff29de4
JB
148792003-05-29 Jim Blandy <jimb@redhat.com>
14880
14881 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14882 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14883 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14884 away part of the register's value.
14885
254787d4
DJ
148862003-03-26 Daniel Jacobowitz <drow@mvista.com>
14887
14888 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14889 (linux_wait_for_event, linux_init_signals): Likewise.
14890
94e10508
DJ
148912003-03-17 Daniel Jacobowitz <drow@mvista.com>
14892
14893 * configure.in: Check for stdlib.h.
14894 * configure: Regenerated.
14895 * config.in: Regenerated.
14896
4c0711e0
DJ
148972003-01-04 Andreas Schwab <schwab@suse.de>
14898
14899 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14900
ef66e766
AC
149012003-01-02 Andrew Cagney <ac131313@redhat.com>
14902
14903 * Makefile.in: Remove obsolete code.
14904
a1358604
DJ
149052002-11-20 Daniel Jacobowitz <drow@mvista.com>
14906
14907 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14908 defined(PT_FPR0_HI).
14909
23ce3b1c
DJ
149102002-11-17 Stuart Hughes <seh@zee2.com>
14911
14912 * linux-arm-low.c (arm_num_regs): Increase.
14913 (arm_regmap): Include status register.
14914
149152002-11-17 Daniel Jacobowitz <drow@mvista.com>
14916
14917 * linux-low.c (register_addr): Remove incorrect -1 check.
14918
a9fa9f7d
DJ
149192002-08-29 Daniel Jacobowitz <drow@mvista.com>
14920
14921 * linux-low.c (linux_create_inferior): Call setpgid. Return
14922 the new PID.
14923 (unstopped_p, linux_signal_pid): Remove.
14924 (linux_target_ops): Remove linux_signal_pid.
14925 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14926 global instead of target method.
14927 * target.h (struct target_ops): Remove signal_pid. Update comment
14928 for create_inferior.
14929 * server.c (signal_pid): New variable.
14930 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14931 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14932 (attach_inferior): Set signal_pid.
14933
17574093
DJ
149342002-08-23 Daniel Jacobowitz <drow@mvista.com>
14935
14936 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14937
149382002-08-20 Jim Blandy <jimb@redhat.com>
14939
14940 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14941 default for this.
14942
149432002-08-01 Andrew Cagney <cagney@redhat.com>
14944
14945 * Makefile.in: Make chill references obsolete.
14946
149472002-07-24 Kevin Buettner <kevinb@redhat.com>
14948
14949 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14950 * configure: Regenerate.
14951 * config.in: Regenerate.
14952
149532002-07-09 David O'Brien <obrien@FreeBSD.org>
14954
14955 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14956 (perror_with_name, remote_close, remote_open, expect, play): Static.
14957
149582002-07-04 Michal Ludvig <mludvig@suse.cz>
14959
4b8dad4a 14960 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14961 byte offsets instead of an array of indexes.
14962 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14963
149642002-06-13 Daniel Jacobowitz <drow@mvista.com>
14965
14966 * regcache.c: Add comment.
14967
149682002-06-11 Daniel Jacobowitz <drow@mvista.com>
14969
14970 * thread-db.c: New file.
14971 * proc-service.c: New file.
14972 * acinclude.m4: New file.
14973 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14974 proc-service.o, and thread-db.o.
14975 (linux-low.o): Add USE_THREAD_DB.
14976 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14977 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14978 * aclocal.m4: Regenerated.
14979 * config.in: Regenerated.
14980 * configure: Regenerated.
14981 * configure.in: Check for proc_service.h, sys/procfs.h,
14982 thread_db.h, and linux/elf.h headrs.
14983 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14984 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14985 Check for -lthread_db and thread support.
14986 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14987 PowerPC, and SuperH.
14988 * i387-fp.c: Constify arguments.
14989 * i387-fp.h: Likewise.
14990 * inferiors.c: (struct thread_info): Renamed from
14991 `struct inferior_info'. Remove PID member. Use generic inferior
14992 list header. All uses updated.
14993 (inferiors, signal_pid): Removed.
14994 (all_threads): New variable.
14995 (get_thread): Define.
14996 (add_inferior_to_list): New function.
14997 (for_each_inferior): New function.
14998 (change_inferior_id): New function.
14999 (add_inferior): Removed.
15000 (remove_inferior): New function.
15001 (add_thread): New function.
15002 (free_one_thread): New function.
15003 (remove_thread): New function.
15004 (clear_inferiors): Use for_each_inferior and free_one_thread.
15005 (find_inferior): New function.
15006 (find_inferior_id): New function.
15007 (inferior_target_data): Update argument type.
15008 (set_inferior_target_data): Likewise.
15009 (inferior_regcache_data): Likewise.
15010 (set_inferior_regcache_data): Likewise.
15011 * linux-low.c (linux_bp_reinsert): Remove.
15012 (all_processes, stopping_threads, using_thrads)
15013 (struct pending_signals, debug_threads, pid_of): New.
15014 (inferior_pid): Replace with macro.
15015 (struct inferior_linux_data): Remove.
15016 (get_stop_pc, add_process): New functions.
15017 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15018 Use add_process and add_thread.
15019 (linux_attach_lwp): New function, based on old linux_attach. Use
15020 add_process and add_thread. Set stop_expected for new threads.
15021 (linux_attach): New function.
15022 (linux_kill_one_process): New function.
15023 (linux_kill): Kill all LWPs.
15024 (linux_thread_alive): Use find_inferior_id.
15025 (check_removed_breakpoints, status_pending_p): New functions.
15026 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15027 Update. Use WNOHANG. Wait for cloned processes also. Update process
15028 struct for the found process.
15029 (linux_wait_for_event): New function.
15030 (linux_wait): Use it. Support LWPs.
15031 (send_sigstop, wait_for_sigstop, stop_all_processes)
15032 (linux_resume_one_process, linux_continue_one_process): New functions.
15033 (linux_resume): Support LWPs.
15034 (REGISTER_RAW_SIZE): Remove.
15035 (fetch_register): Use register_size instead. Call supply_register.
15036 (usr_store_inferior_registers): Likewise. Call collect_register.
15037 Fix recursive case.
15038 (regsets_fetch_inferior_registers): Improve error message.
15039 (regsets_store_inferior_registers): Add debugging.
15040 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15041 (unstopped_p, linux_signal_pid): New functions.
15042 (linux_target_ops): Add linux_signal_pid.
15043 (linux_init_signals): New function.
15044 (initialize_low): Call it. Initialize using_threads.
15045 * regcache.c (inferior_regcache_data): Add valid
15046 flag.
15047 (get_regcache): Fetch registers lazily. Add fetch argument
15048 and update all callers.
15049 (regcache_invalidate_one, regcache_invalidate): New
15050 functions.
15051 (new_register_cache): Renamed from create_register_cache.
15052 Return the new regcache.
15053 (free_register_cache): Change argument to a void *.
15054 (registers_to_string, registers_from_string): Call get_regcache
15055 with fetch flag set.
15056 (register_data): Make static. Pass fetch flag to get_regcache.
15057 (supply_register): Call get_regcache with fetch flag clear.
15058 (collect_register): Call get_regcache with fetch flag set.
15059 (collect_register_as_string): New function.
15060 * regcache.h: Update.
15061 * remote-utils.c (putpkt): Flush after debug output and use
15062 stderr.
15063 Handle input interrupts while waiting for an ACK.
15064 (input_interrupt): Use signal_pid method.
15065 (getpkt): Flush after debug output and use stderr.
15066 (outreg): Use collect_register_as_string.
15067 (new_thread_notify, dead_thread_notify): New functions.
15068 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15069 and general_thread.
15070 (look_up_one_symbol): Flush after debug output.
15071 * server.c (step_thread, server_waiting): New variables.
15072 (start_inferior): Don't use signal_pid. Update call to mywait.
15073 (attach_inferior): Update call to mywait.
15074 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15075 (main): Don't fetch/store registers explicitly. Use
15076 set_desired_inferior. Support proposed ``Hs'' packet. Update
15077 calls to mywait.
15078 * server.h: Update.
15079 (struct inferior_list, struct_inferior_list_entry): New.
15080 * target.c (set_desired_inferior): New.
15081 (write_inferior_memory): Constify.
15082 (mywait): New function.
15083 * target.h: Update.
15084 (struct target_ops): New signal_pid method.
15085 (mywait): Removed macro, added prototype.
15086
15087 * linux-low.h (regset_func): Removed.
15088 (regset_fill_func, regset_store_func): New.
15089 (enum regset_type): New.
15090 (struct regset_info): Add type field. Use new operation types.
15091 (struct linux_target_ops): stop_pc renamed to get_pc.
15092 Add decr_pc_after_break and breakpoint_at.
15093 (get_process, get_thread_proess, get_process_thread)
15094 (strut process_info, all_processes, linux_attach_lwp)
15095 (thread_db_init): New.
15096
15097 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15098 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15099 (the_low_target): Add new members.
15100 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15101 (i386_store_fpxregset): Constify.
15102 (target_regsets): Add new kind identifier.
15103 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15104 (i386_set_pc): Add debugging.
15105 (i386_breakpoint_at): New function.
15106 (the_low_target): Add new members.
15107 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15108 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15109 (mips_breakpoint_at): New.
15110 (the_low_target): Add new members.
15111 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15112 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15113 (the_low_target): Add new members.
15114 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15115 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15116 (the_low_target): Add new members.
15117 * linux-x86-64-low.c (target_regsets): Add new kind
15118 identifier.
15119
151202002-05-15 Daniel Jacobowitz <drow@mvista.com>
15121
15122 From Martin Pool <mbp@samba.org>:
15123 * server.c (gdbserver_usage): New function.
15124 (main): Call it.
15125
151262002-05-14 Daniel Jacobowitz <drow@mvista.com>
15127
15128 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15129 stop_at -> stop_pc.
15130
151312002-05-04 Andrew Cagney <ac131313@redhat.com>
15132
15133 * Makefile.in: Remove obsolete code.
15134
151352002-04-24 Michal Ludvig <mludvig@suse.cz>
15136
15137 * linux-low.c (regsets_fetch_inferior_registers),
15138 (regsets_store_inferior_registers): Removed cast to int from
15139 ptrace() calls.
15140 * regcache.h: Added declaration of struct inferior_info.
15141
151422002-04-20 Daniel Jacobowitz <drow@mvista.com>
15143
15144 * inferiors.c (struct inferior_info): Add regcache_data.
15145 (add_inferior): Call create_register_cache.
15146 (clear_inferiors): Call free_register_cache.
15147 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15148 * regcache.c (struct inferior_regcache_data): New.
15149 (registers): Remove.
15150 (get_regcache): New function.
15151 (create_register_cache, free_register_cache): New functions.
15152 (set_register_cache): Don't initialize the register cache here.
15153 (registers_to_string, registers_from_string, register_data): Call
15154 get_regcache.
15155 * regcache.h: Add prototypes.
15156 * server.h: Likewise.
15157
151582002-04-20 Daniel Jacobowitz <drow@mvista.com>
15159
15160 * mem-break.c: New file.
15161 * mem-break.h: New file.
15162 * Makefile.in: Add mem-break.o rule; update server.h
15163 dependencies.
15164 * inferiors.c (struct inferior_info): Add target_data
15165 member.
15166 (clear_inferiors): Free target_data member if set.
15167 (inferior_target_data, set_inferior_target_data): New functions.
15168 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15169 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15170 * linux-low.c (linux_bp_reinsert): New variable.
15171 (struct inferior_linux_data): New.
15172 (linux_create_inferior): Use set_inferior_target_data.
15173 (linux_attach): Likewise. Call add_inferior.
15174 (linux_wait_for_one_inferior): New function.
15175 (linux_wait): Call it.
15176 (linux_write_memory): Add const.
15177 (initialize_low): Call set_breakpoint_data.
15178 * linux-low.h (struct linux_target_ops): Add breakpoint
15179 handling members.
15180 * server.c (attach_inferior): Remove extra add_inferior
15181 call.
15182 * server.h: Include mem-break.h. Update inferior.c
15183 prototypes.
15184 * target.c (read_inferior_memory)
15185 (write_inferior_memory): New functions.
15186 * target.h (read_inferior_memory)
15187 (write_inferior_memory): Change macros to prototypes.
15188 (struct target_ops): Update comments. Add const to write_memory
15189 definition.
15190
151912002-04-11 Daniel Jacobowitz <drow@mvista.com>
15192
15193 * linux-low.c (usr_store_inferior_registers): Support
15194 registers which are allowed to fail to store.
15195 * linux-low.h (linux_target_ops): Likewise.
15196 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15197 (ppc_cannot_store_register): FPSCR may not be storable.
15198
151992002-04-09 Daniel Jacobowitz <drow@mvista.com>
15200
15201 * server.h: Include <string.h> if HAVE_STRING_H.
15202 * ChangeLog: Correct paths in last ChangeLog entry.
15203
152042002-04-09 Daniel Jacobowitz <drow@mvista.com>
15205
15206 * linux-low.h: Remove obsolete prototypes.
15207 (struct linux_target_ops): New.
15208 (extern the_low_target): New.
15209 * linux-low.c (num_regs, regmap): Remove declarations.
15210 (register_addr): Use the_low_target explicitly.
15211 (fetch_register): Likewise.
15212 (usr_fetch_inferior_registers): Likewise.
15213 (usr_store_inferior_registers): Likewise.
15214 * linux-arm-low.c (num_regs): Remove.
15215 (arm_num_regs): Define.
15216 (arm_regmap): Renamed from regmap, made static.
15217 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15218 made static.
15219 (arm_cannot_store_register): Renamed from cannot_store_register,
15220 made static.
15221 (the_low_target): New.
15222 * linux-i386-low.c (num_regs): Remove.
15223 (i386_num_regs): Define.
15224 (i386_regmap): Renamed from regmap, made static.
15225 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15226 made static.
15227 (i386_cannot_store_register): Renamed from cannot_store_register,
15228 made static.
15229 (the_low_target): New.
15230 * linux-ia64-low.c (num_regs): Remove.
15231 (ia64_num_regs): Define.
15232 (ia64_regmap): Renamed from regmap, made static.
15233 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15234 made static.
15235 (ia64_cannot_store_register): Renamed from cannot_store_register,
15236 made static.
15237 (the_low_target): New.
15238 * linux-m68k-low.c (num_regs): Remove.
15239 (m68k_num_regs): Define.
15240 (m68k_regmap): Renamed from regmap, made static.
15241 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15242 made static.
15243 (m68k_cannot_store_register): Renamed from cannot_store_register,
15244 made static.
15245 (the_low_target): New.
15246 * linux-mips-low.c (num_regs): Remove.
15247 (mips_num_regs): Define.
15248 (mips_regmap): Renamed from regmap, made static.
15249 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15250 made static.
15251 (mips_cannot_store_register): Renamed from cannot_store_register,
15252 made static.
15253 (the_low_target): New.
15254 * linux-ppc-low.c (num_regs): Remove.
15255 (ppc_num_regs): Define.
15256 (ppc_regmap): Renamed from regmap, made static.
15257 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15258 made static.
15259 (ppc_cannot_store_register): Renamed from cannot_store_register,
15260 made static.
15261 (the_low_target): New.
15262 * linux-s390-low.c (num_regs): Remove.
15263 (s390_num_regs): Define.
15264 (s390_regmap): Renamed from regmap, made static.
15265 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15266 made static.
15267 (s390_cannot_store_register): Renamed from cannot_store_register,
15268 made static.
15269 (the_low_target): New.
15270 * linux-sh-low.c (num_regs): Remove.
15271 (sh_num_regs): Define.
15272 (sh_regmap): Renamed from regmap, made static.
15273 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15274 made static.
15275 (sh_cannot_store_register): Renamed from cannot_store_register,
15276 made static.
15277 (the_low_target): New.
15278 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15279 (the_low_target): New.
15280
152812002-04-09 Daniel Jacobowitz <drow@mvista.com>
15282
15283 * Makefile.in: Add stamp-h target.
15284 * configure.in: Create stamp-h.
15285 * configure: Regenerated.
15286
152872002-04-09 Daniel Jacobowitz <drow@mvista.com>
15288
15289 * inferiors.c: New file.
15290 * target.c: New file.
15291 * target.h: New file.
15292 * Makefile.in: Add target.o and inferiors.o. Update
15293 dependencies.
15294 * linux-low.c (inferior_pid): New static variable,
15295 moved from server.c.
15296 (linux_create_inferior): Renamed from create_inferior.
15297 Call add_inferior. Return 0 on success instead of a PID.
15298 (linux_attach): Renamed from myattach.
15299 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15300 (linux_thread_alive): Renamed from mythread_alive.
15301 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15302 child dies.
15303 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15304 (regsets_store_inferior_registers): Correct error message.
15305 Add missing ``return 0''.
15306 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15307 (linux_store_registers): Renamed from store_inferior_registers.
15308 (linux_read_memory): Renamed from read_inferior_memory.
15309 (linux_write_memory): Renamed from write_inferior_memory.
15310 (linux_target_ops): New structure.
15311 (initialize_low): Call set_target_ops ().
15312 * remote-utils.c (unhexify): New function.
15313 (hexify): New function.
15314 (input_interrupt): Send signals to ``signal_pid''.
15315 * server.c (inferior_pid): Remove.
15316 (start_inferior): Update create_inferior call.
15317 (attach_inferior): Call add_inferior.
15318 (handle_query): New function.
15319 (main): Call handle_query for `q' packets.
15320 * server.h: Include "target.h". Remove obsolete prototypes.
15321 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15322
153232002-04-09 Daniel Jacobowitz <drow@mvista.com>
15324
15325 * Makefile.in: Add WARN_CFLAGS. Update configury
15326 dependencies.
15327 * configure.in: Check for <string.h>
15328 * configure: Regenerate.
15329 * config.in: Regenerate.
15330 * gdbreplay.c: Include needed system headers.
15331 (remote_open): Remove strchr prototype.
15332 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15333 * regcache.c (supply_register): Change buf argument to const void *.
15334 (supply_register_by_name): Likewise.
15335 (collect_register): Change buf argument to void *.
15336 (collect_register_by_name): Likewise.
15337 * regcache.h: Add missing prototypes.
15338 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15339 * server.c (handle_query): New function.
15340 (attached): New static variable, moved out of main.
15341 (main): Quiet longjmp clobber warnings.
15342 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15343 * utils.c (error): Remove NORETURN.
15344 (fatal): Likewise.
This page took 2.473193 seconds and 4 git commands to generate.